diff --git a/README.md b/README.md index afa532637..0e86bacd2 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ SDK code examples for each supported language, organized by version, platform, a | Version | Specs | Examples | |---------|-------|----------| | latest | [specs/latest](specs/latest) | - | +| 2.3.x | [specs/2.3.x](specs/2.3.x) | [examples/2.3.x](examples/2.3.x) | | 2.2.x | [specs/2.2.x](specs/2.2.x) | [examples/2.2.x](examples/2.2.x) | | 2.1.x | [specs/2.1.x](specs/2.1.x) | [examples/2.1.x](examples/2.1.x) | | 2.0.x | [specs/2.0.x](specs/2.0.x) | [examples/2.0.x](examples/2.0.x) | @@ -70,17 +71,17 @@ You can use these specs with any OpenAPI-compatible tool. For example, to genera ```bash # Download the spec -curl -O https://raw.githubusercontent.com/appwrite/specs/main/specs/2.2.x/open-api3-2.2.x.json +curl -O https://raw.githubusercontent.com/appwrite/specs/main/specs/2.3.x/open-api3-2.3.x.json # The document covers every platform. Keep the operations available to one of # them (client, server or console) by filtering on x-appwrite.platforms. jq --arg platform server ' .paths |= (map_values(with_entries(select(.value["x-appwrite"].platforms | index($platform)))) | with_entries(select(.value | length > 0))) -' open-api3-2.2.x.json > open-api3-2.2.x-server.json +' open-api3-2.3.x.json > open-api3-2.3.x-server.json # Generate a client -openapi-generator generate -i open-api3-2.2.x-server.json -g python -o ./sdk +openapi-generator generate -i open-api3-2.3.x-server.json -g python -o ./sdk ``` Or import directly into tools like [Postman](https://www.postman.com/), [Insomnia](https://insomnia.rest/), or [Swagger UI](https://swagger.io/tools/swagger-ui/). @@ -94,7 +95,7 @@ Each example file is a Markdown document showing how to call a specific API meth Specs and examples are generated from the [appwrite/appwrite](https://github.com/appwrite/appwrite) codebase using the `specs` CLI task: ```bash -php app/cli.php specs --version=2.2.x --git=yes --message="Update specs for 2.2.x" +php app/cli.php specs --version=2.3.x --git=yes --message="Update specs for 2.3.x" ``` The task writes the API specification for that version, regenerates SDK examples for every supported language, and opens a PR in this repository. Releases run it through Appwrite's deployment automation rather than by hand, which is why the PRs here are authored by a bot. diff --git a/examples/2.3.x/client-android/java/account/create-anonymous-session.md b/examples/2.3.x/client-android/java/account/create-anonymous-session.md new file mode 100644 index 000000000..4d99edf85 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-anonymous-session.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createAnonymousSession(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/account/create-email-password-session.md b/examples/2.3.x/client-android/java/account/create-email-password-session.md new file mode 100644 index 000000000..fa7d25235 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-email-password-session.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailPasswordSession( + "email@example.com", // email + "password", // password + 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/account/create-email-token.md b/examples/2.3.x/client-android/java/account/create-email-token.md new file mode 100644 index 000000000..b65178373 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-email-token.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailToken( + "", // userId + "email@example.com", // email + false, // phrase (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/account/create-email-verification-otp.md b/examples/2.3.x/client-android/java/account/create-email-verification-otp.md new file mode 100644 index 000000000..951b4bd87 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-email-verification-otp.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailVerificationOTP( + false, // phrase (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/account/create-email-verification.md b/examples/2.3.x/client-android/java/account/create-email-verification.md new file mode 100644 index 000000000..c8099477f --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-email-verification.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailVerification( + "https://example.com", // url + 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/account/create-id-token-session.md b/examples/2.3.x/client-android/java/account/create-id-token-session.md new file mode 100644 index 000000000..457b9fee6 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-id-token-session.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.IdTokenProvider; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createIdTokenSession( + IdTokenProvider.APPLE, // provider + "", // idToken + "", // nonce (optional) + "", // accessToken (optional) + 0, // accessTokenExpiry (optional) + "", // name (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/account/create-jwt.md b/examples/2.3.x/client-android/java/account/create-jwt.md new file mode 100644 index 000000000..f405d3066 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-jwt.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createJWT( + 0, // duration (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/account/create-magic-url-token.md b/examples/2.3.x/client-android/java/account/create-magic-url-token.md new file mode 100644 index 000000000..e087ea80c --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-magic-url-token.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMagicURLToken( + "", // userId + "email@example.com", // email + "https://example.com", // url (optional) + false, // phrase (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/account/create-mfa-authenticator.md b/examples/2.3.x/client-android/java/account/create-mfa-authenticator.md new file mode 100644 index 000000000..a87f0101c --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-mfa-authenticator.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMFAAuthenticator( + AuthenticatorType.TOTP, // type + 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/account/create-mfa-challenge.md b/examples/2.3.x/client-android/java/account/create-mfa-challenge.md new file mode 100644 index 000000000..d0e9d5cb0 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-mfa-challenge.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMFAChallenge( + AuthenticationFactor.EMAIL, // factor + 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/account/create-mfa-recovery-codes.md b/examples/2.3.x/client-android/java/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..caaa86aa1 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-mfa-recovery-codes.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMFARecoveryCodes(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/account/create-o-auth-2-session.md b/examples/2.3.x/client-android/java/account/create-o-auth-2-session.md new file mode 100644 index 000000000..da547421c --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-o-auth-2-session.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + List.of(), // scopes (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/account/create-o-auth-2-token.md b/examples/2.3.x/client-android/java/account/create-o-auth-2-token.md new file mode 100644 index 000000000..ae685850e --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-o-auth-2-token.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + List.of(), // scopes (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/account/create-phone-token.md b/examples/2.3.x/client-android/java/account/create-phone-token.md new file mode 100644 index 000000000..a9568376d --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-phone-token.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPhoneToken( + "", // userId + "+12065550100", // phone + 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/account/create-phone-verification.md b/examples/2.3.x/client-android/java/account/create-phone-verification.md new file mode 100644 index 000000000..db54d3c83 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-phone-verification.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPhoneVerification(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/account/create-push-target.md b/examples/2.3.x/client-android/java/account/create-push-target.md new file mode 100644 index 000000000..34d903c44 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-push-target.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPushTarget( + "", // targetId + "", // identifier + "", // providerId (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/account/create-recovery-otp.md b/examples/2.3.x/client-android/java/account/create-recovery-otp.md new file mode 100644 index 000000000..66c165b8e --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-recovery-otp.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createRecoveryOTP( + "email@example.com", // email + false, // phrase (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/account/create-recovery.md b/examples/2.3.x/client-android/java/account/create-recovery.md new file mode 100644 index 000000000..acc22302e --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-recovery.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", // email + "https://example.com", // url + 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/account/create-session.md b/examples/2.3.x/client-android/java/account/create-session.md new file mode 100644 index 000000000..e9ea8d702 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-session.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createSession( + "", // userId + "", // secret + 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/account/create-verification.md b/examples/2.3.x/client-android/java/account/create-verification.md new file mode 100644 index 000000000..3c80fbef8 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create-verification.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createVerification( + "https://example.com", // url + 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/account/create.md b/examples/2.3.x/client-android/java/account/create.md new file mode 100644 index 000000000..6a84b3c58 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/create.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.create( + "", // userId + "email@example.com", // email + "password", // password + "", // name (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/account/delete-consent-token.md b/examples/2.3.x/client-android/java/account/delete-consent-token.md new file mode 100644 index 000000000..de7cf32ad --- /dev/null +++ b/examples/2.3.x/client-android/java/account/delete-consent-token.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteConsentToken( + "", // consentId + "", // tokenId + 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/account/delete-consent.md b/examples/2.3.x/client-android/java/account/delete-consent.md new file mode 100644 index 000000000..84450cce5 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/delete-consent.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteConsent( + "", // consentId + 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/account/delete-identity.md b/examples/2.3.x/client-android/java/account/delete-identity.md new file mode 100644 index 000000000..513de6363 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/delete-identity.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteIdentity( + "", // identityId + 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/account/delete-mfa-authenticator.md b/examples/2.3.x/client-android/java/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..c57eeab8f --- /dev/null +++ b/examples/2.3.x/client-android/java/account/delete-mfa-authenticator.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteMFAAuthenticator( + AuthenticatorType.TOTP, // type + 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/account/delete-push-target.md b/examples/2.3.x/client-android/java/account/delete-push-target.md new file mode 100644 index 000000000..a9e6aff97 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/delete-push-target.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deletePushTarget( + "", // targetId + 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/account/delete-session.md b/examples/2.3.x/client-android/java/account/delete-session.md new file mode 100644 index 000000000..84a735035 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/delete-session.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteSession( + "", // sessionId + 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/account/delete-sessions.md b/examples/2.3.x/client-android/java/account/delete-sessions.md new file mode 100644 index 000000000..4b93d19af --- /dev/null +++ b/examples/2.3.x/client-android/java/account/delete-sessions.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteSessions(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/account/get-consent-token.md b/examples/2.3.x/client-android/java/account/get-consent-token.md new file mode 100644 index 000000000..1395852f9 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/get-consent-token.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getConsentToken( + "", // consentId + "", // tokenId + 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/account/get-consent.md b/examples/2.3.x/client-android/java/account/get-consent.md new file mode 100644 index 000000000..54f2bf2dd --- /dev/null +++ b/examples/2.3.x/client-android/java/account/get-consent.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getConsent( + "", // consentId + 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/account/get-mfa-recovery-codes.md b/examples/2.3.x/client-android/java/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..36814e6cc --- /dev/null +++ b/examples/2.3.x/client-android/java/account/get-mfa-recovery-codes.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getMFARecoveryCodes(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/account/get-prefs.md b/examples/2.3.x/client-android/java/account/get-prefs.md new file mode 100644 index 000000000..f951fe9b8 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/get-prefs.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getPrefs(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/account/get-session.md b/examples/2.3.x/client-android/java/account/get-session.md new file mode 100644 index 000000000..1fb6f1baa --- /dev/null +++ b/examples/2.3.x/client-android/java/account/get-session.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getSession( + "", // sessionId + 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/account/get.md b/examples/2.3.x/client-android/java/account/get.md new file mode 100644 index 000000000..e452e8912 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/get.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.get(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/account/list-consent-tokens.md b/examples/2.3.x/client-android/java/account/list-consent-tokens.md new file mode 100644 index 000000000..0552b7dc3 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/list-consent-tokens.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listConsentTokens( + "", // consentId + 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/account/list-consents.md b/examples/2.3.x/client-android/java/account/list-consents.md new file mode 100644 index 000000000..5db215fe7 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/list-consents.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listConsents( + 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/account/list-identities.md b/examples/2.3.x/client-android/java/account/list-identities.md new file mode 100644 index 000000000..1222edaae --- /dev/null +++ b/examples/2.3.x/client-android/java/account/list-identities.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listIdentities( + 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/account/list-mfa-factors.md b/examples/2.3.x/client-android/java/account/list-mfa-factors.md new file mode 100644 index 000000000..f0c3e01a4 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/list-mfa-factors.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listMFAFactors(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/account/list-sessions.md b/examples/2.3.x/client-android/java/account/list-sessions.md new file mode 100644 index 000000000..9e52ea471 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/list-sessions.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listSessions(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/account/update-email-verification-otp.md b/examples/2.3.x/client-android/java/account/update-email-verification-otp.md new file mode 100644 index 000000000..d66521c8f --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-email-verification-otp.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateEmailVerificationOTP( + "", // userId + "", // secret + 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/account/update-email-verification.md b/examples/2.3.x/client-android/java/account/update-email-verification.md new file mode 100644 index 000000000..1c9bc865e --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-email-verification.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateEmailVerification( + "", // userId + "", // secret + 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/account/update-email.md b/examples/2.3.x/client-android/java/account/update-email.md new file mode 100644 index 000000000..d077f9f47 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-email.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", // email + "password", // password + 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/account/update-magic-url-session.md b/examples/2.3.x/client-android/java/account/update-magic-url-session.md new file mode 100644 index 000000000..be3e9b0c9 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-magic-url-session.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMagicURLSession( + "", // userId + "", // secret + 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/account/update-mfa-authenticator.md b/examples/2.3.x/client-android/java/account/update-mfa-authenticator.md new file mode 100644 index 000000000..e2b017cf5 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-mfa-authenticator.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMFAAuthenticator( + AuthenticatorType.TOTP, // type + "", // otp + 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/account/update-mfa-challenge.md b/examples/2.3.x/client-android/java/account/update-mfa-challenge.md new file mode 100644 index 000000000..132b29948 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-mfa-challenge.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMFAChallenge( + "", // challengeId + "", // otp + 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/account/update-mfa-recovery-codes.md b/examples/2.3.x/client-android/java/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..38c2fa969 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-mfa-recovery-codes.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMFARecoveryCodes(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/account/update-mfa.md b/examples/2.3.x/client-android/java/account/update-mfa.md new file mode 100644 index 000000000..dc9a3d769 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-mfa.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMFA( + false, // mfa + 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/account/update-name.md b/examples/2.3.x/client-android/java/account/update-name.md new file mode 100644 index 000000000..3aca6d887 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-name.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateName( + "", // name + 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/account/update-password.md b/examples/2.3.x/client-android/java/account/update-password.md new file mode 100644 index 000000000..c491f4b91 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-password.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePassword( + "password", // password + "password", // oldPassword (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/account/update-phone-session.md b/examples/2.3.x/client-android/java/account/update-phone-session.md new file mode 100644 index 000000000..edaa99d4b --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-phone-session.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhoneSession( + "", // userId + "", // secret + 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/account/update-phone-verification.md b/examples/2.3.x/client-android/java/account/update-phone-verification.md new file mode 100644 index 000000000..b8f19abd0 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-phone-verification.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhoneVerification( + "", // userId + "", // secret + 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/account/update-phone.md b/examples/2.3.x/client-android/java/account/update-phone.md new file mode 100644 index 000000000..6613850b1 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-phone.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", // phone + "password", // password + 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/account/update-prefs.md b/examples/2.3.x/client-android/java/account/update-prefs.md new file mode 100644 index 000000000..819a89960 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-prefs.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePrefs( + Map.of( + "language", "en", + "timezone", "UTC", + "darkTheme", true + ), // prefs + 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/account/update-push-target.md b/examples/2.3.x/client-android/java/account/update-push-target.md new file mode 100644 index 000000000..197787858 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-push-target.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePushTarget( + "", // targetId + "", // identifier + 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/account/update-recovery-otp.md b/examples/2.3.x/client-android/java/account/update-recovery-otp.md new file mode 100644 index 000000000..c16df289d --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-recovery-otp.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateRecoveryOTP( + "", // userId + "", // secret + "password", // password + 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/account/update-recovery.md b/examples/2.3.x/client-android/java/account/update-recovery.md new file mode 100644 index 000000000..96741d0a9 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-recovery.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateRecovery( + "", // userId + "", // secret + "password", // password + 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/account/update-session.md b/examples/2.3.x/client-android/java/account/update-session.md new file mode 100644 index 000000000..bf54de4dc --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-session.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateSession( + "", // sessionId + 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/account/update-status.md b/examples/2.3.x/client-android/java/account/update-status.md new file mode 100644 index 000000000..a0537aeb1 --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-status.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateStatus(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/account/update-verification.md b/examples/2.3.x/client-android/java/account/update-verification.md new file mode 100644 index 000000000..2f63c5bda --- /dev/null +++ b/examples/2.3.x/client-android/java/account/update-verification.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateVerification( + "", // userId + "", // secret + 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 new file mode 100644 index 000000000..f101ad541 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-browser.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Browser; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + Browser.AVANT_BROWSER, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (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/get-credit-card.md b/examples/2.3.x/client-android/java/avatars/get-credit-card.md new file mode 100644 index 000000000..b12cebc96 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-credit-card.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.CreditCard; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + CreditCard.AMERICAN_EXPRESS, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (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/get-favicon.md b/examples/2.3.x/client-android/java/avatars/get-favicon.md new file mode 100644 index 000000000..c7bc6411f --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-favicon.md @@ -0,0 +1,26 @@ +```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.getFavicon( + "https://example.com", // url + 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-flag.md b/examples/2.3.x/client-android/java/avatars/get-flag.md new file mode 100644 index 000000000..4d808513f --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-flag.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Flag; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + Flag.AFGHANISTAN, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (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/get-image.md b/examples/2.3.x/client-android/java/avatars/get-image.md new file mode 100644 index 000000000..a22041f53 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-image.md @@ -0,0 +1,28 @@ +```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.getImage( + "https://example.com", // url + 0, // width (optional) + 0, // height (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/get-initials.md b/examples/2.3.x/client-android/java/avatars/get-initials.md new file mode 100644 index 000000000..08f5bea98 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-initials.md @@ -0,0 +1,29 @@ +```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.getInitials( + "", // name (optional) + 0, // width (optional) + 0, // height (optional) + "FFFFFF", // background (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/get-photo.md b/examples/2.3.x/client-android/java/avatars/get-photo.md new file mode 100644 index 000000000..2204db789 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-photo.md @@ -0,0 +1,33 @@ +```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.getPhoto( + 0, // width (optional) + 0, // height (optional) + 0, // quality (optional) + "png", // output (optional) + "g", // rating (optional) + "current()", // userId (optional) + "", // emailHash (optional) + "", // name (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/get-qr.md b/examples/2.3.x/client-android/java/avatars/get-qr.md new file mode 100644 index 000000000..ad08ab561 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-qr.md @@ -0,0 +1,29 @@ +```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.getQR( + "", // text + 1, // size (optional) + 0, // margin (optional) + false, // download (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/get-screenshot.md b/examples/2.3.x/client-android/java/avatars/get-screenshot.md new file mode 100644 index 000000000..71f96c5b6 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/get-screenshot.md @@ -0,0 +1,52 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.BrowserTheme; +import io.appwrite.enums.Timezone; +import io.appwrite.enums.BrowserPermission; +import io.appwrite.enums.ImageFormat; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getScreenshot( + "https://example.com", // url + Map.of( + "Authorization", "Bearer token123", + "X-Custom-Header", "value" + ), // headers (optional) + 1920, // viewportWidth (optional) + 1080, // viewportHeight (optional) + 2, // 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) + "en-US", // locale (optional) + Timezone.AFRICA_ABIDJAN, // timezone (optional) + 37.7749, // latitude (optional) + -122.4194, // longitude (optional) + 100, // accuracy (optional) + true, // touch (optional) + BrowserPermission.GEOLOCATION, // permissions (optional) + 3, // sleep (optional) + 800, // width (optional) + 600, // height (optional) + 85, // quality (optional) + ImageFormat.JPG, // output (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/databases/create-document.md b/examples/2.3.x/client-android/java/databases/create-document.md new file mode 100644 index 000000000..3c64659d5 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/create-document.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.createDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (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/databases/create-operations.md b/examples/2.3.x/client-android/java/databases/create-operations.md new file mode 100644 index 000000000..bbef85739 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/create-operations.md @@ -0,0 +1,35 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.createOperations( + "", // transactionId + List.of(Map.of( + "action", "create", + "databaseId", "", + "collectionId", "", + "documentId", "", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..d96c27a07 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/create-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.createTransaction( + 60, // ttl (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/databases/decrement-document-attribute.md b/examples/2.3.x/client-android/java/databases/decrement-document-attribute.md new file mode 100644 index 000000000..1a2f23e22 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/decrement-document-attribute.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.decrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 1, // value (optional) + 0, // min (optional) + "", // transactionId (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/databases/delete-document.md b/examples/2.3.x/client-android/java/databases/delete-document.md new file mode 100644 index 000000000..ef04ee69f --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/delete-document.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.deleteDocument( + "", // databaseId + "", // collectionId + "", // documentId + "", // transactionId (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/databases/delete-transaction.md b/examples/2.3.x/client-android/java/databases/delete-transaction.md new file mode 100644 index 000000000..4a2d8f01f --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/delete-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.deleteTransaction( + "", // transactionId + 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/get-document.md b/examples/2.3.x/client-android/java/databases/get-document.md new file mode 100644 index 000000000..106afa2c5 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/get-document.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.getDocument( + "", // databaseId + "", // collectionId + "", // documentId + List.of(), // queries (optional) + "", // transactionId (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/databases/get-transaction.md b/examples/2.3.x/client-android/java/databases/get-transaction.md new file mode 100644 index 000000000..b33a4bc87 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/get-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.getTransaction( + "", // transactionId + 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/increment-document-attribute.md b/examples/2.3.x/client-android/java/databases/increment-document-attribute.md new file mode 100644 index 000000000..fe3635924 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/increment-document-attribute.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.incrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 1, // value (optional) + 100, // max (optional) + "", // transactionId (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/databases/list-documents.md b/examples/2.3.x/client-android/java/databases/list-documents.md new file mode 100644 index 000000000..8569cb60f --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/list-documents.md @@ -0,0 +1,31 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.listDocuments( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` 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 new file mode 100644 index 000000000..ad11c7f70 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/list-transactions.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.listTransactions( + List.of(), // queries (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/databases/update-document.md b/examples/2.3.x/client-android/java/databases/update-document.md new file mode 100644 index 000000000..40dc7c7be --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/update-document.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.updateDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 33, + "isAdmin", false + ), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (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/databases/update-transaction.md b/examples/2.3.x/client-android/java/databases/update-transaction.md new file mode 100644 index 000000000..dfc4db62c --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/update-transaction.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.updateTransaction( + "", // transactionId + false, // commit (optional) + false, // rollback (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/databases/upsert-document.md b/examples/2.3.x/client-android/java/databases/upsert-document.md new file mode 100644 index 000000000..f5976a925 --- /dev/null +++ b/examples/2.3.x/client-android/java/databases/upsert-document.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.upsertDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (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/documentsdb/create-document.md b/examples/2.3.x/client-android/java/documentsdb/create-document.md new file mode 100644 index 000000000..77f034d88 --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/create-document.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (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/documentsdb/create-documents.md b/examples/2.3.x/client-android/java/documentsdb/create-documents.md new file mode 100644 index 000000000..c52433a2d --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/create-documents.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createDocuments( + "", // databaseId + "", // collectionId + List.of(), // documents + "", // transactionId (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/documentsdb/create-operations.md b/examples/2.3.x/client-android/java/documentsdb/create-operations.md new file mode 100644 index 000000000..961a5501d --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/create-operations.md @@ -0,0 +1,35 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createOperations( + "", // transactionId + List.of(Map.of( + "action", "create", + "databaseId", "", + "collectionId", "", + "documentId", "", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` 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 new file mode 100644 index 000000000..da91c5c8e --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/create-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createTransaction( + 60, // ttl (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/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-android/java/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..f1853ac6d --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/decrement-document-attribute.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.decrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 1, // value (optional) + 0, // min (optional) + "", // transactionId (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/documentsdb/delete-document.md b/examples/2.3.x/client-android/java/documentsdb/delete-document.md new file mode 100644 index 000000000..247a63aac --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/delete-document.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteDocument( + "", // databaseId + "", // collectionId + "", // documentId + "", // transactionId (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/documentsdb/delete-transaction.md b/examples/2.3.x/client-android/java/documentsdb/delete-transaction.md new file mode 100644 index 000000000..0b0a76161 --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/delete-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteTransaction( + "", // transactionId + 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/documentsdb/get-document.md b/examples/2.3.x/client-android/java/documentsdb/get-document.md new file mode 100644 index 000000000..7bd66e1ea --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/get-document.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getDocument( + "", // databaseId + "", // collectionId + "", // documentId + List.of(), // queries (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/documentsdb/get-transaction.md b/examples/2.3.x/client-android/java/documentsdb/get-transaction.md new file mode 100644 index 000000000..12c42243e --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/get-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getTransaction( + "", // transactionId + 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/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-android/java/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..fab214e96 --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/increment-document-attribute.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.incrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 1, // value (optional) + 100, // max (optional) + "", // transactionId (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/documentsdb/list-documents.md b/examples/2.3.x/client-android/java/documentsdb/list-documents.md new file mode 100644 index 000000000..0abb6734c --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/list-documents.md @@ -0,0 +1,31 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listDocuments( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` 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 new file mode 100644 index 000000000..9b8fcd7bc --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/list-transactions.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listTransactions( + List.of(), // queries (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/documentsdb/update-document.md b/examples/2.3.x/client-android/java/documentsdb/update-document.md new file mode 100644 index 000000000..da8475fa8 --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/update-document.md @@ -0,0 +1,33 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/documentsdb/update-transaction.md b/examples/2.3.x/client-android/java/documentsdb/update-transaction.md new file mode 100644 index 000000000..9d95dfcd6 --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/update-transaction.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateTransaction( + "", // transactionId + false, // commit (optional) + false, // rollback (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/documentsdb/upsert-document.md b/examples/2.3.x/client-android/java/documentsdb/upsert-document.md new file mode 100644 index 000000000..82e90a403 --- /dev/null +++ b/examples/2.3.x/client-android/java/documentsdb/upsert-document.md @@ -0,0 +1,33 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.upsertDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/functions/create-execution.md b/examples/2.3.x/client-android/java/functions/create-execution.md new file mode 100644 index 000000000..1984020b5 --- /dev/null +++ b/examples/2.3.x/client-android/java/functions/create-execution.md @@ -0,0 +1,33 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.ExecutionMethod; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.createExecution( + "", // functionId + "", // body (optional) + false, // async (optional) + "", // path (optional) + ExecutionMethod.GET, // method (optional) + Map.of("a", "b"), // headers (optional) + "", // scheduledAt (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/functions/get-execution.md b/examples/2.3.x/client-android/java/functions/get-execution.md new file mode 100644 index 000000000..206b407c7 --- /dev/null +++ b/examples/2.3.x/client-android/java/functions/get-execution.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.getExecution( + "", // functionId + "", // executionId + 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/functions/list-executions.md b/examples/2.3.x/client-android/java/functions/list-executions.md new file mode 100644 index 000000000..3cd974de7 --- /dev/null +++ b/examples/2.3.x/client-android/java/functions/list-executions.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.listExecutions( + "", // functionId + 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/graphql/mutation.md b/examples/2.3.x/client-android/java/graphql/mutation.md new file mode 100644 index 000000000..9cc7febe9 --- /dev/null +++ b/examples/2.3.x/client-android/java/graphql/mutation.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.mutation( + Map.of("a", "b"), // query + 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/graphql/query.md b/examples/2.3.x/client-android/java/graphql/query.md new file mode 100644 index 000000000..25704b00b --- /dev/null +++ b/examples/2.3.x/client-android/java/graphql/query.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.query( + Map.of("a", "b"), // query + 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/locale/get.md b/examples/2.3.x/client-android/java/locale/get.md new file mode 100644 index 000000000..d2c4e4d23 --- /dev/null +++ b/examples/2.3.x/client-android/java/locale/get.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.get(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/locale/list-codes.md b/examples/2.3.x/client-android/java/locale/list-codes.md new file mode 100644 index 000000000..534b11995 --- /dev/null +++ b/examples/2.3.x/client-android/java/locale/list-codes.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCodes(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/locale/list-continents.md b/examples/2.3.x/client-android/java/locale/list-continents.md new file mode 100644 index 000000000..998a31be2 --- /dev/null +++ b/examples/2.3.x/client-android/java/locale/list-continents.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listContinents(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/locale/list-countries-eu.md b/examples/2.3.x/client-android/java/locale/list-countries-eu.md new file mode 100644 index 000000000..5950c990f --- /dev/null +++ b/examples/2.3.x/client-android/java/locale/list-countries-eu.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesEU(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/locale/list-countries-phones.md b/examples/2.3.x/client-android/java/locale/list-countries-phones.md new file mode 100644 index 000000000..6096758ec --- /dev/null +++ b/examples/2.3.x/client-android/java/locale/list-countries-phones.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesPhones(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/locale/list-countries.md b/examples/2.3.x/client-android/java/locale/list-countries.md new file mode 100644 index 000000000..140fc48a0 --- /dev/null +++ b/examples/2.3.x/client-android/java/locale/list-countries.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountries(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/locale/list-currencies.md b/examples/2.3.x/client-android/java/locale/list-currencies.md new file mode 100644 index 000000000..0e5273d96 --- /dev/null +++ b/examples/2.3.x/client-android/java/locale/list-currencies.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCurrencies(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/locale/list-languages.md b/examples/2.3.x/client-android/java/locale/list-languages.md new file mode 100644 index 000000000..e85bd0a11 --- /dev/null +++ b/examples/2.3.x/client-android/java/locale/list-languages.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listLanguages(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/messaging/create-subscriber.md b/examples/2.3.x/client-android/java/messaging/create-subscriber.md new file mode 100644 index 000000000..88f9260d4 --- /dev/null +++ b/examples/2.3.x/client-android/java/messaging/create-subscriber.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Messaging messaging = new Messaging(client); + +messaging.createSubscriber( + "", // topicId + "", // subscriberId + "", // targetId + 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/messaging/delete-subscriber.md b/examples/2.3.x/client-android/java/messaging/delete-subscriber.md new file mode 100644 index 000000000..1c012a3f9 --- /dev/null +++ b/examples/2.3.x/client-android/java/messaging/delete-subscriber.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Messaging messaging = new Messaging(client); + +messaging.deleteSubscriber( + "", // topicId + "", // subscriberId + 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/organization/create-installation.md b/examples/2.3.x/client-android/java/organization/create-installation.md new file mode 100644 index 000000000..d4c40fbe4 --- /dev/null +++ b/examples/2.3.x/client-android/java/organization/create-installation.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.createInstallation( + "", // appId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/organization/delete-installation.md b/examples/2.3.x/client-android/java/organization/delete-installation.md new file mode 100644 index 000000000..f1bc8718a --- /dev/null +++ b/examples/2.3.x/client-android/java/organization/delete-installation.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.deleteInstallation( + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/organization/get-installation.md b/examples/2.3.x/client-android/java/organization/get-installation.md new file mode 100644 index 000000000..20c8779f2 --- /dev/null +++ b/examples/2.3.x/client-android/java/organization/get-installation.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.getInstallation( + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/organization/list-installations.md b/examples/2.3.x/client-android/java/organization/list-installations.md new file mode 100644 index 000000000..6fa2c2a98 --- /dev/null +++ b/examples/2.3.x/client-android/java/organization/list-installations.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.listInstallations( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/organization/update-installation.md b/examples/2.3.x/client-android/java/organization/update-installation.md new file mode 100644 index 000000000..f27fb55ce --- /dev/null +++ b/examples/2.3.x/client-android/java/organization/update-installation.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.updateInstallation( + "", // installationId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/presences/delete.md b/examples/2.3.x/client-android/java/presences/delete.md new file mode 100644 index 000000000..f0f6afa26 --- /dev/null +++ b/examples/2.3.x/client-android/java/presences/delete.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Presences; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Presences presences = new Presences(client); + +presences.delete( + "", // presenceId + 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/get.md b/examples/2.3.x/client-android/java/presences/get.md new file mode 100644 index 000000000..2d2d2cea0 --- /dev/null +++ b/examples/2.3.x/client-android/java/presences/get.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Presences; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Presences presences = new Presences(client); + +presences.get( + "", // presenceId + 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 new file mode 100644 index 000000000..d66a4161b --- /dev/null +++ b/examples/2.3.x/client-android/java/presences/list.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Presences; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Presences presences = new Presences(client); + +presences.list( + List.of(), // queries (optional) + false, // total (optional) + 0, // ttl (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/update.md b/examples/2.3.x/client-android/java/presences/update.md new file mode 100644 index 000000000..964f3a032 --- /dev/null +++ b/examples/2.3.x/client-android/java/presences/update.md @@ -0,0 +1,33 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Presences; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Presences presences = new Presences(client); + +presences.update( + "", // presenceId + "", // status (optional) + "2020-10-15T06:38:00.000+00:00", // expiresAt (optional) + Map.of("a", "b"), // metadata (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + false, // purge (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/upsert.md b/examples/2.3.x/client-android/java/presences/upsert.md new file mode 100644 index 000000000..2d279b3d0 --- /dev/null +++ b/examples/2.3.x/client-android/java/presences/upsert.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Presences; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Presences presences = new Presences(client); + +presences.upsert( + "", // presenceId + "", // status + List.of(Permission.read(Role.any())), // permissions (optional) + "2020-10-15T06:38:00.000+00:00", // expiresAt (optional) + Map.of("a", "b"), // metadata (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/storage/create-file.md b/examples/2.3.x/client-android/java/storage/create-file.md new file mode 100644 index 000000000..e441255e2 --- /dev/null +++ b/examples/2.3.x/client-android/java/storage/create-file.md @@ -0,0 +1,33 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.createFile( + "", // bucketId + "", // fileId + InputFile.fromPath("file.png"), // file + List.of(Permission.read(Role.any())), // permissions (optional) + "photos/2026", // folder (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/storage/delete-file.md b/examples/2.3.x/client-android/java/storage/delete-file.md new file mode 100644 index 000000000..67212a70c --- /dev/null +++ b/examples/2.3.x/client-android/java/storage/delete-file.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.deleteFile( + "", // bucketId + "", // fileId + 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/storage/get-file-download.md b/examples/2.3.x/client-android/java/storage/get-file-download.md new file mode 100644 index 000000000..88e24ca73 --- /dev/null +++ b/examples/2.3.x/client-android/java/storage/get-file-download.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileDownload( + "", // bucketId + "", // fileId + "", // token (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/storage/get-file-preview.md b/examples/2.3.x/client-android/java/storage/get-file-preview.md new file mode 100644 index 000000000..3d753c447 --- /dev/null +++ b/examples/2.3.x/client-android/java/storage/get-file-preview.md @@ -0,0 +1,41 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; +import io.appwrite.enums.ImageGravity; +import io.appwrite.enums.ImageFormat; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFilePreview( + "", // bucketId + "", // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.AUTO, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + "FFFFFF", // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + "FFFFFF", // background (optional) + ImageFormat.JPG, // output (optional) + "", // token (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/storage/get-file-view.md b/examples/2.3.x/client-android/java/storage/get-file-view.md new file mode 100644 index 000000000..c9d11938b --- /dev/null +++ b/examples/2.3.x/client-android/java/storage/get-file-view.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileView( + "", // bucketId + "", // fileId + "", // token (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/storage/get-file.md b/examples/2.3.x/client-android/java/storage/get-file.md new file mode 100644 index 000000000..1c5cb7af3 --- /dev/null +++ b/examples/2.3.x/client-android/java/storage/get-file.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFile( + "", // bucketId + "", // fileId + 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/storage/list-files.md b/examples/2.3.x/client-android/java/storage/list-files.md new file mode 100644 index 000000000..b6737bf00 --- /dev/null +++ b/examples/2.3.x/client-android/java/storage/list-files.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.listFiles( + "", // bucketId + List.of(), // queries (optional) + "", // search (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/storage/update-file.md b/examples/2.3.x/client-android/java/storage/update-file.md new file mode 100644 index 000000000..225eaaac4 --- /dev/null +++ b/examples/2.3.x/client-android/java/storage/update-file.md @@ -0,0 +1,31 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.updateFile( + "", // bucketId + "", // fileId + "", // name (optional) + List.of(Permission.read(Role.any())), // permissions (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/tablesdb/create-operations.md b/examples/2.3.x/client-android/java/tablesdb/create-operations.md new file mode 100644 index 000000000..86cdfa3af --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/create-operations.md @@ -0,0 +1,35 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createOperations( + "", // transactionId + List.of(Map.of( + "action", "create", + "databaseId", "", + "tableId", "", + "rowId", "", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (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/tablesdb/create-row.md b/examples/2.3.x/client-android/java/tablesdb/create-row.md new file mode 100644 index 000000000..4244a249f --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/create-row.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createRow( + "", // databaseId + "", // tableId + "", // rowId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (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/tablesdb/create-transaction.md b/examples/2.3.x/client-android/java/tablesdb/create-transaction.md new file mode 100644 index 000000000..8401bfec3 --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/create-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createTransaction( + 60, // ttl (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/tablesdb/decrement-row-column.md b/examples/2.3.x/client-android/java/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..c998b442f --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/decrement-row-column.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.decrementRowColumn( + "", // databaseId + "", // tableId + "", // rowId + "", // column + 1, // value (optional) + 0, // min (optional) + "", // transactionId (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/tablesdb/delete-row.md b/examples/2.3.x/client-android/java/tablesdb/delete-row.md new file mode 100644 index 000000000..d00cf595c --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/delete-row.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteRow( + "", // databaseId + "", // tableId + "", // rowId + "", // transactionId (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/tablesdb/delete-transaction.md b/examples/2.3.x/client-android/java/tablesdb/delete-transaction.md new file mode 100644 index 000000000..f48b50ac9 --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/delete-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteTransaction( + "", // transactionId + 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/tablesdb/get-row.md b/examples/2.3.x/client-android/java/tablesdb/get-row.md new file mode 100644 index 000000000..1eae5257d --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/get-row.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getRow( + "", // databaseId + "", // tableId + "", // rowId + List.of(), // queries (optional) + "", // transactionId (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/tablesdb/get-transaction.md b/examples/2.3.x/client-android/java/tablesdb/get-transaction.md new file mode 100644 index 000000000..861aacb82 --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/get-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getTransaction( + "", // transactionId + 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/tablesdb/increment-row-column.md b/examples/2.3.x/client-android/java/tablesdb/increment-row-column.md new file mode 100644 index 000000000..5fb7189e2 --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/increment-row-column.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.incrementRowColumn( + "", // databaseId + "", // tableId + "", // rowId + "", // column + 1, // value (optional) + 100, // max (optional) + "", // transactionId (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/tablesdb/list-rows.md b/examples/2.3.x/client-android/java/tablesdb/list-rows.md new file mode 100644 index 000000000..cbf40287b --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/list-rows.md @@ -0,0 +1,31 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listRows( + "", // databaseId + "", // tableId + List.of(), // queries (optional) + "", // transactionId (optional) + false, // total (optional) + 0, // ttl (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/tablesdb/list-transactions.md b/examples/2.3.x/client-android/java/tablesdb/list-transactions.md new file mode 100644 index 000000000..9ebb180a8 --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/list-transactions.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listTransactions( + List.of(), // queries (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/tablesdb/update-row.md b/examples/2.3.x/client-android/java/tablesdb/update-row.md new file mode 100644 index 000000000..bc3f84c12 --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/update-row.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateRow( + "", // databaseId + "", // tableId + "", // rowId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 33, + "isAdmin", false + ), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (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/tablesdb/update-transaction.md b/examples/2.3.x/client-android/java/tablesdb/update-transaction.md new file mode 100644 index 000000000..8f362d038 --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/update-transaction.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateTransaction( + "", // transactionId + false, // commit (optional) + false, // rollback (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/tablesdb/upsert-row.md b/examples/2.3.x/client-android/java/tablesdb/upsert-row.md new file mode 100644 index 000000000..4df4792a3 --- /dev/null +++ b/examples/2.3.x/client-android/java/tablesdb/upsert-row.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.TablesDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.upsertRow( + "", // databaseId + "", // tableId + "", // rowId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 33, + "isAdmin", false + ), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (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/teams/create-installation.md b/examples/2.3.x/client-android/java/teams/create-installation.md new file mode 100644 index 000000000..699f71b4b --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/create-installation.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.createInstallation( + "", // teamId + "", // appId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/teams/create-membership.md b/examples/2.3.x/client-android/java/teams/create-membership.md new file mode 100644 index 000000000..861aeb622 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/create-membership.md @@ -0,0 +1,32 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.createMembership( + "", // teamId + List.of(), // roles + "email@example.com", // email (optional) + "", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "", // name (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/teams/create.md b/examples/2.3.x/client-android/java/teams/create.md new file mode 100644 index 000000000..e9a680043 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/create.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.create( + "", // teamId + "", // name + List.of(), // roles (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/teams/delete-installation.md b/examples/2.3.x/client-android/java/teams/delete-installation.md new file mode 100644 index 000000000..da5d48fdc --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/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.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.deleteInstallation( + "", // teamId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/teams/delete-membership.md b/examples/2.3.x/client-android/java/teams/delete-membership.md new file mode 100644 index 000000000..3a0482db0 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/delete-membership.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.deleteMembership( + "", // teamId + "", // membershipId + 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/teams/delete.md b/examples/2.3.x/client-android/java/teams/delete.md new file mode 100644 index 000000000..06f186730 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/delete.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.delete( + "", // 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/teams/get-installation.md b/examples/2.3.x/client-android/java/teams/get-installation.md new file mode 100644 index 000000000..9222d7624 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/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.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getInstallation( + "", // teamId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/teams/get-membership.md b/examples/2.3.x/client-android/java/teams/get-membership.md new file mode 100644 index 000000000..501849608 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/get-membership.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getMembership( + "", // teamId + "", // membershipId + 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/teams/get-prefs.md b/examples/2.3.x/client-android/java/teams/get-prefs.md new file mode 100644 index 000000000..c82fce982 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/get-prefs.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getPrefs( + "", // 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/teams/get.md b/examples/2.3.x/client-android/java/teams/get.md new file mode 100644 index 000000000..df348f12c --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/get.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.get( + "", // 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/teams/list-installations.md b/examples/2.3.x/client-android/java/teams/list-installations.md new file mode 100644 index 000000000..8aeace5f5 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/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.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.listInstallations( + "", // teamId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/teams/list-memberships.md b/examples/2.3.x/client-android/java/teams/list-memberships.md new file mode 100644 index 000000000..79aad6dea --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/list-memberships.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.listMemberships( + "", // teamId + List.of(), // queries (optional) + "", // search (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/teams/list.md b/examples/2.3.x/client-android/java/teams/list.md new file mode 100644 index 000000000..5d2582848 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/list.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.list( + List.of(), // queries (optional) + "", // search (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/teams/update-installation.md b/examples/2.3.x/client-android/java/teams/update-installation.md new file mode 100644 index 000000000..cd32a5cda --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/update-installation.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateInstallation( + "", // teamId + "", // installationId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/teams/update-membership-status.md b/examples/2.3.x/client-android/java/teams/update-membership-status.md new file mode 100644 index 000000000..a6a54df0e --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/update-membership-status.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "", // teamId + "", // membershipId + "", // userId + "", // secret + 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/teams/update-membership.md b/examples/2.3.x/client-android/java/teams/update-membership.md new file mode 100644 index 000000000..60231f2c1 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/update-membership.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembership( + "", // teamId + "", // membershipId + List.of(), // roles + 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/teams/update-name.md b/examples/2.3.x/client-android/java/teams/update-name.md new file mode 100644 index 000000000..1e104100a --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/update-name.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateName( + "", // teamId + "", // name + 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/teams/update-prefs.md b/examples/2.3.x/client-android/java/teams/update-prefs.md new file mode 100644 index 000000000..69ed22ae5 --- /dev/null +++ b/examples/2.3.x/client-android/java/teams/update-prefs.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updatePrefs( + "", // teamId + Map.of("a", "b"), // prefs + 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/vectorsdb/create-document.md b/examples/2.3.x/client-android/java/vectorsdb/create-document.md new file mode 100644 index 000000000..8a3d7f9eb --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/create-document.md @@ -0,0 +1,38 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of( + "embeddings", List.of(0.12, -0.55, 0.88, 1.02), + "metadata", Map.of( + "key", "value" + ) + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (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/vectorsdb/create-operations.md b/examples/2.3.x/client-android/java/vectorsdb/create-operations.md new file mode 100644 index 000000000..7e503634c --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/create-operations.md @@ -0,0 +1,35 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createOperations( + "", // transactionId + List.of(Map.of( + "action", "create", + "databaseId", "", + "collectionId", "", + "documentId", "", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` 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 new file mode 100644 index 000000000..3f1cfd5cc --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/create-query.md @@ -0,0 +1,31 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createQuery( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` 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 new file mode 100644 index 000000000..4784fc47c --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/create-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createTransaction( + 60, // ttl (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/vectorsdb/delete-document.md b/examples/2.3.x/client-android/java/vectorsdb/delete-document.md new file mode 100644 index 000000000..d80673015 --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/delete-document.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteDocument( + "", // databaseId + "", // collectionId + "", // documentId + "", // transactionId (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/vectorsdb/delete-transaction.md b/examples/2.3.x/client-android/java/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..04b9c4da1 --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/delete-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteTransaction( + "", // transactionId + 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/vectorsdb/get-document.md b/examples/2.3.x/client-android/java/vectorsdb/get-document.md new file mode 100644 index 000000000..15ddf82d0 --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/get-document.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getDocument( + "", // databaseId + "", // collectionId + "", // documentId + List.of(), // queries (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/vectorsdb/get-transaction.md b/examples/2.3.x/client-android/java/vectorsdb/get-transaction.md new file mode 100644 index 000000000..987ca6e7c --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/get-transaction.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getTransaction( + "", // transactionId + 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/vectorsdb/list-documents.md b/examples/2.3.x/client-android/java/vectorsdb/list-documents.md new file mode 100644 index 000000000..12ef1f0c3 --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/list-documents.md @@ -0,0 +1,31 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listDocuments( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` 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 new file mode 100644 index 000000000..18ef0e55d --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/list-transactions.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listTransactions( + List.of(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/vectorsdb/update-document.md b/examples/2.3.x/client-android/java/vectorsdb/update-document.md new file mode 100644 index 000000000..4acb5cce0 --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/update-document.md @@ -0,0 +1,33 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/vectorsdb/update-transaction.md b/examples/2.3.x/client-android/java/vectorsdb/update-transaction.md new file mode 100644 index 000000000..a21aad1aa --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/update-transaction.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateTransaction( + "", // transactionId + false, // commit (optional) + false, // rollback (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/vectorsdb/upsert-document.md b/examples/2.3.x/client-android/java/vectorsdb/upsert-document.md new file mode 100644 index 000000000..58ac9a9a9 --- /dev/null +++ b/examples/2.3.x/client-android/java/vectorsdb/upsert-document.md @@ -0,0 +1,33 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.upsertDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-anonymous-session.md b/examples/2.3.x/client-android/kotlin/account/create-anonymous-session.md new file mode 100644 index 000000000..0cc36e1f6 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-anonymous-session.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createAnonymousSession() +``` 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 new file mode 100644 index 000000000..6100e4834 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-email-password-session.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailPasswordSession( + email = "email@example.com", + password = "password", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-email-token.md b/examples/2.3.x/client-android/kotlin/account/create-email-token.md new file mode 100644 index 000000000..01dda3d64 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-email-token.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailToken( + userId = "", + email = "email@example.com", + phrase = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-email-verification-otp.md b/examples/2.3.x/client-android/kotlin/account/create-email-verification-otp.md new file mode 100644 index 000000000..6acba146f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-email-verification-otp.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailVerificationOTP( + phrase = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-email-verification.md b/examples/2.3.x/client-android/kotlin/account/create-email-verification.md new file mode 100644 index 000000000..2a0d00e97 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-email-verification.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailVerification( + url = "https://example.com", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-id-token-session.md b/examples/2.3.x/client-android/kotlin/account/create-id-token-session.md new file mode 100644 index 000000000..5eb6d0da9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-id-token-session.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.IdTokenProvider + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createIdTokenSession( + provider = IdTokenProvider.APPLE, + idToken = "", + nonce = "", // (optional) + accessToken = "", // (optional) + accessTokenExpiry = 0, // (optional) + name = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-jwt.md b/examples/2.3.x/client-android/kotlin/account/create-jwt.md new file mode 100644 index 000000000..79d7b0993 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-jwt.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createJWT( + duration = 0, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-magic-url-token.md b/examples/2.3.x/client-android/kotlin/account/create-magic-url-token.md new file mode 100644 index 000000000..62904044f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-magic-url-token.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMagicURLToken( + userId = "", + email = "email@example.com", + url = "https://example.com", // (optional) + phrase = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-mfa-authenticator.md b/examples/2.3.x/client-android/kotlin/account/create-mfa-authenticator.md new file mode 100644 index 000000000..132bf749e --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-mfa-authenticator.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMFAAuthenticator( + type = AuthenticatorType.TOTP, +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-mfa-challenge.md b/examples/2.3.x/client-android/kotlin/account/create-mfa-challenge.md new file mode 100644 index 000000000..92206faba --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-mfa-challenge.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMFAChallenge( + factor = AuthenticationFactor.EMAIL, +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-mfa-recovery-codes.md b/examples/2.3.x/client-android/kotlin/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..d91a3eb39 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMFARecoveryCodes() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-o-auth-2-session.md b/examples/2.3.x/client-android/kotlin/account/create-o-auth-2-session.md new file mode 100644 index 000000000..cde941c78 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-o-auth-2-session.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +account.createOAuth2Session( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // (optional) + failure = "https://example.com", // (optional) + scopes = listOf(), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-o-auth-2-token.md b/examples/2.3.x/client-android/kotlin/account/create-o-auth-2-token.md new file mode 100644 index 000000000..5e9056494 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-o-auth-2-token.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +account.createOAuth2Token( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // (optional) + failure = "https://example.com", // (optional) + scopes = listOf(), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-phone-token.md b/examples/2.3.x/client-android/kotlin/account/create-phone-token.md new file mode 100644 index 000000000..3a61bac79 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-phone-token.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPhoneToken( + userId = "", + phone = "+12065550100", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-phone-verification.md b/examples/2.3.x/client-android/kotlin/account/create-phone-verification.md new file mode 100644 index 000000000..77705b8fd --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-phone-verification.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPhoneVerification() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-push-target.md b/examples/2.3.x/client-android/kotlin/account/create-push-target.md new file mode 100644 index 000000000..22d64cb9e --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-push-target.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPushTarget( + targetId = "", + identifier = "", + providerId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-recovery-otp.md b/examples/2.3.x/client-android/kotlin/account/create-recovery-otp.md new file mode 100644 index 000000000..754baa872 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-recovery-otp.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createRecoveryOTP( + email = "email@example.com", + phrase = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-recovery.md b/examples/2.3.x/client-android/kotlin/account/create-recovery.md new file mode 100644 index 000000000..1a89ccccb --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-recovery.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createRecovery( + email = "email@example.com", + url = "https://example.com", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-session.md b/examples/2.3.x/client-android/kotlin/account/create-session.md new file mode 100644 index 000000000..b86495cfb --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-session.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createSession( + userId = "", + secret = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create-verification.md b/examples/2.3.x/client-android/kotlin/account/create-verification.md new file mode 100644 index 000000000..d8ad1bc51 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create-verification.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createVerification( + url = "https://example.com", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/create.md b/examples/2.3.x/client-android/kotlin/account/create.md new file mode 100644 index 000000000..8e7f12c51 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/create.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.create( + userId = "", + email = "email@example.com", + password = "password", + name = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/delete-consent-token.md b/examples/2.3.x/client-android/kotlin/account/delete-consent-token.md new file mode 100644 index 000000000..82e2d5356 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/delete-consent-token.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteConsentToken( + consentId = "", + tokenId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/delete-consent.md b/examples/2.3.x/client-android/kotlin/account/delete-consent.md new file mode 100644 index 000000000..278342a8c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/delete-consent.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteConsent( + consentId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/delete-identity.md b/examples/2.3.x/client-android/kotlin/account/delete-identity.md new file mode 100644 index 000000000..7efc1d7c9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/delete-identity.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteIdentity( + identityId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/delete-mfa-authenticator.md b/examples/2.3.x/client-android/kotlin/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..77a68a075 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteMFAAuthenticator( + type = AuthenticatorType.TOTP, +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/delete-push-target.md b/examples/2.3.x/client-android/kotlin/account/delete-push-target.md new file mode 100644 index 000000000..6fce7b7c3 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/delete-push-target.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deletePushTarget( + targetId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/delete-session.md b/examples/2.3.x/client-android/kotlin/account/delete-session.md new file mode 100644 index 000000000..de9381177 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/delete-session.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteSession( + sessionId = "", +) +``` 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 new file mode 100644 index 000000000..ff404dbc1 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/delete-sessions.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteSessions() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/get-consent-token.md b/examples/2.3.x/client-android/kotlin/account/get-consent-token.md new file mode 100644 index 000000000..3109987d0 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/get-consent-token.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getConsentToken( + consentId = "", + tokenId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/get-consent.md b/examples/2.3.x/client-android/kotlin/account/get-consent.md new file mode 100644 index 000000000..be31d5f9a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/get-consent.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getConsent( + consentId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/get-mfa-recovery-codes.md b/examples/2.3.x/client-android/kotlin/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..5d9e1e4a6 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getMFARecoveryCodes() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/get-prefs.md b/examples/2.3.x/client-android/kotlin/account/get-prefs.md new file mode 100644 index 000000000..8e963ca82 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/get-prefs.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getPrefs() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/get-session.md b/examples/2.3.x/client-android/kotlin/account/get-session.md new file mode 100644 index 000000000..29bac94c2 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/get-session.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getSession( + sessionId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/get.md b/examples/2.3.x/client-android/kotlin/account/get.md new file mode 100644 index 000000000..e2dfe542a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/get.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.get() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/list-consent-tokens.md b/examples/2.3.x/client-android/kotlin/account/list-consent-tokens.md new file mode 100644 index 000000000..8fab57d12 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/list-consent-tokens.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listConsentTokens( + consentId = "", + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/list-consents.md b/examples/2.3.x/client-android/kotlin/account/list-consents.md new file mode 100644 index 000000000..fe3928195 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/list-consents.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listConsents( + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/list-identities.md b/examples/2.3.x/client-android/kotlin/account/list-identities.md new file mode 100644 index 000000000..9037c0e68 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/list-identities.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listIdentities( + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/list-mfa-factors.md b/examples/2.3.x/client-android/kotlin/account/list-mfa-factors.md new file mode 100644 index 000000000..b12f25c86 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/list-mfa-factors.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listMFAFactors() +``` 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 new file mode 100644 index 000000000..8c261a2d3 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/list-sessions.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listSessions() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-email-verification-otp.md b/examples/2.3.x/client-android/kotlin/account/update-email-verification-otp.md new file mode 100644 index 000000000..639605bca --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-email-verification-otp.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateEmailVerificationOTP( + userId = "", + secret = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-email-verification.md b/examples/2.3.x/client-android/kotlin/account/update-email-verification.md new file mode 100644 index 000000000..cfc5d6714 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-email-verification.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateEmailVerification( + userId = "", + secret = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-email.md b/examples/2.3.x/client-android/kotlin/account/update-email.md new file mode 100644 index 000000000..dc4bcbf3b --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-email.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateEmail( + email = "email@example.com", + password = "password", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-magic-url-session.md b/examples/2.3.x/client-android/kotlin/account/update-magic-url-session.md new file mode 100644 index 000000000..d943ac6ad --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-magic-url-session.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMagicURLSession( + userId = "", + secret = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-mfa-authenticator.md b/examples/2.3.x/client-android/kotlin/account/update-mfa-authenticator.md new file mode 100644 index 000000000..9befabe94 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-mfa-authenticator.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMFAAuthenticator( + type = AuthenticatorType.TOTP, + otp = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-mfa-challenge.md b/examples/2.3.x/client-android/kotlin/account/update-mfa-challenge.md new file mode 100644 index 000000000..6f2e99c0f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-mfa-challenge.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMFAChallenge( + challengeId = "", + otp = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-mfa-recovery-codes.md b/examples/2.3.x/client-android/kotlin/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..dfdbd95d8 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMFARecoveryCodes() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-mfa.md b/examples/2.3.x/client-android/kotlin/account/update-mfa.md new file mode 100644 index 000000000..6acd1e701 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-mfa.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMFA( + mfa = false, +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-name.md b/examples/2.3.x/client-android/kotlin/account/update-name.md new file mode 100644 index 000000000..ed40f240e --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-name.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateName( + name = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-password.md b/examples/2.3.x/client-android/kotlin/account/update-password.md new file mode 100644 index 000000000..1ec378a1a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-password.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePassword( + password = "password", + oldPassword = "password", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-phone-session.md b/examples/2.3.x/client-android/kotlin/account/update-phone-session.md new file mode 100644 index 000000000..ea5f25b58 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-phone-session.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhoneSession( + userId = "", + secret = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-phone-verification.md b/examples/2.3.x/client-android/kotlin/account/update-phone-verification.md new file mode 100644 index 000000000..c68d213aa --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-phone-verification.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhoneVerification( + userId = "", + secret = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-phone.md b/examples/2.3.x/client-android/kotlin/account/update-phone.md new file mode 100644 index 000000000..b7e669b0b --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-phone.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhone( + phone = "+12065550100", + password = "password", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-prefs.md b/examples/2.3.x/client-android/kotlin/account/update-prefs.md new file mode 100644 index 000000000..4444fb968 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-prefs.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePrefs( + prefs = mapOf( + "language" to "en", + "timezone" to "UTC", + "darkTheme" to true + ), +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-push-target.md b/examples/2.3.x/client-android/kotlin/account/update-push-target.md new file mode 100644 index 000000000..0e16e2fe7 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-push-target.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePushTarget( + targetId = "", + identifier = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-recovery-otp.md b/examples/2.3.x/client-android/kotlin/account/update-recovery-otp.md new file mode 100644 index 000000000..00b2ff0ae --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-recovery-otp.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateRecoveryOTP( + userId = "", + secret = "", + password = "password", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-recovery.md b/examples/2.3.x/client-android/kotlin/account/update-recovery.md new file mode 100644 index 000000000..c18262570 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-recovery.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateRecovery( + userId = "", + secret = "", + password = "password", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-session.md b/examples/2.3.x/client-android/kotlin/account/update-session.md new file mode 100644 index 000000000..b29ece551 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-session.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateSession( + sessionId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-status.md b/examples/2.3.x/client-android/kotlin/account/update-status.md new file mode 100644 index 000000000..d22c9ce41 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-status.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateStatus() +``` diff --git a/examples/2.3.x/client-android/kotlin/account/update-verification.md b/examples/2.3.x/client-android/kotlin/account/update-verification.md new file mode 100644 index 000000000..1c4af79e8 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/account/update-verification.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateVerification( + userId = "", + secret = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-browser.md b/examples/2.3.x/client-android/kotlin/avatars/get-browser.md new file mode 100644 index 000000000..7c32ad2d9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-browser.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Browser + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = Browser.AVANT_BROWSER, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-credit-card.md b/examples/2.3.x/client-android/kotlin/avatars/get-credit-card.md new file mode 100644 index 000000000..54244acc9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-credit-card.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.CreditCard + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-favicon.md b/examples/2.3.x/client-android/kotlin/avatars/get-favicon.md new file mode 100644 index 000000000..d55a0b424 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-favicon.md @@ -0,0 +1,15 @@ +```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.getFavicon( + url = "https://example.com", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-flag.md b/examples/2.3.x/client-android/kotlin/avatars/get-flag.md new file mode 100644 index 000000000..c03ccb3f9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-flag.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Flag + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = Flag.AFGHANISTAN, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-image.md b/examples/2.3.x/client-android/kotlin/avatars/get-image.md new file mode 100644 index 000000000..4e22185de --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-image.md @@ -0,0 +1,17 @@ +```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.getImage( + url = "https://example.com", + width = 0, // (optional) + height = 0, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-initials.md b/examples/2.3.x/client-android/kotlin/avatars/get-initials.md new file mode 100644 index 000000000..31b1f474d --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-initials.md @@ -0,0 +1,18 @@ +```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.getInitials( + name = "", // (optional) + width = 0, // (optional) + height = 0, // (optional) + background = "FFFFFF", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-photo.md b/examples/2.3.x/client-android/kotlin/avatars/get-photo.md new file mode 100644 index 000000000..d1127ba68 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-photo.md @@ -0,0 +1,22 @@ +```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.getPhoto( + width = 0, // (optional) + height = 0, // (optional) + quality = 0, // (optional) + output = "png", // (optional) + rating = "g", // (optional) + userId = "current()", // (optional) + emailHash = "", // (optional) + name = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-qr.md b/examples/2.3.x/client-android/kotlin/avatars/get-qr.md new file mode 100644 index 000000000..e962ef309 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-qr.md @@ -0,0 +1,18 @@ +```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.getQR( + text = "", + size = 1, // (optional) + margin = 0, // (optional) + download = false, // (optional) +) +``` 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 new file mode 100644 index 000000000..1093c060f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/get-screenshot.md @@ -0,0 +1,41 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.BrowserTheme +import io.appwrite.enums.Timezone +import io.appwrite.enums.BrowserPermission +import io.appwrite.enums.ImageFormat + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getScreenshot( + url = "https://example.com", + headers = mapOf( + "Authorization" to "Bearer token123", + "X-Custom-Header" to "value" + ), // (optional) + viewportWidth = 1920, // (optional) + viewportHeight = 1080, // (optional) + scale = 2, // (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) + locale = "en-US", // (optional) + timezone = Timezone.AFRICA_ABIDJAN, // (optional) + latitude = 37.7749, // (optional) + longitude = -122.4194, // (optional) + accuracy = 100, // (optional) + touch = true, // (optional) + permissions = BrowserPermission.GEOLOCATION, // (optional) + sleep = 3, // (optional) + width = 800, // (optional) + height = 600, // (optional) + quality = 85, // (optional) + output = ImageFormat.JPG, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/create-document.md b/examples/2.3.x/client-android/kotlin/databases/create-document.md new file mode 100644 index 000000000..7105df5c1 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/create-document.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.createDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/create-operations.md b/examples/2.3.x/client-android/kotlin/databases/create-operations.md new file mode 100644 index 000000000..3bd7ae5d5 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/create-operations.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.createOperations( + transactionId = "", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "", + "collectionId" to "", + "documentId" to "", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/create-transaction.md b/examples/2.3.x/client-android/kotlin/databases/create-transaction.md new file mode 100644 index 000000000..59a3c12f6 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/create-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.createTransaction( + ttl = 60, // (optional) +) +``` 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 new file mode 100644 index 000000000..c32a60027 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.decrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 1, // (optional) + min = 0, // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/delete-document.md b/examples/2.3.x/client-android/kotlin/databases/delete-document.md new file mode 100644 index 000000000..c31bdb9fd --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/delete-document.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.deleteDocument( + databaseId = "", + collectionId = "", + documentId = "", + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/delete-transaction.md b/examples/2.3.x/client-android/kotlin/databases/delete-transaction.md new file mode 100644 index 000000000..101bd8cda --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/delete-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.deleteTransaction( + transactionId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/get-document.md b/examples/2.3.x/client-android/kotlin/databases/get-document.md new file mode 100644 index 000000000..5c54be0ca --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/get-document.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.getDocument( + databaseId = "", + collectionId = "", + documentId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/get-transaction.md b/examples/2.3.x/client-android/kotlin/databases/get-transaction.md new file mode 100644 index 000000000..2f08ad611 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/get-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.getTransaction( + transactionId = "", +) +``` 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 new file mode 100644 index 000000000..daaa6d6ae --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/increment-document-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.incrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 1, // (optional) + max = 100, // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/list-documents.md b/examples/2.3.x/client-android/kotlin/databases/list-documents.md new file mode 100644 index 000000000..b42b7dd8a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/list-documents.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.listDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) + total = false, // (optional) + ttl = 0, // (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 new file mode 100644 index 000000000..3cabd79f3 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/list-transactions.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.listTransactions( + queries = listOf(), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/update-document.md b/examples/2.3.x/client-android/kotlin/databases/update-document.md new file mode 100644 index 000000000..5c8a5e313 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/update-document.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.updateDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 33, + "isAdmin" to false + ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/update-transaction.md b/examples/2.3.x/client-android/kotlin/databases/update-transaction.md new file mode 100644 index 000000000..88360b276 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/update-transaction.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.updateTransaction( + transactionId = "", + commit = false, // (optional) + rollback = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/upsert-document.md b/examples/2.3.x/client-android/kotlin/databases/upsert-document.md new file mode 100644 index 000000000..edecb8630 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/databases/upsert-document.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.upsertDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/create-document.md b/examples/2.3.x/client-android/kotlin/documentsdb/create-document.md new file mode 100644 index 000000000..e2e493f86 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/create-document.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.createDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (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 new file mode 100644 index 000000000..2923c1007 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/create-documents.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.createDocuments( + databaseId = "", + collectionId = "", + documents = listOf(), + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/create-operations.md b/examples/2.3.x/client-android/kotlin/documentsdb/create-operations.md new file mode 100644 index 000000000..c62580959 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/create-operations.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.createOperations( + transactionId = "", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "", + "collectionId" to "", + "documentId" to "", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/create-transaction.md b/examples/2.3.x/client-android/kotlin/documentsdb/create-transaction.md new file mode 100644 index 000000000..ad1f0b217 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/create-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.createTransaction( + ttl = 60, // (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 new file mode 100644 index 000000000..fdb11fe06 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.decrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 1, // (optional) + min = 0, // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/delete-document.md b/examples/2.3.x/client-android/kotlin/documentsdb/delete-document.md new file mode 100644 index 000000000..648a83ca4 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.deleteDocument( + databaseId = "", + collectionId = "", + documentId = "", + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/delete-transaction.md b/examples/2.3.x/client-android/kotlin/documentsdb/delete-transaction.md new file mode 100644 index 000000000..d991466f1 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.deleteTransaction( + transactionId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/get-document.md b/examples/2.3.x/client-android/kotlin/documentsdb/get-document.md new file mode 100644 index 000000000..1988e0028 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/get-document.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.getDocument( + databaseId = "", + collectionId = "", + documentId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/get-transaction.md b/examples/2.3.x/client-android/kotlin/documentsdb/get-transaction.md new file mode 100644 index 000000000..695412e77 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/get-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.getTransaction( + transactionId = "", +) +``` 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 new file mode 100644 index 000000000..8286ad447 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/increment-document-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.incrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 1, // (optional) + max = 100, // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/list-documents.md b/examples/2.3.x/client-android/kotlin/documentsdb/list-documents.md new file mode 100644 index 000000000..a8c1b66b7 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/list-documents.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.listDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) + total = false, // (optional) + ttl = 0, // (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 new file mode 100644 index 000000000..46571468e --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/list-transactions.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.listTransactions( + queries = listOf(), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/update-document.md b/examples/2.3.x/client-android/kotlin/documentsdb/update-document.md new file mode 100644 index 000000000..69668863d --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/update-document.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.updateDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/update-transaction.md b/examples/2.3.x/client-android/kotlin/documentsdb/update-transaction.md new file mode 100644 index 000000000..78fb3e7b9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/update-transaction.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.updateTransaction( + transactionId = "", + commit = false, // (optional) + rollback = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/upsert-document.md b/examples/2.3.x/client-android/kotlin/documentsdb/upsert-document.md new file mode 100644 index 000000000..defc50a20 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/documentsdb/upsert-document.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val documentsDB = DocumentsDB(client) + +val result = documentsDB.upsertDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/functions/create-execution.md b/examples/2.3.x/client-android/kotlin/functions/create-execution.md new file mode 100644 index 000000000..13654e65e --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/functions/create-execution.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.ExecutionMethod + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.createExecution( + functionId = "", + body = "", // (optional) + async = false, // (optional) + path = "", // (optional) + method = ExecutionMethod.GET, // (optional) + headers = mapOf( "a" to "b" ), // (optional) + scheduledAt = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/functions/get-execution.md b/examples/2.3.x/client-android/kotlin/functions/get-execution.md new file mode 100644 index 000000000..c092909e9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/functions/get-execution.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.getExecution( + functionId = "", + executionId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/functions/list-executions.md b/examples/2.3.x/client-android/kotlin/functions/list-executions.md new file mode 100644 index 000000000..5fb16f85a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/functions/list-executions.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.listExecutions( + functionId = "", + 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 new file mode 100644 index 000000000..0cdb78e6d --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/graphql/mutation.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val graphql = Graphql(client) + +val result = graphql.mutation( + query = mapOf( "a" to "b" ), +) +``` diff --git a/examples/2.3.x/client-android/kotlin/graphql/query.md b/examples/2.3.x/client-android/kotlin/graphql/query.md new file mode 100644 index 000000000..3359822a5 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/graphql/query.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val graphql = Graphql(client) + +val result = graphql.query( + query = mapOf( "a" to "b" ), +) +``` diff --git a/examples/2.3.x/client-android/kotlin/locale/get.md b/examples/2.3.x/client-android/kotlin/locale/get.md new file mode 100644 index 000000000..151971612 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/locale/get.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.get() +``` 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 new file mode 100644 index 000000000..d70521444 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/locale/list-codes.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCodes() +``` 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 new file mode 100644 index 000000000..03e917e43 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/locale/list-continents.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listContinents() +``` 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 new file mode 100644 index 000000000..a933ed85b --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/locale/list-countries-eu.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountriesEU() +``` 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 new file mode 100644 index 000000000..8d4c7534e --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/locale/list-countries-phones.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountriesPhones() +``` 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 new file mode 100644 index 000000000..e67b5fe7c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/locale/list-countries.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountries() +``` 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 new file mode 100644 index 000000000..fb0087d7c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/locale/list-currencies.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCurrencies() +``` 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 new file mode 100644 index 000000000..30fb65bf0 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/locale/list-languages.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listLanguages() +``` diff --git a/examples/2.3.x/client-android/kotlin/messaging/create-subscriber.md b/examples/2.3.x/client-android/kotlin/messaging/create-subscriber.md new file mode 100644 index 000000000..09c28349f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/messaging/create-subscriber.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val messaging = Messaging(client) + +val result = messaging.createSubscriber( + topicId = "", + subscriberId = "", + targetId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/messaging/delete-subscriber.md b/examples/2.3.x/client-android/kotlin/messaging/delete-subscriber.md new file mode 100644 index 000000000..7247e1290 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val messaging = Messaging(client) + +val result = messaging.deleteSubscriber( + topicId = "", + subscriberId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/organization/create-installation.md b/examples/2.3.x/client-android/kotlin/organization/create-installation.md new file mode 100644 index 000000000..f5f79b423 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/organization/create-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.createInstallation( + appId = "", + authorizationDetails = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/organization/delete-installation.md b/examples/2.3.x/client-android/kotlin/organization/delete-installation.md new file mode 100644 index 000000000..c0f1b11d1 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/organization/delete-installation.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.deleteInstallation( + installationId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/organization/get-installation.md b/examples/2.3.x/client-android/kotlin/organization/get-installation.md new file mode 100644 index 000000000..8a512807c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/organization/get-installation.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.getInstallation( + installationId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/organization/list-installations.md b/examples/2.3.x/client-android/kotlin/organization/list-installations.md new file mode 100644 index 000000000..3f6d83900 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/organization/list-installations.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.listInstallations( + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/organization/update-installation.md b/examples/2.3.x/client-android/kotlin/organization/update-installation.md new file mode 100644 index 000000000..b5dbb792b --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/organization/update-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.updateInstallation( + installationId = "", + authorizationDetails = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/presences/delete.md b/examples/2.3.x/client-android/kotlin/presences/delete.md new file mode 100644 index 000000000..d74aae005 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/presences/delete.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val presences = Presences(client) + +val result = presences.delete( + presenceId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/presences/get.md b/examples/2.3.x/client-android/kotlin/presences/get.md new file mode 100644 index 000000000..c12a51821 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/presences/get.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val presences = Presences(client) + +val result = presences.get( + presenceId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/presences/list.md b/examples/2.3.x/client-android/kotlin/presences/list.md new file mode 100644 index 000000000..6496a3e26 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/presences/list.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val presences = Presences(client) + +val result = presences.list( + queries = listOf(), // (optional) + total = false, // (optional) + ttl = 0, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/presences/update.md b/examples/2.3.x/client-android/kotlin/presences/update.md new file mode 100644 index 000000000..c6626913a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/presences/update.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val presences = Presences(client) + +val result = presences.update( + presenceId = "", + status = "", // (optional) + expiresAt = "2020-10-15T06:38:00.000+00:00", // (optional) + metadata = mapOf( "a" to "b" ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + purge = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/presences/upsert.md b/examples/2.3.x/client-android/kotlin/presences/upsert.md new file mode 100644 index 000000000..d868a1dd0 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/presences/upsert.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val presences = Presences(client) + +val result = presences.upsert( + presenceId = "", + status = "", + permissions = listOf(Permission.read(Role.any())), // (optional) + expiresAt = "2020-10-15T06:38:00.000+00:00", // (optional) + metadata = mapOf( "a" to "b" ), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/storage/create-file.md b/examples/2.3.x/client-android/kotlin/storage/create-file.md new file mode 100644 index 000000000..0e095d2d9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/storage/create-file.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Storage +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.createFile( + bucketId = "", + fileId = "", + file = InputFile.fromPath("file.png"), + permissions = listOf(Permission.read(Role.any())), // (optional) + folder = "photos/2026", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/storage/delete-file.md b/examples/2.3.x/client-android/kotlin/storage/delete-file.md new file mode 100644 index 000000000..831ea2b2c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/storage/delete-file.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.deleteFile( + bucketId = "", + fileId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/storage/get-file-download.md b/examples/2.3.x/client-android/kotlin/storage/get-file-download.md new file mode 100644 index 000000000..d60b5fa4a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/storage/get-file-download.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "", + fileId = "", + token = "", // (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 new file mode 100644 index 000000000..e2d2851d7 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/storage/get-file-preview.md @@ -0,0 +1,30 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage +import io.appwrite.enums.ImageGravity +import io.appwrite.enums.ImageFormat + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "", + fileId = "", + width = 0, // (optional) + height = 0, // (optional) + gravity = ImageGravity.AUTO, // (optional) + quality = -1, // (optional) + borderWidth = 0, // (optional) + borderColor = "FFFFFF", // (optional) + borderRadius = 0, // (optional) + opacity = 0, // (optional) + rotation = -360, // (optional) + background = "FFFFFF", // (optional) + output = ImageFormat.JPG, // (optional) + token = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/storage/get-file-view.md b/examples/2.3.x/client-android/kotlin/storage/get-file-view.md new file mode 100644 index 000000000..6e6e77f46 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/storage/get-file-view.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "", + fileId = "", + token = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/storage/get-file.md b/examples/2.3.x/client-android/kotlin/storage/get-file.md new file mode 100644 index 000000000..ac456abf5 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/storage/get-file.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFile( + bucketId = "", + fileId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/storage/list-files.md b/examples/2.3.x/client-android/kotlin/storage/list-files.md new file mode 100644 index 000000000..7ad2ebeee --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/storage/list-files.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.listFiles( + bucketId = "", + queries = listOf(), // (optional) + search = "", // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/storage/update-file.md b/examples/2.3.x/client-android/kotlin/storage/update-file.md new file mode 100644 index 000000000..532c815b8 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/storage/update-file.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.updateFile( + bucketId = "", + fileId = "", + name = "", // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/create-operations.md b/examples/2.3.x/client-android/kotlin/tablesdb/create-operations.md new file mode 100644 index 000000000..93c32c54a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/create-operations.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.createOperations( + transactionId = "", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "", + "tableId" to "", + "rowId" to "", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/create-row.md b/examples/2.3.x/client-android/kotlin/tablesdb/create-row.md new file mode 100644 index 000000000..e6e75051f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/create-row.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.createRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/create-transaction.md b/examples/2.3.x/client-android/kotlin/tablesdb/create-transaction.md new file mode 100644 index 000000000..dcf640c38 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/create-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.createTransaction( + ttl = 60, // (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 new file mode 100644 index 000000000..157c3d118 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/decrement-row-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.decrementRowColumn( + databaseId = "", + tableId = "", + rowId = "", + column = "", + value = 1, // (optional) + min = 0, // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/delete-row.md b/examples/2.3.x/client-android/kotlin/tablesdb/delete-row.md new file mode 100644 index 000000000..976a7f88f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/delete-row.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.deleteRow( + databaseId = "", + tableId = "", + rowId = "", + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/delete-transaction.md b/examples/2.3.x/client-android/kotlin/tablesdb/delete-transaction.md new file mode 100644 index 000000000..d3237744f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/delete-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.deleteTransaction( + transactionId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/get-row.md b/examples/2.3.x/client-android/kotlin/tablesdb/get-row.md new file mode 100644 index 000000000..e40856a3c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/get-row.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.getRow( + databaseId = "", + tableId = "", + rowId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/get-transaction.md b/examples/2.3.x/client-android/kotlin/tablesdb/get-transaction.md new file mode 100644 index 000000000..fd0e5ee61 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/get-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.getTransaction( + transactionId = "", +) +``` 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 new file mode 100644 index 000000000..802c6a2b1 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/increment-row-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.incrementRowColumn( + databaseId = "", + tableId = "", + rowId = "", + column = "", + value = 1, // (optional) + max = 100, // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/list-rows.md b/examples/2.3.x/client-android/kotlin/tablesdb/list-rows.md new file mode 100644 index 000000000..a428290a9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/list-rows.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.listRows( + databaseId = "", + tableId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) + total = false, // (optional) + ttl = 0, // (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 new file mode 100644 index 000000000..03c9d5b4a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/list-transactions.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.listTransactions( + queries = listOf(), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/update-row.md b/examples/2.3.x/client-android/kotlin/tablesdb/update-row.md new file mode 100644 index 000000000..fcba331bc --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/update-row.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.updateRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 33, + "isAdmin" to false + ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/update-transaction.md b/examples/2.3.x/client-android/kotlin/tablesdb/update-transaction.md new file mode 100644 index 000000000..4843e5b72 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/update-transaction.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.updateTransaction( + transactionId = "", + commit = false, // (optional) + rollback = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/upsert-row.md b/examples/2.3.x/client-android/kotlin/tablesdb/upsert-row.md new file mode 100644 index 000000000..d0b52793b --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/tablesdb/upsert-row.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDB = TablesDB(client) + +val result = tablesDB.upsertRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 33, + "isAdmin" to false + ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/create-installation.md b/examples/2.3.x/client-android/kotlin/teams/create-installation.md new file mode 100644 index 000000000..975cab997 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/create-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.createInstallation( + teamId = "", + appId = "", + authorizationDetails = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/create-membership.md b/examples/2.3.x/client-android/kotlin/teams/create-membership.md new file mode 100644 index 000000000..e5289e645 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/create-membership.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.createMembership( + teamId = "", + roles = listOf(), + email = "email@example.com", // (optional) + userId = "", // (optional) + phone = "+12065550100", // (optional) + url = "https://example.com", // (optional) + name = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/create.md b/examples/2.3.x/client-android/kotlin/teams/create.md new file mode 100644 index 000000000..7b4bfcbc5 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/create.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.create( + teamId = "", + name = "", + roles = listOf(), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/delete-installation.md b/examples/2.3.x/client-android/kotlin/teams/delete-installation.md new file mode 100644 index 000000000..7db6a2c54 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/delete-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.deleteInstallation( + teamId = "", + installationId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/delete-membership.md b/examples/2.3.x/client-android/kotlin/teams/delete-membership.md new file mode 100644 index 000000000..4c1cebeab --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/delete-membership.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.deleteMembership( + teamId = "", + membershipId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/delete.md b/examples/2.3.x/client-android/kotlin/teams/delete.md new file mode 100644 index 000000000..03f319f87 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/delete.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.delete( + teamId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/get-installation.md b/examples/2.3.x/client-android/kotlin/teams/get-installation.md new file mode 100644 index 000000000..805e97b32 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/get-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getInstallation( + teamId = "", + installationId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/get-membership.md b/examples/2.3.x/client-android/kotlin/teams/get-membership.md new file mode 100644 index 000000000..cc85d6fb5 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/get-membership.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getMembership( + teamId = "", + membershipId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/get-prefs.md b/examples/2.3.x/client-android/kotlin/teams/get-prefs.md new file mode 100644 index 000000000..3fa7fb3f3 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/get-prefs.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getPrefs( + teamId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/get.md b/examples/2.3.x/client-android/kotlin/teams/get.md new file mode 100644 index 000000000..a01167ca1 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/get.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.get( + teamId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/list-installations.md b/examples/2.3.x/client-android/kotlin/teams/list-installations.md new file mode 100644 index 000000000..6143b5b1d --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/list-installations.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.listInstallations( + teamId = "", + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/list-memberships.md b/examples/2.3.x/client-android/kotlin/teams/list-memberships.md new file mode 100644 index 000000000..438194247 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/list-memberships.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.listMemberships( + teamId = "", + queries = listOf(), // (optional) + search = "", // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/list.md b/examples/2.3.x/client-android/kotlin/teams/list.md new file mode 100644 index 000000000..d38ba4743 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/list.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.list( + queries = listOf(), // (optional) + search = "", // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/update-installation.md b/examples/2.3.x/client-android/kotlin/teams/update-installation.md new file mode 100644 index 000000000..e80ff3fd0 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/update-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateInstallation( + teamId = "", + installationId = "", + authorizationDetails = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/update-membership-status.md b/examples/2.3.x/client-android/kotlin/teams/update-membership-status.md new file mode 100644 index 000000000..cc4fb2fb6 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/update-membership-status.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateMembershipStatus( + teamId = "", + membershipId = "", + userId = "", + secret = "", +) +``` 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 new file mode 100644 index 000000000..6e721d4ec --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/update-membership.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateMembership( + teamId = "", + membershipId = "", + roles = listOf(), +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/update-name.md b/examples/2.3.x/client-android/kotlin/teams/update-name.md new file mode 100644 index 000000000..0248d2468 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/update-name.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateName( + teamId = "", + name = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/teams/update-prefs.md b/examples/2.3.x/client-android/kotlin/teams/update-prefs.md new file mode 100644 index 000000000..fd6e44eb8 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/teams/update-prefs.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updatePrefs( + teamId = "", + prefs = mapOf( "a" to "b" ), +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/create-document.md b/examples/2.3.x/client-android/kotlin/vectorsdb/create-document.md new file mode 100644 index 000000000..960654faa --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/create-document.md @@ -0,0 +1,27 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.createDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( + "embeddings" to listOf(0.12, -0.55, 0.88, 1.02), + "metadata" to mapOf( + "key" to "value" + ) + ), + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` 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 new file mode 100644 index 000000000..1a2908af9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/create-operations.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.createOperations( + transactionId = "", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "", + "collectionId" to "", + "documentId" to "", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/create-query.md b/examples/2.3.x/client-android/kotlin/vectorsdb/create-query.md new file mode 100644 index 000000000..0e8aaf25e --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.createQuery( + databaseId = "", + collectionId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) + total = false, // (optional) + ttl = 0, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/create-transaction.md b/examples/2.3.x/client-android/kotlin/vectorsdb/create-transaction.md new file mode 100644 index 000000000..9ca3de5ce --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/create-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.createTransaction( + ttl = 60, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/delete-document.md b/examples/2.3.x/client-android/kotlin/vectorsdb/delete-document.md new file mode 100644 index 000000000..9cc1856f2 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.deleteDocument( + databaseId = "", + collectionId = "", + documentId = "", + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/delete-transaction.md b/examples/2.3.x/client-android/kotlin/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..e97ab53a8 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.deleteTransaction( + transactionId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/get-document.md b/examples/2.3.x/client-android/kotlin/vectorsdb/get-document.md new file mode 100644 index 000000000..22584ab1a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/get-document.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.getDocument( + databaseId = "", + collectionId = "", + documentId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/get-transaction.md b/examples/2.3.x/client-android/kotlin/vectorsdb/get-transaction.md new file mode 100644 index 000000000..2a510ea86 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/get-transaction.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.getTransaction( + transactionId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/list-documents.md b/examples/2.3.x/client-android/kotlin/vectorsdb/list-documents.md new file mode 100644 index 000000000..90a7f04a3 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/list-documents.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.listDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // (optional) + transactionId = "", // (optional) + total = false, // (optional) + ttl = 0, // (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 new file mode 100644 index 000000000..97981c01a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/list-transactions.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.listTransactions( + queries = listOf(), // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/update-document.md b/examples/2.3.x/client-android/kotlin/vectorsdb/update-document.md new file mode 100644 index 000000000..13422596c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/update-document.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.updateDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/update-transaction.md b/examples/2.3.x/client-android/kotlin/vectorsdb/update-transaction.md new file mode 100644 index 000000000..c49da3486 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/update-transaction.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.updateTransaction( + transactionId = "", + commit = false, // (optional) + rollback = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/upsert-document.md b/examples/2.3.x/client-android/kotlin/vectorsdb/upsert-document.md new file mode 100644 index 000000000..111b61c6b --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/upsert-document.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val vectorsDB = VectorsDB(client) + +val result = vectorsDB.upsertDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) + transactionId = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-anonymous-session.md b/examples/2.3.x/client-apple/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..eeeb552a1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-anonymous-session.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 account = Account(client) + +let session = try await account.createAnonymousSession() + +``` 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 new file mode 100644 index 000000000..7233b7399 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-email-password-session.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 account = Account(client) + +let session = try await account.createEmailPasswordSession( + email: "email@example.com", + password: "password" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-email-token.md b/examples/2.3.x/client-apple/examples/account/create-email-token.md new file mode 100644 index 000000000..eb21e9bc0 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-email-token.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createEmailToken( + userId: "", + email: "email@example.com", + phrase: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-email-verification-otp.md b/examples/2.3.x/client-apple/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..67949cb32 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-email-verification-otp.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 account = Account(client) + +let token = try await account.createEmailVerificationOTP( + phrase: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-email-verification.md b/examples/2.3.x/client-apple/examples/account/create-email-verification.md new file mode 100644 index 000000000..841ddd68d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-email-verification.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 account = Account(client) + +let token = try await account.createEmailVerification( + url: "https://example.com" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-id-token-session.md b/examples/2.3.x/client-apple/examples/account/create-id-token-session.md new file mode 100644 index 000000000..a7e73da86 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-id-token-session.md @@ -0,0 +1,20 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createIdTokenSession( + provider: .apple, + idToken: "", + nonce: "", // optional + accessToken: "", // optional + accessTokenExpiry: 0, // optional + name: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-jwt.md b/examples/2.3.x/client-apple/examples/account/create-jwt.md new file mode 100644 index 000000000..96c867f7f --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-jwt.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 account = Account(client) + +let jwt = try await account.createJWT( + duration: 0 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-magic-url-token.md b/examples/2.3.x/client-apple/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..dd60fa939 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-magic-url-token.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 account = Account(client) + +let token = try await account.createMagicURLToken( + userId: "", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-mfa-authenticator.md b/examples/2.3.x/client-apple/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..b42fc7fdc --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaType = try await account.createMFAAuthenticator( + type: .totp +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-mfa-challenge.md b/examples/2.3.x/client-apple/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..dfb50487e --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-mfa-challenge.md @@ -0,0 +1,15 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaChallenge = try await account.createMFAChallenge( + factor: .email +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/client-apple/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..fb1b22de7 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-mfa-recovery-codes.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 account = Account(client) + +let mfaRecoveryCodes = try await account.createMFARecoveryCodes() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-o-auth-2-session.md b/examples/2.3.x/client-apple/examples/account/create-o-auth-2-session.md new file mode 100644 index 000000000..3552fda80 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-o-auth-2-session.md @@ -0,0 +1,18 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Session( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-o-auth-2-token.md b/examples/2.3.x/client-apple/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..1a22fb32c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-o-auth-2-token.md @@ -0,0 +1,18 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Token( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-phone-token.md b/examples/2.3.x/client-apple/examples/account/create-phone-token.md new file mode 100644 index 000000000..bdf53c43b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-phone-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 account = Account(client) + +let token = try await account.createPhoneToken( + userId: "", + phone: "+12065550100" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-phone-verification.md b/examples/2.3.x/client-apple/examples/account/create-phone-verification.md new file mode 100644 index 000000000..1259af838 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-phone-verification.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 account = Account(client) + +let token = try await account.createPhoneVerification() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-push-target.md b/examples/2.3.x/client-apple/examples/account/create-push-target.md new file mode 100644 index 000000000..2507d9660 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-push-target.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 account = Account(client) + +let target = try await account.createPushTarget( + targetId: "", + identifier: "", + providerId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-recovery-otp.md b/examples/2.3.x/client-apple/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..19ced6951 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-recovery-otp.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 account = Account(client) + +let token = try await account.createRecoveryOTP( + email: "email@example.com", + phrase: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-recovery.md b/examples/2.3.x/client-apple/examples/account/create-recovery.md new file mode 100644 index 000000000..3d2e2d1b4 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-recovery.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 account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-session.md b/examples/2.3.x/client-apple/examples/account/create-session.md new file mode 100644 index 000000000..1cec5939d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-session.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 account = Account(client) + +let session = try await account.createSession( + userId: "", + secret: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create-verification.md b/examples/2.3.x/client-apple/examples/account/create-verification.md new file mode 100644 index 000000000..054d7657c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create-verification.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 account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/create.md b/examples/2.3.x/client-apple/examples/account/create.md new file mode 100644 index 000000000..7bebdefce --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/create.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.create( + userId: "", + email: "email@example.com", + password: "password", + name: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/delete-consent-token.md b/examples/2.3.x/client-apple/examples/account/delete-consent-token.md new file mode 100644 index 000000000..ef9b8a2fc --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/delete-consent-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 account = Account(client) + +let result = try await account.deleteConsentToken( + consentId: "", + tokenId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/delete-consent.md b/examples/2.3.x/client-apple/examples/account/delete-consent.md new file mode 100644 index 000000000..862b1e3a2 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/delete-consent.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 account = Account(client) + +let result = try await account.deleteConsent( + consentId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/delete-identity.md b/examples/2.3.x/client-apple/examples/account/delete-identity.md new file mode 100644 index 000000000..0e63ea0cf --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/delete-identity.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 account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/client-apple/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..e8ef91a81 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteMFAAuthenticator( + type: .totp +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/delete-push-target.md b/examples/2.3.x/client-apple/examples/account/delete-push-target.md new file mode 100644 index 000000000..cf613b553 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/delete-push-target.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 account = Account(client) + +let result = try await account.deletePushTarget( + targetId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/delete-session.md b/examples/2.3.x/client-apple/examples/account/delete-session.md new file mode 100644 index 000000000..79e0aa2c6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/delete-session.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 account = Account(client) + +let result = try await account.deleteSession( + sessionId: "" +) + +``` 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 new file mode 100644 index 000000000..7e524f2d6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/delete-sessions.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 account = Account(client) + +let result = try await account.deleteSessions() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/get-consent-token.md b/examples/2.3.x/client-apple/examples/account/get-consent-token.md new file mode 100644 index 000000000..502f79ed1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/get-consent-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 account = Account(client) + +let oauth2ConsentToken = try await account.getConsentToken( + consentId: "", + tokenId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/get-consent.md b/examples/2.3.x/client-apple/examples/account/get-consent.md new file mode 100644 index 000000000..a7380c48b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/get-consent.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 account = Account(client) + +let oauth2Consent = try await account.getConsent( + consentId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/client-apple/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..31e9e5b88 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/get-mfa-recovery-codes.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 account = Account(client) + +let mfaRecoveryCodes = try await account.getMFARecoveryCodes() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/get-prefs.md b/examples/2.3.x/client-apple/examples/account/get-prefs.md new file mode 100644 index 000000000..0235e0d8d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/get-prefs.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 account = Account(client) + +let preferences = try await account.getPrefs() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/get-session.md b/examples/2.3.x/client-apple/examples/account/get-session.md new file mode 100644 index 000000000..8c22074a6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/get-session.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 account = Account(client) + +let session = try await account.getSession( + sessionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/get.md b/examples/2.3.x/client-apple/examples/account/get.md new file mode 100644 index 000000000..3ddbca44d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/get.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 account = Account(client) + +let user = try await account.get() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/list-consent-tokens.md b/examples/2.3.x/client-apple/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..bc3231697 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/list-consent-tokens.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 account = Account(client) + +let oauth2ConsentTokenList = try await account.listConsentTokens( + consentId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/list-consents.md b/examples/2.3.x/client-apple/examples/account/list-consents.md new file mode 100644 index 000000000..25b50d5e9 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/list-consents.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 account = Account(client) + +let oauth2ConsentList = try await account.listConsents( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/list-identities.md b/examples/2.3.x/client-apple/examples/account/list-identities.md new file mode 100644 index 000000000..eb5874c59 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/list-identities.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 account = Account(client) + +let identityList = try await account.listIdentities( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/list-mfa-factors.md b/examples/2.3.x/client-apple/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..534ccbe2b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/list-mfa-factors.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 account = Account(client) + +let mfaFactors = try await account.listMFAFactors() + +``` 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 new file mode 100644 index 000000000..2932881f0 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/list-sessions.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 account = Account(client) + +let sessionList = try await account.listSessions() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-email-verification-otp.md b/examples/2.3.x/client-apple/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..0082a8fc0 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-email-verification-otp.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 account = Account(client) + +let token = try await account.updateEmailVerificationOTP( + userId: "", + secret: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-email-verification.md b/examples/2.3.x/client-apple/examples/account/update-email-verification.md new file mode 100644 index 000000000..823cc4128 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-email-verification.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 account = Account(client) + +let token = try await account.updateEmailVerification( + userId: "", + secret: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-email.md b/examples/2.3.x/client-apple/examples/account/update-email.md new file mode 100644 index 000000000..f13a4d5f1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-email.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 account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-magic-url-session.md b/examples/2.3.x/client-apple/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..c55827099 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-magic-url-session.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 account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "", + secret: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-mfa-authenticator.md b/examples/2.3.x/client-apple/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..75c37f229 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateMFAAuthenticator( + type: .totp, + otp: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-mfa-challenge.md b/examples/2.3.x/client-apple/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..6bc6e47ab --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-mfa-challenge.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 account = Account(client) + +let session = try await account.updateMFAChallenge( + challengeId: "", + otp: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/client-apple/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..5445ab215 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-mfa-recovery-codes.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 account = Account(client) + +let mfaRecoveryCodes = try await account.updateMFARecoveryCodes() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-mfa.md b/examples/2.3.x/client-apple/examples/account/update-mfa.md new file mode 100644 index 000000000..9a509efa9 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-mfa.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 account = Account(client) + +let user = try await account.updateMFA( + mfa: false +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-name.md b/examples/2.3.x/client-apple/examples/account/update-name.md new file mode 100644 index 000000000..72d0b7a26 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-name.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 account = Account(client) + +let user = try await account.updateName( + name: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-password.md b/examples/2.3.x/client-apple/examples/account/update-password.md new file mode 100644 index 000000000..fe1479efd --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-password.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 account = Account(client) + +let user = try await account.updatePassword( + password: "password", + oldPassword: "password" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-phone-session.md b/examples/2.3.x/client-apple/examples/account/update-phone-session.md new file mode 100644 index 000000000..bc3ae963d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-phone-session.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 account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "", + secret: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-phone-verification.md b/examples/2.3.x/client-apple/examples/account/update-phone-verification.md new file mode 100644 index 000000000..11f7f91ac --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-phone-verification.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 account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "", + secret: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-phone.md b/examples/2.3.x/client-apple/examples/account/update-phone.md new file mode 100644 index 000000000..098bb06b3 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-phone.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 account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-prefs.md b/examples/2.3.x/client-apple/examples/account/update-prefs.md new file mode 100644 index 000000000..43ebb2461 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-prefs.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 account = Account(client) + +let user = try await account.updatePrefs( + prefs: [ + "language": "en", + "timezone": "UTC", + "darkTheme": true + ] +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-push-target.md b/examples/2.3.x/client-apple/examples/account/update-push-target.md new file mode 100644 index 000000000..7b4ce8bd9 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-push-target.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 account = Account(client) + +let target = try await account.updatePushTarget( + targetId: "", + identifier: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-recovery-otp.md b/examples/2.3.x/client-apple/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..e10d6e029 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-recovery-otp.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 account = Account(client) + +let token = try await account.updateRecoveryOTP( + userId: "", + secret: "", + password: "password" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-recovery.md b/examples/2.3.x/client-apple/examples/account/update-recovery.md new file mode 100644 index 000000000..f785d8f63 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-recovery.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 account = Account(client) + +let token = try await account.updateRecovery( + userId: "", + secret: "", + password: "password" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-session.md b/examples/2.3.x/client-apple/examples/account/update-session.md new file mode 100644 index 000000000..2e9849b47 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-session.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 account = Account(client) + +let session = try await account.updateSession( + sessionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-status.md b/examples/2.3.x/client-apple/examples/account/update-status.md new file mode 100644 index 000000000..a6198d68f --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-status.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 account = Account(client) + +let user = try await account.updateStatus() + +``` diff --git a/examples/2.3.x/client-apple/examples/account/update-verification.md b/examples/2.3.x/client-apple/examples/account/update-verification.md new file mode 100644 index 000000000..d4a251c5a --- /dev/null +++ b/examples/2.3.x/client-apple/examples/account/update-verification.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 account = Account(client) + +let token = try await account.updateVerification( + userId: "", + secret: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-browser.md b/examples/2.3.x/client-apple/examples/avatars/get-browser.md new file mode 100644 index 000000000..9825d8804 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getBrowser( + code: .avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-credit-card.md b/examples/2.3.x/client-apple/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..a294929a6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getCreditCard( + code: .americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-favicon.md b/examples/2.3.x/client-apple/examples/avatars/get-favicon.md new file mode 100644 index 000000000..0d5435214 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-favicon.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 bytes = try await avatars.getFavicon( + url: "https://example.com" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-flag.md b/examples/2.3.x/client-apple/examples/avatars/get-flag.md new file mode 100644 index 000000000..ae4586067 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getFlag( + code: .afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-image.md b/examples/2.3.x/client-apple/examples/avatars/get-image.md new file mode 100644 index 000000000..0cbc666ae --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-image.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 avatars = Avatars(client) + +let bytes = try await avatars.getImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-initials.md b/examples/2.3.x/client-apple/examples/avatars/get-initials.md new file mode 100644 index 000000000..44fca8f30 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-initials.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 avatars = Avatars(client) + +let bytes = try await avatars.getInitials( + name: "", // optional + width: 0, // optional + height: 0, // optional + background: "FFFFFF" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-photo.md b/examples/2.3.x/client-apple/examples/avatars/get-photo.md new file mode 100644 index 000000000..d5a198275 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-photo.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getPhoto( + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: "png", // optional + rating: "g", // optional + userId: "current()", // optional + emailHash: "", // optional + name: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-qr.md b/examples/2.3.x/client-apple/examples/avatars/get-qr.md new file mode 100644 index 000000000..86a43fba1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-qr.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 avatars = Avatars(client) + +let bytes = try await avatars.getQR( + text: "", + size: 1, // optional + margin: 0, // optional + download: false // optional +) + +``` 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 new file mode 100644 index 000000000..7711677f4 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/get-screenshot.md @@ -0,0 +1,37 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getScreenshot( + url: "https://example.com", + headers: [ + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + ], // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional + theme: .dark, // optional + userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // optional + fullpage: true, // optional + locale: "en-US", // optional + timezone: .africaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [.geolocation, .notifications], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: .jpeg // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/create-document.md b/examples/2.3.x/client-apple/examples/databases/create-document.md new file mode 100644 index 000000000..973bb324e --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/create-document.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/create-operations.md b/examples/2.3.x/client-apple/examples/databases/create-operations.md new file mode 100644 index 000000000..f669acb86 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/create-operations.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let transaction = try await databases.createOperations( + transactionId: "", + operations: [ + [ + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": [ + "name": "Walter O'Brien" + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/create-transaction.md b/examples/2.3.x/client-apple/examples/databases/create-transaction.md new file mode 100644 index 000000000..29bb609ec --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/create-transaction.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 databases = Databases(client) + +let transaction = try await databases.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/decrement-document-attribute.md b/examples/2.3.x/client-apple/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..8f7746ed2 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/decrement-document-attribute.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.decrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 1, // optional + min: 0, // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/delete-document.md b/examples/2.3.x/client-apple/examples/databases/delete-document.md new file mode 100644 index 000000000..6cd36430b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/delete-document.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 databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/delete-transaction.md b/examples/2.3.x/client-apple/examples/databases/delete-transaction.md new file mode 100644 index 000000000..4a3a7e29e --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/delete-transaction.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 databases = Databases(client) + +let result = try await databases.deleteTransaction( + transactionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/get-document.md b/examples/2.3.x/client-apple/examples/databases/get-document.md new file mode 100644 index 000000000..c7cc142a6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/get-document.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/get-transaction.md b/examples/2.3.x/client-apple/examples/databases/get-transaction.md new file mode 100644 index 000000000..9e2c76c59 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/get-transaction.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 databases = Databases(client) + +let transaction = try await databases.getTransaction( + transactionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/increment-document-attribute.md b/examples/2.3.x/client-apple/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..3bd247486 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/increment-document-attribute.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.incrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 1, // optional + max: 100, // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/list-documents.md b/examples/2.3.x/client-apple/examples/databases/list-documents.md new file mode 100644 index 000000000..801424eaf --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/list-documents.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +) + +``` 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 new file mode 100644 index 000000000..15c823f51 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/list-transactions.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 databases = Databases(client) + +let transactionList = try await databases.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/update-document.md b/examples/2.3.x/client-apple/examples/databases/update-document.md new file mode 100644 index 000000000..0963c234a --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/update-document.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + ], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/update-transaction.md b/examples/2.3.x/client-apple/examples/databases/update-transaction.md new file mode 100644 index 000000000..e4e0eb62a --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/update-transaction.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 databases = Databases(client) + +let transaction = try await databases.updateTransaction( + transactionId: "", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/upsert-document.md b/examples/2.3.x/client-apple/examples/databases/upsert-document.md new file mode 100644 index 000000000..9e8aea690 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/databases/upsert-document.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.upsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/create-document.md b/examples/2.3.x/client-apple/examples/documentsdb/create-document.md new file mode 100644 index 000000000..a0d6a69bc --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/create-document.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.createDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // 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 new file mode 100644 index 000000000..c170200b7 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/create-documents.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.createDocuments( + databaseId: "", + collectionId: "", + documents: [], + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/create-operations.md b/examples/2.3.x/client-apple/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..1255f668d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.createOperations( + transactionId: "", + operations: [ + [ + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": [ + "name": "Walter O'Brien" + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/create-transaction.md b/examples/2.3.x/client-apple/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..88030b7de --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/create-transaction.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 documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-apple/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..11d2ed3e1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.decrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 1, // optional + min: 0, // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/delete-document.md b/examples/2.3.x/client-apple/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..10eef1736 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/delete-document.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 documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/delete-transaction.md b/examples/2.3.x/client-apple/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..ca1c9bb19 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/delete-transaction.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 documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteTransaction( + transactionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/get-document.md b/examples/2.3.x/client-apple/examples/documentsdb/get-document.md new file mode 100644 index 000000000..504bbf1cc --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/get-document.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.getDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/get-transaction.md b/examples/2.3.x/client-apple/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..4435dce02 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/get-transaction.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 documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.getTransaction( + transactionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-apple/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..41648951d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.incrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 1, // optional + max: 100, // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/list-documents.md b/examples/2.3.x/client-apple/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..81768bc19 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/list-documents.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.listDocuments( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/list-transactions.md b/examples/2.3.x/client-apple/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..0fe1ca767 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/list-transactions.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 documentsDB = DocumentsDB(client) + +let transactionList = try await documentsDB.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/update-document.md b/examples/2.3.x/client-apple/examples/documentsdb/update-document.md new file mode 100644 index 000000000..250ecd700 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/update-document.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.updateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/update-transaction.md b/examples/2.3.x/client-apple/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..1ea869b7c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/update-transaction.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 documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.updateTransaction( + transactionId: "", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/upsert-document.md b/examples/2.3.x/client-apple/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..cede61c6d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/documentsdb/upsert-document.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.upsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/functions/create-execution.md b/examples/2.3.x/client-apple/examples/functions/create-execution.md new file mode 100644 index 000000000..9597fd9d3 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "", + body: "", // optional + async: false, // optional + path: "", // optional + method: .gET, // optional + headers: [:], // optional + scheduledAt: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/functions/get-execution.md b/examples/2.3.x/client-apple/examples/functions/get-execution.md new file mode 100644 index 000000000..fbd787f4c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/functions/get-execution.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 functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "", + executionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/functions/list-executions.md b/examples/2.3.x/client-apple/examples/functions/list-executions.md new file mode 100644 index 000000000..e0204619f --- /dev/null +++ b/examples/2.3.x/client-apple/examples/functions/list-executions.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 functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "", + 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 new file mode 100644 index 000000000..86894fea9 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/graphql/mutation.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 graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + +``` diff --git a/examples/2.3.x/client-apple/examples/graphql/query.md b/examples/2.3.x/client-apple/examples/graphql/query.md new file mode 100644 index 000000000..e01c78df1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/graphql/query.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 graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + +``` diff --git a/examples/2.3.x/client-apple/examples/locale/get.md b/examples/2.3.x/client-apple/examples/locale/get.md new file mode 100644 index 000000000..f87854a1d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/locale/get.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 locale = Locale(client) + +let locale = try await locale.get() + +``` 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 new file mode 100644 index 000000000..d524b5e2a --- /dev/null +++ b/examples/2.3.x/client-apple/examples/locale/list-codes.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 locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + +``` 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 new file mode 100644 index 000000000..dfad5ced7 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/locale/list-continents.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 locale = Locale(client) + +let continentList = try await locale.listContinents() + +``` 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 new file mode 100644 index 000000000..ee6a97f92 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/locale/list-countries-eu.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 locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + +``` 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 new file mode 100644 index 000000000..d9267a684 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/locale/list-countries-phones.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 locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + +``` 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 new file mode 100644 index 000000000..2b79063db --- /dev/null +++ b/examples/2.3.x/client-apple/examples/locale/list-countries.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 locale = Locale(client) + +let countryList = try await locale.listCountries() + +``` 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 new file mode 100644 index 000000000..ccd5c92e1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/locale/list-currencies.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 locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + +``` 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 new file mode 100644 index 000000000..7132b1bfe --- /dev/null +++ b/examples/2.3.x/client-apple/examples/locale/list-languages.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 locale = Locale(client) + +let languageList = try await locale.listLanguages() + +``` diff --git a/examples/2.3.x/client-apple/examples/messaging/create-subscriber.md b/examples/2.3.x/client-apple/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..a7e96e552 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/messaging/create-subscriber.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 messaging = Messaging(client) + +let subscriber = try await messaging.createSubscriber( + topicId: "", + subscriberId: "", + targetId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/messaging/delete-subscriber.md b/examples/2.3.x/client-apple/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..7e68489b6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/messaging/delete-subscriber.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 messaging = Messaging(client) + +let result = try await messaging.deleteSubscriber( + topicId: "", + subscriberId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/organization/create-installation.md b/examples/2.3.x/client-apple/examples/organization/create-installation.md new file mode 100644 index 000000000..b2eb34ab3 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/organization/create-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let appInstallation = try await organization.createInstallation( + appId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/organization/delete-installation.md b/examples/2.3.x/client-apple/examples/organization/delete-installation.md new file mode 100644 index 000000000..3124453f0 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/organization/delete-installation.md @@ -0,0 +1,14 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let result = try await organization.deleteInstallation( + installationId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/organization/get-installation.md b/examples/2.3.x/client-apple/examples/organization/get-installation.md new file mode 100644 index 000000000..f9bbcabab --- /dev/null +++ b/examples/2.3.x/client-apple/examples/organization/get-installation.md @@ -0,0 +1,14 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let appInstallation = try await organization.getInstallation( + installationId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/organization/list-installations.md b/examples/2.3.x/client-apple/examples/organization/list-installations.md new file mode 100644 index 000000000..56c8b0541 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/organization/list-installations.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let appInstallationList = try await organization.listInstallations( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/organization/update-installation.md b/examples/2.3.x/client-apple/examples/organization/update-installation.md new file mode 100644 index 000000000..e0be7adfc --- /dev/null +++ b/examples/2.3.x/client-apple/examples/organization/update-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let appInstallation = try await organization.updateInstallation( + installationId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/presences/delete.md b/examples/2.3.x/client-apple/examples/presences/delete.md new file mode 100644 index 000000000..6df012b51 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/presences/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 presences = Presences(client) + +let result = try await presences.delete( + presenceId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/presences/get.md b/examples/2.3.x/client-apple/examples/presences/get.md new file mode 100644 index 000000000..9e8ae6ac2 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/presences/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 presences = Presences(client) + +let presence = try await presences.get( + presenceId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/presences/list.md b/examples/2.3.x/client-apple/examples/presences/list.md new file mode 100644 index 000000000..e24323535 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/presences/list.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let presences = Presences(client) + +let presenceList = try await presences.list( + queries: [], // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/presences/update.md b/examples/2.3.x/client-apple/examples/presences/update.md new file mode 100644 index 000000000..1dce7b7d3 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/presences/update.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 presences = Presences(client) + +let presence = try await presences.update( + presenceId: "", + status: "", // optional + expiresAt: "2020-10-15T06:38:00.000+00:00", // optional + metadata: [:], // optional + permissions: [Permission.read(Role.any())], // optional + purge: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/presences/upsert.md b/examples/2.3.x/client-apple/examples/presences/upsert.md new file mode 100644 index 000000000..23e495015 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/presences/upsert.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 presences = Presences(client) + +let presence = try await presences.upsert( + presenceId: "", + status: "", + permissions: [Permission.read(Role.any())], // optional + expiresAt: "2020-10-15T06:38:00.000+00:00", // optional + metadata: [:] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/storage/create-file.md b/examples/2.3.x/client-apple/examples/storage/create-file.md new file mode 100644 index 000000000..bfa3197a1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/storage/create-file.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 storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "", + fileId: "", + file: InputFile.fromPath("file.png"), + permissions: [Permission.read(Role.any())], // optional + folder: "photos/2026" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/storage/delete-file.md b/examples/2.3.x/client-apple/examples/storage/delete-file.md new file mode 100644 index 000000000..dee1c64b2 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/storage/delete-file.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 storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "", + fileId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/storage/get-file-download.md b/examples/2.3.x/client-apple/examples/storage/get-file-download.md new file mode 100644 index 000000000..c46d0723a --- /dev/null +++ b/examples/2.3.x/client-apple/examples/storage/get-file-download.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 storage = Storage(client) + +let bytes = try await storage.getFileDownload( + bucketId: "", + fileId: "", + token: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/storage/get-file-preview.md b/examples/2.3.x/client-apple/examples/storage/get-file-preview.md new file mode 100644 index 000000000..ea1df78ad --- /dev/null +++ b/examples/2.3.x/client-apple/examples/storage/get-file-preview.md @@ -0,0 +1,28 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFilePreview( + bucketId: "", + fileId: "", + width: 0, // optional + height: 0, // optional + gravity: .auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "FFFFFF", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "FFFFFF", // optional + output: .jpg, // optional + token: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/storage/get-file-view.md b/examples/2.3.x/client-apple/examples/storage/get-file-view.md new file mode 100644 index 000000000..1364d8ef6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/storage/get-file-view.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 storage = Storage(client) + +let bytes = try await storage.getFileView( + bucketId: "", + fileId: "", + token: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/storage/get-file.md b/examples/2.3.x/client-apple/examples/storage/get-file.md new file mode 100644 index 000000000..7ec8438e5 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/storage/get-file.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 storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "", + fileId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/storage/list-files.md b/examples/2.3.x/client-apple/examples/storage/list-files.md new file mode 100644 index 000000000..f65495610 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/storage/list-files.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 storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "", + queries: [], // optional + search: "", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/storage/update-file.md b/examples/2.3.x/client-apple/examples/storage/update-file.md new file mode 100644 index 000000000..dcc0c5dd2 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/storage/update-file.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 storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "", + fileId: "", + name: "", // optional + permissions: [Permission.read(Role.any())] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/create-operations.md b/examples/2.3.x/client-apple/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..edebcee35 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/create-operations.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDB = TablesDB(client) + +let transaction = try await tablesDB.createOperations( + transactionId: "", + operations: [ + [ + "action": "create", + "databaseId": "", + "tableId": "", + "rowId": "", + "data": [ + "name": "Walter O'Brien" + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/create-row.md b/examples/2.3.x/client-apple/examples/tablesdb/create-row.md new file mode 100644 index 000000000..68e9fc386 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/create-row.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.createRow( + databaseId: "", + tableId: "", + rowId: "", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/create-transaction.md b/examples/2.3.x/client-apple/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..97d1346e9 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/create-transaction.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 tablesDB = TablesDB(client) + +let transaction = try await tablesDB.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/client-apple/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..bef6d34e2 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.decrementRowColumn( + databaseId: "", + tableId: "", + rowId: "", + column: "", + value: 1, // optional + min: 0, // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/delete-row.md b/examples/2.3.x/client-apple/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..82890ed77 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/delete-row.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 tablesDB = TablesDB(client) + +let result = try await tablesDB.deleteRow( + databaseId: "", + tableId: "", + rowId: "", + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/delete-transaction.md b/examples/2.3.x/client-apple/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..865aeaecc --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/delete-transaction.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 tablesDB = TablesDB(client) + +let result = try await tablesDB.deleteTransaction( + transactionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/get-row.md b/examples/2.3.x/client-apple/examples/tablesdb/get-row.md new file mode 100644 index 000000000..51167094f --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/get-row.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 tablesDB = TablesDB(client) + +let row = try await tablesDB.getRow( + databaseId: "", + tableId: "", + rowId: "", + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/get-transaction.md b/examples/2.3.x/client-apple/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..601ece79b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/get-transaction.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 tablesDB = TablesDB(client) + +let transaction = try await tablesDB.getTransaction( + transactionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/increment-row-column.md b/examples/2.3.x/client-apple/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..f82985265 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/increment-row-column.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.incrementRowColumn( + databaseId: "", + tableId: "", + rowId: "", + column: "", + value: 1, // optional + max: 100, // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/list-rows.md b/examples/2.3.x/client-apple/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..b6df80e0c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/list-rows.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 tablesDB = TablesDB(client) + +let rowList = try await tablesDB.listRows( + databaseId: "", + tableId: "", + queries: [], // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // 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 new file mode 100644 index 000000000..655109394 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/list-transactions.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 tablesDB = TablesDB(client) + +let transactionList = try await tablesDB.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/update-row.md b/examples/2.3.x/client-apple/examples/tablesdb/update-row.md new file mode 100644 index 000000000..29fb327e2 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/update-row.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.updateRow( + databaseId: "", + tableId: "", + rowId: "", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + ], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/update-transaction.md b/examples/2.3.x/client-apple/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..432d7c486 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/update-transaction.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 tablesDB = TablesDB(client) + +let transaction = try await tablesDB.updateTransaction( + transactionId: "", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/tablesdb/upsert-row.md b/examples/2.3.x/client-apple/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..77d971c97 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/tablesdb/upsert-row.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.upsertRow( + databaseId: "", + tableId: "", + rowId: "", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + ], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/create-installation.md b/examples/2.3.x/client-apple/examples/teams/create-installation.md new file mode 100644 index 000000000..71f64aae4 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/create-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let appInstallation = try await teams.createInstallation( + teamId: "", + appId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/create-membership.md b/examples/2.3.x/client-apple/examples/teams/create-membership.md new file mode 100644 index 000000000..124765abf --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "", + roles: [], + email: "email@example.com", // optional + userId: "", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/create.md b/examples/2.3.x/client-apple/examples/teams/create.md new file mode 100644 index 000000000..70600909b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/create.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "", + name: "", + roles: [] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/delete-installation.md b/examples/2.3.x/client-apple/examples/teams/delete-installation.md new file mode 100644 index 000000000..66ef934c6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/delete-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.deleteInstallation( + teamId: "", + installationId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/delete-membership.md b/examples/2.3.x/client-apple/examples/teams/delete-membership.md new file mode 100644 index 000000000..c5e61cfb2 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "", + membershipId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/delete.md b/examples/2.3.x/client-apple/examples/teams/delete.md new file mode 100644 index 000000000..782b41b3d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/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 teams = Teams(client) + +let result = try await teams.delete( + teamId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/get-installation.md b/examples/2.3.x/client-apple/examples/teams/get-installation.md new file mode 100644 index 000000000..c4420115b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/get-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let appInstallation = try await teams.getInstallation( + teamId: "", + installationId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/get-membership.md b/examples/2.3.x/client-apple/examples/teams/get-membership.md new file mode 100644 index 000000000..94882c98f --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "", + membershipId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/get-prefs.md b/examples/2.3.x/client-apple/examples/teams/get-prefs.md new file mode 100644 index 000000000..0fc67385e --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/get-prefs.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 teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/get.md b/examples/2.3.x/client-apple/examples/teams/get.md new file mode 100644 index 000000000..592be9553 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/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 teams = Teams(client) + +let team = try await teams.get( + teamId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/list-installations.md b/examples/2.3.x/client-apple/examples/teams/list-installations.md new file mode 100644 index 000000000..c64ae7d84 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/list-installations.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let appInstallationList = try await teams.listInstallations( + teamId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/list-memberships.md b/examples/2.3.x/client-apple/examples/teams/list-memberships.md new file mode 100644 index 000000000..b2338476b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/list-memberships.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 teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "", + queries: [], // optional + search: "", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/list.md b/examples/2.3.x/client-apple/examples/teams/list.md new file mode 100644 index 000000000..7404c8b7f --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/list.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let teamList = try await teams.list( + queries: [], // optional + search: "", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/update-installation.md b/examples/2.3.x/client-apple/examples/teams/update-installation.md new file mode 100644 index 000000000..7b5029308 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/update-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let appInstallation = try await teams.updateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/update-membership-status.md b/examples/2.3.x/client-apple/examples/teams/update-membership-status.md new file mode 100644 index 000000000..1a3ae9139 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/update-membership-status.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 teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "", + membershipId: "", + userId: "", + secret: "" +) + +``` 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 new file mode 100644 index 000000000..5663848d1 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/update-membership.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "", + membershipId: "", + roles: [] +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/update-name.md b/examples/2.3.x/client-apple/examples/teams/update-name.md new file mode 100644 index 000000000..bc7187cd9 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/update-name.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "", + name: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/teams/update-prefs.md b/examples/2.3.x/client-apple/examples/teams/update-prefs.md new file mode 100644 index 000000000..c40796b3a --- /dev/null +++ b/examples/2.3.x/client-apple/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "", + prefs: [:] +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/create-document.md b/examples/2.3.x/client-apple/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..b1340908b --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/create-document.md @@ -0,0 +1,29 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.createDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [ + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": [ + "key": "value" + ] + ], + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` 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 new file mode 100644 index 000000000..b48c45983 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.createOperations( + transactionId: "", + operations: [ + [ + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": [ + "name": "Walter O'Brien" + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/create-query.md b/examples/2.3.x/client-apple/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..e80be9b2d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/create-query.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 vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.createQuery( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/create-transaction.md b/examples/2.3.x/client-apple/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..4cdabc2ec --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/create-transaction.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 vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/delete-document.md b/examples/2.3.x/client-apple/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..dd80e834d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/delete-document.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 vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/client-apple/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..ff7538a06 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/delete-transaction.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 vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteTransaction( + transactionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/get-document.md b/examples/2.3.x/client-apple/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..e1814376f --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/get-document.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.getDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/get-transaction.md b/examples/2.3.x/client-apple/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..4b8fd1a64 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/get-transaction.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 vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.getTransaction( + transactionId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/list-documents.md b/examples/2.3.x/client-apple/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..c082c815e --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/list-documents.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.listDocuments( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/list-transactions.md b/examples/2.3.x/client-apple/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..26aa4f467 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/list-transactions.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 vectorsDB = VectorsDB(client) + +let transactionList = try await vectorsDB.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/update-document.md b/examples/2.3.x/client-apple/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..f96706f84 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/update-document.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.updateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/update-transaction.md b/examples/2.3.x/client-apple/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..f254540e5 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/update-transaction.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 vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.updateTransaction( + transactionId: "", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/upsert-document.md b/examples/2.3.x/client-apple/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..4fd857661 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/vectorsdb/upsert-document.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.upsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-anonymous-session.md b/examples/2.3.x/client-flutter/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..0cdedf8f2 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-anonymous-session.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 + +Account account = Account(client); + +Session result = await account.createAnonymousSession(); +``` 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 new file mode 100644 index 000000000..d444996d9 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-email-password-session.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 + +Account account = Account(client); + +Session result = await account.createEmailPasswordSession( + email: 'email@example.com', + password: 'password', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-email-token.md b/examples/2.3.x/client-flutter/examples/account/create-email-token.md new file mode 100644 index 000000000..738905812 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-email-token.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 + +Account account = Account(client); + +Token result = await account.createEmailToken( + userId: '', + email: 'email@example.com', + phrase: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-email-verification-otp.md b/examples/2.3.x/client-flutter/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..941db9659 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-email-verification-otp.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 + +Account account = Account(client); + +Token result = await account.createEmailVerificationOTP( + phrase: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-email-verification.md b/examples/2.3.x/client-flutter/examples/account/create-email-verification.md new file mode 100644 index 000000000..d88979c88 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-email-verification.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 + +Account account = Account(client); + +Token result = await account.createEmailVerification( + url: 'https://example.com', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-id-token-session.md b/examples/2.3.x/client-flutter/examples/account/create-id-token-session.md new file mode 100644 index 000000000..61f840659 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-id-token-session.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createIdTokenSession( + provider: enums.IdTokenProvider.apple, + idToken: '', + nonce: '', // optional + accessToken: '', // optional + accessTokenExpiry: 0, // optional + name: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-jwt.md b/examples/2.3.x/client-flutter/examples/account/create-jwt.md new file mode 100644 index 000000000..72ff1180e --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-jwt.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 + +Account account = Account(client); + +Jwt result = await account.createJWT( + duration: 0, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-magic-url-token.md b/examples/2.3.x/client-flutter/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..59d1cc243 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-magic-url-token.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 + +Account account = Account(client); + +Token result = await account.createMagicURLToken( + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-mfa-authenticator.md b/examples/2.3.x/client-flutter/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..c86de3ba7 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaType result = await account.createMFAAuthenticator( + type: enums.AuthenticatorType.totp, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-mfa-challenge.md b/examples/2.3.x/client-flutter/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..c7007d328 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaChallenge result = await account.createMFAChallenge( + factor: enums.AuthenticationFactor.email, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/client-flutter/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..252dec7a7 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-mfa-recovery-codes.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 + +Account account = Account(client); + +MfaRecoveryCodes result = await account.createMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-o-auth-2-session.md b/examples/2.3.x/client-flutter/examples/account/create-o-auth-2-session.md new file mode 100644 index 000000000..75abae31a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-o-auth-2-session.md @@ -0,0 +1,17 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Session( + provider: enums.OAuthProvider.amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-o-auth-2-token.md b/examples/2.3.x/client-flutter/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..be098a627 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-o-auth-2-token.md @@ -0,0 +1,17 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Token( + provider: enums.OAuthProvider.amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-phone-token.md b/examples/2.3.x/client-flutter/examples/account/create-phone-token.md new file mode 100644 index 000000000..95799d62a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-phone-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 + +Account account = Account(client); + +Token result = await account.createPhoneToken( + userId: '', + phone: '+12065550100', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-phone-verification.md b/examples/2.3.x/client-flutter/examples/account/create-phone-verification.md new file mode 100644 index 000000000..9fc84dfc7 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-phone-verification.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 + +Account account = Account(client); + +Token result = await account.createPhoneVerification(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-push-target.md b/examples/2.3.x/client-flutter/examples/account/create-push-target.md new file mode 100644 index 000000000..d493b2a00 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-push-target.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 + +Account account = Account(client); + +Target result = await account.createPushTarget( + targetId: '', + identifier: '', + providerId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-recovery-otp.md b/examples/2.3.x/client-flutter/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..366469f35 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-recovery-otp.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 + +Account account = Account(client); + +Token result = await account.createRecoveryOTP( + email: 'email@example.com', + phrase: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-recovery.md b/examples/2.3.x/client-flutter/examples/account/create-recovery.md new file mode 100644 index 000000000..fe5ecfa05 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-recovery.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 + +Account account = Account(client); + +Token result = await account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-session.md b/examples/2.3.x/client-flutter/examples/account/create-session.md new file mode 100644 index 000000000..ebac1f930 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-session.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 + +Account account = Account(client); + +Session result = await account.createSession( + userId: '', + secret: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-verification.md b/examples/2.3.x/client-flutter/examples/account/create-verification.md new file mode 100644 index 000000000..c36cb8f34 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create-verification.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 + +Account account = Account(client); + +Token result = await account.createVerification( + url: 'https://example.com', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/create.md b/examples/2.3.x/client-flutter/examples/account/create.md new file mode 100644 index 000000000..8343f6284 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/create.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 + +Account account = Account(client); + +User result = await account.create( + userId: '', + email: 'email@example.com', + password: 'password', + name: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/delete-consent-token.md b/examples/2.3.x/client-flutter/examples/account/delete-consent-token.md new file mode 100644 index 000000000..9c8774793 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/delete-consent-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 + +Account account = Account(client); + +await account.deleteConsentToken( + consentId: '', + tokenId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/delete-consent.md b/examples/2.3.x/client-flutter/examples/account/delete-consent.md new file mode 100644 index 000000000..78799117e --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/delete-consent.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 + +Account account = Account(client); + +await account.deleteConsent( + consentId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/delete-identity.md b/examples/2.3.x/client-flutter/examples/account/delete-identity.md new file mode 100644 index 000000000..47407e7f7 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/delete-identity.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 + +Account account = Account(client); + +await account.deleteIdentity( + identityId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/client-flutter/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..eac797665 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteMFAAuthenticator( + type: enums.AuthenticatorType.totp, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/delete-push-target.md b/examples/2.3.x/client-flutter/examples/account/delete-push-target.md new file mode 100644 index 000000000..477a0446f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/delete-push-target.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 + +Account account = Account(client); + +await account.deletePushTarget( + targetId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/delete-session.md b/examples/2.3.x/client-flutter/examples/account/delete-session.md new file mode 100644 index 000000000..513f2146f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/delete-session.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 + +Account account = Account(client); + +await account.deleteSession( + sessionId: '', +); +``` 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 new file mode 100644 index 000000000..e8e8ba1af --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/delete-sessions.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 + +Account account = Account(client); + +await account.deleteSessions(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/get-consent-token.md b/examples/2.3.x/client-flutter/examples/account/get-consent-token.md new file mode 100644 index 000000000..67a0d842d --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/get-consent-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 + +Account account = Account(client); + +Oauth2ConsentToken result = await account.getConsentToken( + consentId: '', + tokenId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/get-consent.md b/examples/2.3.x/client-flutter/examples/account/get-consent.md new file mode 100644 index 000000000..aff627251 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/get-consent.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 + +Account account = Account(client); + +Oauth2Consent result = await account.getConsent( + consentId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/client-flutter/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..ed5531a32 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/get-mfa-recovery-codes.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 + +Account account = Account(client); + +MfaRecoveryCodes result = await account.getMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/get-prefs.md b/examples/2.3.x/client-flutter/examples/account/get-prefs.md new file mode 100644 index 000000000..dc359f9c1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/get-prefs.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 + +Account account = Account(client); + +Preferences result = await account.getPrefs(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/get-session.md b/examples/2.3.x/client-flutter/examples/account/get-session.md new file mode 100644 index 000000000..c27058a8e --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/get-session.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 + +Account account = Account(client); + +Session result = await account.getSession( + sessionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/get.md b/examples/2.3.x/client-flutter/examples/account/get.md new file mode 100644 index 000000000..1bd67c6a1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/get.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 + +Account account = Account(client); + +User result = await account.get(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/list-consent-tokens.md b/examples/2.3.x/client-flutter/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..835c7775a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/list-consent-tokens.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 + +Account account = Account(client); + +Oauth2ConsentTokenList result = await account.listConsentTokens( + consentId: '', + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/list-consents.md b/examples/2.3.x/client-flutter/examples/account/list-consents.md new file mode 100644 index 000000000..d39f05479 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/list-consents.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 + +Account account = Account(client); + +Oauth2ConsentList result = await account.listConsents( + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/list-identities.md b/examples/2.3.x/client-flutter/examples/account/list-identities.md new file mode 100644 index 000000000..d0c0e5b60 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/list-identities.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 + +Account account = Account(client); + +IdentityList result = await account.listIdentities( + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/list-mfa-factors.md b/examples/2.3.x/client-flutter/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..4cfcf88b3 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/list-mfa-factors.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 + +Account account = Account(client); + +MfaFactors result = await account.listMFAFactors(); +``` 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 new file mode 100644 index 000000000..18db93bbb --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/list-sessions.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 + +Account account = Account(client); + +SessionList result = await account.listSessions(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-email-verification-otp.md b/examples/2.3.x/client-flutter/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..52ff4c119 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-email-verification-otp.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 + +Account account = Account(client); + +Token result = await account.updateEmailVerificationOTP( + userId: '', + secret: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-email-verification.md b/examples/2.3.x/client-flutter/examples/account/update-email-verification.md new file mode 100644 index 000000000..7e3975e96 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-email-verification.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 + +Account account = Account(client); + +Token result = await account.updateEmailVerification( + userId: '', + secret: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-email.md b/examples/2.3.x/client-flutter/examples/account/update-email.md new file mode 100644 index 000000000..e5e1a169a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-email.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 + +Account account = Account(client); + +User result = await account.updateEmail( + email: 'email@example.com', + password: 'password', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-magic-url-session.md b/examples/2.3.x/client-flutter/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..c45dcf1eb --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-magic-url-session.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 + +Account account = Account(client); + +Session result = await account.updateMagicURLSession( + userId: '', + secret: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-mfa-authenticator.md b/examples/2.3.x/client-flutter/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..539c5e280 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateMFAAuthenticator( + type: enums.AuthenticatorType.totp, + otp: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-mfa-challenge.md b/examples/2.3.x/client-flutter/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..55f4ebee4 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-mfa-challenge.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 + +Account account = Account(client); + +Session result = await account.updateMFAChallenge( + challengeId: '', + otp: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/client-flutter/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..7a188d40f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-mfa-recovery-codes.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 + +Account account = Account(client); + +MfaRecoveryCodes result = await account.updateMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-mfa.md b/examples/2.3.x/client-flutter/examples/account/update-mfa.md new file mode 100644 index 000000000..db9addd61 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-mfa.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 + +Account account = Account(client); + +User result = await account.updateMFA( + mfa: false, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-name.md b/examples/2.3.x/client-flutter/examples/account/update-name.md new file mode 100644 index 000000000..8ab712232 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-name.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 + +Account account = Account(client); + +User result = await account.updateName( + name: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-password.md b/examples/2.3.x/client-flutter/examples/account/update-password.md new file mode 100644 index 000000000..c2604a9c2 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-password.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 + +Account account = Account(client); + +User result = await account.updatePassword( + password: 'password', + oldPassword: 'password', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-phone-session.md b/examples/2.3.x/client-flutter/examples/account/update-phone-session.md new file mode 100644 index 000000000..f538680a5 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-phone-session.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 + +Account account = Account(client); + +Session result = await account.updatePhoneSession( + userId: '', + secret: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-phone-verification.md b/examples/2.3.x/client-flutter/examples/account/update-phone-verification.md new file mode 100644 index 000000000..de226a7c7 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-phone-verification.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 + +Account account = Account(client); + +Token result = await account.updatePhoneVerification( + userId: '', + secret: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-phone.md b/examples/2.3.x/client-flutter/examples/account/update-phone.md new file mode 100644 index 000000000..f631c5dfc --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-phone.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 + +Account account = Account(client); + +User result = await account.updatePhone( + phone: '+12065550100', + password: 'password', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-prefs.md b/examples/2.3.x/client-flutter/examples/account/update-prefs.md new file mode 100644 index 000000000..6f9863d38 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-prefs.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 + +Account account = Account(client); + +User result = await account.updatePrefs( + prefs: { + "language": "en", + "timezone": "UTC", + "darkTheme": true + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-push-target.md b/examples/2.3.x/client-flutter/examples/account/update-push-target.md new file mode 100644 index 000000000..601f3aece --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-push-target.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 + +Account account = Account(client); + +Target result = await account.updatePushTarget( + targetId: '', + identifier: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-recovery-otp.md b/examples/2.3.x/client-flutter/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..f7b4a2efc --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-recovery-otp.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 + +Account account = Account(client); + +Token result = await account.updateRecoveryOTP( + userId: '', + secret: '', + password: 'password', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-recovery.md b/examples/2.3.x/client-flutter/examples/account/update-recovery.md new file mode 100644 index 000000000..809aa0448 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-recovery.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 + +Account account = Account(client); + +Token result = await account.updateRecovery( + userId: '', + secret: '', + password: 'password', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-session.md b/examples/2.3.x/client-flutter/examples/account/update-session.md new file mode 100644 index 000000000..7fb334aaa --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-session.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 + +Account account = Account(client); + +Session result = await account.updateSession( + sessionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-status.md b/examples/2.3.x/client-flutter/examples/account/update-status.md new file mode 100644 index 000000000..d7b0d0dcc --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-status.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 + +Account account = Account(client); + +User result = await account.updateStatus(); +``` diff --git a/examples/2.3.x/client-flutter/examples/account/update-verification.md b/examples/2.3.x/client-flutter/examples/account/update-verification.md new file mode 100644 index 000000000..339b4b91c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/account/update-verification.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 + +Account account = Account(client); + +Token result = await account.updateVerification( + userId: '', + secret: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-browser.md b/examples/2.3.x/client-flutter/examples/avatars/get-browser.md new file mode 100644 index 000000000..91cd7be6e --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-browser.md @@ -0,0 +1,39 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.dart'; +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +Uint8List bytes = await avatars.getBrowser( + code: enums.Browser.avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getBrowser( + code: enums.Browser.avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1, // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-credit-card.md b/examples/2.3.x/client-flutter/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..4665fcce1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-credit-card.md @@ -0,0 +1,39 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.dart'; +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +Uint8List bytes = await avatars.getCreditCard( + code: enums.CreditCard.americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getCreditCard( + code: enums.CreditCard.americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1, // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-favicon.md b/examples/2.3.x/client-flutter/examples/avatars/get-favicon.md new file mode 100644 index 000000000..5f523f814 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-favicon.md @@ -0,0 +1,32 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.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); + +// Downloading file +Uint8List bytes = await avatars.getFavicon( + url: 'https://example.com', +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getFavicon( + url: 'https://example.com', + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-flag.md b/examples/2.3.x/client-flutter/examples/avatars/get-flag.md new file mode 100644 index 000000000..552c22ccd --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-flag.md @@ -0,0 +1,39 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.dart'; +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +Uint8List bytes = await avatars.getFlag( + code: enums.Flag.afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getFlag( + code: enums.Flag.afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1, // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-image.md b/examples/2.3.x/client-flutter/examples/avatars/get-image.md new file mode 100644 index 000000000..3f74cae01 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-image.md @@ -0,0 +1,36 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.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); + +// Downloading file +Uint8List bytes = await avatars.getImage( + url: 'https://example.com', + width: 0, // optional + height: 0, // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getImage( + url: 'https://example.com', + width: 0, // optional + height: 0, // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-initials.md b/examples/2.3.x/client-flutter/examples/avatars/get-initials.md new file mode 100644 index 000000000..89e20e7c6 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-initials.md @@ -0,0 +1,38 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.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); + +// Downloading file +Uint8List bytes = await avatars.getInitials( + name: '', // optional + width: 0, // optional + height: 0, // optional + background: 'FFFFFF', // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getInitials( + name: '', // optional + width: 0, // optional + height: 0, // optional + background: 'FFFFFF', // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-photo.md b/examples/2.3.x/client-flutter/examples/avatars/get-photo.md new file mode 100644 index 000000000..371b19d91 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-photo.md @@ -0,0 +1,46 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.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); + +// Downloading file +Uint8List bytes = await avatars.getPhoto( + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: 'png', // optional + rating: 'g', // optional + userId: 'current()', // optional + emailHash: '', // optional + name: '', // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getPhoto( + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: 'png', // optional + rating: 'g', // optional + userId: 'current()', // optional + emailHash: '', // optional + name: '', // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-qr.md b/examples/2.3.x/client-flutter/examples/avatars/get-qr.md new file mode 100644 index 000000000..3579f4312 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-qr.md @@ -0,0 +1,38 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.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); + +// Downloading file +Uint8List bytes = await avatars.getQR( + text: '', + size: 1, // optional + margin: 0, // optional + download: false, // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getQR( + text: '', + size: 1, // optional + margin: 0, // optional + download: false, // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` 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 new file mode 100644 index 000000000..daa38d171 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/get-screenshot.md @@ -0,0 +1,77 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.dart'; +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +Uint8List bytes = await avatars.getScreenshot( + url: 'https://example.com', + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional + theme: enums.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 + locale: 'en-US', // optional + timezone: enums.Timezone.africaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [enums.BrowserPermission.geolocation, enums.BrowserPermission.notifications], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: enums.ImageFormat.jpeg, // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getScreenshot( + url: 'https://example.com', + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional + theme: enums.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 + locale: 'en-US', // optional + timezone: enums.Timezone.africaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [enums.BrowserPermission.geolocation, enums.BrowserPermission.notifications], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: enums.ImageFormat.jpeg, // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/create-document.md b/examples/2.3.x/client-flutter/examples/databases/create-document.md new file mode 100644 index 000000000..a4df848f0 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/create-document.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/create-operations.md b/examples/2.3.x/client-flutter/examples/databases/create-operations.md new file mode 100644 index 000000000..0551c28bf --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/create-operations.md @@ -0,0 +1,24 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Transaction result = await databases.createOperations( + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/create-transaction.md b/examples/2.3.x/client-flutter/examples/databases/create-transaction.md new file mode 100644 index 000000000..14ea55637 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/create-transaction.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 + +Databases databases = Databases(client); + +Transaction result = await databases.createTransaction( + ttl: 60, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/decrement-document-attribute.md b/examples/2.3.x/client-flutter/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..0d178cff1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.decrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/delete-document.md b/examples/2.3.x/client-flutter/examples/databases/delete-document.md new file mode 100644 index 000000000..92350ce2f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/delete-document.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 + +Databases databases = Databases(client); + +await databases.deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/delete-transaction.md b/examples/2.3.x/client-flutter/examples/databases/delete-transaction.md new file mode 100644 index 000000000..3d6d5ed41 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/delete-transaction.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 + +Databases databases = Databases(client); + +await databases.deleteTransaction( + transactionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/get-document.md b/examples/2.3.x/client-flutter/examples/databases/get-document.md new file mode 100644 index 000000000..1f384afd1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/get-document.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 + +Databases databases = Databases(client); + +Document result = await databases.getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/get-transaction.md b/examples/2.3.x/client-flutter/examples/databases/get-transaction.md new file mode 100644 index 000000000..142b8bfa4 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/get-transaction.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 + +Databases databases = Databases(client); + +Transaction result = await databases.getTransaction( + transactionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/increment-document-attribute.md b/examples/2.3.x/client-flutter/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..05b3690ef --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.incrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/list-documents.md b/examples/2.3.x/client-flutter/examples/databases/list-documents.md new file mode 100644 index 000000000..531be6ade --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/list-documents.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 + +Databases databases = Databases(client); + +DocumentList result = await databases.listDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +); +``` 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 new file mode 100644 index 000000000..ca9ff6fb1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/list-transactions.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 + +Databases databases = Databases(client); + +TransactionList result = await databases.listTransactions( + queries: [], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/update-document.md b/examples/2.3.x/client-flutter/examples/databases/update-document.md new file mode 100644 index 000000000..52557334c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/update-document.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/update-transaction.md b/examples/2.3.x/client-flutter/examples/databases/update-transaction.md new file mode 100644 index 000000000..a882eb92c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/update-transaction.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 + +Databases databases = Databases(client); + +Transaction result = await databases.updateTransaction( + transactionId: '', + commit: false, // optional + rollback: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/upsert-document.md b/examples/2.3.x/client-flutter/examples/databases/upsert-document.md new file mode 100644 index 000000000..6678a0dcb --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/databases/upsert-document.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/create-document.md b/examples/2.3.x/client-flutter/examples/documentsdb/create-document.md new file mode 100644 index 000000000..d4b564e2e --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/create-document.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // 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 new file mode 100644 index 000000000..6a5083730 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/create-documents.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.createDocuments( + databaseId: '', + collectionId: '', + documents: [], + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/create-operations.md b/examples/2.3.x/client-flutter/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..a4d1ecddb --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/create-operations.md @@ -0,0 +1,24 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.createOperations( + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/create-transaction.md b/examples/2.3.x/client-flutter/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..2d9cb9f72 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/create-transaction.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.createTransaction( + ttl: 60, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-flutter/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..dcdac3aae --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.decrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/delete-document.md b/examples/2.3.x/client-flutter/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..8d59422e1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/delete-document.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/delete-transaction.md b/examples/2.3.x/client-flutter/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..9b95d9487 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/delete-transaction.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteTransaction( + transactionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/get-document.md b/examples/2.3.x/client-flutter/examples/documentsdb/get-document.md new file mode 100644 index 000000000..45db46e6a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/get-document.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/get-transaction.md b/examples/2.3.x/client-flutter/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..4b1a5f1f8 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/get-transaction.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.getTransaction( + transactionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-flutter/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..c2c6e95c8 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.incrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/list-documents.md b/examples/2.3.x/client-flutter/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..92d2651c5 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/list-documents.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.listDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/list-transactions.md b/examples/2.3.x/client-flutter/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..d2c09525d --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/list-transactions.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +TransactionList result = await documentsDB.listTransactions( + queries: [], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/update-document.md b/examples/2.3.x/client-flutter/examples/documentsdb/update-document.md new file mode 100644 index 000000000..1b9fba9a5 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/update-transaction.md b/examples/2.3.x/client-flutter/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..ebcf17be1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/update-transaction.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.updateTransaction( + transactionId: '', + commit: false, // optional + rollback: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/upsert-document.md b/examples/2.3.x/client-flutter/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..bdf3844b1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/functions/create-execution.md b/examples/2.3.x/client-flutter/examples/functions/create-execution.md new file mode 100644 index 000000000..0e2197489 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +Execution result = await functions.createExecution( + functionId: '', + body: '', // optional + xasync: false, // optional + path: '', // optional + method: enums.ExecutionMethod.gET, // optional + headers: {}, // optional + scheduledAt: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/functions/get-execution.md b/examples/2.3.x/client-flutter/examples/functions/get-execution.md new file mode 100644 index 000000000..f17e10c1d --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/functions/get-execution.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 + +Functions functions = Functions(client); + +Execution result = await functions.getExecution( + functionId: '', + executionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/functions/list-executions.md b/examples/2.3.x/client-flutter/examples/functions/list-executions.md new file mode 100644 index 000000000..ae31ffcce --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/functions/list-executions.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 + +Functions functions = Functions(client); + +ExecutionList result = await functions.listExecutions( + functionId: '', + 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 new file mode 100644 index 000000000..7ec3ba75f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/graphql/mutation.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 + +Graphql graphql = Graphql(client); + +Any result = await graphql.mutation( + query: {}, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/graphql/query.md b/examples/2.3.x/client-flutter/examples/graphql/query.md new file mode 100644 index 000000000..cac705e5a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/graphql/query.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 + +Graphql graphql = Graphql(client); + +Any result = await graphql.query( + query: {}, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/locale/get.md b/examples/2.3.x/client-flutter/examples/locale/get.md new file mode 100644 index 000000000..630211442 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/locale/get.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 + +Locale locale = Locale(client); + +Locale result = await locale.get(); +``` 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 new file mode 100644 index 000000000..23c375ba3 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/locale/list-codes.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 + +Locale locale = Locale(client); + +LocaleCodeList result = await locale.listCodes(); +``` 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 new file mode 100644 index 000000000..349be7951 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/locale/list-continents.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 + +Locale locale = Locale(client); + +ContinentList result = await locale.listContinents(); +``` 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 new file mode 100644 index 000000000..f775aa2e7 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/locale/list-countries-eu.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 + +Locale locale = Locale(client); + +CountryList result = await locale.listCountriesEU(); +``` 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 new file mode 100644 index 000000000..ee368e297 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/locale/list-countries-phones.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 + +Locale locale = Locale(client); + +PhoneList result = await locale.listCountriesPhones(); +``` 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 new file mode 100644 index 000000000..17e0814f9 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/locale/list-countries.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 + +Locale locale = Locale(client); + +CountryList result = await locale.listCountries(); +``` 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 new file mode 100644 index 000000000..751de786f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/locale/list-currencies.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 + +Locale locale = Locale(client); + +CurrencyList result = await locale.listCurrencies(); +``` 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 new file mode 100644 index 000000000..28b46a0a8 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/locale/list-languages.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 + +Locale locale = Locale(client); + +LanguageList result = await locale.listLanguages(); +``` diff --git a/examples/2.3.x/client-flutter/examples/messaging/create-subscriber.md b/examples/2.3.x/client-flutter/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..e28a1ab62 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/messaging/create-subscriber.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 + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.createSubscriber( + topicId: '', + subscriberId: '', + targetId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/messaging/delete-subscriber.md b/examples/2.3.x/client-flutter/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..4861ec905 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/messaging/delete-subscriber.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 + +Messaging messaging = Messaging(client); + +await messaging.deleteSubscriber( + topicId: '', + subscriberId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/organization/create-installation.md b/examples/2.3.x/client-flutter/examples/organization/create-installation.md new file mode 100644 index 000000000..d28dacfc2 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/organization/create-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +AppInstallation result = await organization.createInstallation( + appId: '', + authorizationDetails: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/organization/delete-installation.md b/examples/2.3.x/client-flutter/examples/organization/delete-installation.md new file mode 100644 index 000000000..3142e2450 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/organization/delete-installation.md @@ -0,0 +1,13 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +await organization.deleteInstallation( + installationId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/organization/get-installation.md b/examples/2.3.x/client-flutter/examples/organization/get-installation.md new file mode 100644 index 000000000..dd2d7ac71 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/organization/get-installation.md @@ -0,0 +1,13 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +AppInstallation result = await organization.getInstallation( + installationId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/organization/list-installations.md b/examples/2.3.x/client-flutter/examples/organization/list-installations.md new file mode 100644 index 000000000..bdecb1083 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/organization/list-installations.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +AppInstallationList result = await organization.listInstallations( + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/organization/update-installation.md b/examples/2.3.x/client-flutter/examples/organization/update-installation.md new file mode 100644 index 000000000..fa834d49f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/organization/update-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +AppInstallation result = await organization.updateInstallation( + installationId: '', + authorizationDetails: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/presences/delete.md b/examples/2.3.x/client-flutter/examples/presences/delete.md new file mode 100644 index 000000000..b79ace2c8 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/presences/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 + +Presences presences = Presences(client); + +await presences.delete( + presenceId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/presences/get.md b/examples/2.3.x/client-flutter/examples/presences/get.md new file mode 100644 index 000000000..9fad57c6f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/presences/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 + +Presences presences = Presences(client); + +Presence result = await presences.get( + presenceId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/presences/list.md b/examples/2.3.x/client-flutter/examples/presences/list.md new file mode 100644 index 000000000..5810a2984 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/presences/list.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 + +Presences presences = Presences(client); + +PresenceList result = await presences.list( + queries: [], // optional + total: false, // optional + ttl: 0, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/presences/update.md b/examples/2.3.x/client-flutter/examples/presences/update.md new file mode 100644 index 000000000..84a64be01 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/presences/update.md @@ -0,0 +1,20 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Presences presences = Presences(client); + +Presence result = await presences.update( + presenceId: '', + status: '', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional + permissions: [Permission.read(Role.any())], // optional + purge: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/presences/upsert.md b/examples/2.3.x/client-flutter/examples/presences/upsert.md new file mode 100644 index 000000000..32acc92fe --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/presences/upsert.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Presences presences = Presences(client); + +Presence result = await presences.upsert( + presenceId: '', + status: '', + permissions: [Permission.read(Role.any())], // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/storage/create-file.md b/examples/2.3.x/client-flutter/examples/storage/create-file.md new file mode 100644 index 000000000..7d8fbd13c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/storage/create-file.md @@ -0,0 +1,20 @@ +```dart +import 'dart:io'; +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.createFile( + bucketId: '', + fileId: '', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + permissions: [Permission.read(Role.any())], // optional + folder: 'photos/2026', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/storage/delete-file.md b/examples/2.3.x/client-flutter/examples/storage/delete-file.md new file mode 100644 index 000000000..960e92f57 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/storage/delete-file.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 + +Storage storage = Storage(client); + +await storage.deleteFile( + bucketId: '', + fileId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/storage/get-file-download.md b/examples/2.3.x/client-flutter/examples/storage/get-file-download.md new file mode 100644 index 000000000..8e6e75eff --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/storage/get-file-download.md @@ -0,0 +1,36 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.dart'; +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +Uint8List bytes = await storage.getFileDownload( + bucketId: '', + fileId: '', + token: '', // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFileDownload( + bucketId: '', + fileId: '', + token: '', // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/storage/get-file-preview.md b/examples/2.3.x/client-flutter/examples/storage/get-file-preview.md new file mode 100644 index 000000000..bc811343a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/storage/get-file-preview.md @@ -0,0 +1,59 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.dart'; +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +Uint8List bytes = await storage.getFilePreview( + bucketId: '', + fileId: '', + width: 0, // optional + height: 0, // optional + gravity: enums.ImageGravity.auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: 'FFFFFF', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: 'FFFFFF', // optional + output: enums.ImageFormat.jpg, // optional + token: '', // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFilePreview( + bucketId: '', + fileId: '', + width: 0, // optional + height: 0, // optional + gravity: enums.ImageGravity.auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: 'FFFFFF', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: 'FFFFFF', // optional + output: enums.ImageFormat.jpg, // optional + token: '', // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/storage/get-file-view.md b/examples/2.3.x/client-flutter/examples/storage/get-file-view.md new file mode 100644 index 000000000..6cc01b658 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/storage/get-file-view.md @@ -0,0 +1,36 @@ +```dart +import 'dart:io'; +import 'dart:typed_data'; +import 'package:flutter/material.dart'; +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +Uint8List bytes = await storage.getFileView( + bucketId: '', + fileId: '', + token: '', // optional +); + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFileView( + bucketId: '', + fileId: '', + token: '', // optional + ), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data!) + : const CircularProgressIndicator(); + }, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/storage/get-file.md b/examples/2.3.x/client-flutter/examples/storage/get-file.md new file mode 100644 index 000000000..9f1adb6e7 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/storage/get-file.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 + +Storage storage = Storage(client); + +File result = await storage.getFile( + bucketId: '', + fileId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/storage/list-files.md b/examples/2.3.x/client-flutter/examples/storage/list-files.md new file mode 100644 index 000000000..0decd6953 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/storage/list-files.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 + +Storage storage = Storage(client); + +FileList result = await storage.listFiles( + bucketId: '', + queries: [], // optional + search: '', // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/storage/update-file.md b/examples/2.3.x/client-flutter/examples/storage/update-file.md new file mode 100644 index 000000000..90814329a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/storage/update-file.md @@ -0,0 +1,18 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.updateFile( + bucketId: '', + fileId: '', + name: '', // optional + permissions: [Permission.read(Role.any())], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/create-operations.md b/examples/2.3.x/client-flutter/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..bc779b6bf --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/create-operations.md @@ -0,0 +1,24 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDB tablesDB = TablesDB(client); + +Transaction result = await tablesDB.createOperations( + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "tableId": "", + "rowId": "", + "data": { + "name": "Walter O'Brien" + } + } + ], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/create-row.md b/examples/2.3.x/client-flutter/examples/tablesdb/create-row.md new file mode 100644 index 000000000..cb5d85783 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/create-row.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.createRow( + databaseId: '', + tableId: '', + rowId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/create-transaction.md b/examples/2.3.x/client-flutter/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..527dde392 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/create-transaction.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 + +TablesDB tablesDB = TablesDB(client); + +Transaction result = await tablesDB.createTransaction( + ttl: 60, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/client-flutter/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..bee4987f1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.decrementRowColumn( + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/delete-row.md b/examples/2.3.x/client-flutter/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..c4e66f58a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/delete-row.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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteRow( + databaseId: '', + tableId: '', + rowId: '', + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/delete-transaction.md b/examples/2.3.x/client-flutter/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..ab178fb88 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/delete-transaction.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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteTransaction( + transactionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/get-row.md b/examples/2.3.x/client-flutter/examples/tablesdb/get-row.md new file mode 100644 index 000000000..6e385a846 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/get-row.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 + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.getRow( + databaseId: '', + tableId: '', + rowId: '', + queries: [], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/get-transaction.md b/examples/2.3.x/client-flutter/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..39b02a77f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/get-transaction.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 + +TablesDB tablesDB = TablesDB(client); + +Transaction result = await tablesDB.getTransaction( + transactionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/increment-row-column.md b/examples/2.3.x/client-flutter/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..9b0e47694 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/increment-row-column.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.incrementRowColumn( + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/list-rows.md b/examples/2.3.x/client-flutter/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..a2637a93e --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/list-rows.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 + +TablesDB tablesDB = TablesDB(client); + +RowList result = await tablesDB.listRows( + databaseId: '', + tableId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // 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 new file mode 100644 index 000000000..d95e5198b --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/list-transactions.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 + +TablesDB tablesDB = TablesDB(client); + +TransactionList result = await tablesDB.listTransactions( + queries: [], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/update-row.md b/examples/2.3.x/client-flutter/examples/tablesdb/update-row.md new file mode 100644 index 000000000..3cf3c9551 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/update-row.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.updateRow( + databaseId: '', + tableId: '', + rowId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/update-transaction.md b/examples/2.3.x/client-flutter/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..d5a8e0820 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/update-transaction.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 + +TablesDB tablesDB = TablesDB(client); + +Transaction result = await tablesDB.updateTransaction( + transactionId: '', + commit: false, // optional + rollback: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/tablesdb/upsert-row.md b/examples/2.3.x/client-flutter/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..74c7d2c58 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/tablesdb/upsert-row.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.upsertRow( + databaseId: '', + tableId: '', + rowId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/create-installation.md b/examples/2.3.x/client-flutter/examples/teams/create-installation.md new file mode 100644 index 000000000..4ad63b8de --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/create-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +AppInstallation result = await teams.createInstallation( + teamId: '', + appId: '', + authorizationDetails: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/create-membership.md b/examples/2.3.x/client-flutter/examples/teams/create-membership.md new file mode 100644 index 000000000..caab7926c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.createMembership( + teamId: '', + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/create.md b/examples/2.3.x/client-flutter/examples/teams/create.md new file mode 100644 index 000000000..7a4af366f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/create.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.create( + teamId: '', + name: '', + roles: [], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/delete-installation.md b/examples/2.3.x/client-flutter/examples/teams/delete-installation.md new file mode 100644 index 000000000..4c872cec0 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/delete-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.deleteInstallation( + teamId: '', + installationId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/delete-membership.md b/examples/2.3.x/client-flutter/examples/teams/delete-membership.md new file mode 100644 index 000000000..e42161fac --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.deleteMembership( + teamId: '', + membershipId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/delete.md b/examples/2.3.x/client-flutter/examples/teams/delete.md new file mode 100644 index 000000000..d3f4d7115 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/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 + +Teams teams = Teams(client); + +await teams.delete( + teamId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/get-installation.md b/examples/2.3.x/client-flutter/examples/teams/get-installation.md new file mode 100644 index 000000000..eec876623 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/get-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +AppInstallation result = await teams.getInstallation( + teamId: '', + installationId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/get-membership.md b/examples/2.3.x/client-flutter/examples/teams/get-membership.md new file mode 100644 index 000000000..3a2906b9c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.getMembership( + teamId: '', + membershipId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/get-prefs.md b/examples/2.3.x/client-flutter/examples/teams/get-prefs.md new file mode 100644 index 000000000..e35006fa5 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/get-prefs.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 + +Teams teams = Teams(client); + +Preferences result = await teams.getPrefs( + teamId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/get.md b/examples/2.3.x/client-flutter/examples/teams/get.md new file mode 100644 index 000000000..2a71db42b --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/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 + +Teams teams = Teams(client); + +Team result = await teams.get( + teamId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/list-installations.md b/examples/2.3.x/client-flutter/examples/teams/list-installations.md new file mode 100644 index 000000000..9c3aa8524 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/list-installations.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +AppInstallationList result = await teams.listInstallations( + teamId: '', + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/list-memberships.md b/examples/2.3.x/client-flutter/examples/teams/list-memberships.md new file mode 100644 index 000000000..bf643511c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/list-memberships.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 + +Teams teams = Teams(client); + +MembershipList result = await teams.listMemberships( + teamId: '', + queries: [], // optional + search: '', // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/list.md b/examples/2.3.x/client-flutter/examples/teams/list.md new file mode 100644 index 000000000..2de4ebfe8 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/list.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +TeamList result = await teams.list( + queries: [], // optional + search: '', // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/update-installation.md b/examples/2.3.x/client-flutter/examples/teams/update-installation.md new file mode 100644 index 000000000..e9e8ba4bf --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/update-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +AppInstallation result = await teams.updateInstallation( + teamId: '', + installationId: '', + authorizationDetails: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/update-membership-status.md b/examples/2.3.x/client-flutter/examples/teams/update-membership-status.md new file mode 100644 index 000000000..ebb924b0a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/update-membership-status.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 + +Teams teams = Teams(client); + +Membership result = await teams.updateMembershipStatus( + teamId: '', + membershipId: '', + userId: '', + secret: '', +); +``` 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 new file mode 100644 index 000000000..2d7c25c87 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.updateMembership( + teamId: '', + membershipId: '', + roles: [], +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/update-name.md b/examples/2.3.x/client-flutter/examples/teams/update-name.md new file mode 100644 index 000000000..629e76082 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/update-name.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.updateName( + teamId: '', + name: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/teams/update-prefs.md b/examples/2.3.x/client-flutter/examples/teams/update-prefs.md new file mode 100644 index 000000000..1a53c4985 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Preferences result = await teams.updatePrefs( + teamId: '', + prefs: {}, +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/create-document.md b/examples/2.3.x/client-flutter/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..fc39a7c10 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/create-document.md @@ -0,0 +1,30 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` 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 new file mode 100644 index 000000000..a994693e3 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/create-operations.md @@ -0,0 +1,24 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.createOperations( + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/create-query.md b/examples/2.3.x/client-flutter/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..fa41ee5c5 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/create-query.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 + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.createQuery( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/create-transaction.md b/examples/2.3.x/client-flutter/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..9c8c96d3b --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/create-transaction.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 + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.createTransaction( + ttl: 60, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/delete-document.md b/examples/2.3.x/client-flutter/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..7827d9c36 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/delete-document.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 + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/client-flutter/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..e4b82888f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/delete-transaction.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 + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteTransaction( + transactionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/get-document.md b/examples/2.3.x/client-flutter/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..28e544b37 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/get-document.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 + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/get-transaction.md b/examples/2.3.x/client-flutter/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..1d191d09c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/get-transaction.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 + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.getTransaction( + transactionId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/list-documents.md b/examples/2.3.x/client-flutter/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..03b4931de --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/list-documents.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 + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.listDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/list-transactions.md b/examples/2.3.x/client-flutter/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..fb7f83dbf --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/list-transactions.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 + +VectorsDB vectorsDB = VectorsDB(client); + +TransactionList result = await vectorsDB.listTransactions( + queries: [], // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/update-document.md b/examples/2.3.x/client-flutter/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..8c2a90919 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/update-transaction.md b/examples/2.3.x/client-flutter/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..1abd8b028 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/update-transaction.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 + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.updateTransaction( + transactionId: '', + commit: false, // optional + rollback: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/upsert-document.md b/examples/2.3.x/client-flutter/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..1367bba4a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```dart +import 'package:appwrite/appwrite.dart'; +import 'package:appwrite/permission.dart'; +import 'package:appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +); +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-anonymous-session.md b/examples/2.3.x/client-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..c040efb8c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,35 @@ +```graphql +mutation { + accountCreateAnonymousSession { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` 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 new file mode 100644 index 000000000..c68a4feb2 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-email-password-session.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountCreateEmailPasswordSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-email-token.md b/examples/2.3.x/client-graphql/examples/account/create-email-token.md new file mode 100644 index 000000000..f9db2e2cc --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-email-token.md @@ -0,0 +1,16 @@ +```graphql +mutation { + accountCreateEmailToken( + userId: "", + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-email-verification-otp.md b/examples/2.3.x/client-graphql/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..5a0e10202 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-email-verification-otp.md @@ -0,0 +1,14 @@ +```graphql +mutation { + accountCreateEmailVerificationOTP( + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-email-verification.md b/examples/2.3.x/client-graphql/examples/account/create-email-verification.md new file mode 100644 index 000000000..3a4c559b2 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-email-verification.md @@ -0,0 +1,14 @@ +```graphql +mutation { + accountCreateEmailVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-id-token-session.md b/examples/2.3.x/client-graphql/examples/account/create-id-token-session.md new file mode 100644 index 000000000..3c0bb50ff --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-id-token-session.md @@ -0,0 +1,42 @@ +```graphql +mutation { + accountCreateIdTokenSession( + provider: "apple", + idToken: "", + nonce: "", + accessToken: "", + accessTokenExpiry: 0, + name: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-jwt.md b/examples/2.3.x/client-graphql/examples/account/create-jwt.md new file mode 100644 index 000000000..8bc8f9acd --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-jwt.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountCreateJWT( + duration: 0 + ) { + jwt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-magic-url-token.md b/examples/2.3.x/client-graphql/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..59b2c94f2 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-magic-url-token.md @@ -0,0 +1,17 @@ +```graphql +mutation { + accountCreateMagicURLToken( + userId: "", + email: "email@example.com", + url: "https://example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-mfa-authenticator.md b/examples/2.3.x/client-graphql/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..a3920a197 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-mfa-authenticator.md @@ -0,0 +1,10 @@ +```graphql +mutation { + accountCreateMFAAuthenticator( + type: "totp" + ) { + secret + uri + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-mfa-challenge.md b/examples/2.3.x/client-graphql/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..3da400f67 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-mfa-challenge.md @@ -0,0 +1,12 @@ +```graphql +mutation { + accountCreateMFAChallenge( + factor: "email" + ) { + _id + _createdAt + userId + expire + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/client-graphql/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..9f1c3596e --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```graphql +mutation { + accountCreateMFARecoveryCodes { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-phone-token.md b/examples/2.3.x/client-graphql/examples/account/create-phone-token.md new file mode 100644 index 000000000..e382df55c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-phone-token.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountCreatePhoneToken( + userId: "", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-phone-verification.md b/examples/2.3.x/client-graphql/examples/account/create-phone-verification.md new file mode 100644 index 000000000..88ce51a14 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +```graphql +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-push-target.md b/examples/2.3.x/client-graphql/examples/account/create-push-target.md new file mode 100644 index 000000000..3b47523db --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-push-target.md @@ -0,0 +1,19 @@ +```graphql +mutation { + accountCreatePushTarget( + targetId: "", + identifier: "", + providerId: "" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-recovery-otp.md b/examples/2.3.x/client-graphql/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..94088b137 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-recovery-otp.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountCreateRecoveryOTP( + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-recovery.md b/examples/2.3.x/client-graphql/examples/account/create-recovery.md new file mode 100644 index 000000000..f72f5a653 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-session.md b/examples/2.3.x/client-graphql/examples/account/create-session.md new file mode 100644 index 000000000..b5dda77e1 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-session.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountCreateSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-verification.md b/examples/2.3.x/client-graphql/examples/account/create-verification.md new file mode 100644 index 000000000..818efe4dd --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create-verification.md @@ -0,0 +1,14 @@ +```graphql +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/create.md b/examples/2.3.x/client-graphql/examples/account/create.md new file mode 100644 index 000000000..76ace14aa --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/create.md @@ -0,0 +1,50 @@ +```graphql +mutation { + accountCreate( + userId: "", + email: "email@example.com", + password: "password", + name: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/delete-consent-token.md b/examples/2.3.x/client-graphql/examples/account/delete-consent-token.md new file mode 100644 index 000000000..aaca4bc86 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/delete-consent-token.md @@ -0,0 +1,10 @@ +```graphql +mutation { + accountDeleteConsentToken( + consentId: "", + tokenId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/delete-consent.md b/examples/2.3.x/client-graphql/examples/account/delete-consent.md new file mode 100644 index 000000000..698e6c46e --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/delete-consent.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeleteConsent( + consentId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/delete-identity.md b/examples/2.3.x/client-graphql/examples/account/delete-identity.md new file mode 100644 index 000000000..d984a934b --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/delete-identity.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeleteIdentity( + identityId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/client-graphql/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..7c78bc317 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeleteMFAAuthenticator( + type: "totp" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/delete-push-target.md b/examples/2.3.x/client-graphql/examples/account/delete-push-target.md new file mode 100644 index 000000000..a8588be93 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/delete-push-target.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeletePushTarget( + targetId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/delete-session.md b/examples/2.3.x/client-graphql/examples/account/delete-session.md new file mode 100644 index 000000000..36c3de994 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/delete-session.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeleteSession( + sessionId: "" + ) { + status + } +} +``` 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 new file mode 100644 index 000000000..65f6900e5 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/delete-sessions.md @@ -0,0 +1,7 @@ +```graphql +mutation { + accountDeleteSessions { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/get-consent-token.md b/examples/2.3.x/client-graphql/examples/account/get-consent-token.md new file mode 100644 index 000000000..8294afb8d --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/get-consent-token.md @@ -0,0 +1,20 @@ +```graphql +query { + accountGetConsentToken( + consentId: "", + tokenId: "" + ) { + _id + _createdAt + _updatedAt + consentId + userId + appId + cimdUrl + scopes + resources + authorizationDetails + expire + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/get-consent.md b/examples/2.3.x/client-graphql/examples/account/get-consent.md new file mode 100644 index 000000000..999c7aedd --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/get-consent.md @@ -0,0 +1,18 @@ +```graphql +query { + accountGetConsent( + consentId: "" + ) { + _id + _createdAt + _updatedAt + userId + appId + cimdUrl + scopes + resources + authorizationDetails + expire + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/client-graphql/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..430d5f42c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```graphql +query { + accountGetMFARecoveryCodes { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/get-prefs.md b/examples/2.3.x/client-graphql/examples/account/get-prefs.md new file mode 100644 index 000000000..f7920fc2e --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/get-prefs.md @@ -0,0 +1,7 @@ +```graphql +query { + accountGetPrefs { + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/get-session.md b/examples/2.3.x/client-graphql/examples/account/get-session.md new file mode 100644 index 000000000..0ff57c396 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/get-session.md @@ -0,0 +1,37 @@ +```graphql +query { + accountGetSession( + sessionId: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/get.md b/examples/2.3.x/client-graphql/examples/account/get.md new file mode 100644 index 000000000..a1f4a9075 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/get.md @@ -0,0 +1,45 @@ +```graphql +query { + accountGet { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/list-consent-tokens.md b/examples/2.3.x/client-graphql/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..1bdb2d9fe --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/list-consent-tokens.md @@ -0,0 +1,24 @@ +```graphql +query { + accountListConsentTokens( + consentId: "", + queries: [], + total: false + ) { + total + tokens { + _id + _createdAt + _updatedAt + consentId + userId + appId + cimdUrl + scopes + resources + authorizationDetails + expire + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/list-consents.md b/examples/2.3.x/client-graphql/examples/account/list-consents.md new file mode 100644 index 000000000..cca99e441 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/list-consents.md @@ -0,0 +1,22 @@ +```graphql +query { + accountListConsents( + queries: [], + total: false + ) { + total + consents { + _id + _createdAt + _updatedAt + userId + appId + cimdUrl + scopes + resources + authorizationDetails + expire + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/list-identities.md b/examples/2.3.x/client-graphql/examples/account/list-identities.md new file mode 100644 index 000000000..a5d30d3b6 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/list-identities.md @@ -0,0 +1,23 @@ +```graphql +query { + accountListIdentities( + queries: [], + total: false + ) { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + providerIdToken + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/list-mfa-factors.md b/examples/2.3.x/client-graphql/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..cca647fec --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +```graphql +query { + accountListMFAFactors { + totp + phone + email + recoveryCode + custom + } +} +``` 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 new file mode 100644 index 000000000..106419a76 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/list-sessions.md @@ -0,0 +1,38 @@ +```graphql +query { + accountListSessions { + total + sessions { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-email-verification-otp.md b/examples/2.3.x/client-graphql/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..262cdf417 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-email-verification-otp.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountUpdateEmailVerificationOTP( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-email-verification.md b/examples/2.3.x/client-graphql/examples/account/update-email-verification.md new file mode 100644 index 000000000..9a045dd80 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-email-verification.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountUpdateEmailVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-email.md b/examples/2.3.x/client-graphql/examples/account/update-email.md new file mode 100644 index 000000000..bfab99aa5 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-email.md @@ -0,0 +1,48 @@ +```graphql +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-magic-url-session.md b/examples/2.3.x/client-graphql/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..92ad9693d --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-magic-url-session.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountUpdateMagicURLSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-mfa-authenticator.md b/examples/2.3.x/client-graphql/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..55c258878 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-mfa-authenticator.md @@ -0,0 +1,48 @@ +```graphql +mutation { + accountUpdateMFAAuthenticator( + type: "totp", + otp: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-mfa-challenge.md b/examples/2.3.x/client-graphql/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..d3a438cf0 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-mfa-challenge.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountUpdateMFAChallenge( + challengeId: "", + otp: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/client-graphql/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..5f0c5c2d6 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```graphql +mutation { + accountUpdateMFARecoveryCodes { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-mfa.md b/examples/2.3.x/client-graphql/examples/account/update-mfa.md new file mode 100644 index 000000000..59179a358 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-mfa.md @@ -0,0 +1,47 @@ +```graphql +mutation { + accountUpdateMFA( + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-name.md b/examples/2.3.x/client-graphql/examples/account/update-name.md new file mode 100644 index 000000000..58703b1b9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-name.md @@ -0,0 +1,47 @@ +```graphql +mutation { + accountUpdateName( + name: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-password.md b/examples/2.3.x/client-graphql/examples/account/update-password.md new file mode 100644 index 000000000..9290fcfe0 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-password.md @@ -0,0 +1,48 @@ +```graphql +mutation { + accountUpdatePassword( + password: "password", + oldPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-phone-session.md b/examples/2.3.x/client-graphql/examples/account/update-phone-session.md new file mode 100644 index 000000000..aa054709d --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-phone-session.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountUpdatePhoneSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-phone-verification.md b/examples/2.3.x/client-graphql/examples/account/update-phone-verification.md new file mode 100644 index 000000000..2122d41be --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountUpdatePhoneVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-phone.md b/examples/2.3.x/client-graphql/examples/account/update-phone.md new file mode 100644 index 000000000..e2d632912 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-phone.md @@ -0,0 +1,48 @@ +```graphql +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-prefs.md b/examples/2.3.x/client-graphql/examples/account/update-prefs.md new file mode 100644 index 000000000..00338b2fd --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-prefs.md @@ -0,0 +1,47 @@ +```graphql +mutation { + accountUpdatePrefs( + prefs: "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-push-target.md b/examples/2.3.x/client-graphql/examples/account/update-push-target.md new file mode 100644 index 000000000..9cd77d826 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-push-target.md @@ -0,0 +1,18 @@ +```graphql +mutation { + accountUpdatePushTarget( + targetId: "", + identifier: "" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-recovery-otp.md b/examples/2.3.x/client-graphql/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..879ae3d8c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-recovery-otp.md @@ -0,0 +1,16 @@ +```graphql +mutation { + accountUpdateRecoveryOTP( + userId: "", + secret: "", + password: "password" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-recovery.md b/examples/2.3.x/client-graphql/examples/account/update-recovery.md new file mode 100644 index 000000000..8d4c37a99 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +```graphql +mutation { + accountUpdateRecovery( + userId: "", + secret: "", + password: "password" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-session.md b/examples/2.3.x/client-graphql/examples/account/update-session.md new file mode 100644 index 000000000..c045df3c1 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-session.md @@ -0,0 +1,37 @@ +```graphql +mutation { + accountUpdateSession( + sessionId: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-status.md b/examples/2.3.x/client-graphql/examples/account/update-status.md new file mode 100644 index 000000000..a2b65cb15 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-status.md @@ -0,0 +1,45 @@ +```graphql +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/account/update-verification.md b/examples/2.3.x/client-graphql/examples/account/update-verification.md new file mode 100644 index 000000000..927ce4953 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/account/update-verification.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountUpdateVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-browser.md b/examples/2.3.x/client-graphql/examples/avatars/get-browser.md new file mode 100644 index 000000000..2f432681b --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-browser.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetBrowser( + code: "aa", + width: 0, + height: 0, + quality: -1 + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-credit-card.md b/examples/2.3.x/client-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..952c23021 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-credit-card.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetCreditCard( + code: "amex", + width: 0, + height: 0, + quality: -1 + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-favicon.md b/examples/2.3.x/client-graphql/examples/avatars/get-favicon.md new file mode 100644 index 000000000..22653ab58 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-favicon.md @@ -0,0 +1,9 @@ +```graphql +query { + avatarsGetFavicon( + url: "https://example.com" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-flag.md b/examples/2.3.x/client-graphql/examples/avatars/get-flag.md new file mode 100644 index 000000000..6444e6988 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-flag.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetFlag( + code: "af", + width: 0, + height: 0, + quality: -1 + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-image.md b/examples/2.3.x/client-graphql/examples/avatars/get-image.md new file mode 100644 index 000000000..8acc02134 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-image.md @@ -0,0 +1,11 @@ +```graphql +query { + avatarsGetImage( + url: "https://example.com", + width: 0, + height: 0 + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-initials.md b/examples/2.3.x/client-graphql/examples/avatars/get-initials.md new file mode 100644 index 000000000..c172740be --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-initials.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetInitials( + name: "", + width: 0, + height: 0, + background: "FFFFFF" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-photo.md b/examples/2.3.x/client-graphql/examples/avatars/get-photo.md new file mode 100644 index 000000000..101335eac --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-photo.md @@ -0,0 +1,16 @@ +```graphql +query { + avatarsGetPhoto( + width: 0, + height: 0, + quality: 0, + output: "png", + rating: "g", + userId: "current()", + emailHash: "", + name: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-qr.md b/examples/2.3.x/client-graphql/examples/avatars/get-qr.md new file mode 100644 index 000000000..9206b404e --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-qr.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetQR( + text: "", + size: 1, + margin: 0, + download: false + ) { + 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 new file mode 100644 index 000000000..f5cab660c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/get-screenshot.md @@ -0,0 +1,28 @@ +```graphql +query { + avatarsGetScreenshot( + url: "https://example.com", + headers: "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + viewportWidth: 1920, + viewportHeight: 1080, + scale: 2, + theme: "dark", + userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", + fullpage: true, + locale: "en-US", + timezone: "America/New_York", + latitude: 37.7749, + longitude: -122.4194, + accuracy: 100, + touch: true, + permissions: ["geolocation", "notifications"], + sleep: 3, + width: 800, + height: 600, + quality: 85, + output: "jpeg" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/create-document.md b/examples/2.3.x/client-graphql/examples/databases/create-document.md new file mode 100644 index 000000000..5ca3e372a --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/create-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/create-operations.md b/examples/2.3.x/client-graphql/examples/databases/create-operations.md new file mode 100644 index 000000000..7fa29cf3f --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/create-operations.md @@ -0,0 +1,25 @@ +```graphql +mutation { + databasesCreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/create-transaction.md b/examples/2.3.x/client-graphql/examples/databases/create-transaction.md new file mode 100644 index 000000000..d28f2eadc --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/create-transaction.md @@ -0,0 +1,14 @@ +```graphql +mutation { + databasesCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/decrement-document-attribute.md b/examples/2.3.x/client-graphql/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..0b5428ae6 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesDecrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 1, + min: 0, + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/delete-document.md b/examples/2.3.x/client-graphql/examples/databases/delete-document.md new file mode 100644 index 000000000..f6d166b0c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/delete-document.md @@ -0,0 +1,12 @@ +```graphql +mutation { + databasesDeleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/delete-transaction.md b/examples/2.3.x/client-graphql/examples/databases/delete-transaction.md new file mode 100644 index 000000000..9230d0c85 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + databasesDeleteTransaction( + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/get-document.md b/examples/2.3.x/client-graphql/examples/databases/get-document.md new file mode 100644 index 000000000..e188dee38 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/get-document.md @@ -0,0 +1,20 @@ +```graphql +query { + databasesGetDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/get-transaction.md b/examples/2.3.x/client-graphql/examples/databases/get-transaction.md new file mode 100644 index 000000000..001554140 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + databasesGetTransaction( + transactionId: "" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/increment-document-attribute.md b/examples/2.3.x/client-graphql/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..8c3246a05 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/increment-document-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesIncrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 1, + max: 100, + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/list-documents.md b/examples/2.3.x/client-graphql/examples/databases/list-documents.md new file mode 100644 index 000000000..d0e331d0e --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/list-documents.md @@ -0,0 +1,24 @@ +```graphql +query { + databasesListDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` 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 new file mode 100644 index 000000000..2fc18db35 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + databasesListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/update-document.md b/examples/2.3.x/client-graphql/examples/databases/update-document.md new file mode 100644 index 000000000..5b9eaf050 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/update-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/update-transaction.md b/examples/2.3.x/client-graphql/examples/databases/update-transaction.md new file mode 100644 index 000000000..a2d8cb145 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/update-transaction.md @@ -0,0 +1,16 @@ +```graphql +mutation { + databasesUpdateTransaction( + transactionId: "", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/upsert-document.md b/examples/2.3.x/client-graphql/examples/databases/upsert-document.md new file mode 100644 index 000000000..910971ed5 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/databases/upsert-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/create-document.md b/examples/2.3.x/client-graphql/examples/documentsdb/create-document.md new file mode 100644 index 000000000..f8415e6af --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/create-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + documentsDBCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..211576113 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/create-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + documentsDBCreateDocuments( + databaseId: "", + collectionId: "", + documents: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/create-operations.md b/examples/2.3.x/client-graphql/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..153d00770 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```graphql +mutation { + documentsDBCreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/create-transaction.md b/examples/2.3.x/client-graphql/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..75a9d53d4 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/create-transaction.md @@ -0,0 +1,14 @@ +```graphql +mutation { + documentsDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-graphql/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..180e2af17 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + documentsDBDecrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 1, + min: 0, + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/delete-document.md b/examples/2.3.x/client-graphql/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..64f03c698 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/delete-document.md @@ -0,0 +1,12 @@ +```graphql +mutation { + documentsDBDeleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/delete-transaction.md b/examples/2.3.x/client-graphql/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..d6cea68f2 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + documentsDBDeleteTransaction( + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/get-document.md b/examples/2.3.x/client-graphql/examples/documentsdb/get-document.md new file mode 100644 index 000000000..970f56656 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/get-document.md @@ -0,0 +1,20 @@ +```graphql +query { + documentsDBGetDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/get-transaction.md b/examples/2.3.x/client-graphql/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..76e3dd728 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + documentsDBGetTransaction( + transactionId: "" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-graphql/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..cb70414fd --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + documentsDBIncrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 1, + max: 100, + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/list-documents.md b/examples/2.3.x/client-graphql/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..89a23cf05 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/list-documents.md @@ -0,0 +1,24 @@ +```graphql +query { + documentsDBListDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/list-transactions.md b/examples/2.3.x/client-graphql/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..2569dde05 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + documentsDBListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/update-document.md b/examples/2.3.x/client-graphql/examples/documentsdb/update-document.md new file mode 100644 index 000000000..40a4898c9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/update-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + documentsDBUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/update-transaction.md b/examples/2.3.x/client-graphql/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..a9616ca48 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/update-transaction.md @@ -0,0 +1,16 @@ +```graphql +mutation { + documentsDBUpdateTransaction( + transactionId: "", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/upsert-document.md b/examples/2.3.x/client-graphql/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..1b75a2830 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/documentsdb/upsert-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + documentsDBUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/functions/create-execution.md b/examples/2.3.x/client-graphql/examples/functions/create-execution.md new file mode 100644 index 000000000..1009c36d5 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/functions/create-execution.md @@ -0,0 +1,39 @@ +```graphql +mutation { + functionsCreateExecution( + functionId: "", + body: "", + async: false, + path: "", + method: "GET", + headers: "{}", + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + _permissions + resourceId + resourceType + deploymentId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/functions/get-execution.md b/examples/2.3.x/client-graphql/examples/functions/get-execution.md new file mode 100644 index 000000000..314b7423e --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/functions/get-execution.md @@ -0,0 +1,34 @@ +```graphql +query { + functionsGetExecution( + functionId: "", + executionId: "" + ) { + _id + _createdAt + _updatedAt + _permissions + resourceId + resourceType + deploymentId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/functions/list-executions.md b/examples/2.3.x/client-graphql/examples/functions/list-executions.md new file mode 100644 index 000000000..b76e92aca --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/functions/list-executions.md @@ -0,0 +1,38 @@ +```graphql +query { + functionsListExecutions( + functionId: "", + queries: [], + total: false + ) { + total + executions { + _id + _createdAt + _updatedAt + _permissions + resourceId + resourceType + deploymentId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/locale/get.md b/examples/2.3.x/client-graphql/examples/locale/get.md new file mode 100644 index 000000000..5ab0b0f78 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/locale/get.md @@ -0,0 +1,24 @@ +```graphql +query { + localeGet { + ip + countryCode + country + continentCode + continent + eu + currency + city + timeZone + postalCode + latitude + longitude + autonomousSystemNumber + autonomousSystemOrganization + isp + connectionType + connectionUsageType + connectionOrganization + } +} +``` 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 new file mode 100644 index 000000000..0e3967246 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +```graphql +query { + localeListCodes { + total + localeCodes { + code + name + } + } +} +``` 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 new file mode 100644 index 000000000..16ad0fd94 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +```graphql +query { + localeListContinents { + total + continents { + name + code + } + } +} +``` 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 new file mode 100644 index 000000000..293d32c9c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/locale/list-countries-eu.md @@ -0,0 +1,11 @@ +```graphql +query { + localeListCountriesEU { + total + countries { + name + code + } + } +} +``` 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 new file mode 100644 index 000000000..b17b065e3 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +```graphql +query { + localeListCountriesPhones { + total + phones { + code + countryCode + countryName + } + } +} +``` 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 new file mode 100644 index 000000000..15f566af0 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +```graphql +query { + localeListCountries { + total + countries { + name + code + } + } +} +``` 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 new file mode 100644 index 000000000..374d67126 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/locale/list-currencies.md @@ -0,0 +1,16 @@ +```graphql +query { + localeListCurrencies { + total + currencies { + symbol + name + symbolNative + decimalDigits + rounding + code + namePlural + } + } +} +``` 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 new file mode 100644 index 000000000..ed108f5a4 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +```graphql +query { + localeListLanguages { + total + languages { + name + code + nativeName + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/messaging/create-subscriber.md b/examples/2.3.x/client-graphql/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..50d67e14f --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/messaging/create-subscriber.md @@ -0,0 +1,29 @@ +```graphql +mutation { + messagingCreateSubscriber( + topicId: "", + subscriberId: "", + targetId: "" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/messaging/delete-subscriber.md b/examples/2.3.x/client-graphql/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..81c5558ad --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/messaging/delete-subscriber.md @@ -0,0 +1,10 @@ +```graphql +mutation { + messagingDeleteSubscriber( + topicId: "", + subscriberId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/organization/create-installation.md b/examples/2.3.x/client-graphql/examples/organization/create-installation.md new file mode 100644 index 000000000..39ff45096 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/organization/create-installation.md @@ -0,0 +1,19 @@ +```graphql +mutation { + organizationCreateInstallation( + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/organization/delete-installation.md b/examples/2.3.x/client-graphql/examples/organization/delete-installation.md new file mode 100644 index 000000000..67a69768c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/organization/delete-installation.md @@ -0,0 +1,9 @@ +```graphql +mutation { + organizationDeleteInstallation( + installationId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/organization/get-installation.md b/examples/2.3.x/client-graphql/examples/organization/get-installation.md new file mode 100644 index 000000000..d5748da24 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/organization/get-installation.md @@ -0,0 +1,18 @@ +```graphql +query { + organizationGetInstallation( + installationId: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/organization/list-installations.md b/examples/2.3.x/client-graphql/examples/organization/list-installations.md new file mode 100644 index 000000000..900a0a2d9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/organization/list-installations.md @@ -0,0 +1,22 @@ +```graphql +query { + organizationListInstallations( + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/organization/update-installation.md b/examples/2.3.x/client-graphql/examples/organization/update-installation.md new file mode 100644 index 000000000..05434914f --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/organization/update-installation.md @@ -0,0 +1,19 @@ +```graphql +mutation { + organizationUpdateInstallation( + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/presences/delete.md b/examples/2.3.x/client-graphql/examples/presences/delete.md new file mode 100644 index 000000000..cc8294d0c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/presences/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + presencesDelete( + presenceId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/presences/get.md b/examples/2.3.x/client-graphql/examples/presences/get.md new file mode 100644 index 000000000..c7c9da818 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/presences/get.md @@ -0,0 +1,17 @@ +```graphql +query { + presencesGet( + presenceId: "" + ) { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/presences/list.md b/examples/2.3.x/client-graphql/examples/presences/list.md new file mode 100644 index 000000000..ff95bbd1c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/presences/list.md @@ -0,0 +1,22 @@ +```graphql +query { + presencesList( + queries: [], + total: false, + ttl: 0 + ) { + total + presences { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/presences/update.md b/examples/2.3.x/client-graphql/examples/presences/update.md new file mode 100644 index 000000000..82f9c9dbc --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/presences/update.md @@ -0,0 +1,22 @@ +```graphql +mutation { + presencesUpdate( + presenceId: "", + status: "", + expiresAt: "2020-10-15T06:38:00.000+00:00", + metadata: "{}", + permissions: ["read(\"any\")"], + purge: false + ) { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/presences/upsert.md b/examples/2.3.x/client-graphql/examples/presences/upsert.md new file mode 100644 index 000000000..451f53b04 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/presences/upsert.md @@ -0,0 +1,21 @@ +```graphql +mutation { + presencesUpsert( + presenceId: "", + status: "", + permissions: ["read(\"any\")"], + expiresAt: "2020-10-15T06:38:00.000+00:00", + metadata: "{}" + ) { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/storage/create-file.md b/examples/2.3.x/client-graphql/examples/storage/create-file.md new file mode 100644 index 000000000..1f2b982c5 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/storage/create-file.md @@ -0,0 +1,26 @@ +```graphql +POST /v1/storage/buckets/{bucketId}/files 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 { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions, folder: $folder) { id }" }, "variables": { "bucketId": "", "fileId": "", "file": null, "permissions": ["read(\"any\")"], "folder": "photos/2026" } } + +--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/storage/delete-file.md b/examples/2.3.x/client-graphql/examples/storage/delete-file.md new file mode 100644 index 000000000..c36fa0e94 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/storage/delete-file.md @@ -0,0 +1,10 @@ +```graphql +mutation { + storageDeleteFile( + bucketId: "", + fileId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/storage/get-file-download.md b/examples/2.3.x/client-graphql/examples/storage/get-file-download.md new file mode 100644 index 000000000..f323f21e2 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/storage/get-file-download.md @@ -0,0 +1,11 @@ +```graphql +query { + storageGetFileDownload( + bucketId: "", + fileId: "", + token: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/storage/get-file-preview.md b/examples/2.3.x/client-graphql/examples/storage/get-file-preview.md new file mode 100644 index 000000000..0c06ca2b8 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/storage/get-file-preview.md @@ -0,0 +1,22 @@ +```graphql +query { + storageGetFilePreview( + bucketId: "", + fileId: "", + width: 0, + height: 0, + gravity: "auto", + quality: -1, + borderWidth: 0, + borderColor: "FFFFFF", + borderRadius: 0, + opacity: 0, + rotation: -360, + background: "FFFFFF", + output: "jpg", + token: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/storage/get-file-view.md b/examples/2.3.x/client-graphql/examples/storage/get-file-view.md new file mode 100644 index 000000000..7871a3111 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/storage/get-file-view.md @@ -0,0 +1,11 @@ +```graphql +query { + storageGetFileView( + bucketId: "", + fileId: "", + token: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/storage/get-file.md b/examples/2.3.x/client-graphql/examples/storage/get-file.md new file mode 100644 index 000000000..3bbbfcb4b --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/storage/get-file.md @@ -0,0 +1,25 @@ +```graphql +query { + storageGetFile( + bucketId: "", + fileId: "" + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + folder + key + signature + mimeType + sizeOriginal + sizeActual + chunksTotal + chunksUploaded + encryption + compression + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/storage/list-files.md b/examples/2.3.x/client-graphql/examples/storage/list-files.md new file mode 100644 index 000000000..974b01a7f --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/storage/list-files.md @@ -0,0 +1,30 @@ +```graphql +query { + storageListFiles( + bucketId: "", + queries: [], + search: "", + total: false + ) { + total + files { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + folder + key + signature + mimeType + sizeOriginal + sizeActual + chunksTotal + chunksUploaded + encryption + compression + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/storage/update-file.md b/examples/2.3.x/client-graphql/examples/storage/update-file.md new file mode 100644 index 000000000..ace17f9b1 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/storage/update-file.md @@ -0,0 +1,27 @@ +```graphql +mutation { + storageUpdateFile( + bucketId: "", + fileId: "", + name: "", + permissions: ["read(\"any\")"] + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + folder + key + signature + mimeType + sizeOriginal + sizeActual + chunksTotal + chunksUploaded + encryption + compression + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/create-operations.md b/examples/2.3.x/client-graphql/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..f5721ece9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/create-operations.md @@ -0,0 +1,25 @@ +```graphql +mutation { + tablesDBCreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "tableId": "", + "rowId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/create-row.md b/examples/2.3.x/client-graphql/examples/tablesdb/create-row.md new file mode 100644 index 000000000..556147030 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/create-row.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBCreateRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/create-transaction.md b/examples/2.3.x/client-graphql/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..2ecb30310 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/create-transaction.md @@ -0,0 +1,14 @@ +```graphql +mutation { + tablesDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/client-graphql/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..203ed56e9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBDecrementRowColumn( + databaseId: "", + tableId: "", + rowId: "", + column: "", + value: 1, + min: 0, + transactionId: "" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/delete-row.md b/examples/2.3.x/client-graphql/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..0acff213e --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/delete-row.md @@ -0,0 +1,12 @@ +```graphql +mutation { + tablesDBDeleteRow( + databaseId: "", + tableId: "", + rowId: "", + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/delete-transaction.md b/examples/2.3.x/client-graphql/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..e12bd209a --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + tablesDBDeleteTransaction( + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/get-row.md b/examples/2.3.x/client-graphql/examples/tablesdb/get-row.md new file mode 100644 index 000000000..354f847dc --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/get-row.md @@ -0,0 +1,20 @@ +```graphql +query { + tablesDBGetRow( + databaseId: "", + tableId: "", + rowId: "", + queries: [], + transactionId: "" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/get-transaction.md b/examples/2.3.x/client-graphql/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..0c520f611 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + tablesDBGetTransaction( + transactionId: "" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/increment-row-column.md b/examples/2.3.x/client-graphql/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..1137e3e4d --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/increment-row-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBIncrementRowColumn( + databaseId: "", + tableId: "", + rowId: "", + column: "", + value: 1, + max: 100, + transactionId: "" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/list-rows.md b/examples/2.3.x/client-graphql/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..6927344f1 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/list-rows.md @@ -0,0 +1,24 @@ +```graphql +query { + tablesDBListRows( + databaseId: "", + tableId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` 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 new file mode 100644 index 000000000..bc3663bec --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + tablesDBListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/update-row.md b/examples/2.3.x/client-graphql/examples/tablesdb/update-row.md new file mode 100644 index 000000000..2f3abc144 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/update-row.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBUpdateRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/update-transaction.md b/examples/2.3.x/client-graphql/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..0d0986b85 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/update-transaction.md @@ -0,0 +1,16 @@ +```graphql +mutation { + tablesDBUpdateTransaction( + transactionId: "", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/upsert-row.md b/examples/2.3.x/client-graphql/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..027687876 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/tablesdb/upsert-row.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBUpsertRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/create-installation.md b/examples/2.3.x/client-graphql/examples/teams/create-installation.md new file mode 100644 index 000000000..e40ba133c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/create-installation.md @@ -0,0 +1,20 @@ +```graphql +mutation { + teamsCreateInstallation( + teamId: "", + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` 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 new file mode 100644 index 000000000..67b153ea1 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/create-membership.md @@ -0,0 +1,29 @@ +```graphql +mutation { + teamsCreateMembership( + teamId: "", + roles: [], + email: "email@example.com", + userId: "", + phone: "+12065550100", + url: "https://example.com", + name: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/create.md b/examples/2.3.x/client-graphql/examples/teams/create.md new file mode 100644 index 000000000..c31af8335 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/create.md @@ -0,0 +1,18 @@ +```graphql +mutation { + teamsCreate( + teamId: "", + name: "", + roles: [] + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/delete-installation.md b/examples/2.3.x/client-graphql/examples/teams/delete-installation.md new file mode 100644 index 000000000..2ca9fc4ec --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/delete-installation.md @@ -0,0 +1,10 @@ +```graphql +mutation { + teamsDeleteInstallation( + teamId: "", + installationId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/delete-membership.md b/examples/2.3.x/client-graphql/examples/teams/delete-membership.md new file mode 100644 index 000000000..297d48689 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/delete-membership.md @@ -0,0 +1,10 @@ +```graphql +mutation { + teamsDeleteMembership( + teamId: "", + membershipId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/delete.md b/examples/2.3.x/client-graphql/examples/teams/delete.md new file mode 100644 index 000000000..924ab91c9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + teamsDelete( + teamId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/get-installation.md b/examples/2.3.x/client-graphql/examples/teams/get-installation.md new file mode 100644 index 000000000..051aa484a --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/get-installation.md @@ -0,0 +1,19 @@ +```graphql +query { + teamsGetInstallation( + teamId: "", + installationId: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/get-membership.md b/examples/2.3.x/client-graphql/examples/teams/get-membership.md new file mode 100644 index 000000000..cccc945b4 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/get-membership.md @@ -0,0 +1,24 @@ +```graphql +query { + teamsGetMembership( + teamId: "", + membershipId: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/get-prefs.md b/examples/2.3.x/client-graphql/examples/teams/get-prefs.md new file mode 100644 index 000000000..182735730 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/get-prefs.md @@ -0,0 +1,9 @@ +```graphql +query { + teamsGetPrefs( + teamId: "" + ) { + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/get.md b/examples/2.3.x/client-graphql/examples/teams/get.md new file mode 100644 index 000000000..17f4a5ee9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/get.md @@ -0,0 +1,16 @@ +```graphql +query { + teamsGet( + teamId: "" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/list-installations.md b/examples/2.3.x/client-graphql/examples/teams/list-installations.md new file mode 100644 index 000000000..e67a0d520 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/list-installations.md @@ -0,0 +1,23 @@ +```graphql +query { + teamsListInstallations( + teamId: "", + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/list-memberships.md b/examples/2.3.x/client-graphql/examples/teams/list-memberships.md new file mode 100644 index 000000000..9f76ab1d5 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/list-memberships.md @@ -0,0 +1,29 @@ +```graphql +query { + teamsListMemberships( + teamId: "", + queries: [], + search: "", + total: false + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/list.md b/examples/2.3.x/client-graphql/examples/teams/list.md new file mode 100644 index 000000000..a714bd0bc --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/list.md @@ -0,0 +1,21 @@ +```graphql +query { + teamsList( + queries: [], + search: "", + total: false + ) { + total + teams { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/update-installation.md b/examples/2.3.x/client-graphql/examples/teams/update-installation.md new file mode 100644 index 000000000..1c784643d --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/update-installation.md @@ -0,0 +1,20 @@ +```graphql +mutation { + teamsUpdateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/update-membership-status.md b/examples/2.3.x/client-graphql/examples/teams/update-membership-status.md new file mode 100644 index 000000000..2b86ad398 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,26 @@ +```graphql +mutation { + teamsUpdateMembershipStatus( + teamId: "", + membershipId: "", + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` 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 new file mode 100644 index 000000000..c08593729 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/update-membership.md @@ -0,0 +1,25 @@ +```graphql +mutation { + teamsUpdateMembership( + teamId: "", + membershipId: "", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/update-name.md b/examples/2.3.x/client-graphql/examples/teams/update-name.md new file mode 100644 index 000000000..a3ce2bd1f --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/update-name.md @@ -0,0 +1,17 @@ +```graphql +mutation { + teamsUpdateName( + teamId: "", + name: "" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/teams/update-prefs.md b/examples/2.3.x/client-graphql/examples/teams/update-prefs.md new file mode 100644 index 000000000..411431a12 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/teams/update-prefs.md @@ -0,0 +1,10 @@ +```graphql +mutation { + teamsUpdatePrefs( + teamId: "", + prefs: "{}" + ) { + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/create-document.md b/examples/2.3.x/client-graphql/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..e81b723e9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/create-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + vectorsDBCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"embeddings\":[0.12,-0.55,0.88,1.02],\"metadata\":{\"key\":\"value\"}}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..b1d86d55b --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```graphql +mutation { + vectorsDBCreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/create-query.md b/examples/2.3.x/client-graphql/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..fac71fdf8 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/create-query.md @@ -0,0 +1,24 @@ +```graphql +mutation { + vectorsDBCreateQuery( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/create-transaction.md b/examples/2.3.x/client-graphql/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..d3057810c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/create-transaction.md @@ -0,0 +1,14 @@ +```graphql +mutation { + vectorsDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/delete-document.md b/examples/2.3.x/client-graphql/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..2da5f257d --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/delete-document.md @@ -0,0 +1,12 @@ +```graphql +mutation { + vectorsDBDeleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/client-graphql/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..ba12d0e13 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + vectorsDBDeleteTransaction( + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/get-document.md b/examples/2.3.x/client-graphql/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..4a2ca99c9 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/get-document.md @@ -0,0 +1,20 @@ +```graphql +query { + vectorsDBGetDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/get-transaction.md b/examples/2.3.x/client-graphql/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..df2dbc325 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + vectorsDBGetTransaction( + transactionId: "" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/list-documents.md b/examples/2.3.x/client-graphql/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..68f1ff5c7 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/list-documents.md @@ -0,0 +1,24 @@ +```graphql +query { + vectorsDBListDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/list-transactions.md b/examples/2.3.x/client-graphql/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..1f2ea4aa4 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + vectorsDBListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/update-document.md b/examples/2.3.x/client-graphql/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..328c52df5 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/update-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + vectorsDBUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/update-transaction.md b/examples/2.3.x/client-graphql/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..106a7b51d --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/update-transaction.md @@ -0,0 +1,16 @@ +```graphql +mutation { + vectorsDBUpdateTransaction( + transactionId: "", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/upsert-document.md b/examples/2.3.x/client-graphql/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..21e56bc8b --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/upsert-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + vectorsDBUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read(\"any\")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-anonymous-session.md b/examples/2.3.x/client-react-native/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..7047a74dc --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-anonymous-session.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); +``` 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 new file mode 100644 index 000000000..e38beaf79 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-email-password-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-email-token.md b/examples/2.3.x/client-react-native/examples/account/create-email-token.md new file mode 100644 index 000000000..9b9db8b8f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-email-token.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken({ + userId: '', + email: 'email@example.com', + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-email-verification-otp.md b/examples/2.3.x/client-react-native/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..151eafcd2 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-email-verification-otp.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailVerificationOTP({ + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-email-verification.md b/examples/2.3.x/client-react-native/examples/account/create-email-verification.md new file mode 100644 index 000000000..1a42defdd --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-email-verification.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailVerification({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-id-token-session.md b/examples/2.3.x/client-react-native/examples/account/create-id-token-session.md new file mode 100644 index 000000000..4061a60a5 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-id-token-session.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Account, IdTokenProvider } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createIdTokenSession({ + provider: IdTokenProvider.Apple, + idToken: '', + nonce: '', // optional + accessToken: '', // optional + accessTokenExpiry: 0, // optional + name: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-jwt.md b/examples/2.3.x/client-react-native/examples/account/create-jwt.md new file mode 100644 index 000000000..77ecb531e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-jwt.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT({ + duration: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-magic-url-token.md b/examples/2.3.x/client-react-native/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..95327d71e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-magic-url-token.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken({ + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-mfa-authenticator.md b/examples/2.3.x/client-react-native/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..3b43a0241 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticatorType } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMFAAuthenticator({ + type: AuthenticatorType.Totp, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-mfa-challenge.md b/examples/2.3.x/client-react-native/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..532343667 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-mfa-challenge.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticationFactor } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMFAChallenge({ + factor: AuthenticationFactor.Email, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/client-react-native/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..300096e99 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-o-auth-2-session.md b/examples/2.3.x/client-react-native/examples/account/create-o-auth-2-session.md new file mode 100644 index 000000000..c90edc145 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-o-auth-2-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, OAuthProvider } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +}); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-o-auth-2-token.md b/examples/2.3.x/client-react-native/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..c043fb78c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-o-auth-2-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, OAuthProvider } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +}); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-phone-token.md b/examples/2.3.x/client-react-native/examples/account/create-phone-token.md new file mode 100644 index 000000000..1bf53f9af --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-phone-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken({ + userId: '', + phone: '+12065550100', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-phone-verification.md b/examples/2.3.x/client-react-native/examples/account/create-phone-verification.md new file mode 100644 index 000000000..6588b6b22 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-phone-verification.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-push-target.md b/examples/2.3.x/client-react-native/examples/account/create-push-target.md new file mode 100644 index 000000000..da09d09d1 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-push-target.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget({ + targetId: '', + identifier: '', + providerId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-recovery-otp.md b/examples/2.3.x/client-react-native/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..0ece5dfae --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-recovery-otp.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecoveryOTP({ + email: 'email@example.com', + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-recovery.md b/examples/2.3.x/client-react-native/examples/account/create-recovery.md new file mode 100644 index 000000000..4d970c4f6 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-session.md b/examples/2.3.x/client-react-native/examples/account/create-session.md new file mode 100644 index 000000000..bcee0a800 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create-verification.md b/examples/2.3.x/client-react-native/examples/account/create-verification.md new file mode 100644 index 000000000..8c7be4e8f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create-verification.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/create.md b/examples/2.3.x/client-react-native/examples/account/create.md new file mode 100644 index 000000000..964d1c4d1 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/create.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create({ + userId: '', + email: 'email@example.com', + password: 'password', + name: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/delete-consent-token.md b/examples/2.3.x/client-react-native/examples/account/delete-consent-token.md new file mode 100644 index 000000000..e27393f5d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/delete-consent-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteConsentToken({ + consentId: '', + tokenId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/delete-consent.md b/examples/2.3.x/client-react-native/examples/account/delete-consent.md new file mode 100644 index 000000000..1b87ee717 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/delete-consent.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteConsent({ + consentId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/delete-identity.md b/examples/2.3.x/client-react-native/examples/account/delete-identity.md new file mode 100644 index 000000000..fbf4f7eca --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/delete-identity.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity({ + identityId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/client-react-native/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..faffbba64 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticatorType } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMFAAuthenticator({ + type: AuthenticatorType.Totp, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/delete-push-target.md b/examples/2.3.x/client-react-native/examples/account/delete-push-target.md new file mode 100644 index 000000000..ab0bb9d43 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/delete-push-target.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget({ + targetId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/delete-session.md b/examples/2.3.x/client-react-native/examples/account/delete-session.md new file mode 100644 index 000000000..16f6df8a0 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/delete-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession({ + sessionId: '', +}); + +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 new file mode 100644 index 000000000..0f1bc281c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/delete-sessions.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/get-consent-token.md b/examples/2.3.x/client-react-native/examples/account/get-consent-token.md new file mode 100644 index 000000000..9bb0ab99a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/get-consent-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getConsentToken({ + consentId: '', + tokenId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/get-consent.md b/examples/2.3.x/client-react-native/examples/account/get-consent.md new file mode 100644 index 000000000..ae7cdc1c1 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/get-consent.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getConsent({ + consentId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/client-react-native/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..cd2a16efc --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/get-prefs.md b/examples/2.3.x/client-react-native/examples/account/get-prefs.md new file mode 100644 index 000000000..337523afe --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/get-prefs.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/get-session.md b/examples/2.3.x/client-react-native/examples/account/get-session.md new file mode 100644 index 000000000..3676c4b2e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/get-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession({ + sessionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/get.md b/examples/2.3.x/client-react-native/examples/account/get.md new file mode 100644 index 000000000..7144a9eb3 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/get.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/list-consent-tokens.md b/examples/2.3.x/client-react-native/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..e33cf4e98 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/list-consent-tokens.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listConsentTokens({ + consentId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/list-consents.md b/examples/2.3.x/client-react-native/examples/account/list-consents.md new file mode 100644 index 000000000..032aed08a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/list-consents.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listConsents({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/list-identities.md b/examples/2.3.x/client-react-native/examples/account/list-identities.md new file mode 100644 index 000000000..24426d423 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/list-identities.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/list-mfa-factors.md b/examples/2.3.x/client-react-native/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..82c643bcd --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/list-mfa-factors.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMFAFactors(); + +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 new file mode 100644 index 000000000..c8acda4d4 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/list-sessions.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-email-verification-otp.md b/examples/2.3.x/client-react-native/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..80edd0436 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-email-verification-otp.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmailVerificationOTP({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-email-verification.md b/examples/2.3.x/client-react-native/examples/account/update-email-verification.md new file mode 100644 index 000000000..684ecfa8c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-email-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmailVerification({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-email.md b/examples/2.3.x/client-react-native/examples/account/update-email.md new file mode 100644 index 000000000..ec0f8d643 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-email.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-magic-url-session.md b/examples/2.3.x/client-react-native/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..625453225 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-magic-url-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-mfa-authenticator.md b/examples/2.3.x/client-react-native/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..4a954e855 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, AuthenticatorType } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFAAuthenticator({ + type: AuthenticatorType.Totp, + otp: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-mfa-challenge.md b/examples/2.3.x/client-react-native/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..b6521a692 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-mfa-challenge.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFAChallenge({ + challengeId: '', + otp: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/client-react-native/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..fa03ccd0f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-mfa.md b/examples/2.3.x/client-react-native/examples/account/update-mfa.md new file mode 100644 index 000000000..c2973e41d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-mfa.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA({ + mfa: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-name.md b/examples/2.3.x/client-react-native/examples/account/update-name.md new file mode 100644 index 000000000..500e2f06e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-name.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName({ + name: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-password.md b/examples/2.3.x/client-react-native/examples/account/update-password.md new file mode 100644 index 000000000..cf8ad5b60 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-password.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword({ + password: 'password', + oldPassword: 'password', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-phone-session.md b/examples/2.3.x/client-react-native/examples/account/update-phone-session.md new file mode 100644 index 000000000..d008f2af7 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-phone-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-phone-verification.md b/examples/2.3.x/client-react-native/examples/account/update-phone-verification.md new file mode 100644 index 000000000..0bc9a3f00 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-phone-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-phone.md b/examples/2.3.x/client-react-native/examples/account/update-phone.md new file mode 100644 index 000000000..d8537e97c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-phone.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone({ + phone: '+12065550100', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-prefs.md b/examples/2.3.x/client-react-native/examples/account/update-prefs.md new file mode 100644 index 000000000..a7afc13af --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-prefs.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs({ + prefs: { + language: 'en', + timezone: 'UTC', + darkTheme: true, + }, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-push-target.md b/examples/2.3.x/client-react-native/examples/account/update-push-target.md new file mode 100644 index 000000000..a759e5c5e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-push-target.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget({ + targetId: '', + identifier: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-recovery-otp.md b/examples/2.3.x/client-react-native/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..5bf3c2a03 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-recovery-otp.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecoveryOTP({ + userId: '', + secret: '', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-recovery.md b/examples/2.3.x/client-react-native/examples/account/update-recovery.md new file mode 100644 index 000000000..87cc4f413 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-recovery.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery({ + userId: '', + secret: '', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-session.md b/examples/2.3.x/client-react-native/examples/account/update-session.md new file mode 100644 index 000000000..cc3f3216e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession({ + sessionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-status.md b/examples/2.3.x/client-react-native/examples/account/update-status.md new file mode 100644 index 000000000..48976e3cd --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-status.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/account/update-verification.md b/examples/2.3.x/client-react-native/examples/account/update-verification.md new file mode 100644 index 000000000..421643025 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/account/update-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-browser.md b/examples/2.3.x/client-react-native/examples/avatars/get-browser.md new file mode 100644 index 000000000..d748496c9 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, Browser } 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 = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-credit-card.md b/examples/2.3.x/client-react-native/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..604390fea --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, CreditCard } 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 = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-favicon.md b/examples/2.3.x/client-react-native/examples/avatars/get-favicon.md new file mode 100644 index 000000000..ec54e8c56 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-favicon.md @@ -0,0 +1,15 @@ +```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 = avatars.getFavicon({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-flag.md b/examples/2.3.x/client-react-native/examples/avatars/get-flag.md new file mode 100644 index 000000000..8e5f4d7bd --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, Flag } 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 = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-image.md b/examples/2.3.x/client-react-native/examples/avatars/get-image.md new file mode 100644 index 000000000..55abf9dca --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +```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 = avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-initials.md b/examples/2.3.x/client-react-native/examples/avatars/get-initials.md new file mode 100644 index 000000000..bd4675aff --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-initials.md @@ -0,0 +1,18 @@ +```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 = avatars.getInitials({ + name: '', // optional + width: 0, // optional + height: 0, // optional + background: 'FFFFFF', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-photo.md b/examples/2.3.x/client-react-native/examples/avatars/get-photo.md new file mode 100644 index 000000000..44ca362b9 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-photo.md @@ -0,0 +1,22 @@ +```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 = avatars.getPhoto({ + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: 'png', // optional + rating: 'g', // optional + userId: 'current()', // optional + emailHash: '', // optional + name: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-qr.md b/examples/2.3.x/client-react-native/examples/avatars/get-qr.md new file mode 100644 index 000000000..98c291b9d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-qr.md @@ -0,0 +1,18 @@ +```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 = avatars.getQR({ + text: '', + size: 1, // optional + margin: 0, // optional + download: false, // optional +}); + +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 new file mode 100644 index 000000000..4e0402bc8 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/get-screenshot.md @@ -0,0 +1,48 @@ +```javascript +import { + Client, + Avatars, + BrowserTheme, + Timezone, + BrowserPermission, + ImageFormat, +} 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 = avatars.getScreenshot({ + url: 'https://example.com', + headers: { + Authorization: 'Bearer token123', + 'X-Custom-Header': 'value', + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // 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 + locale: 'en-US', // optional + timezone: Timezone.AfricaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [ + BrowserPermission.Geolocation, + BrowserPermission.Notifications, + ], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: ImageFormat.Jpeg, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/create-document.md b/examples/2.3.x/client-react-native/examples/databases/create-document.md new file mode 100644 index 000000000..5f4f0d8be --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/create-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/create-operations.md b/examples/2.3.x/client-react-native/examples/databases/create-operations.md new file mode 100644 index 000000000..29999609f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/create-transaction.md b/examples/2.3.x/client-react-native/examples/databases/create-transaction.md new file mode 100644 index 000000000..508008db1 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/decrement-document-attribute.md b/examples/2.3.x/client-react-native/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..efb34ee4a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/delete-document.md b/examples/2.3.x/client-react-native/examples/databases/delete-document.md new file mode 100644 index 000000000..5b326f085 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/delete-transaction.md b/examples/2.3.x/client-react-native/examples/databases/delete-transaction.md new file mode 100644 index 000000000..b020fec4c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/get-document.md b/examples/2.3.x/client-react-native/examples/databases/get-document.md new file mode 100644 index 000000000..c4de18152 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/get-transaction.md b/examples/2.3.x/client-react-native/examples/databases/get-transaction.md new file mode 100644 index 000000000..76923162f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/increment-document-attribute.md b/examples/2.3.x/client-react-native/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..9da47e2a8 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/increment-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/list-documents.md b/examples/2.3.x/client-react-native/examples/databases/list-documents.md new file mode 100644 index 000000000..c4f07bf9a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +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 new file mode 100644 index 000000000..051ea0f3a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/update-document.md b/examples/2.3.x/client-react-native/examples/databases/update-document.md new file mode 100644 index 000000000..9aac365fb --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/update-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/update-transaction.md b/examples/2.3.x/client-react-native/examples/databases/update-transaction.md new file mode 100644 index 000000000..9f040f0b8 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/upsert-document.md b/examples/2.3.x/client-react-native/examples/databases/upsert-document.md new file mode 100644 index 000000000..6d2102aa7 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/databases/upsert-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/create-document.md b/examples/2.3.x/client-react-native/examples/documentsdb/create-document.md new file mode 100644 index 000000000..51d69a975 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/create-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // 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 new file mode 100644 index 000000000..891757c68 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/create-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createDocuments({ + databaseId: '', + collectionId: '', + documents: [], + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/create-operations.md b/examples/2.3.x/client-react-native/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..41698bbf4 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/create-transaction.md b/examples/2.3.x/client-react-native/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..e535ea74b --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-react-native/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..ca7ed94fb --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/delete-document.md b/examples/2.3.x/client-react-native/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..ba07f8316 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/delete-transaction.md b/examples/2.3.x/client-react-native/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..a537cad48 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/get-document.md b/examples/2.3.x/client-react-native/examples/documentsdb/get-document.md new file mode 100644 index 000000000..64a5b43be --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/get-transaction.md b/examples/2.3.x/client-react-native/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..449f89245 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-react-native/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..80f4b0cc0 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/list-documents.md b/examples/2.3.x/client-react-native/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..b6a16cc2d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..24c8dbdb1 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/update-document.md b/examples/2.3.x/client-react-native/examples/documentsdb/update-document.md new file mode 100644 index 000000000..cad772ded --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/update-transaction.md b/examples/2.3.x/client-react-native/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..df1009a61 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, DocumentsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/upsert-document.md b/examples/2.3.x/client-react-native/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..52af7040e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/functions/create-execution.md b/examples/2.3.x/client-react-native/examples/functions/create-execution.md new file mode 100644 index 000000000..7c0addc78 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Functions, ExecutionMethod } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution({ + functionId: '', + body: '', // optional + async: false, // optional + xpath: '', // optional + method: ExecutionMethod.GET, // optional + headers: {}, // optional + scheduledAt: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/functions/get-execution.md b/examples/2.3.x/client-react-native/examples/functions/get-execution.md new file mode 100644 index 000000000..5f3bd5128 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution({ + functionId: '', + executionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/functions/list-executions.md b/examples/2.3.x/client-react-native/examples/functions/list-executions.md new file mode 100644 index 000000000..fedf597a3 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/functions/list-executions.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Functions } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions({ + functionId: '', + 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 new file mode 100644 index 000000000..f5e673a2f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/graphql/mutation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Graphql } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation({ + query: {}, +}); + +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 new file mode 100644 index 000000000..c9640ebeb --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/graphql/query.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Graphql } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query({ + query: {}, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/locale/get.md b/examples/2.3.x/client-react-native/examples/locale/get.md new file mode 100644 index 000000000..99bde954a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/locale/get.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +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 new file mode 100644 index 000000000..f96a7ee39 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/locale/list-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +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 new file mode 100644 index 000000000..8973cfd4d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/locale/list-continents.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +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 new file mode 100644 index 000000000..f948ee69d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/locale/list-countries-eu.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +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 new file mode 100644 index 000000000..7974d60ee --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/locale/list-countries-phones.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +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 new file mode 100644 index 000000000..b46bc615f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/locale/list-countries.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +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 new file mode 100644 index 000000000..28498d9a5 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/locale/list-currencies.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +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 new file mode 100644 index 000000000..835b04de2 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/locale/list-languages.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/messaging/create-subscriber.md b/examples/2.3.x/client-react-native/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..20f1368b3 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/messaging/create-subscriber.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Messaging } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber({ + topicId: '', + subscriberId: '', + targetId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/messaging/delete-subscriber.md b/examples/2.3.x/client-react-native/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..209c133fb --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Messaging } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber({ + topicId: '', + subscriberId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/organization/create-installation.md b/examples/2.3.x/client-react-native/examples/organization/create-installation.md new file mode 100644 index 000000000..9ae1fa679 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.createInstallation({ + appId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/organization/delete-installation.md b/examples/2.3.x/client-react-native/examples/organization/delete-installation.md new file mode 100644 index 000000000..47f5cc48c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/organization/get-installation.md b/examples/2.3.x/client-react-native/examples/organization/get-installation.md new file mode 100644 index 000000000..bcde6bf3f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.getInstallation({ + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/organization/list-installations.md b/examples/2.3.x/client-react-native/examples/organization/list-installations.md new file mode 100644 index 000000000..836181887 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/organization/update-installation.md b/examples/2.3.x/client-react-native/examples/organization/update-installation.md new file mode 100644 index 000000000..150d0ee6d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.updateInstallation({ + installationId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/presences/delete.md b/examples/2.3.x/client-react-native/examples/presences/delete.md new file mode 100644 index 000000000..03e4a1075 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/presences/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Presences } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.delete({ + presenceId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/presences/get.md b/examples/2.3.x/client-react-native/examples/presences/get.md new file mode 100644 index 000000000..7358111b9 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/presences/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Presences } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.get({ + presenceId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/presences/list.md b/examples/2.3.x/client-react-native/examples/presences/list.md new file mode 100644 index 000000000..ea4f8fe81 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/presences/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Presences } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.list({ + queries: [], // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/presences/update.md b/examples/2.3.x/client-react-native/examples/presences/update.md new file mode 100644 index 000000000..a9a0dad7b --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/presences/update.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Presences, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.update({ + presenceId: '', + status: '', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional + permissions: [Permission.read(Role.any())], // optional + purge: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/presences/upsert.md b/examples/2.3.x/client-react-native/examples/presences/upsert.md new file mode 100644 index 000000000..09e216221 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/presences/upsert.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Presences, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.upsert({ + presenceId: '', + status: '', + permissions: [Permission.read(Role.any())], // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/storage/create-file.md b/examples/2.3.x/client-react-native/examples/storage/create-file.md new file mode 100644 index 000000000..2901c4bd4 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/storage/create-file.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Storage, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile({ + bucketId: '', + fileId: '', + file: { + name: 'image.png', + type: 'image/png', + size: 1024, + uri: 'file:///path/to/image.png', + }, + permissions: [Permission.read(Role.any())], // optional + folder: 'photos/2026', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/storage/delete-file.md b/examples/2.3.x/client-react-native/examples/storage/delete-file.md new file mode 100644 index 000000000..c6ef83ceb --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Storage } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile({ + bucketId: '', + fileId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/storage/get-file-download.md b/examples/2.3.x/client-react-native/examples/storage/get-file-download.md new file mode 100644 index 000000000..cba6f31c8 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/storage/get-file-download.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Storage } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload({ + bucketId: '', + fileId: '', + token: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/storage/get-file-preview.md b/examples/2.3.x/client-react-native/examples/storage/get-file-preview.md new file mode 100644 index 000000000..eabdc1f23 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/storage/get-file-preview.md @@ -0,0 +1,33 @@ +```javascript +import { + Client, + Storage, + ImageGravity, + ImageFormat, +} from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview({ + bucketId: '', + fileId: '', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.Auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: 'FFFFFF', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: 'FFFFFF', // optional + output: ImageFormat.Jpg, // optional + token: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/storage/get-file-view.md b/examples/2.3.x/client-react-native/examples/storage/get-file-view.md new file mode 100644 index 000000000..99b341613 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/storage/get-file-view.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Storage } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView({ + bucketId: '', + fileId: '', + token: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/storage/get-file.md b/examples/2.3.x/client-react-native/examples/storage/get-file.md new file mode 100644 index 000000000..80b9a17e4 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/storage/get-file.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Storage } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile({ + bucketId: '', + fileId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/storage/list-files.md b/examples/2.3.x/client-react-native/examples/storage/list-files.md new file mode 100644 index 000000000..31b88fb52 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/storage/list-files.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Storage } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles({ + bucketId: '', + queries: [], // optional + search: '', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/storage/update-file.md b/examples/2.3.x/client-react-native/examples/storage/update-file.md new file mode 100644 index 000000000..417fb8111 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/storage/update-file.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Storage, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile({ + bucketId: '', + fileId: '', + name: '', // optional + permissions: [Permission.read(Role.any())], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/create-operations.md b/examples/2.3.x/client-react-native/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..9c1458fe4 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + tableId: '', + rowId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/create-row.md b/examples/2.3.x/client-react-native/examples/tablesdb/create-row.md new file mode 100644 index 000000000..c4d2cb4fe --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/create-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createRow({ + databaseId: '', + tableId: '', + rowId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/create-transaction.md b/examples/2.3.x/client-react-native/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..87e53a18d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/client-react-native/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..a3a845f8a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.decrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/delete-row.md b/examples/2.3.x/client-react-native/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..4a32be86c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/delete-row.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteRow({ + databaseId: '', + tableId: '', + rowId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/delete-transaction.md b/examples/2.3.x/client-react-native/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..3cbf63e9f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/get-row.md b/examples/2.3.x/client-react-native/examples/tablesdb/get-row.md new file mode 100644 index 000000000..fe2c7769c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/get-row.md @@ -0,0 +1,19 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getRow({ + databaseId: '', + tableId: '', + rowId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/get-transaction.md b/examples/2.3.x/client-react-native/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..8776ee669 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/increment-row-column.md b/examples/2.3.x/client-react-native/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..189851478 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/increment-row-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.incrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/list-rows.md b/examples/2.3.x/client-react-native/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..6c0cc4179 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/list-rows.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listRows({ + databaseId: '', + tableId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // 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 new file mode 100644 index 000000000..e28ff1415 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/update-row.md b/examples/2.3.x/client-react-native/examples/tablesdb/update-row.md new file mode 100644 index 000000000..a330449ef --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/update-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRow({ + databaseId: '', + tableId: '', + rowId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/update-transaction.md b/examples/2.3.x/client-react-native/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..d89cc16ee --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/upsert-row.md b/examples/2.3.x/client-react-native/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..916919316 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/tablesdb/upsert-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.upsertRow({ + databaseId: '', + tableId: '', + rowId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/create-installation.md b/examples/2.3.x/client-react-native/examples/teams/create-installation.md new file mode 100644 index 000000000..56b4b08e8 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createInstallation({ + teamId: '', + appId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/create-membership.md b/examples/2.3.x/client-react-native/examples/teams/create-membership.md new file mode 100644 index 000000000..e7fe0d72c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/create-membership.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership({ + teamId: '', + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/create.md b/examples/2.3.x/client-react-native/examples/teams/create.md new file mode 100644 index 000000000..0bd3adf53 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/create.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create({ + teamId: '', + name: '', + roles: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/delete-installation.md b/examples/2.3.x/client-react-native/examples/teams/delete-installation.md new file mode 100644 index 000000000..290975574 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/delete-membership.md b/examples/2.3.x/client-react-native/examples/teams/delete-membership.md new file mode 100644 index 000000000..f8fb2c970 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership({ + teamId: '', + membershipId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/delete.md b/examples/2.3.x/client-react-native/examples/teams/delete.md new file mode 100644 index 000000000..e5927ef8c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete({ + teamId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/get-installation.md b/examples/2.3.x/client-react-native/examples/teams/get-installation.md new file mode 100644 index 000000000..8f1a7e442 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getInstallation({ + teamId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/get-membership.md b/examples/2.3.x/client-react-native/examples/teams/get-membership.md new file mode 100644 index 000000000..b73f234ea --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership({ + teamId: '', + membershipId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/get-prefs.md b/examples/2.3.x/client-react-native/examples/teams/get-prefs.md new file mode 100644 index 000000000..78fd30c62 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/get-prefs.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs({ + teamId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/get.md b/examples/2.3.x/client-react-native/examples/teams/get.md new file mode 100644 index 000000000..fb2fc31f6 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get({ + teamId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/list-installations.md b/examples/2.3.x/client-react-native/examples/teams/list-installations.md new file mode 100644 index 000000000..48e971eb3 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listInstallations({ + teamId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/list-memberships.md b/examples/2.3.x/client-react-native/examples/teams/list-memberships.md new file mode 100644 index 000000000..14104a631 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/list-memberships.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships({ + teamId: '', + queries: [], // optional + search: '', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/list.md b/examples/2.3.x/client-react-native/examples/teams/list.md new file mode 100644 index 000000000..5f3fb9b90 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list({ + queries: [], // optional + search: '', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/update-installation.md b/examples/2.3.x/client-react-native/examples/teams/update-installation.md new file mode 100644 index 000000000..5d613035d --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateInstallation({ + teamId: '', + installationId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/update-membership-status.md b/examples/2.3.x/client-react-native/examples/teams/update-membership-status.md new file mode 100644 index 000000000..23d0479a8 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/update-membership-status.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus({ + teamId: '', + membershipId: '', + userId: '', + secret: '', +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..92e596961 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/update-membership.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership({ + teamId: '', + membershipId: '', + roles: [], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/update-name.md b/examples/2.3.x/client-react-native/examples/teams/update-name.md new file mode 100644 index 000000000..c18ed1283 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/update-name.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName({ + teamId: '', + name: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/teams/update-prefs.md b/examples/2.3.x/client-react-native/examples/teams/update-prefs.md new file mode 100644 index 000000000..1e068740a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/teams/update-prefs.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs({ + teamId: '', + prefs: {}, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/create-document.md b/examples/2.3.x/client-react-native/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..f2aaf4729 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/create-document.md @@ -0,0 +1,25 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + key: 'value', + }, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +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 new file mode 100644 index 000000000..86be153fa --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/create-query.md b/examples/2.3.x/client-react-native/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..af9820000 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/create-transaction.md b/examples/2.3.x/client-react-native/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..8377619f7 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/delete-document.md b/examples/2.3.x/client-react-native/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..5046144d5 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/client-react-native/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..fc6cc5c53 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/get-document.md b/examples/2.3.x/client-react-native/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..1545ae996 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/get-transaction.md b/examples/2.3.x/client-react-native/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..b6e81c948 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/list-documents.md b/examples/2.3.x/client-react-native/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..fa79136ab --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..8a009a985 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/update-document.md b/examples/2.3.x/client-react-native/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..d2fa8794f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/update-transaction.md b/examples/2.3.x/client-react-native/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..d1392088e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, VectorsDB } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/upsert-document.md b/examples/2.3.x/client-react-native/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..cabe87c07 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-anonymous-session.md b/examples/2.3.x/client-rest/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..da7ca670a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +```http +POST /v1/account/sessions/anonymous 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/account/create-email-password-session.md b/examples/2.3.x/client-rest/examples/account/create-email-password-session.md new file mode 100644 index 000000000..bd8c32a48 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/sessions/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "email": "email@example.com", + "password": "password" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-email-token.md b/examples/2.3.x/client-rest/examples/account/create-email-token.md new file mode 100644 index 000000000..4d23eba86 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +```http +POST /v1/account/tokens/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "phrase": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-email-verification-otp.md b/examples/2.3.x/client-rest/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..d421b844e --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-email-verification-otp.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/verifications/email/otp HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "phrase": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-email-verification.md b/examples/2.3.x/client-rest/examples/account/create-email-verification.md new file mode 100644 index 000000000..15d915105 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-email-verification.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/verifications/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "url": "https://example.com" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-id-token-session.md b/examples/2.3.x/client-rest/examples/account/create-id-token-session.md new file mode 100644 index 000000000..071fb8671 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-id-token-session.md @@ -0,0 +1,17 @@ +```http +POST /v1/account/sessions/id-token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "provider": "apple", + "idToken": "", + "nonce": "", + "accessToken": "", + "accessTokenExpiry": 0, + "name": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-jwt.md b/examples/2.3.x/client-rest/examples/account/create-jwt.md new file mode 100644 index 000000000..aded20081 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-jwt.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "duration": 0 +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-magic-url-token.md b/examples/2.3.x/client-rest/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..ec06742ed --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-magic-url-token.md @@ -0,0 +1,15 @@ +```http +POST /v1/account/tokens/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "url": "https://example.com", + "phrase": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-mfa-authenticator.md b/examples/2.3.x/client-rest/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..ec9fdd1c2 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-mfa-authenticator.md @@ -0,0 +1,9 @@ +```http +POST /v1/account/mfa/authenticators/{type} 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/account/create-mfa-challenge.md b/examples/2.3.x/client-rest/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..433721513 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-mfa-challenge.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/mfa/challenges HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "factor": "email" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/client-rest/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..336eaac4d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```http +POST /v1/account/mfa/recovery-codes 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/account/create-o-auth-2-session.md b/examples/2.3.x/client-rest/examples/account/create-o-auth-2-session.md new file mode 100644 index 000000000..132d1f969 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-o-auth-2-session.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/sessions/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +Accept: text/html +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-o-auth-2-token.md b/examples/2.3.x/client-rest/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..b08d6fb23 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-o-auth-2-token.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +Accept: text/html +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-phone-token.md b/examples/2.3.x/client-rest/examples/account/create-phone-token.md new file mode 100644 index 000000000..460bbf349 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/tokens/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "phone": "+12065550100" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-phone-verification.md b/examples/2.3.x/client-rest/examples/account/create-phone-verification.md new file mode 100644 index 000000000..7a88ab610 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-phone-verification.md @@ -0,0 +1,9 @@ +```http +POST /v1/account/verifications/phone 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/account/create-push-target.md b/examples/2.3.x/client-rest/examples/account/create-push-target.md new file mode 100644 index 000000000..a35bfe65f --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-push-target.md @@ -0,0 +1,14 @@ +```http +POST /v1/account/targets/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "targetId": "", + "identifier": "", + "providerId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-recovery-otp.md b/examples/2.3.x/client-rest/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..74da36ea9 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-recovery-otp.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/recovery/otp HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "email": "email@example.com", + "phrase": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-recovery.md b/examples/2.3.x/client-rest/examples/account/create-recovery.md new file mode 100644 index 000000000..8e11c70e2 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "email": "email@example.com", + "url": "https://example.com" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-session.md b/examples/2.3.x/client-rest/examples/account/create-session.md new file mode 100644 index 000000000..5ad02ccdc --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-session.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/sessions/token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create-verification.md b/examples/2.3.x/client-rest/examples/account/create-verification.md new file mode 100644 index 000000000..15d915105 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create-verification.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/verifications/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "url": "https://example.com" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/create.md b/examples/2.3.x/client-rest/examples/account/create.md new file mode 100644 index 000000000..b61fd268c --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/create.md @@ -0,0 +1,15 @@ +```http +POST /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "password": "password", + "name": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/delete-consent-token.md b/examples/2.3.x/client-rest/examples/account/delete-consent-token.md new file mode 100644 index 000000000..be7e1e558 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/delete-consent-token.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/consents/{consentId}/tokens/{tokenId} 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/account/delete-consent.md b/examples/2.3.x/client-rest/examples/account/delete-consent.md new file mode 100644 index 000000000..a05664502 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/delete-consent.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/consents/{consentId} 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/account/delete-identity.md b/examples/2.3.x/client-rest/examples/account/delete-identity.md new file mode 100644 index 000000000..0d66a32ad --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/delete-identity.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/identities/{identityId} 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/account/delete-mfa-authenticator.md b/examples/2.3.x/client-rest/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..8b234af52 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/mfa/authenticators/{type} 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/account/delete-push-target.md b/examples/2.3.x/client-rest/examples/account/delete-push-target.md new file mode 100644 index 000000000..24847198a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/delete-push-target.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/targets/{targetId}/push 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/account/delete-session.md b/examples/2.3.x/client-rest/examples/account/delete-session.md new file mode 100644 index 000000000..208f07822 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/delete-session.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/sessions/{sessionId} 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/account/delete-sessions.md b/examples/2.3.x/client-rest/examples/account/delete-sessions.md new file mode 100644 index 000000000..5cffb6a79 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/delete-sessions.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/sessions 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/account/get-consent-token.md b/examples/2.3.x/client-rest/examples/account/get-consent-token.md new file mode 100644 index 000000000..68ea281a4 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/get-consent-token.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/consents/{consentId}/tokens/{tokenId} 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/account/get-consent.md b/examples/2.3.x/client-rest/examples/account/get-consent.md new file mode 100644 index 000000000..a817f312f --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/get-consent.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/consents/{consentId} 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/account/get-mfa-recovery-codes.md b/examples/2.3.x/client-rest/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..7eeb0659b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/mfa/recovery-codes 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/account/get-prefs.md b/examples/2.3.x/client-rest/examples/account/get-prefs.md new file mode 100644 index 000000000..5a7a22bd8 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/get-prefs.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/prefs 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/account/get-session.md b/examples/2.3.x/client-rest/examples/account/get-session.md new file mode 100644 index 000000000..bfe859f6b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/get-session.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/sessions/{sessionId} 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/account/get.md b/examples/2.3.x/client-rest/examples/account/get.md new file mode 100644 index 000000000..c59eb46eb --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/account 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/account/list-consent-tokens.md b/examples/2.3.x/client-rest/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..c68cac352 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/list-consent-tokens.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/consents/{consentId}/tokens 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/account/list-consents.md b/examples/2.3.x/client-rest/examples/account/list-consents.md new file mode 100644 index 000000000..4ce873930 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/list-consents.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/consents 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/account/list-identities.md b/examples/2.3.x/client-rest/examples/account/list-identities.md new file mode 100644 index 000000000..38b27ad4f --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/list-identities.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/identities 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/account/list-mfa-factors.md b/examples/2.3.x/client-rest/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..72a32ac4e --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/list-mfa-factors.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/mfa/factors 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/account/list-sessions.md b/examples/2.3.x/client-rest/examples/account/list-sessions.md new file mode 100644 index 000000000..30a533aa3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/list-sessions.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/sessions 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/account/update-email-verification-otp.md b/examples/2.3.x/client-rest/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..0cacdbf15 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-email-verification-otp.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/verifications/email/otp HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-email-verification.md b/examples/2.3.x/client-rest/examples/account/update-email-verification.md new file mode 100644 index 000000000..4337185e9 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-email-verification.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/verifications/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-email.md b/examples/2.3.x/client-rest/examples/account/update-email.md new file mode 100644 index 000000000..5ee0833fb --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-email.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/account/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "email": "email@example.com", + "password": "password" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-magic-url-session.md b/examples/2.3.x/client-rest/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..7f9a3152a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-magic-url-session.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/sessions/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-mfa-authenticator.md b/examples/2.3.x/client-rest/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..d8e514901 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-mfa-authenticator.md @@ -0,0 +1,12 @@ +```http +PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "otp": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-mfa-challenge.md b/examples/2.3.x/client-rest/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..e99f2e12c --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/mfa/challenges HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "challengeId": "", + "otp": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/client-rest/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..c2e49f97b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/account/mfa/recovery-codes 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/account/update-mfa.md b/examples/2.3.x/client-rest/examples/account/update-mfa.md new file mode 100644 index 000000000..99eda3b60 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-mfa.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/account/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "mfa": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-name.md b/examples/2.3.x/client-rest/examples/account/update-name.md new file mode 100644 index 000000000..922865105 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-name.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/account/name 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": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-password.md b/examples/2.3.x/client-rest/examples/account/update-password.md new file mode 100644 index 000000000..a18cdf9ba --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-password.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/account/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "password": "password", + "oldPassword": "password" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-phone-session.md b/examples/2.3.x/client-rest/examples/account/update-phone-session.md new file mode 100644 index 000000000..b345acc0a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/sessions/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-phone-verification.md b/examples/2.3.x/client-rest/examples/account/update-phone-verification.md new file mode 100644 index 000000000..0fc920d28 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/verifications/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-phone.md b/examples/2.3.x/client-rest/examples/account/update-phone.md new file mode 100644 index 000000000..41518a1d3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-phone.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/account/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "phone": "+12065550100", + "password": "password" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-prefs.md b/examples/2.3.x/client-rest/examples/account/update-prefs.md new file mode 100644 index 000000000..596c84fe0 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-prefs.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "prefs": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-push-target.md b/examples/2.3.x/client-rest/examples/account/update-push-target.md new file mode 100644 index 000000000..bc06dc744 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-push-target.md @@ -0,0 +1,12 @@ +```http +PUT /v1/account/targets/{targetId}/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "identifier": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-recovery-otp.md b/examples/2.3.x/client-rest/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..e9f7e598e --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-recovery-otp.md @@ -0,0 +1,14 @@ +```http +PUT /v1/account/recovery/otp HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "", + "password": "password" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-recovery.md b/examples/2.3.x/client-rest/examples/account/update-recovery.md new file mode 100644 index 000000000..e94a20600 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +```http +PUT /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "", + "password": "password" +} +``` diff --git a/examples/2.3.x/client-rest/examples/account/update-session.md b/examples/2.3.x/client-rest/examples/account/update-session.md new file mode 100644 index 000000000..24f2398d5 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-session.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/account/sessions/{sessionId} 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/account/update-status.md b/examples/2.3.x/client-rest/examples/account/update-status.md new file mode 100644 index 000000000..bb32e42c9 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-status.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/account/status 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/account/update-verification.md b/examples/2.3.x/client-rest/examples/account/update-verification.md new file mode 100644 index 000000000..4337185e9 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/account/update-verification.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/verifications/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-browser.md b/examples/2.3.x/client-rest/examples/avatars/get-browser.md new file mode 100644 index 000000000..8d54b1773 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-browser.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-credit-card.md b/examples/2.3.x/client-rest/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..77de1b29a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-favicon.md b/examples/2.3.x/client-rest/examples/avatars/get-favicon.md new file mode 100644 index 000000000..01d1d0e6b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/favicon HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-flag.md b/examples/2.3.x/client-rest/examples/avatars/get-flag.md new file mode 100644 index 000000000..38968e37f --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-flag.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-image.md b/examples/2.3.x/client-rest/examples/avatars/get-image.md new file mode 100644 index 000000000..bb4ae20d4 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-image.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/image HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-initials.md b/examples/2.3.x/client-rest/examples/avatars/get-initials.md new file mode 100644 index 000000000..2f2d34c42 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-initials.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/initials HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-photo.md b/examples/2.3.x/client-rest/examples/avatars/get-photo.md new file mode 100644 index 000000000..e5b593919 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-photo.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/photo HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-qr.md b/examples/2.3.x/client-rest/examples/avatars/get-qr.md new file mode 100644 index 000000000..088b3970b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-qr.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/qr HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/get-screenshot.md b/examples/2.3.x/client-rest/examples/avatars/get-screenshot.md new file mode 100644 index 000000000..82f4a41cf --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/get-screenshot.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/screenshots HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/databases/create-document.md b/examples/2.3.x/client-rest/examples/databases/create-document.md new file mode 100644 index 000000000..96ce28eda --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/create-document.md @@ -0,0 +1,21 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "documentId": "", + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/databases/create-operations.md b/examples/2.3.x/client-rest/examples/databases/create-operations.md new file mode 100644 index 000000000..026d252a2 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/create-operations.md @@ -0,0 +1,22 @@ +```http +POST /v1/databases/transactions/{transactionId}/operations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "operations": [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/2.3.x/client-rest/examples/databases/create-transaction.md b/examples/2.3.x/client-rest/examples/databases/create-transaction.md new file mode 100644 index 000000000..9dcfe857d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/create-transaction.md @@ -0,0 +1,12 @@ +```http +POST /v1/databases/transactions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "ttl": 60 +} +``` diff --git a/examples/2.3.x/client-rest/examples/databases/decrement-document-attribute.md b/examples/2.3.x/client-rest/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..1cbb1574a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/decrement-document-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "value": 1, + "min": 0, + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/databases/delete-document.md b/examples/2.3.x/client-rest/examples/databases/delete-document.md new file mode 100644 index 000000000..b21e233a8 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} 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/databases/delete-transaction.md b/examples/2.3.x/client-rest/examples/databases/delete-transaction.md new file mode 100644 index 000000000..b998e9152 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/delete-transaction.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/transactions/{transactionId} 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/databases/get-document.md b/examples/2.3.x/client-rest/examples/databases/get-document.md new file mode 100644 index 000000000..a46fafbf4 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/get-document.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} 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/databases/get-transaction.md b/examples/2.3.x/client-rest/examples/databases/get-transaction.md new file mode 100644 index 000000000..5cd851998 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/get-transaction.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/transactions/{transactionId} 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/databases/increment-document-attribute.md b/examples/2.3.x/client-rest/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..10cf8831e --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/increment-document-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "value": 1, + "max": 100, + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/databases/list-documents.md b/examples/2.3.x/client-rest/examples/databases/list-documents.md new file mode 100644 index 000000000..c2786da53 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/list-documents.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId}/documents 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/databases/list-transactions.md b/examples/2.3.x/client-rest/examples/databases/list-transactions.md new file mode 100644 index 000000000..97f91e7e5 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/list-transactions.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/transactions 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/databases/update-document.md b/examples/2.3.x/client-rest/examples/databases/update-document.md new file mode 100644 index 000000000..c83352f49 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/update-document.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/databases/update-transaction.md b/examples/2.3.x/client-rest/examples/databases/update-transaction.md new file mode 100644 index 000000000..eedd39518 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/update-transaction.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/databases/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/databases/upsert-document.md b/examples/2.3.x/client-rest/examples/databases/upsert-document.md new file mode 100644 index 000000000..144890b55 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/databases/upsert-document.md @@ -0,0 +1,20 @@ +```http +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/create-document.md b/examples/2.3.x/client-rest/examples/documentsdb/create-document.md new file mode 100644 index 000000000..ba48e0e19 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/create-document.md @@ -0,0 +1,21 @@ +```http +POST /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "documentId": "", + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` 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 new file mode 100644 index 000000000..8ab99545a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/create-documents.md @@ -0,0 +1,13 @@ +```http +POST /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "documents": [], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/create-operations.md b/examples/2.3.x/client-rest/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..07237f7d5 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/create-operations.md @@ -0,0 +1,22 @@ +```http +POST /v1/documentsdb/transactions/{transactionId}/operations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "operations": [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/create-transaction.md b/examples/2.3.x/client-rest/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..eba3f1c9c --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/create-transaction.md @@ -0,0 +1,12 @@ +```http +POST /v1/documentsdb/transactions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "ttl": 60 +} +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-rest/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..272ecfc7e --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "value": 1, + "min": 0, + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/delete-document.md b/examples/2.3.x/client-rest/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..3e0963a78 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/delete-document.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/delete-transaction.md b/examples/2.3.x/client-rest/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..49dcf3aa1 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/documentsdb/transactions/{transactionId} 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/documentsdb/get-document.md b/examples/2.3.x/client-rest/examples/documentsdb/get-document.md new file mode 100644 index 000000000..0fd825fea --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/get-document.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} 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/documentsdb/get-transaction.md b/examples/2.3.x/client-rest/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..e2c0c1efa --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/get-transaction.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/transactions/{transactionId} 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/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-rest/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..b49c29ce5 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "value": 1, + "max": 100, + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/list-documents.md b/examples/2.3.x/client-rest/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..c4d6ce409 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/list-documents.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/documents 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/documentsdb/list-transactions.md b/examples/2.3.x/client-rest/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..7b6db4f87 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/list-transactions.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/transactions 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/documentsdb/update-document.md b/examples/2.3.x/client-rest/examples/documentsdb/update-document.md new file mode 100644 index 000000000..7cce98ab1 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/update-document.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/update-transaction.md b/examples/2.3.x/client-rest/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..ef88f9cd7 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/update-transaction.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/documentsdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/upsert-document.md b/examples/2.3.x/client-rest/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..3c5de683b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/documentsdb/upsert-document.md @@ -0,0 +1,14 @@ +```http +PUT /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/functions/create-execution.md b/examples/2.3.x/client-rest/examples/functions/create-execution.md new file mode 100644 index 000000000..67d0f4a14 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/functions/create-execution.md @@ -0,0 +1,17 @@ +```http +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "body": "", + "async": false, + "path": "", + "method": "GET", + "headers": {}, + "scheduledAt": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/functions/get-execution.md b/examples/2.3.x/client-rest/examples/functions/get-execution.md new file mode 100644 index 000000000..724d02488 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/functions/get-execution.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/executions/{executionId} 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/functions/list-executions.md b/examples/2.3.x/client-rest/examples/functions/list-executions.md new file mode 100644 index 000000000..1b1449aad --- /dev/null +++ b/examples/2.3.x/client-rest/examples/functions/list-executions.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/executions 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/graphql/mutation.md b/examples/2.3.x/client-rest/examples/graphql/mutation.md new file mode 100644 index 000000000..2ad4b0d6d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +```http +POST /v1/graphql/mutation HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "query": {} +} +``` diff --git a/examples/2.3.x/client-rest/examples/graphql/query.md b/examples/2.3.x/client-rest/examples/graphql/query.md new file mode 100644 index 000000000..98a401e63 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/graphql/query.md @@ -0,0 +1,13 @@ +```http +POST /v1/graphql HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "query": {} +} +``` diff --git a/examples/2.3.x/client-rest/examples/locale/get.md b/examples/2.3.x/client-rest/examples/locale/get.md new file mode 100644 index 000000000..09e338076 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/locale/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale 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/locale/list-codes.md b/examples/2.3.x/client-rest/examples/locale/list-codes.md new file mode 100644 index 000000000..ee12c3e61 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/locale/list-codes.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/codes 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/locale/list-continents.md b/examples/2.3.x/client-rest/examples/locale/list-continents.md new file mode 100644 index 000000000..0a9f602e5 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/locale/list-continents.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/continents 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/locale/list-countries-eu.md b/examples/2.3.x/client-rest/examples/locale/list-countries-eu.md new file mode 100644 index 000000000..ee04befd5 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/locale/list-countries-eu.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/countries/eu 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/locale/list-countries-phones.md b/examples/2.3.x/client-rest/examples/locale/list-countries-phones.md new file mode 100644 index 000000000..e4a4c36c1 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/countries/phones 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/locale/list-countries.md b/examples/2.3.x/client-rest/examples/locale/list-countries.md new file mode 100644 index 000000000..c90f2d43b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/locale/list-countries.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/countries 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/locale/list-currencies.md b/examples/2.3.x/client-rest/examples/locale/list-currencies.md new file mode 100644 index 000000000..0684e9c83 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/locale/list-currencies.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/currencies 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/locale/list-languages.md b/examples/2.3.x/client-rest/examples/locale/list-languages.md new file mode 100644 index 000000000..1ae858c81 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/locale/list-languages.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/languages 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/messaging/create-subscriber.md b/examples/2.3.x/client-rest/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..05eb943b7 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/messaging/create-subscriber.md @@ -0,0 +1,13 @@ +```http +POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "subscriberId": "", + "targetId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/messaging/delete-subscriber.md b/examples/2.3.x/client-rest/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..240d535b3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/messaging/delete-subscriber.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} 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/organization/create-installation.md b/examples/2.3.x/client-rest/examples/organization/create-installation.md new file mode 100644 index 000000000..bec0d3d9e --- /dev/null +++ b/examples/2.3.x/client-rest/examples/organization/create-installation.md @@ -0,0 +1,13 @@ +```http +POST /v1/organization/installations 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": "", + "authorizationDetails": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/organization/delete-installation.md b/examples/2.3.x/client-rest/examples/organization/delete-installation.md new file mode 100644 index 000000000..b06d8cf83 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/organization/delete-installation.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/organization/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/organization/get-installation.md b/examples/2.3.x/client-rest/examples/organization/get-installation.md new file mode 100644 index 000000000..f4acf641a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/organization/get-installation.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/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/organization/list-installations.md b/examples/2.3.x/client-rest/examples/organization/list-installations.md new file mode 100644 index 000000000..8ab5fe60e --- /dev/null +++ b/examples/2.3.x/client-rest/examples/organization/list-installations.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/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/organization/update-installation.md b/examples/2.3.x/client-rest/examples/organization/update-installation.md new file mode 100644 index 000000000..f9fc9b541 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/organization/update-installation.md @@ -0,0 +1,12 @@ +```http +PUT /v1/organization/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: + +{ + "authorizationDetails": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/presences/delete.md b/examples/2.3.x/client-rest/examples/presences/delete.md new file mode 100644 index 000000000..70721ec2b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/presences/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/presences/{presenceId} 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/presences/get.md b/examples/2.3.x/client-rest/examples/presences/get.md new file mode 100644 index 000000000..a872e4109 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/presences/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/presences/{presenceId} 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/presences/list.md b/examples/2.3.x/client-rest/examples/presences/list.md new file mode 100644 index 000000000..a156b3e80 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/presences/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/presences 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/presences/update.md b/examples/2.3.x/client-rest/examples/presences/update.md new file mode 100644 index 000000000..9156b735b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/presences/update.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/presences/{presenceId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "status": "", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": {}, + "permissions": ["read(\"any\")"], + "purge": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/presences/upsert.md b/examples/2.3.x/client-rest/examples/presences/upsert.md new file mode 100644 index 000000000..dc002fd6c --- /dev/null +++ b/examples/2.3.x/client-rest/examples/presences/upsert.md @@ -0,0 +1,15 @@ +```http +PUT /v1/presences/{presenceId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "status": "", + "permissions": ["read(\"any\")"], + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": {} +} +``` diff --git a/examples/2.3.x/client-rest/examples/storage/create-file.md b/examples/2.3.x/client-rest/examples/storage/create-file.md new file mode 100644 index 000000000..d46117f79 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/storage/create-file.md @@ -0,0 +1,31 @@ +```http +POST /v1/storage/buckets/{bucketId}/files 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="fileId" + +"" + +--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 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="folder" + +"photos/2026" + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/client-rest/examples/storage/delete-file.md b/examples/2.3.x/client-rest/examples/storage/delete-file.md new file mode 100644 index 000000000..cbfff5eb3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/storage/delete-file.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} 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/storage/get-file-download.md b/examples/2.3.x/client-rest/examples/storage/get-file-download.md new file mode 100644 index 000000000..2d7f52d86 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/storage/get-file-download.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: cloud.appwrite.io +Accept: */* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/storage/get-file-preview.md b/examples/2.3.x/client-rest/examples/storage/get-file-preview.md new file mode 100644 index 000000000..4ff6429ab --- /dev/null +++ b/examples/2.3.x/client-rest/examples/storage/get-file-preview.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/storage/get-file-view.md b/examples/2.3.x/client-rest/examples/storage/get-file-view.md new file mode 100644 index 000000000..97ff6cd71 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/storage/get-file-view.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: cloud.appwrite.io +Accept: */* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/storage/get-file.md b/examples/2.3.x/client-rest/examples/storage/get-file.md new file mode 100644 index 000000000..ef97d4ebf --- /dev/null +++ b/examples/2.3.x/client-rest/examples/storage/get-file.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files/{fileId} 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/storage/list-files.md b/examples/2.3.x/client-rest/examples/storage/list-files.md new file mode 100644 index 000000000..35c7e0f5b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/storage/list-files.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files 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/storage/update-file.md b/examples/2.3.x/client-rest/examples/storage/update-file.md new file mode 100644 index 000000000..23741785b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/storage/update-file.md @@ -0,0 +1,13 @@ +```http +PUT /v1/storage/buckets/{bucketId}/files/{fileId} 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": "", + "permissions": ["read(\"any\")"] +} +``` diff --git a/examples/2.3.x/client-rest/examples/tablesdb/create-operations.md b/examples/2.3.x/client-rest/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..8a5b1fa42 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/create-operations.md @@ -0,0 +1,22 @@ +```http +POST /v1/tablesdb/transactions/{transactionId}/operations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "operations": [ + { + "action": "create", + "databaseId": "", + "tableId": "", + "rowId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/2.3.x/client-rest/examples/tablesdb/create-row.md b/examples/2.3.x/client-rest/examples/tablesdb/create-row.md new file mode 100644 index 000000000..a36367c5d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/create-row.md @@ -0,0 +1,21 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "rowId": "", + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/tablesdb/create-transaction.md b/examples/2.3.x/client-rest/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..e3eadf4cb --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/create-transaction.md @@ -0,0 +1,12 @@ +```http +POST /v1/tablesdb/transactions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "ttl": 60 +} +``` diff --git a/examples/2.3.x/client-rest/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/client-rest/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..5c6ce0f01 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "value": 1, + "min": 0, + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/tablesdb/delete-row.md b/examples/2.3.x/client-rest/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..3f989a76c --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/delete-row.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} 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/tablesdb/delete-transaction.md b/examples/2.3.x/client-rest/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..de9680c61 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/delete-transaction.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/transactions/{transactionId} 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/tablesdb/get-row.md b/examples/2.3.x/client-rest/examples/tablesdb/get-row.md new file mode 100644 index 000000000..b54f17302 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/get-row.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} 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/tablesdb/get-transaction.md b/examples/2.3.x/client-rest/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..6ce8f644b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/get-transaction.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/transactions/{transactionId} 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/tablesdb/increment-row-column.md b/examples/2.3.x/client-rest/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..0e9f6b36d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/increment-row-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "value": 1, + "max": 100, + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/tablesdb/list-rows.md b/examples/2.3.x/client-rest/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..374ff3a9a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/list-rows.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows 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/tablesdb/list-transactions.md b/examples/2.3.x/client-rest/examples/tablesdb/list-transactions.md new file mode 100644 index 000000000..151eeff1b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/list-transactions.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/transactions 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/tablesdb/update-row.md b/examples/2.3.x/client-rest/examples/tablesdb/update-row.md new file mode 100644 index 000000000..b1747bd31 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/update-row.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/tablesdb/update-transaction.md b/examples/2.3.x/client-rest/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..e71e7ca81 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/update-transaction.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/tablesdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/tablesdb/upsert-row.md b/examples/2.3.x/client-rest/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..6c7ebc074 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/tablesdb/upsert-row.md @@ -0,0 +1,20 @@ +```http +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/teams/create-installation.md b/examples/2.3.x/client-rest/examples/teams/create-installation.md new file mode 100644 index 000000000..ed26bd178 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/create-installation.md @@ -0,0 +1,13 @@ +```http +POST /v1/teams/{teamId}/installations 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": "", + "authorizationDetails": "" +} +``` 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 new file mode 100644 index 000000000..c4840217f --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +```http +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "email": "email@example.com", + "userId": "", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/teams/create.md b/examples/2.3.x/client-rest/examples/teams/create.md new file mode 100644 index 000000000..f6b14347c --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/create.md @@ -0,0 +1,14 @@ +```http +POST /v1/teams 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": "", + "name": "", + "roles": [] +} +``` diff --git a/examples/2.3.x/client-rest/examples/teams/delete-installation.md b/examples/2.3.x/client-rest/examples/teams/delete-installation.md new file mode 100644 index 000000000..83c753b4d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/delete-installation.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/teams/delete-membership.md b/examples/2.3.x/client-rest/examples/teams/delete-membership.md new file mode 100644 index 000000000..7f07cd3ae --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/delete-membership.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/teams/{teamId}/memberships/{membershipId} 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/teams/delete.md b/examples/2.3.x/client-rest/examples/teams/delete.md new file mode 100644 index 000000000..c53e5fb68 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/teams/{teamId} 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/teams/get-installation.md b/examples/2.3.x/client-rest/examples/teams/get-installation.md new file mode 100644 index 000000000..fd34bb104 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/get-installation.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/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/teams/get-membership.md b/examples/2.3.x/client-rest/examples/teams/get-membership.md new file mode 100644 index 000000000..80210cf1b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/get-membership.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/memberships/{membershipId} 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/teams/get-prefs.md b/examples/2.3.x/client-rest/examples/teams/get-prefs.md new file mode 100644 index 000000000..904afc75d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/get-prefs.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/prefs 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/teams/get.md b/examples/2.3.x/client-rest/examples/teams/get.md new file mode 100644 index 000000000..5f7f1c9d7 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId} 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/teams/list-installations.md b/examples/2.3.x/client-rest/examples/teams/list-installations.md new file mode 100644 index 000000000..890f6677d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/list-installations.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/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/teams/list-memberships.md b/examples/2.3.x/client-rest/examples/teams/list-memberships.md new file mode 100644 index 000000000..d9c8783be --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/list-memberships.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/memberships 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/teams/list.md b/examples/2.3.x/client-rest/examples/teams/list.md new file mode 100644 index 000000000..81ab77c48 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams 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/teams/update-installation.md b/examples/2.3.x/client-rest/examples/teams/update-installation.md new file mode 100644 index 000000000..671c4f1b3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/update-installation.md @@ -0,0 +1,12 @@ +```http +PUT /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "authorizationDetails": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/teams/update-membership-status.md b/examples/2.3.x/client-rest/examples/teams/update-membership-status.md new file mode 100644 index 000000000..d2b79b661 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/update-membership-status.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} +``` 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 new file mode 100644 index 000000000..22358a94d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/update-membership.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "roles": [] +} +``` diff --git a/examples/2.3.x/client-rest/examples/teams/update-name.md b/examples/2.3.x/client-rest/examples/teams/update-name.md new file mode 100644 index 000000000..7357765b3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/update-name.md @@ -0,0 +1,12 @@ +```http +PUT /v1/teams/{teamId} 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": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/teams/update-prefs.md b/examples/2.3.x/client-rest/examples/teams/update-prefs.md new file mode 100644 index 000000000..cd21f1287 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/teams/update-prefs.md @@ -0,0 +1,12 @@ +```http +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "prefs": {} +} +``` diff --git a/examples/2.3.x/client-rest/examples/vectorsdb/create-document.md b/examples/2.3.x/client-rest/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..7b7df3bc5 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/create-document.md @@ -0,0 +1,25 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "documentId": "", + "data": { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` 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 new file mode 100644 index 000000000..9f34f5b34 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/create-operations.md @@ -0,0 +1,22 @@ +```http +POST /v1/vectorsdb/transactions/{transactionId}/operations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "operations": [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/2.3.x/client-rest/examples/vectorsdb/create-query.md b/examples/2.3.x/client-rest/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..2c9f8080d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/create-query.md @@ -0,0 +1,15 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/query HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "queries": [], + "transactionId": "", + "total": false, + "ttl": 0 +} +``` diff --git a/examples/2.3.x/client-rest/examples/vectorsdb/create-transaction.md b/examples/2.3.x/client-rest/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..7cdba97f8 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/create-transaction.md @@ -0,0 +1,12 @@ +```http +POST /v1/vectorsdb/transactions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "ttl": 60 +} +``` diff --git a/examples/2.3.x/client-rest/examples/vectorsdb/delete-document.md b/examples/2.3.x/client-rest/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..1d47c9165 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/delete-document.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/client-rest/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..241c0b626 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/vectorsdb/transactions/{transactionId} 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/vectorsdb/get-document.md b/examples/2.3.x/client-rest/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..2e2c467f7 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/get-document.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} 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/vectorsdb/get-transaction.md b/examples/2.3.x/client-rest/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..36180f219 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/get-transaction.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/transactions/{transactionId} 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/vectorsdb/list-documents.md b/examples/2.3.x/client-rest/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..40fb060fd --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/list-documents.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents 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/vectorsdb/list-transactions.md b/examples/2.3.x/client-rest/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..659efa4dc --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/list-transactions.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/transactions 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/vectorsdb/update-document.md b/examples/2.3.x/client-rest/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..aba8122e3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/update-document.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/vectorsdb/update-transaction.md b/examples/2.3.x/client-rest/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..3851b7624 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/update-transaction.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/vectorsdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/2.3.x/client-rest/examples/vectorsdb/upsert-document.md b/examples/2.3.x/client-rest/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..45b66eb4d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/vectorsdb/upsert-document.md @@ -0,0 +1,14 @@ +```http +PUT /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/2.3.x/client-web/examples/account/create-anonymous-session.md b/examples/2.3.x/client-web/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..45b612e0f --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-anonymous-session.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); +``` 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 new file mode 100644 index 000000000..6093aa240 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-email-password-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-email-token.md b/examples/2.3.x/client-web/examples/account/create-email-token.md new file mode 100644 index 000000000..a90e93161 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-email-token.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken({ + userId: '', + email: 'email@example.com', + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-email-verification-otp.md b/examples/2.3.x/client-web/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..5e2934976 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-email-verification-otp.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailVerificationOTP({ + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-email-verification.md b/examples/2.3.x/client-web/examples/account/create-email-verification.md new file mode 100644 index 000000000..7b7edd983 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-email-verification.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailVerification({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-id-token-session.md b/examples/2.3.x/client-web/examples/account/create-id-token-session.md new file mode 100644 index 000000000..abd586cfd --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-id-token-session.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Account, IdTokenProvider } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createIdTokenSession({ + provider: IdTokenProvider.Apple, + idToken: '', + nonce: '', // optional + accessToken: '', // optional + accessTokenExpiry: 0, // optional + name: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-jwt.md b/examples/2.3.x/client-web/examples/account/create-jwt.md new file mode 100644 index 000000000..c17d32c41 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-jwt.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT({ + duration: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-magic-url-token.md b/examples/2.3.x/client-web/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..b1d50a01d --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-magic-url-token.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken({ + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-mfa-authenticator.md b/examples/2.3.x/client-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..70fa31738 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticatorType } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMFAAuthenticator({ + type: AuthenticatorType.Totp, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-mfa-challenge.md b/examples/2.3.x/client-web/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..b59204a81 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticationFactor } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMFAChallenge({ + factor: AuthenticationFactor.Email, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/client-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..a8b9532a7 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-o-auth-2-session.md b/examples/2.3.x/client-web/examples/account/create-o-auth-2-session.md new file mode 100644 index 000000000..869e0f375 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-o-auth-2-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, OAuthProvider } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +}); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-o-auth-2-token.md b/examples/2.3.x/client-web/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..1cb7dd5a9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-o-auth-2-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, OAuthProvider } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +}); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-phone-token.md b/examples/2.3.x/client-web/examples/account/create-phone-token.md new file mode 100644 index 000000000..b212cf658 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-phone-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken({ + userId: '', + phone: '+12065550100', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-phone-verification.md b/examples/2.3.x/client-web/examples/account/create-phone-verification.md new file mode 100644 index 000000000..9e12b6db6 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-phone-verification.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-push-target.md b/examples/2.3.x/client-web/examples/account/create-push-target.md new file mode 100644 index 000000000..915780cd9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-push-target.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget({ + targetId: '', + identifier: '', + providerId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-recovery-otp.md b/examples/2.3.x/client-web/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..62bc8f329 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-recovery-otp.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecoveryOTP({ + email: 'email@example.com', + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-recovery.md b/examples/2.3.x/client-web/examples/account/create-recovery.md new file mode 100644 index 000000000..3cae042ba --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-session.md b/examples/2.3.x/client-web/examples/account/create-session.md new file mode 100644 index 000000000..6fba52485 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create-verification.md b/examples/2.3.x/client-web/examples/account/create-verification.md new file mode 100644 index 000000000..58e2a9aa1 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create-verification.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/create.md b/examples/2.3.x/client-web/examples/account/create.md new file mode 100644 index 000000000..c9872ec6d --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/create.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create({ + userId: '', + email: 'email@example.com', + password: 'password', + name: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/delete-consent-token.md b/examples/2.3.x/client-web/examples/account/delete-consent-token.md new file mode 100644 index 000000000..d57bdb3f7 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/delete-consent-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteConsentToken({ + consentId: '', + tokenId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/delete-consent.md b/examples/2.3.x/client-web/examples/account/delete-consent.md new file mode 100644 index 000000000..c3bd51e34 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/delete-consent.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteConsent({ + consentId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/delete-identity.md b/examples/2.3.x/client-web/examples/account/delete-identity.md new file mode 100644 index 000000000..def2ad629 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/delete-identity.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity({ + identityId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/client-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..e785c0ff0 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticatorType } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMFAAuthenticator({ + type: AuthenticatorType.Totp, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/delete-push-target.md b/examples/2.3.x/client-web/examples/account/delete-push-target.md new file mode 100644 index 000000000..38aaab18e --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/delete-push-target.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget({ + targetId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/delete-session.md b/examples/2.3.x/client-web/examples/account/delete-session.md new file mode 100644 index 000000000..2547e38ac --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/delete-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession({ + sessionId: '', +}); + +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 new file mode 100644 index 000000000..1bd929a8a --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/delete-sessions.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/get-consent-token.md b/examples/2.3.x/client-web/examples/account/get-consent-token.md new file mode 100644 index 000000000..840af7b2e --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/get-consent-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getConsentToken({ + consentId: '', + tokenId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/get-consent.md b/examples/2.3.x/client-web/examples/account/get-consent.md new file mode 100644 index 000000000..c21096c32 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/get-consent.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getConsent({ + consentId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/client-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..07c4eb784 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/get-prefs.md b/examples/2.3.x/client-web/examples/account/get-prefs.md new file mode 100644 index 000000000..81feeeabe --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/get-prefs.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/get-session.md b/examples/2.3.x/client-web/examples/account/get-session.md new file mode 100644 index 000000000..f32fb12ce --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/get-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession({ + sessionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/get.md b/examples/2.3.x/client-web/examples/account/get.md new file mode 100644 index 000000000..bf3175473 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/get.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/list-consent-tokens.md b/examples/2.3.x/client-web/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..4e0cedfe1 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/list-consent-tokens.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listConsentTokens({ + consentId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/list-consents.md b/examples/2.3.x/client-web/examples/account/list-consents.md new file mode 100644 index 000000000..042dfd984 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/list-consents.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listConsents({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/list-identities.md b/examples/2.3.x/client-web/examples/account/list-identities.md new file mode 100644 index 000000000..015e94963 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/list-identities.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/list-mfa-factors.md b/examples/2.3.x/client-web/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..9a151cc00 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/list-mfa-factors.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMFAFactors(); + +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 new file mode 100644 index 000000000..d07cf48e5 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/list-sessions.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-email-verification-otp.md b/examples/2.3.x/client-web/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..d94f8eae2 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-email-verification-otp.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmailVerificationOTP({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-email-verification.md b/examples/2.3.x/client-web/examples/account/update-email-verification.md new file mode 100644 index 000000000..34b5f4ad6 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-email-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmailVerification({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-email.md b/examples/2.3.x/client-web/examples/account/update-email.md new file mode 100644 index 000000000..e18c3f82b --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-email.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-magic-url-session.md b/examples/2.3.x/client-web/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..2b5f59a95 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-magic-url-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-mfa-authenticator.md b/examples/2.3.x/client-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..0f350d051 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, AuthenticatorType } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFAAuthenticator({ + type: AuthenticatorType.Totp, + otp: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-mfa-challenge.md b/examples/2.3.x/client-web/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..84a764261 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFAChallenge({ + challengeId: '', + otp: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/client-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..039640fb1 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-mfa.md b/examples/2.3.x/client-web/examples/account/update-mfa.md new file mode 100644 index 000000000..75c011371 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-mfa.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA({ + mfa: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-name.md b/examples/2.3.x/client-web/examples/account/update-name.md new file mode 100644 index 000000000..41d3b27f5 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-name.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName({ + name: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-password.md b/examples/2.3.x/client-web/examples/account/update-password.md new file mode 100644 index 000000000..b4a002ee8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-password.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword({ + password: 'password', + oldPassword: 'password', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-phone-session.md b/examples/2.3.x/client-web/examples/account/update-phone-session.md new file mode 100644 index 000000000..5238cf412 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-phone-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-phone-verification.md b/examples/2.3.x/client-web/examples/account/update-phone-verification.md new file mode 100644 index 000000000..e2980824d --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-phone-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-phone.md b/examples/2.3.x/client-web/examples/account/update-phone.md new file mode 100644 index 000000000..e564e2ef7 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-phone.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone({ + phone: '+12065550100', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-prefs.md b/examples/2.3.x/client-web/examples/account/update-prefs.md new file mode 100644 index 000000000..ab1b9ffc3 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-prefs.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs({ + prefs: { + language: 'en', + timezone: 'UTC', + darkTheme: true, + }, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-push-target.md b/examples/2.3.x/client-web/examples/account/update-push-target.md new file mode 100644 index 000000000..83bf217b5 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-push-target.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget({ + targetId: '', + identifier: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-recovery-otp.md b/examples/2.3.x/client-web/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..c8b124cb6 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-recovery-otp.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecoveryOTP({ + userId: '', + secret: '', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-recovery.md b/examples/2.3.x/client-web/examples/account/update-recovery.md new file mode 100644 index 000000000..a1ca9cf42 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-recovery.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery({ + userId: '', + secret: '', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-session.md b/examples/2.3.x/client-web/examples/account/update-session.md new file mode 100644 index 000000000..7b7e88d5b --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession({ + sessionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-status.md b/examples/2.3.x/client-web/examples/account/update-status.md new file mode 100644 index 000000000..d2ace3ff1 --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-status.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/account/update-verification.md b/examples/2.3.x/client-web/examples/account/update-verification.md new file mode 100644 index 000000000..c732ca82c --- /dev/null +++ b/examples/2.3.x/client-web/examples/account/update-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-browser.md b/examples/2.3.x/client-web/examples/avatars/get-browser.md new file mode 100644 index 000000000..a446f4dc8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, Browser } 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 = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-credit-card.md b/examples/2.3.x/client-web/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..a644fda19 --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, CreditCard } 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 = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-favicon.md b/examples/2.3.x/client-web/examples/avatars/get-favicon.md new file mode 100644 index 000000000..8036a9f5a --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-favicon.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 = avatars.getFavicon({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-flag.md b/examples/2.3.x/client-web/examples/avatars/get-flag.md new file mode 100644 index 000000000..5264199ee --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, Flag } 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 = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-image.md b/examples/2.3.x/client-web/examples/avatars/get-image.md new file mode 100644 index 000000000..d5cd7300a --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +```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 = avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-initials.md b/examples/2.3.x/client-web/examples/avatars/get-initials.md new file mode 100644 index 000000000..03c6f9b15 --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-initials.md @@ -0,0 +1,18 @@ +```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 = avatars.getInitials({ + name: '', // optional + width: 0, // optional + height: 0, // optional + background: 'FFFFFF', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-photo.md b/examples/2.3.x/client-web/examples/avatars/get-photo.md new file mode 100644 index 000000000..1b0567a33 --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-photo.md @@ -0,0 +1,22 @@ +```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 = avatars.getPhoto({ + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: 'png', // optional + rating: 'g', // optional + userId: 'current()', // optional + emailHash: '', // optional + name: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-qr.md b/examples/2.3.x/client-web/examples/avatars/get-qr.md new file mode 100644 index 000000000..59cda9cf8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-qr.md @@ -0,0 +1,18 @@ +```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 = avatars.getQR({ + text: '', + size: 1, // optional + margin: 0, // optional + download: false, // optional +}); + +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 new file mode 100644 index 000000000..680d225e4 --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/get-screenshot.md @@ -0,0 +1,48 @@ +```javascript +import { + Client, + Avatars, + BrowserTheme, + Timezone, + BrowserPermission, + ImageFormat, +} 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 = avatars.getScreenshot({ + url: 'https://example.com', + headers: { + Authorization: 'Bearer token123', + 'X-Custom-Header': 'value', + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // 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 + locale: 'en-US', // optional + timezone: Timezone.AfricaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [ + BrowserPermission.Geolocation, + BrowserPermission.Notifications, + ], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: ImageFormat.Jpeg, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/create-document.md b/examples/2.3.x/client-web/examples/databases/create-document.md new file mode 100644 index 000000000..822dd49fc --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/create-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/create-operations.md b/examples/2.3.x/client-web/examples/databases/create-operations.md new file mode 100644 index 000000000..ff5876bd3 --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/create-transaction.md b/examples/2.3.x/client-web/examples/databases/create-transaction.md new file mode 100644 index 000000000..075d33b05 --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/decrement-document-attribute.md b/examples/2.3.x/client-web/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..bc5a24bc0 --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/delete-document.md b/examples/2.3.x/client-web/examples/databases/delete-document.md new file mode 100644 index 000000000..a5e123f48 --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/delete-transaction.md b/examples/2.3.x/client-web/examples/databases/delete-transaction.md new file mode 100644 index 000000000..b7f177969 --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/get-document.md b/examples/2.3.x/client-web/examples/databases/get-document.md new file mode 100644 index 000000000..4d900ffbb --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/get-transaction.md b/examples/2.3.x/client-web/examples/databases/get-transaction.md new file mode 100644 index 000000000..13d5c189d --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/increment-document-attribute.md b/examples/2.3.x/client-web/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..38fdeee00 --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/increment-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/list-documents.md b/examples/2.3.x/client-web/examples/databases/list-documents.md new file mode 100644 index 000000000..e10300a9d --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +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 new file mode 100644 index 000000000..bb8ae2e1f --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/update-document.md b/examples/2.3.x/client-web/examples/databases/update-document.md new file mode 100644 index 000000000..026b9fe1f --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/update-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/update-transaction.md b/examples/2.3.x/client-web/examples/databases/update-transaction.md new file mode 100644 index 000000000..f7ddf24a1 --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/upsert-document.md b/examples/2.3.x/client-web/examples/databases/upsert-document.md new file mode 100644 index 000000000..02ef19b1b --- /dev/null +++ b/examples/2.3.x/client-web/examples/databases/upsert-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/create-document.md b/examples/2.3.x/client-web/examples/documentsdb/create-document.md new file mode 100644 index 000000000..b33c8780f --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/create-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // 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 new file mode 100644 index 000000000..c2830b94d --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/create-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createDocuments({ + databaseId: '', + collectionId: '', + documents: [], + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/create-operations.md b/examples/2.3.x/client-web/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..371f4cf3a --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/create-transaction.md b/examples/2.3.x/client-web/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..5eaf00656 --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-web/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..75f4b0382 --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/delete-document.md b/examples/2.3.x/client-web/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..e8b7e18b7 --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/delete-transaction.md b/examples/2.3.x/client-web/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..97c1fe6f6 --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/get-document.md b/examples/2.3.x/client-web/examples/documentsdb/get-document.md new file mode 100644 index 000000000..daedc268c --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/get-transaction.md b/examples/2.3.x/client-web/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..75cdd78f8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-web/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..493b8a682 --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/list-documents.md b/examples/2.3.x/client-web/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..26081239d --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..161d38804 --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/update-document.md b/examples/2.3.x/client-web/examples/documentsdb/update-document.md new file mode 100644 index 000000000..5acecac7b --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/update-transaction.md b/examples/2.3.x/client-web/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..5f8d74dfb --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/documentsdb/upsert-document.md b/examples/2.3.x/client-web/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..3e10833c8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/functions/create-execution.md b/examples/2.3.x/client-web/examples/functions/create-execution.md new file mode 100644 index 000000000..d746df9a0 --- /dev/null +++ b/examples/2.3.x/client-web/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Functions, ExecutionMethod } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution({ + functionId: '', + body: '', // optional + async: false, // optional + xpath: '', // optional + method: ExecutionMethod.GET, // optional + headers: {}, // optional + scheduledAt: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/functions/get-execution.md b/examples/2.3.x/client-web/examples/functions/get-execution.md new file mode 100644 index 000000000..a8c5064eb --- /dev/null +++ b/examples/2.3.x/client-web/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution({ + functionId: '', + executionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/functions/list-executions.md b/examples/2.3.x/client-web/examples/functions/list-executions.md new file mode 100644 index 000000000..95f7cd2f3 --- /dev/null +++ b/examples/2.3.x/client-web/examples/functions/list-executions.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Functions } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions({ + functionId: '', + 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 new file mode 100644 index 000000000..abd27e3d4 --- /dev/null +++ b/examples/2.3.x/client-web/examples/graphql/mutation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Graphql } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation({ + query: {}, +}); + +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 new file mode 100644 index 000000000..21b353fc9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/graphql/query.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Graphql } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query({ + query: {}, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/locale/get.md b/examples/2.3.x/client-web/examples/locale/get.md new file mode 100644 index 000000000..f0bd78be1 --- /dev/null +++ b/examples/2.3.x/client-web/examples/locale/get.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +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 new file mode 100644 index 000000000..dce429ef9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/locale/list-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +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 new file mode 100644 index 000000000..4fde4252d --- /dev/null +++ b/examples/2.3.x/client-web/examples/locale/list-continents.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +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 new file mode 100644 index 000000000..917245469 --- /dev/null +++ b/examples/2.3.x/client-web/examples/locale/list-countries-eu.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +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 new file mode 100644 index 000000000..95ef6e533 --- /dev/null +++ b/examples/2.3.x/client-web/examples/locale/list-countries-phones.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +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 new file mode 100644 index 000000000..7d37e8011 --- /dev/null +++ b/examples/2.3.x/client-web/examples/locale/list-countries.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +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 new file mode 100644 index 000000000..b123b1789 --- /dev/null +++ b/examples/2.3.x/client-web/examples/locale/list-currencies.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +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 new file mode 100644 index 000000000..c9abd5dc5 --- /dev/null +++ b/examples/2.3.x/client-web/examples/locale/list-languages.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/messaging/create-subscriber.md b/examples/2.3.x/client-web/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..6ff4eddc9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/messaging/create-subscriber.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Messaging } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber({ + topicId: '', + subscriberId: '', + targetId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/messaging/delete-subscriber.md b/examples/2.3.x/client-web/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..e933009bd --- /dev/null +++ b/examples/2.3.x/client-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Messaging } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber({ + topicId: '', + subscriberId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/organization/create-installation.md b/examples/2.3.x/client-web/examples/organization/create-installation.md new file mode 100644 index 000000000..546f71bb9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.createInstallation({ + appId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/organization/delete-installation.md b/examples/2.3.x/client-web/examples/organization/delete-installation.md new file mode 100644 index 000000000..37969f2cd --- /dev/null +++ b/examples/2.3.x/client-web/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/organization/get-installation.md b/examples/2.3.x/client-web/examples/organization/get-installation.md new file mode 100644 index 000000000..f862572db --- /dev/null +++ b/examples/2.3.x/client-web/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.getInstallation({ + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/organization/list-installations.md b/examples/2.3.x/client-web/examples/organization/list-installations.md new file mode 100644 index 000000000..80be69db2 --- /dev/null +++ b/examples/2.3.x/client-web/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/organization/update-installation.md b/examples/2.3.x/client-web/examples/organization/update-installation.md new file mode 100644 index 000000000..9bcfb9da1 --- /dev/null +++ b/examples/2.3.x/client-web/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.updateInstallation({ + installationId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/presences/delete.md b/examples/2.3.x/client-web/examples/presences/delete.md new file mode 100644 index 000000000..5c0d638e4 --- /dev/null +++ b/examples/2.3.x/client-web/examples/presences/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Presences } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.delete({ + presenceId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/presences/get.md b/examples/2.3.x/client-web/examples/presences/get.md new file mode 100644 index 000000000..6290f7edc --- /dev/null +++ b/examples/2.3.x/client-web/examples/presences/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Presences } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.get({ + presenceId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/presences/list.md b/examples/2.3.x/client-web/examples/presences/list.md new file mode 100644 index 000000000..c9ac96b8c --- /dev/null +++ b/examples/2.3.x/client-web/examples/presences/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Presences } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.list({ + queries: [], // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/presences/update.md b/examples/2.3.x/client-web/examples/presences/update.md new file mode 100644 index 000000000..44dc92f8b --- /dev/null +++ b/examples/2.3.x/client-web/examples/presences/update.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Presences, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.update({ + presenceId: '', + status: '', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional + permissions: [Permission.read(Role.any())], // optional + purge: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/presences/upsert.md b/examples/2.3.x/client-web/examples/presences/upsert.md new file mode 100644 index 000000000..7e03206f8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/presences/upsert.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Presences, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.upsert({ + presenceId: '', + status: '', + permissions: [Permission.read(Role.any())], // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/storage/create-file.md b/examples/2.3.x/client-web/examples/storage/create-file.md new file mode 100644 index 000000000..f4828d988 --- /dev/null +++ b/examples/2.3.x/client-web/examples/storage/create-file.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Storage, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile({ + bucketId: '', + fileId: '', + file: document.getElementById('uploader').files[0], + permissions: [Permission.read(Role.any())], // optional + folder: 'photos/2026', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/storage/delete-file.md b/examples/2.3.x/client-web/examples/storage/delete-file.md new file mode 100644 index 000000000..c1ad65046 --- /dev/null +++ b/examples/2.3.x/client-web/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Storage } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile({ + bucketId: '', + fileId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/storage/get-file-download.md b/examples/2.3.x/client-web/examples/storage/get-file-download.md new file mode 100644 index 000000000..bd2a7e60f --- /dev/null +++ b/examples/2.3.x/client-web/examples/storage/get-file-download.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Storage } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload({ + bucketId: '', + fileId: '', + token: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/storage/get-file-preview.md b/examples/2.3.x/client-web/examples/storage/get-file-preview.md new file mode 100644 index 000000000..4d5913aa2 --- /dev/null +++ b/examples/2.3.x/client-web/examples/storage/get-file-preview.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Storage, ImageGravity, ImageFormat } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview({ + bucketId: '', + fileId: '', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.Auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: 'FFFFFF', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: 'FFFFFF', // optional + output: ImageFormat.Jpg, // optional + token: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/storage/get-file-view.md b/examples/2.3.x/client-web/examples/storage/get-file-view.md new file mode 100644 index 000000000..ba86f7c3d --- /dev/null +++ b/examples/2.3.x/client-web/examples/storage/get-file-view.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Storage } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView({ + bucketId: '', + fileId: '', + token: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/storage/get-file.md b/examples/2.3.x/client-web/examples/storage/get-file.md new file mode 100644 index 000000000..8045f09ce --- /dev/null +++ b/examples/2.3.x/client-web/examples/storage/get-file.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Storage } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile({ + bucketId: '', + fileId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/storage/list-files.md b/examples/2.3.x/client-web/examples/storage/list-files.md new file mode 100644 index 000000000..d80afccfe --- /dev/null +++ b/examples/2.3.x/client-web/examples/storage/list-files.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Storage } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles({ + bucketId: '', + queries: [], // optional + search: '', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/storage/update-file.md b/examples/2.3.x/client-web/examples/storage/update-file.md new file mode 100644 index 000000000..fb1383909 --- /dev/null +++ b/examples/2.3.x/client-web/examples/storage/update-file.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Storage, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile({ + bucketId: '', + fileId: '', + name: '', // optional + permissions: [Permission.read(Role.any())], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/create-operations.md b/examples/2.3.x/client-web/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..10dff2ce9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + tableId: '', + rowId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/create-row.md b/examples/2.3.x/client-web/examples/tablesdb/create-row.md new file mode 100644 index 000000000..9902804ef --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/create-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createRow({ + databaseId: '', + tableId: '', + rowId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/create-transaction.md b/examples/2.3.x/client-web/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..df28475ce --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/client-web/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..c8587f481 --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.decrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/delete-row.md b/examples/2.3.x/client-web/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..19321d966 --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/delete-row.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteRow({ + databaseId: '', + tableId: '', + rowId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/delete-transaction.md b/examples/2.3.x/client-web/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..c0c2da7bf --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/get-row.md b/examples/2.3.x/client-web/examples/tablesdb/get-row.md new file mode 100644 index 000000000..4940f56b4 --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/get-row.md @@ -0,0 +1,19 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getRow({ + databaseId: '', + tableId: '', + rowId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/get-transaction.md b/examples/2.3.x/client-web/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..e940f421c --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/increment-row-column.md b/examples/2.3.x/client-web/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..c4e7954c7 --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/increment-row-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.incrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/list-rows.md b/examples/2.3.x/client-web/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..9a73c4536 --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/list-rows.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listRows({ + databaseId: '', + tableId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // 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 new file mode 100644 index 000000000..20f0dba5c --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/update-row.md b/examples/2.3.x/client-web/examples/tablesdb/update-row.md new file mode 100644 index 000000000..633e3803f --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/update-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRow({ + databaseId: '', + tableId: '', + rowId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/update-transaction.md b/examples/2.3.x/client-web/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..c64ea2ad3 --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/upsert-row.md b/examples/2.3.x/client-web/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..d7543441c --- /dev/null +++ b/examples/2.3.x/client-web/examples/tablesdb/upsert-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDB = new TablesDB(client); + +const result = await tablesDB.upsertRow({ + databaseId: '', + tableId: '', + rowId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/create-installation.md b/examples/2.3.x/client-web/examples/teams/create-installation.md new file mode 100644 index 000000000..f70ea5bc4 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createInstallation({ + teamId: '', + appId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/create-membership.md b/examples/2.3.x/client-web/examples/teams/create-membership.md new file mode 100644 index 000000000..d8f15f3d9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/create-membership.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership({ + teamId: '', + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/create.md b/examples/2.3.x/client-web/examples/teams/create.md new file mode 100644 index 000000000..00668a7ff --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/create.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create({ + teamId: '', + name: '', + roles: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/delete-installation.md b/examples/2.3.x/client-web/examples/teams/delete-installation.md new file mode 100644 index 000000000..17f5ae5a8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/delete-membership.md b/examples/2.3.x/client-web/examples/teams/delete-membership.md new file mode 100644 index 000000000..f32057373 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership({ + teamId: '', + membershipId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/delete.md b/examples/2.3.x/client-web/examples/teams/delete.md new file mode 100644 index 000000000..92900b3ff --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete({ + teamId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/get-installation.md b/examples/2.3.x/client-web/examples/teams/get-installation.md new file mode 100644 index 000000000..40ff94fa3 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getInstallation({ + teamId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/get-membership.md b/examples/2.3.x/client-web/examples/teams/get-membership.md new file mode 100644 index 000000000..a09e27dfe --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership({ + teamId: '', + membershipId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/get-prefs.md b/examples/2.3.x/client-web/examples/teams/get-prefs.md new file mode 100644 index 000000000..2023c9fb0 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/get-prefs.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs({ + teamId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/get.md b/examples/2.3.x/client-web/examples/teams/get.md new file mode 100644 index 000000000..71fc061f9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get({ + teamId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/list-installations.md b/examples/2.3.x/client-web/examples/teams/list-installations.md new file mode 100644 index 000000000..fc1dc2060 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listInstallations({ + teamId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/list-memberships.md b/examples/2.3.x/client-web/examples/teams/list-memberships.md new file mode 100644 index 000000000..b27331277 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/list-memberships.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships({ + teamId: '', + queries: [], // optional + search: '', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/list.md b/examples/2.3.x/client-web/examples/teams/list.md new file mode 100644 index 000000000..9f4140450 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list({ + queries: [], // optional + search: '', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/update-installation.md b/examples/2.3.x/client-web/examples/teams/update-installation.md new file mode 100644 index 000000000..5b6a439cb --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateInstallation({ + teamId: '', + installationId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/update-membership-status.md b/examples/2.3.x/client-web/examples/teams/update-membership-status.md new file mode 100644 index 000000000..e00392291 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/update-membership-status.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus({ + teamId: '', + membershipId: '', + userId: '', + secret: '', +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..a568e3041 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/update-membership.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership({ + teamId: '', + membershipId: '', + roles: [], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/update-name.md b/examples/2.3.x/client-web/examples/teams/update-name.md new file mode 100644 index 000000000..d0661b293 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/update-name.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName({ + teamId: '', + name: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/teams/update-prefs.md b/examples/2.3.x/client-web/examples/teams/update-prefs.md new file mode 100644 index 000000000..08b944c07 --- /dev/null +++ b/examples/2.3.x/client-web/examples/teams/update-prefs.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs({ + teamId: '', + prefs: {}, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/create-document.md b/examples/2.3.x/client-web/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..f68aeef8c --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/create-document.md @@ -0,0 +1,25 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + key: 'value', + }, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +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 new file mode 100644 index 000000000..35fb3d34b --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/create-query.md b/examples/2.3.x/client-web/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..e5de0f427 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/create-transaction.md b/examples/2.3.x/client-web/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..7ae265b50 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/delete-document.md b/examples/2.3.x/client-web/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..c7ccff599 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/client-web/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..c03b17dd6 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/get-document.md b/examples/2.3.x/client-web/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..ce4ffc24b --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/get-transaction.md b/examples/2.3.x/client-web/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..73f9d58a1 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/list-documents.md b/examples/2.3.x/client-web/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..99a76f3a5 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..a39afbc15 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/update-document.md b/examples/2.3.x/client-web/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..56453ccbb --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/update-transaction.md b/examples/2.3.x/client-web/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..c3e229fa9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/vectorsdb/upsert-document.md b/examples/2.3.x/client-web/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..a7143a960 --- /dev/null +++ b/examples/2.3.x/client-web/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-anonymous-session.md b/examples/2.3.x/console-cli/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..49dd12f6a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-anonymous-session.md @@ -0,0 +1,3 @@ +```bash +appwrite account create-anonymous-session +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-email-password-session.md b/examples/2.3.x/console-cli/examples/account/create-email-password-session.md new file mode 100644 index 000000000..ed0658917 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-email-password-session.md @@ -0,0 +1,5 @@ +```bash +appwrite account create-email-password-session \ + --email email@example.com \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-email-token.md b/examples/2.3.x/console-cli/examples/account/create-email-token.md new file mode 100644 index 000000000..a3b3c6c19 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-email-token.md @@ -0,0 +1,5 @@ +```bash +appwrite account create-email-token \ + --user-id '' \ + --email email@example.com +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-email-verification-otp.md b/examples/2.3.x/console-cli/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..1e0cc7abd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-email-verification-otp.md @@ -0,0 +1,3 @@ +```bash +appwrite account create-email-verification-otp +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-email-verification.md b/examples/2.3.x/console-cli/examples/account/create-email-verification.md new file mode 100644 index 000000000..c2a163663 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-email-verification.md @@ -0,0 +1,4 @@ +```bash +appwrite account create-email-verification \ + --url https://example.com +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-id-token-session.md b/examples/2.3.x/console-cli/examples/account/create-id-token-session.md new file mode 100644 index 000000000..85f4a7c45 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-id-token-session.md @@ -0,0 +1,5 @@ +```bash +appwrite account create-id-token-session \ + --provider apple \ + --id-token '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-magic-url-token.md b/examples/2.3.x/console-cli/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..0608b1ddc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-magic-url-token.md @@ -0,0 +1,5 @@ +```bash +appwrite account create-magic-url-token \ + --user-id '' \ + --email email@example.com +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-mfa-authenticator.md b/examples/2.3.x/console-cli/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..50edfe7c8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-mfa-authenticator.md @@ -0,0 +1,4 @@ +```bash +appwrite account create-mfa-authenticator \ + --type totp +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-mfa-challenge.md b/examples/2.3.x/console-cli/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..10b45c59c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-mfa-challenge.md @@ -0,0 +1,4 @@ +```bash +appwrite account create-mfa-challenge \ + --factor email +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/console-cli/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..9b4ec5a53 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,3 @@ +```bash +appwrite account create-mfa-recovery-codes +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-o-auth-2-token.md b/examples/2.3.x/console-cli/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..d634cdbe9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-o-auth-2-token.md @@ -0,0 +1,4 @@ +```bash +appwrite account create-o-auth-2-token \ + --provider amazon +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-phone-token.md b/examples/2.3.x/console-cli/examples/account/create-phone-token.md new file mode 100644 index 000000000..302181178 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-phone-token.md @@ -0,0 +1,5 @@ +```bash +appwrite account create-phone-token \ + --user-id '' \ + --phone +12065550100 +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-phone-verification.md b/examples/2.3.x/console-cli/examples/account/create-phone-verification.md new file mode 100644 index 000000000..913a29d4d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-phone-verification.md @@ -0,0 +1,3 @@ +```bash +appwrite account create-phone-verification +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-recovery-otp.md b/examples/2.3.x/console-cli/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..c0f43025f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-recovery-otp.md @@ -0,0 +1,4 @@ +```bash +appwrite account create-recovery-otp \ + --email email@example.com +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-recovery.md b/examples/2.3.x/console-cli/examples/account/create-recovery.md new file mode 100644 index 000000000..0b2a43f98 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-recovery.md @@ -0,0 +1,5 @@ +```bash +appwrite account create-recovery \ + --email email@example.com \ + --url https://example.com +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-session.md b/examples/2.3.x/console-cli/examples/account/create-session.md new file mode 100644 index 000000000..aa043b71f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-session.md @@ -0,0 +1,5 @@ +```bash +appwrite account create-session \ + --user-id '' \ + --secret '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/create-verification.md b/examples/2.3.x/console-cli/examples/account/create-verification.md new file mode 100644 index 000000000..f06a4ab90 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create-verification.md @@ -0,0 +1,4 @@ +```bash +appwrite account create-verification \ + --url https://example.com +``` diff --git a/examples/2.3.x/console-cli/examples/account/create.md b/examples/2.3.x/console-cli/examples/account/create.md new file mode 100644 index 000000000..980bf5533 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/create.md @@ -0,0 +1,6 @@ +```bash +appwrite account create \ + --user-id '' \ + --email email@example.com \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/account/delete-consent-token.md b/examples/2.3.x/console-cli/examples/account/delete-consent-token.md new file mode 100644 index 000000000..d6c80ea71 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/delete-consent-token.md @@ -0,0 +1,5 @@ +```bash +appwrite account delete-consent-token \ + --consent-id '' \ + --token-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/delete-consent.md b/examples/2.3.x/console-cli/examples/account/delete-consent.md new file mode 100644 index 000000000..f91a7b656 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/delete-consent.md @@ -0,0 +1,4 @@ +```bash +appwrite account delete-consent \ + --consent-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/delete-identity.md b/examples/2.3.x/console-cli/examples/account/delete-identity.md new file mode 100644 index 000000000..915953cc2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/delete-identity.md @@ -0,0 +1,4 @@ +```bash +appwrite account delete-identity \ + --identity-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/console-cli/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..441afcda4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,4 @@ +```bash +appwrite account delete-mfa-authenticator \ + --type totp +``` diff --git a/examples/2.3.x/console-cli/examples/account/delete-session.md b/examples/2.3.x/console-cli/examples/account/delete-session.md new file mode 100644 index 000000000..fd7680ac8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/delete-session.md @@ -0,0 +1,4 @@ +```bash +appwrite account delete-session \ + --session-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/delete-sessions.md b/examples/2.3.x/console-cli/examples/account/delete-sessions.md new file mode 100644 index 000000000..45e5ac4ce --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/delete-sessions.md @@ -0,0 +1,3 @@ +```bash +appwrite account delete-sessions +``` diff --git a/examples/2.3.x/console-cli/examples/account/get-consent-token.md b/examples/2.3.x/console-cli/examples/account/get-consent-token.md new file mode 100644 index 000000000..d46f389d9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/get-consent-token.md @@ -0,0 +1,5 @@ +```bash +appwrite account get-consent-token \ + --consent-id '' \ + --token-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/get-consent.md b/examples/2.3.x/console-cli/examples/account/get-consent.md new file mode 100644 index 000000000..0c96afe9a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/get-consent.md @@ -0,0 +1,4 @@ +```bash +appwrite account get-consent \ + --consent-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/console-cli/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..ca5e236b4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,3 @@ +```bash +appwrite account get-mfa-recovery-codes +``` diff --git a/examples/2.3.x/console-cli/examples/account/get-prefs.md b/examples/2.3.x/console-cli/examples/account/get-prefs.md new file mode 100644 index 000000000..fa4fa6949 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/get-prefs.md @@ -0,0 +1,3 @@ +```bash +appwrite account get-prefs +``` diff --git a/examples/2.3.x/console-cli/examples/account/get-session.md b/examples/2.3.x/console-cli/examples/account/get-session.md new file mode 100644 index 000000000..346cd9768 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/get-session.md @@ -0,0 +1,4 @@ +```bash +appwrite account get-session \ + --session-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/get.md b/examples/2.3.x/console-cli/examples/account/get.md new file mode 100644 index 000000000..010ec709b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/get.md @@ -0,0 +1,3 @@ +```bash +appwrite account get +``` diff --git a/examples/2.3.x/console-cli/examples/account/list-consent-tokens.md b/examples/2.3.x/console-cli/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..8759fa8ef --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/list-consent-tokens.md @@ -0,0 +1,5 @@ +```bash +appwrite account list-consent-tokens \ + --consent-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/account/list-consents.md b/examples/2.3.x/console-cli/examples/account/list-consents.md new file mode 100644 index 000000000..44221d1bb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/list-consents.md @@ -0,0 +1,4 @@ +```bash +appwrite account list-consents \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/account/list-identities.md b/examples/2.3.x/console-cli/examples/account/list-identities.md new file mode 100644 index 000000000..ecc5d6853 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/list-identities.md @@ -0,0 +1,4 @@ +```bash +appwrite account list-identities \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/account/list-mfa-factors.md b/examples/2.3.x/console-cli/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..9edf379ca --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/list-mfa-factors.md @@ -0,0 +1,3 @@ +```bash +appwrite account list-mfa-factors +``` diff --git a/examples/2.3.x/console-cli/examples/account/list-sessions.md b/examples/2.3.x/console-cli/examples/account/list-sessions.md new file mode 100644 index 000000000..f71db5dab --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/list-sessions.md @@ -0,0 +1,3 @@ +```bash +appwrite account list-sessions +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-email-verification-otp.md b/examples/2.3.x/console-cli/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..9bf696bd2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-email-verification-otp.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-email-verification-otp \ + --user-id '' \ + --secret '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-email-verification.md b/examples/2.3.x/console-cli/examples/account/update-email-verification.md new file mode 100644 index 000000000..3a0e6062d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-email-verification.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-email-verification \ + --user-id '' \ + --secret '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-email.md b/examples/2.3.x/console-cli/examples/account/update-email.md new file mode 100644 index 000000000..e4b69338e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-email.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-email \ + --email email@example.com \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-magic-url-session.md b/examples/2.3.x/console-cli/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..f39fe608f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-magic-url-session.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-magic-url-session \ + --user-id '' \ + --secret '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-mfa-authenticator.md b/examples/2.3.x/console-cli/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..a8f1dd28e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-mfa-authenticator.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-mfa-authenticator \ + --type totp \ + --otp '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-mfa-challenge.md b/examples/2.3.x/console-cli/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..daf37c655 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-mfa-challenge.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-mfa-challenge \ + --challenge-id '' \ + --otp '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/console-cli/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..21fce3884 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,3 @@ +```bash +appwrite account update-mfa-recovery-codes +``` 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 new file mode 100644 index 000000000..77b324179 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-mfa.md @@ -0,0 +1,4 @@ +```bash +appwrite account update-mfa \ + --mfa false +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-name.md b/examples/2.3.x/console-cli/examples/account/update-name.md new file mode 100644 index 000000000..b36aaab57 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-name.md @@ -0,0 +1,4 @@ +```bash +appwrite account update-name \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-password.md b/examples/2.3.x/console-cli/examples/account/update-password.md new file mode 100644 index 000000000..b7df48645 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-password.md @@ -0,0 +1,4 @@ +```bash +appwrite account update-password \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-phone-session.md b/examples/2.3.x/console-cli/examples/account/update-phone-session.md new file mode 100644 index 000000000..7672fae91 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-phone-session.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-phone-session \ + --user-id '' \ + --secret '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-phone-verification.md b/examples/2.3.x/console-cli/examples/account/update-phone-verification.md new file mode 100644 index 000000000..c4d6c864d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-phone-verification.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-phone-verification \ + --user-id '' \ + --secret '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-phone.md b/examples/2.3.x/console-cli/examples/account/update-phone.md new file mode 100644 index 000000000..8de216c48 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-phone.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-phone \ + --phone +12065550100 \ + --password password +``` 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 new file mode 100644 index 000000000..80fc7d8f6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-prefs.md @@ -0,0 +1,4 @@ +```bash +appwrite account update-prefs \ + --prefs '{ "key": "value" }' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-recovery-otp.md b/examples/2.3.x/console-cli/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..cc8171bb5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-recovery-otp.md @@ -0,0 +1,6 @@ +```bash +appwrite account update-recovery-otp \ + --user-id '' \ + --secret '' \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-recovery.md b/examples/2.3.x/console-cli/examples/account/update-recovery.md new file mode 100644 index 000000000..6d6934067 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-recovery.md @@ -0,0 +1,6 @@ +```bash +appwrite account update-recovery \ + --user-id '' \ + --secret '' \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-session.md b/examples/2.3.x/console-cli/examples/account/update-session.md new file mode 100644 index 000000000..d15bb6df0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-session.md @@ -0,0 +1,4 @@ +```bash +appwrite account update-session \ + --session-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-status.md b/examples/2.3.x/console-cli/examples/account/update-status.md new file mode 100644 index 000000000..c6abeaa88 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-status.md @@ -0,0 +1,3 @@ +```bash +appwrite account update-status +``` diff --git a/examples/2.3.x/console-cli/examples/account/update-verification.md b/examples/2.3.x/console-cli/examples/account/update-verification.md new file mode 100644 index 000000000..3f7f6374c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/account/update-verification.md @@ -0,0 +1,5 @@ +```bash +appwrite account update-verification \ + --user-id '' \ + --secret '' +``` diff --git a/examples/2.3.x/console-cli/examples/activities/get-event.md b/examples/2.3.x/console-cli/examples/activities/get-event.md new file mode 100644 index 000000000..1a7ff3773 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/activities/get-event.md @@ -0,0 +1,4 @@ +```bash +appwrite activities get-event \ + --event-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/activities/list-events.md b/examples/2.3.x/console-cli/examples/activities/list-events.md new file mode 100644 index 000000000..48685d8d1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/activities/list-events.md @@ -0,0 +1,4 @@ +```bash +appwrite activities list-events \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/apps/create-installation-token.md b/examples/2.3.x/console-cli/examples/apps/create-installation-token.md new file mode 100644 index 000000000..28b57157d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/create-installation-token.md @@ -0,0 +1,5 @@ +```bash +appwrite apps create-installation-token \ + --app-id '' \ + --installation-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/create-key.md b/examples/2.3.x/console-cli/examples/apps/create-key.md new file mode 100644 index 000000000..cb7573d33 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/create-key.md @@ -0,0 +1,4 @@ +```bash +appwrite apps create-key \ + --app-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/create-secret.md b/examples/2.3.x/console-cli/examples/apps/create-secret.md new file mode 100644 index 000000000..69a0bad13 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/create-secret.md @@ -0,0 +1,4 @@ +```bash +appwrite apps create-secret \ + --app-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 new file mode 100644 index 000000000..05006a8c0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/create.md @@ -0,0 +1,6 @@ +```bash +appwrite apps create \ + --app-id '' \ + --name '' \ + --redirect-uris one two three +``` diff --git a/examples/2.3.x/console-cli/examples/apps/delete-installation.md b/examples/2.3.x/console-cli/examples/apps/delete-installation.md new file mode 100644 index 000000000..d81160712 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/delete-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite apps delete-installation \ + --app-id '' \ + --installation-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/delete-key.md b/examples/2.3.x/console-cli/examples/apps/delete-key.md new file mode 100644 index 000000000..f39509228 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/delete-key.md @@ -0,0 +1,5 @@ +```bash +appwrite apps delete-key \ + --app-id '' \ + --key-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/delete-secret.md b/examples/2.3.x/console-cli/examples/apps/delete-secret.md new file mode 100644 index 000000000..8c8efcaa7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/delete-secret.md @@ -0,0 +1,5 @@ +```bash +appwrite apps delete-secret \ + --app-id '' \ + --secret-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/delete-tokens.md b/examples/2.3.x/console-cli/examples/apps/delete-tokens.md new file mode 100644 index 000000000..0633ce100 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/delete-tokens.md @@ -0,0 +1,4 @@ +```bash +appwrite apps delete-tokens \ + --app-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/delete.md b/examples/2.3.x/console-cli/examples/apps/delete.md new file mode 100644 index 000000000..64552e012 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite apps delete \ + --app-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/get-installation.md b/examples/2.3.x/console-cli/examples/apps/get-installation.md new file mode 100644 index 000000000..b96d98424 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/get-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite apps get-installation \ + --app-id '' \ + --installation-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/get-key.md b/examples/2.3.x/console-cli/examples/apps/get-key.md new file mode 100644 index 000000000..677798e66 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/get-key.md @@ -0,0 +1,5 @@ +```bash +appwrite apps get-key \ + --app-id '' \ + --key-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/get-secret.md b/examples/2.3.x/console-cli/examples/apps/get-secret.md new file mode 100644 index 000000000..283cff32e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/get-secret.md @@ -0,0 +1,5 @@ +```bash +appwrite apps get-secret \ + --app-id '' \ + --secret-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/get.md b/examples/2.3.x/console-cli/examples/apps/get.md new file mode 100644 index 000000000..420a2d245 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/get.md @@ -0,0 +1,4 @@ +```bash +appwrite apps get \ + --app-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/list-installation-scopes.md b/examples/2.3.x/console-cli/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..e04505bf5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/list-installation-scopes.md @@ -0,0 +1,3 @@ +```bash +appwrite apps list-installation-scopes +``` diff --git a/examples/2.3.x/console-cli/examples/apps/list-installations.md b/examples/2.3.x/console-cli/examples/apps/list-installations.md new file mode 100644 index 000000000..34b6d2de1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/list-installations.md @@ -0,0 +1,5 @@ +```bash +appwrite apps list-installations \ + --app-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/apps/list-keys.md b/examples/2.3.x/console-cli/examples/apps/list-keys.md new file mode 100644 index 000000000..113d9a50c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/list-keys.md @@ -0,0 +1,5 @@ +```bash +appwrite apps list-keys \ + --app-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/console-cli/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..964352d9e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,3 @@ +```bash +appwrite apps list-o-auth-2-scopes +``` diff --git a/examples/2.3.x/console-cli/examples/apps/list-secrets.md b/examples/2.3.x/console-cli/examples/apps/list-secrets.md new file mode 100644 index 000000000..2a21a4b3f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/list-secrets.md @@ -0,0 +1,5 @@ +```bash +appwrite apps list-secrets \ + --app-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/apps/list.md b/examples/2.3.x/console-cli/examples/apps/list.md new file mode 100644 index 000000000..8ba60d833 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/list.md @@ -0,0 +1,4 @@ +```bash +appwrite apps list \ + --limit 25 +``` 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 new file mode 100644 index 000000000..b574bb9ba --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/update-labels.md @@ -0,0 +1,5 @@ +```bash +appwrite apps update-labels \ + --app-id '' \ + --labels one two three +``` diff --git a/examples/2.3.x/console-cli/examples/apps/update-team.md b/examples/2.3.x/console-cli/examples/apps/update-team.md new file mode 100644 index 000000000..21b350f47 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/update-team.md @@ -0,0 +1,5 @@ +```bash +appwrite apps update-team \ + --app-id '' \ + --team-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/update.md b/examples/2.3.x/console-cli/examples/apps/update.md new file mode 100644 index 000000000..c31065d94 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/apps/update.md @@ -0,0 +1,5 @@ +```bash +appwrite apps update \ + --app-id '' \ + --name '' +``` 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 new file mode 100644 index 000000000..984d4ce64 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/create-archive.md @@ -0,0 +1,4 @@ +```bash +appwrite backups create-archive \ + --services one two three +``` 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 new file mode 100644 index 000000000..fb893dc41 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/create-policy.md @@ -0,0 +1,7 @@ +```bash +appwrite backups create-policy \ + --policy-id '' \ + --services one two three \ + --retention 1 \ + --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 new file mode 100644 index 000000000..a4e1e2c22 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/create-restoration.md @@ -0,0 +1,5 @@ +```bash +appwrite backups create-restoration \ + --archive-id '' \ + --services one two three +``` diff --git a/examples/2.3.x/console-cli/examples/backups/delete-archive.md b/examples/2.3.x/console-cli/examples/backups/delete-archive.md new file mode 100644 index 000000000..1f89d457b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/delete-archive.md @@ -0,0 +1,4 @@ +```bash +appwrite backups delete-archive \ + --archive-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/backups/delete-policy.md b/examples/2.3.x/console-cli/examples/backups/delete-policy.md new file mode 100644 index 000000000..ba0bca01f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/delete-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite backups delete-policy \ + --policy-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/backups/get-archive.md b/examples/2.3.x/console-cli/examples/backups/get-archive.md new file mode 100644 index 000000000..27fcbf0cf --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/get-archive.md @@ -0,0 +1,4 @@ +```bash +appwrite backups get-archive \ + --archive-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/backups/get-policy.md b/examples/2.3.x/console-cli/examples/backups/get-policy.md new file mode 100644 index 000000000..d56375534 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/get-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite backups get-policy \ + --policy-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/backups/get-restoration.md b/examples/2.3.x/console-cli/examples/backups/get-restoration.md new file mode 100644 index 000000000..5ecf6727a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/get-restoration.md @@ -0,0 +1,4 @@ +```bash +appwrite backups get-restoration \ + --restoration-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/backups/list-archives.md b/examples/2.3.x/console-cli/examples/backups/list-archives.md new file mode 100644 index 000000000..403c03959 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/list-archives.md @@ -0,0 +1,4 @@ +```bash +appwrite backups list-archives \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/backups/list-policies.md b/examples/2.3.x/console-cli/examples/backups/list-policies.md new file mode 100644 index 000000000..cdaccd027 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/list-policies.md @@ -0,0 +1,4 @@ +```bash +appwrite backups list-policies \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/backups/list-restorations.md b/examples/2.3.x/console-cli/examples/backups/list-restorations.md new file mode 100644 index 000000000..37406de15 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/list-restorations.md @@ -0,0 +1,4 @@ +```bash +appwrite backups list-restorations \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/backups/update-policy.md b/examples/2.3.x/console-cli/examples/backups/update-policy.md new file mode 100644 index 000000000..1ddf81b90 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/backups/update-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite backups update-policy \ + --policy-id '' +``` 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 new file mode 100644 index 000000000..b6723191d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-big-int-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-big-int-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..fdeca8e82 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-boolean-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-boolean-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-collection.md b/examples/2.3.x/console-cli/examples/databases/create-collection.md new file mode 100644 index 000000000..69b1a2374 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-collection.md @@ -0,0 +1,6 @@ +```bash +appwrite databases create-collection \ + --database-id '' \ + --collection-id '' \ + --name '' +``` 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 new file mode 100644 index 000000000..2bd727d69 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-datetime-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-datetime-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..d14a8498a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-document.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' \ + --data '{ "key": "value" }' +``` 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 new file mode 100644 index 000000000..1c9fbfb26 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite databases create-documents \ + --database-id '' \ + --collection-id '' \ + --documents one two three +``` 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 new file mode 100644 index 000000000..d28ab7bb9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-email-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-email-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..b8bef3823 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-enum-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases create-enum-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --elements "active" "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 new file mode 100644 index 000000000..9d992c0cc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-float-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-float-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..266472713 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-index.md @@ -0,0 +1,8 @@ +```bash +appwrite databases create-index \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --type key \ + --attributes one two three +``` 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 new file mode 100644 index 000000000..072a08148 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-integer-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-integer-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..8e7371074 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-ip-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-ip-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..371c418d5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-line-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-line-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..e8126d52e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-longtext-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-longtext-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..cd391c731 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-mediumtext-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-operations.md b/examples/2.3.x/console-cli/examples/databases/create-operations.md new file mode 100644 index 000000000..6f32b8d4d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite databases create-operations \ + --transaction-id '' +``` 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 new file mode 100644 index 000000000..e16557a17 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-point-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-point-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..82066257b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-polygon-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-polygon-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-relationship-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..d9842ec8f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-relationship-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-relationship-attribute \ + --database-id '' \ + --collection-id '' \ + --related-collection-id '' \ + --type oneToOne +``` 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 new file mode 100644 index 000000000..acbd165e0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-string-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases create-string-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --size 1 \ + --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 new file mode 100644 index 000000000..9836c002a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-text-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-text-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-transaction.md b/examples/2.3.x/console-cli/examples/databases/create-transaction.md new file mode 100644 index 000000000..21449ce88 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-transaction.md @@ -0,0 +1,3 @@ +```bash +appwrite databases create-transaction +``` 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 new file mode 100644 index 000000000..2dc8eeaf5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-url-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases create-url-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..4aed5c58e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create-varchar-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases create-varchar-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --size 1 \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/databases/create.md b/examples/2.3.x/console-cli/examples/databases/create.md new file mode 100644 index 000000000..1830c72a7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/create.md @@ -0,0 +1,5 @@ +```bash +appwrite databases create \ + --database-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/decrement-document-attribute.md b/examples/2.3.x/console-cli/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..7cc5cf66d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/decrement-document-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases decrement-document-attribute \ + --database-id '' \ + --collection-id '' \ + --document-id '' \ + --attribute '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/delete-attribute.md b/examples/2.3.x/console-cli/examples/databases/delete-attribute.md new file mode 100644 index 000000000..bdf44635d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/delete-attribute.md @@ -0,0 +1,6 @@ +```bash +appwrite databases delete-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/delete-collection.md b/examples/2.3.x/console-cli/examples/databases/delete-collection.md new file mode 100644 index 000000000..3f486af26 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/delete-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite databases delete-collection \ + --database-id '' \ + --collection-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/delete-document.md b/examples/2.3.x/console-cli/examples/databases/delete-document.md new file mode 100644 index 000000000..d80be7f12 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/delete-document.md @@ -0,0 +1,6 @@ +```bash +appwrite databases delete-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/delete-documents.md b/examples/2.3.x/console-cli/examples/databases/delete-documents.md new file mode 100644 index 000000000..ae1395c4a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/delete-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite databases delete-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/databases/delete-index.md b/examples/2.3.x/console-cli/examples/databases/delete-index.md new file mode 100644 index 000000000..f21ded857 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/delete-index.md @@ -0,0 +1,6 @@ +```bash +appwrite databases delete-index \ + --database-id '' \ + --collection-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/delete-transaction.md b/examples/2.3.x/console-cli/examples/databases/delete-transaction.md new file mode 100644 index 000000000..675c906f6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/delete-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite databases delete-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/delete.md b/examples/2.3.x/console-cli/examples/databases/delete.md new file mode 100644 index 000000000..c0696d2ec --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite databases delete \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/get-attribute.md b/examples/2.3.x/console-cli/examples/databases/get-attribute.md new file mode 100644 index 000000000..86d555d60 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/get-attribute.md @@ -0,0 +1,6 @@ +```bash +appwrite databases get-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/get-collection.md b/examples/2.3.x/console-cli/examples/databases/get-collection.md new file mode 100644 index 000000000..247101dfe --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/get-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite databases get-collection \ + --database-id '' \ + --collection-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/get-document.md b/examples/2.3.x/console-cli/examples/databases/get-document.md new file mode 100644 index 000000000..fd99f5ab4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/get-document.md @@ -0,0 +1,6 @@ +```bash +appwrite databases get-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/get-index.md b/examples/2.3.x/console-cli/examples/databases/get-index.md new file mode 100644 index 000000000..f55d80af4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/get-index.md @@ -0,0 +1,6 @@ +```bash +appwrite databases get-index \ + --database-id '' \ + --collection-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/get-transaction.md b/examples/2.3.x/console-cli/examples/databases/get-transaction.md new file mode 100644 index 000000000..de860ecde --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/get-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite databases get-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/get.md b/examples/2.3.x/console-cli/examples/databases/get.md new file mode 100644 index 000000000..1965bb84f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/get.md @@ -0,0 +1,4 @@ +```bash +appwrite databases get \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/increment-document-attribute.md b/examples/2.3.x/console-cli/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..1d1017e52 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/increment-document-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases increment-document-attribute \ + --database-id '' \ + --collection-id '' \ + --document-id '' \ + --attribute '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/list-attributes.md b/examples/2.3.x/console-cli/examples/databases/list-attributes.md new file mode 100644 index 000000000..2f3fe4660 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/list-attributes.md @@ -0,0 +1,6 @@ +```bash +appwrite databases list-attributes \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/databases/list-collections.md b/examples/2.3.x/console-cli/examples/databases/list-collections.md new file mode 100644 index 000000000..37aa24c52 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/list-collections.md @@ -0,0 +1,5 @@ +```bash +appwrite databases list-collections \ + --database-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/databases/list-documents.md b/examples/2.3.x/console-cli/examples/databases/list-documents.md new file mode 100644 index 000000000..ea414b29d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/list-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite databases list-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/databases/list-indexes.md b/examples/2.3.x/console-cli/examples/databases/list-indexes.md new file mode 100644 index 000000000..956d9e71d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/list-indexes.md @@ -0,0 +1,6 @@ +```bash +appwrite databases list-indexes \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/databases/list-transactions.md b/examples/2.3.x/console-cli/examples/databases/list-transactions.md new file mode 100644 index 000000000..f74d48bc0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/list-transactions.md @@ -0,0 +1,4 @@ +```bash +appwrite databases list-transactions \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/databases/list.md b/examples/2.3.x/console-cli/examples/databases/list.md new file mode 100644 index 000000000..dd8c3bb09 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/list.md @@ -0,0 +1,4 @@ +```bash +appwrite databases list \ + --limit 25 +``` 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 new file mode 100644 index 000000000..a371e6fe7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-big-int-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-big-int-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..af3960fb3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-boolean-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-boolean-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default false +``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-collection.md b/examples/2.3.x/console-cli/examples/databases/update-collection.md new file mode 100644 index 000000000..fbc6eea05 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite databases update-collection \ + --database-id '' \ + --collection-id '' +``` 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 new file mode 100644 index 000000000..9e78e4a6c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-datetime-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-datetime-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 2020-10-15T06:38:00.000+00:00 +``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-document.md b/examples/2.3.x/console-cli/examples/databases/update-document.md new file mode 100644 index 000000000..91a131e31 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-document.md @@ -0,0 +1,6 @@ +```bash +appwrite databases update-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-documents.md b/examples/2.3.x/console-cli/examples/databases/update-documents.md new file mode 100644 index 000000000..cfd729d86 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite databases update-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` 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 new file mode 100644 index 000000000..1e29ab6c6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-email-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-email-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..95dac92a6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-enum-attribute.md @@ -0,0 +1,9 @@ +```bash +appwrite databases update-enum-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --elements "active" "inactive" \ + --required false \ + --default 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 new file mode 100644 index 000000000..84949cc50 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-float-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-float-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..0239677f5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-integer-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-integer-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..7fe37561b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-ip-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-ip-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..ca4a53f7f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-line-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases update-line-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..27cb4aac4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-longtext-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-longtext-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default '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 new file mode 100644 index 000000000..27d4569bc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-mediumtext-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default '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 new file mode 100644 index 000000000..9a0332913 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-point-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases update-point-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..9b461b8b8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-polygon-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite databases update-polygon-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-relationship-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..d4b291b23 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-relationship-attribute.md @@ -0,0 +1,6 @@ +```bash +appwrite databases update-relationship-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' +``` 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 new file mode 100644 index 000000000..8db9c724f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-string-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-string-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default '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 new file mode 100644 index 000000000..d52e97644 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-text-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-text-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 'Hello World' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-transaction.md b/examples/2.3.x/console-cli/examples/databases/update-transaction.md new file mode 100644 index 000000000..75d9c193c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite databases update-transaction \ + --transaction-id '' +``` 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 new file mode 100644 index 000000000..a5e8548ae --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-url-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-url-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..1e726a42b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update-varchar-attribute.md @@ -0,0 +1,8 @@ +```bash +appwrite databases update-varchar-attribute \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --required false \ + --default 'Hello World' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/update.md b/examples/2.3.x/console-cli/examples/databases/update.md new file mode 100644 index 000000000..9821c4f72 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/update.md @@ -0,0 +1,4 @@ +```bash +appwrite databases update \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/databases/upsert-document.md b/examples/2.3.x/console-cli/examples/databases/upsert-document.md new file mode 100644 index 000000000..78a12cc90 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/upsert-document.md @@ -0,0 +1,6 @@ +```bash +appwrite databases upsert-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` 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 new file mode 100644 index 000000000..1bb53704a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/databases/upsert-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite databases upsert-documents \ + --database-id '' \ + --collection-id '' \ + --documents one two three +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/create-collection.md b/examples/2.3.x/console-cli/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..8f980b403 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-collection.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb create-collection \ + --database-id '' \ + --collection-id '' \ + --name '' +``` 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 new file mode 100644 index 000000000..68d4ecf7c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-document.md @@ -0,0 +1,7 @@ +```bash +appwrite documentsdb create-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' \ + --data '{ "key": "value" }' +``` 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 new file mode 100644 index 000000000..ddaa05eaa --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb create-documents \ + --database-id '' \ + --collection-id '' \ + --documents one two three +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/create-failover.md b/examples/2.3.x/console-cli/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..691f06cb7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-failover.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb create-failover \ + --database-id '' +``` 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 new file mode 100644 index 000000000..1fa9238a3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-index.md @@ -0,0 +1,8 @@ +```bash +appwrite documentsdb create-index \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --type key \ + --attributes one two three +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/create-transaction.md b/examples/2.3.x/console-cli/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..88689b617 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-transaction.md @@ -0,0 +1,3 @@ +```bash +appwrite documentsdb create-transaction +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/create.md b/examples/2.3.x/console-cli/examples/documentsdb/create.md new file mode 100644 index 000000000..bb9289c3e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/create.md @@ -0,0 +1,5 @@ +```bash +appwrite documentsdb create \ + --database-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/console-cli/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..47ed69d7f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite documentsdb decrement-document-attribute \ + --database-id '' \ + --collection-id '' \ + --document-id '' \ + --attribute '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/delete-collection.md b/examples/2.3.x/console-cli/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..b625997af --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/delete-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite documentsdb delete-collection \ + --database-id '' \ + --collection-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/delete-document.md b/examples/2.3.x/console-cli/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..43ceaa13c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/delete-document.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb delete-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/delete-documents.md b/examples/2.3.x/console-cli/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..0d1b48540 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/delete-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb delete-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/delete-index.md b/examples/2.3.x/console-cli/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..056d9ea03 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/delete-index.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb delete-index \ + --database-id '' \ + --collection-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/delete-transaction.md b/examples/2.3.x/console-cli/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..0f40b7a15 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/delete-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb delete-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/delete.md b/examples/2.3.x/console-cli/examples/documentsdb/delete.md new file mode 100644 index 000000000..4af9f935d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb delete \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/get-collection.md b/examples/2.3.x/console-cli/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..ff54073e4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/get-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite documentsdb get-collection \ + --database-id '' \ + --collection-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/get-document.md b/examples/2.3.x/console-cli/examples/documentsdb/get-document.md new file mode 100644 index 000000000..ff1958b31 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/get-document.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb get-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/get-index.md b/examples/2.3.x/console-cli/examples/documentsdb/get-index.md new file mode 100644 index 000000000..2a75462cb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/get-index.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb get-index \ + --database-id '' \ + --collection-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/get-replicas.md b/examples/2.3.x/console-cli/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..98d9c924b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/get-replicas.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb get-replicas \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/get-status.md b/examples/2.3.x/console-cli/examples/documentsdb/get-status.md new file mode 100644 index 000000000..807868e7e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/get-status.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb get-status \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/get-transaction.md b/examples/2.3.x/console-cli/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..1006a8b36 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/get-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb get-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/get.md b/examples/2.3.x/console-cli/examples/documentsdb/get.md new file mode 100644 index 000000000..7edadf333 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/get.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb get \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/console-cli/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..508e8abfb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite documentsdb increment-document-attribute \ + --database-id '' \ + --collection-id '' \ + --document-id '' \ + --attribute '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/list-collections.md b/examples/2.3.x/console-cli/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..1dec21a43 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/list-collections.md @@ -0,0 +1,5 @@ +```bash +appwrite documentsdb list-collections \ + --database-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/list-documents.md b/examples/2.3.x/console-cli/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..83eca6e83 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/list-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb list-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/list-indexes.md b/examples/2.3.x/console-cli/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..e7b7d269d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/list-indexes.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb list-indexes \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/list-operations.md b/examples/2.3.x/console-cli/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..0b1a12b24 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/list-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb list-operations \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/list-specifications.md b/examples/2.3.x/console-cli/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..f0a2bc2cb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/list-specifications.md @@ -0,0 +1,3 @@ +```bash +appwrite documentsdb list-specifications +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/list-transactions.md b/examples/2.3.x/console-cli/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..187f2055c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/list-transactions.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb list-transactions \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/list.md b/examples/2.3.x/console-cli/examples/documentsdb/list.md new file mode 100644 index 000000000..6838fea75 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/list.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb list \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/update-collection.md b/examples/2.3.x/console-cli/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..d6ff0d6c9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/update-collection.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb update-collection \ + --database-id '' \ + --collection-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/update-document.md b/examples/2.3.x/console-cli/examples/documentsdb/update-document.md new file mode 100644 index 000000000..4548c5609 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/update-document.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb update-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/update-documents.md b/examples/2.3.x/console-cli/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..e84b6ca07 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/update-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb update-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/update-transaction.md b/examples/2.3.x/console-cli/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..5ae411cc3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/update-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb update-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/update.md b/examples/2.3.x/console-cli/examples/documentsdb/update.md new file mode 100644 index 000000000..c6ac2440f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/update.md @@ -0,0 +1,5 @@ +```bash +appwrite documentsdb update \ + --database-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/upsert-document.md b/examples/2.3.x/console-cli/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..7f65bbd64 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/upsert-document.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb upsert-document \ + --database-id '' \ + --collection-id '' \ + --document-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 new file mode 100644 index 000000000..646977ad2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/upsert-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documentsdb upsert-documents \ + --database-id '' \ + --collection-id '' \ + --documents one two three +``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/console-cli/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..f29cd8091 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,4 @@ +```bash +appwrite domains create-preset-google-workspace \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/console-cli/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..d651ac7ab --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,4 @@ +```bash +appwrite domains create-preset-i-cloud \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-preset-mailgun.md b/examples/2.3.x/console-cli/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..7fd620ace --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-preset-mailgun.md @@ -0,0 +1,4 @@ +```bash +appwrite domains create-preset-mailgun \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-preset-outlook.md b/examples/2.3.x/console-cli/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..b47f0ecc5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-preset-outlook.md @@ -0,0 +1,4 @@ +```bash +appwrite domains create-preset-outlook \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/console-cli/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..2c51f47ef --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,4 @@ +```bash +appwrite domains create-preset-proton-mail \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-preset-zoho.md b/examples/2.3.x/console-cli/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..b8f613bfa --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-preset-zoho.md @@ -0,0 +1,4 @@ +```bash +appwrite domains create-preset-zoho \ + --domain-id '' +``` 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 new file mode 100644 index 000000000..4517579a2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-a.md @@ -0,0 +1,7 @@ +```bash +appwrite domains create-record-a \ + --domain-id '' \ + --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 new file mode 100644 index 000000000..25e144d6a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-aaaa.md @@ -0,0 +1,7 @@ +```bash +appwrite domains create-record-aaaa \ + --domain-id '' \ + --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 new file mode 100644 index 000000000..c14f2c291 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-alias.md @@ -0,0 +1,7 @@ +```bash +appwrite domains create-record-alias \ + --domain-id '' \ + --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 new file mode 100644 index 000000000..b20aff851 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-caa.md @@ -0,0 +1,7 @@ +```bash +appwrite domains create-record-caa \ + --domain-id '' \ + --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 new file mode 100644 index 000000000..084057b16 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-cname.md @@ -0,0 +1,7 @@ +```bash +appwrite domains create-record-cname \ + --domain-id '' \ + --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 new file mode 100644 index 000000000..1c0618f12 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-https.md @@ -0,0 +1,7 @@ +```bash +appwrite domains create-record-https \ + --domain-id '' \ + --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 new file mode 100644 index 000000000..f92422426 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-mx.md @@ -0,0 +1,8 @@ +```bash +appwrite domains create-record-mx \ + --domain-id '' \ + --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 new file mode 100644 index 000000000..9aa4440d8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-ns.md @@ -0,0 +1,7 @@ +```bash +appwrite domains create-record-ns \ + --domain-id '' \ + --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 new file mode 100644 index 000000000..7b5cf346e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-srv.md @@ -0,0 +1,10 @@ +```bash +appwrite domains create-record-srv \ + --domain-id '' \ + --name '' \ + --value '' \ + --ttl 1 \ + --priority 0 \ + --weight 0 \ + --port 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 new file mode 100644 index 000000000..4d70663aa --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create-record-txt.md @@ -0,0 +1,6 @@ +```bash +appwrite domains create-record-txt \ + --domain-id '' \ + --name '' \ + --ttl 1 +``` diff --git a/examples/2.3.x/console-cli/examples/domains/create.md b/examples/2.3.x/console-cli/examples/domains/create.md new file mode 100644 index 000000000..55bf91daf --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/create.md @@ -0,0 +1,5 @@ +```bash +appwrite domains create \ + --team-id '' \ + --domain example.com +``` diff --git a/examples/2.3.x/console-cli/examples/domains/delete-record.md b/examples/2.3.x/console-cli/examples/domains/delete-record.md new file mode 100644 index 000000000..8f5282018 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/delete-record.md @@ -0,0 +1,5 @@ +```bash +appwrite domains delete-record \ + --domain-id '' \ + --record-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/delete.md b/examples/2.3.x/console-cli/examples/domains/delete.md new file mode 100644 index 000000000..5a7bb0a20 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite domains delete \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/console-cli/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..42c2ceb1c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-preset-google-workspace \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/console-cli/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..68b3f6b6d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-preset-i-cloud \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-preset-mailgun.md b/examples/2.3.x/console-cli/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..35b09592c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-preset-mailgun.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-preset-mailgun \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-preset-outlook.md b/examples/2.3.x/console-cli/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..d2cc2f349 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-preset-outlook.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-preset-outlook \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/console-cli/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..f44cdc591 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-preset-proton-mail \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-preset-zoho.md b/examples/2.3.x/console-cli/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..29311910d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-preset-zoho.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-preset-zoho \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-price.md b/examples/2.3.x/console-cli/examples/domains/get-price.md new file mode 100644 index 000000000..fe04274c9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-price.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-price \ + --domain example.com +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-record.md b/examples/2.3.x/console-cli/examples/domains/get-record.md new file mode 100644 index 000000000..92c0dc95b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-record.md @@ -0,0 +1,5 @@ +```bash +appwrite domains get-record \ + --domain-id '' \ + --record-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-transfer-status.md b/examples/2.3.x/console-cli/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..bca521dfb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-transfer-status.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-transfer-status \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get-zone.md b/examples/2.3.x/console-cli/examples/domains/get-zone.md new file mode 100644 index 000000000..0e7b0a5e9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get-zone.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get-zone \ + --domain-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/get.md b/examples/2.3.x/console-cli/examples/domains/get.md new file mode 100644 index 000000000..bfe0f906e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/get.md @@ -0,0 +1,4 @@ +```bash +appwrite domains get \ + --domain-id '' +``` 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 new file mode 100644 index 000000000..9d85aa32f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/list-prices.md @@ -0,0 +1,4 @@ +```bash +appwrite domains list-prices \ + --domains one two three +``` diff --git a/examples/2.3.x/console-cli/examples/domains/list-records.md b/examples/2.3.x/console-cli/examples/domains/list-records.md new file mode 100644 index 000000000..247ee1aa8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/list-records.md @@ -0,0 +1,5 @@ +```bash +appwrite domains list-records \ + --domain-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/domains/list.md b/examples/2.3.x/console-cli/examples/domains/list.md new file mode 100644 index 000000000..57ebab3f1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/list.md @@ -0,0 +1,4 @@ +```bash +appwrite domains list \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-nameservers.md b/examples/2.3.x/console-cli/examples/domains/update-nameservers.md new file mode 100644 index 000000000..b4a740328 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-nameservers.md @@ -0,0 +1,4 @@ +```bash +appwrite domains update-nameservers \ + --domain-id '' +``` 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 new file mode 100644 index 000000000..18a64dc67 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-a.md @@ -0,0 +1,8 @@ +```bash +appwrite domains update-record-a \ + --domain-id '' \ + --record-id '' \ + --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 new file mode 100644 index 000000000..37ba90b7f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-aaaa.md @@ -0,0 +1,8 @@ +```bash +appwrite domains update-record-aaaa \ + --domain-id '' \ + --record-id '' \ + --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 new file mode 100644 index 000000000..116f00879 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-alias.md @@ -0,0 +1,8 @@ +```bash +appwrite domains update-record-alias \ + --domain-id '' \ + --record-id '' \ + --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 new file mode 100644 index 000000000..2aea15ca3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-caa.md @@ -0,0 +1,8 @@ +```bash +appwrite domains update-record-caa \ + --domain-id '' \ + --record-id '' \ + --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 new file mode 100644 index 000000000..8fff4d197 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-cname.md @@ -0,0 +1,8 @@ +```bash +appwrite domains update-record-cname \ + --domain-id '' \ + --record-id '' \ + --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 new file mode 100644 index 000000000..ca21bfd86 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-https.md @@ -0,0 +1,8 @@ +```bash +appwrite domains update-record-https \ + --domain-id '' \ + --record-id '' \ + --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 new file mode 100644 index 000000000..890fe7822 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-mx.md @@ -0,0 +1,9 @@ +```bash +appwrite domains update-record-mx \ + --domain-id '' \ + --record-id '' \ + --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 new file mode 100644 index 000000000..b70faaf41 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-ns.md @@ -0,0 +1,8 @@ +```bash +appwrite domains update-record-ns \ + --domain-id '' \ + --record-id '' \ + --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 new file mode 100644 index 000000000..5a9969bc1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-srv.md @@ -0,0 +1,11 @@ +```bash +appwrite domains update-record-srv \ + --domain-id '' \ + --record-id '' \ + --name '' \ + --value '' \ + --ttl 1 \ + --priority 0 \ + --weight 0 \ + --port 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 new file mode 100644 index 000000000..337704761 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-record-txt.md @@ -0,0 +1,8 @@ +```bash +appwrite domains update-record-txt \ + --domain-id '' \ + --record-id '' \ + --name '' \ + --value '' \ + --ttl 1 +``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-team.md b/examples/2.3.x/console-cli/examples/domains/update-team.md new file mode 100644 index 000000000..c30f297e2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-team.md @@ -0,0 +1,5 @@ +```bash +appwrite domains update-team \ + --domain-id '' \ + --team-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-zone.md b/examples/2.3.x/console-cli/examples/domains/update-zone.md new file mode 100644 index 000000000..030c12af1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/update-zone.md @@ -0,0 +1,5 @@ +```bash +appwrite domains update-zone \ + --domain-id '' \ + --content '' +``` diff --git a/examples/2.3.x/console-cli/examples/domains/verify-nameservers.md b/examples/2.3.x/console-cli/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..0cafacdfc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/domains/verify-nameservers.md @@ -0,0 +1,4 @@ +```bash +appwrite domains verify-nameservers \ + --domain-id '' +``` 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 new file mode 100644 index 000000000..b66166f8e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,4 @@ +```bash +appwrite embeddings create-text-embeddings \ + --texts one two three +``` 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 new file mode 100644 index 000000000..de08a42d1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/create-deployment.md @@ -0,0 +1,6 @@ +```bash +appwrite functions create-deployment \ + --function-id '' \ + --code 'path/to/file.png' \ + --activate false +``` diff --git a/examples/2.3.x/console-cli/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/console-cli/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..d0f88178c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite functions create-duplicate-deployment \ + --function-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/create-execution.md b/examples/2.3.x/console-cli/examples/functions/create-execution.md new file mode 100644 index 000000000..4970e45b2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/create-execution.md @@ -0,0 +1,4 @@ +```bash +appwrite functions create-execution \ + --function-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/create-template-deployment.md b/examples/2.3.x/console-cli/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..987726b5c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/create-template-deployment.md @@ -0,0 +1,9 @@ +```bash +appwrite functions create-template-deployment \ + --function-id '' \ + --repository '' \ + --owner '' \ + --root-directory '' \ + --type commit \ + --reference '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/create-variable.md b/examples/2.3.x/console-cli/examples/functions/create-variable.md new file mode 100644 index 000000000..4c176c5b5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/create-variable.md @@ -0,0 +1,7 @@ +```bash +appwrite functions create-variable \ + --function-id '' \ + --variable-id '' \ + --key '' \ + --value '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/create-vcs-deployment.md b/examples/2.3.x/console-cli/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..64b27f2df --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/create-vcs-deployment.md @@ -0,0 +1,6 @@ +```bash +appwrite functions create-vcs-deployment \ + --function-id '' \ + --type branch \ + --reference '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/create.md b/examples/2.3.x/console-cli/examples/functions/create.md new file mode 100644 index 000000000..52a7d7f98 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/create.md @@ -0,0 +1,6 @@ +```bash +appwrite functions create \ + --function-id '' \ + --name '' \ + --runtime node-14.5 +``` diff --git a/examples/2.3.x/console-cli/examples/functions/delete-deployment.md b/examples/2.3.x/console-cli/examples/functions/delete-deployment.md new file mode 100644 index 000000000..e093b3a95 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/delete-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite functions delete-deployment \ + --function-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/delete-execution.md b/examples/2.3.x/console-cli/examples/functions/delete-execution.md new file mode 100644 index 000000000..214846f92 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/delete-execution.md @@ -0,0 +1,5 @@ +```bash +appwrite functions delete-execution \ + --function-id '' \ + --execution-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/delete-variable.md b/examples/2.3.x/console-cli/examples/functions/delete-variable.md new file mode 100644 index 000000000..6542e2f1d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/delete-variable.md @@ -0,0 +1,5 @@ +```bash +appwrite functions delete-variable \ + --function-id '' \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/delete.md b/examples/2.3.x/console-cli/examples/functions/delete.md new file mode 100644 index 000000000..cff038bfe --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite functions delete \ + --function-id '' +``` 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 new file mode 100644 index 000000000..fa1f2febb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/get-deployment-download.md @@ -0,0 +1,5 @@ +```bash +appwrite functions get-deployment-download \ + --function-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/get-deployment.md b/examples/2.3.x/console-cli/examples/functions/get-deployment.md new file mode 100644 index 000000000..9facb61f2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/get-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite functions get-deployment \ + --function-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/get-execution.md b/examples/2.3.x/console-cli/examples/functions/get-execution.md new file mode 100644 index 000000000..aca14de37 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/get-execution.md @@ -0,0 +1,5 @@ +```bash +appwrite functions get-execution \ + --function-id '' \ + --execution-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/get-variable.md b/examples/2.3.x/console-cli/examples/functions/get-variable.md new file mode 100644 index 000000000..569207329 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/get-variable.md @@ -0,0 +1,5 @@ +```bash +appwrite functions get-variable \ + --function-id '' \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/get.md b/examples/2.3.x/console-cli/examples/functions/get.md new file mode 100644 index 000000000..046829d49 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/get.md @@ -0,0 +1,4 @@ +```bash +appwrite functions get \ + --function-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/list-deployments.md b/examples/2.3.x/console-cli/examples/functions/list-deployments.md new file mode 100644 index 000000000..c09738530 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/list-deployments.md @@ -0,0 +1,5 @@ +```bash +appwrite functions list-deployments \ + --function-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/functions/list-executions.md b/examples/2.3.x/console-cli/examples/functions/list-executions.md new file mode 100644 index 000000000..c1652af62 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/list-executions.md @@ -0,0 +1,5 @@ +```bash +appwrite functions list-executions \ + --function-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/functions/list-runtimes.md b/examples/2.3.x/console-cli/examples/functions/list-runtimes.md new file mode 100644 index 000000000..0e07f8c61 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/list-runtimes.md @@ -0,0 +1,3 @@ +```bash +appwrite functions list-runtimes +``` diff --git a/examples/2.3.x/console-cli/examples/functions/list-specifications.md b/examples/2.3.x/console-cli/examples/functions/list-specifications.md new file mode 100644 index 000000000..912985f02 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/list-specifications.md @@ -0,0 +1,3 @@ +```bash +appwrite functions list-specifications +``` diff --git a/examples/2.3.x/console-cli/examples/functions/list-variables.md b/examples/2.3.x/console-cli/examples/functions/list-variables.md new file mode 100644 index 000000000..4b1537220 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/list-variables.md @@ -0,0 +1,5 @@ +```bash +appwrite functions list-variables \ + --function-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/functions/list.md b/examples/2.3.x/console-cli/examples/functions/list.md new file mode 100644 index 000000000..9542b5c7a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/list.md @@ -0,0 +1,4 @@ +```bash +appwrite functions list \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/functions/update-deployment-status.md b/examples/2.3.x/console-cli/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..11c578e37 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/update-deployment-status.md @@ -0,0 +1,5 @@ +```bash +appwrite functions update-deployment-status \ + --function-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/update-function-deployment.md b/examples/2.3.x/console-cli/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..d2c04d719 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/update-function-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite functions update-function-deployment \ + --function-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/update-variable.md b/examples/2.3.x/console-cli/examples/functions/update-variable.md new file mode 100644 index 000000000..a6738a8d3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/update-variable.md @@ -0,0 +1,5 @@ +```bash +appwrite functions update-variable \ + --function-id '' \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/functions/update.md b/examples/2.3.x/console-cli/examples/functions/update.md new file mode 100644 index 000000000..21e879ffd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/functions/update.md @@ -0,0 +1,5 @@ +```bash +appwrite functions update \ + --function-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/graphql/mutation.md b/examples/2.3.x/console-cli/examples/graphql/mutation.md new file mode 100644 index 000000000..4666d3020 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/graphql/mutation.md @@ -0,0 +1,4 @@ +```bash +appwrite graphql mutation \ + --query '{ "key": "value" }' +``` diff --git a/examples/2.3.x/console-cli/examples/graphql/query.md b/examples/2.3.x/console-cli/examples/graphql/query.md new file mode 100644 index 000000000..9285fbdf6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/graphql/query.md @@ -0,0 +1,4 @@ +```bash +appwrite graphql query \ + --query '{ "key": "value" }' +``` diff --git a/examples/2.3.x/console-cli/examples/locale/get.md b/examples/2.3.x/console-cli/examples/locale/get.md new file mode 100644 index 000000000..3c4da34ab --- /dev/null +++ b/examples/2.3.x/console-cli/examples/locale/get.md @@ -0,0 +1,3 @@ +```bash +appwrite locale get +``` diff --git a/examples/2.3.x/console-cli/examples/locale/list-codes.md b/examples/2.3.x/console-cli/examples/locale/list-codes.md new file mode 100644 index 000000000..2bb6e6bad --- /dev/null +++ b/examples/2.3.x/console-cli/examples/locale/list-codes.md @@ -0,0 +1,3 @@ +```bash +appwrite locale list-codes +``` diff --git a/examples/2.3.x/console-cli/examples/locale/list-continents.md b/examples/2.3.x/console-cli/examples/locale/list-continents.md new file mode 100644 index 000000000..74dae6a27 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/locale/list-continents.md @@ -0,0 +1,3 @@ +```bash +appwrite locale list-continents +``` diff --git a/examples/2.3.x/console-cli/examples/locale/list-countries-eu.md b/examples/2.3.x/console-cli/examples/locale/list-countries-eu.md new file mode 100644 index 000000000..e3e0f876d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/locale/list-countries-eu.md @@ -0,0 +1,3 @@ +```bash +appwrite locale list-countries-eu +``` diff --git a/examples/2.3.x/console-cli/examples/locale/list-countries-phones.md b/examples/2.3.x/console-cli/examples/locale/list-countries-phones.md new file mode 100644 index 000000000..1ac104ca5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/locale/list-countries-phones.md @@ -0,0 +1,3 @@ +```bash +appwrite locale list-countries-phones +``` diff --git a/examples/2.3.x/console-cli/examples/locale/list-countries.md b/examples/2.3.x/console-cli/examples/locale/list-countries.md new file mode 100644 index 000000000..8c0f01bc8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/locale/list-countries.md @@ -0,0 +1,3 @@ +```bash +appwrite locale list-countries +``` diff --git a/examples/2.3.x/console-cli/examples/locale/list-currencies.md b/examples/2.3.x/console-cli/examples/locale/list-currencies.md new file mode 100644 index 000000000..bf087d51c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/locale/list-currencies.md @@ -0,0 +1,3 @@ +```bash +appwrite locale list-currencies +``` diff --git a/examples/2.3.x/console-cli/examples/locale/list-languages.md b/examples/2.3.x/console-cli/examples/locale/list-languages.md new file mode 100644 index 000000000..69e5ea4c3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/locale/list-languages.md @@ -0,0 +1,3 @@ +```bash +appwrite locale list-languages +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-apns-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..983f6e0c6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-apns-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-apns-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..5eefa94d1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-appwrite-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-email.md b/examples/2.3.x/console-cli/examples/messaging/create-email.md new file mode 100644 index 000000000..a1622aeed --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-email.md @@ -0,0 +1,6 @@ +```bash +appwrite messaging create-email \ + --message-id '' \ + --subject '' \ + --content '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-fcm-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..453bbfa7c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-fcm-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-fcm-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..82e482d01 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-mailgun-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..015fccea1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-msg-91-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-push.md b/examples/2.3.x/console-cli/examples/messaging/create-push.md new file mode 100644 index 000000000..2591798af --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-push.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging create-push \ + --message-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-resend-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..ddd6b7e5f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-resend-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-resend-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..d894b580b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-sendgrid-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-ses-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..36e952f01 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-ses-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-ses-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-sms.md b/examples/2.3.x/console-cli/examples/messaging/create-sms.md new file mode 100644 index 000000000..78fc4014f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-sms.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-sms \ + --message-id '' \ + --content '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-smtp-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..737368730 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-smtp-provider.md @@ -0,0 +1,6 @@ +```bash +appwrite messaging create-smtp-provider \ + --provider-id '' \ + --name '' \ + --host '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-subscriber.md b/examples/2.3.x/console-cli/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..1a46edfc2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-subscriber.md @@ -0,0 +1,6 @@ +```bash +appwrite messaging create-subscriber \ + --topic-id '' \ + --subscriber-id '' \ + --target-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-telesign-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..66fbfe6b1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-telesign-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-telesign-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..d9460dfc3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-textmagic-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-topic.md b/examples/2.3.x/console-cli/examples/messaging/create-topic.md new file mode 100644 index 000000000..01300546d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-topic.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-topic \ + --topic-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-twilio-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..80a1efad7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-twilio-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-twilio-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/create-vonage-provider.md b/examples/2.3.x/console-cli/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..27cec656e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/create-vonage-provider.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging create-vonage-provider \ + --provider-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/delete-provider.md b/examples/2.3.x/console-cli/examples/messaging/delete-provider.md new file mode 100644 index 000000000..6069fa9c3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/delete-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging delete-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/delete-subscriber.md b/examples/2.3.x/console-cli/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..befa626bb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/delete-subscriber.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging delete-subscriber \ + --topic-id '' \ + --subscriber-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/delete-topic.md b/examples/2.3.x/console-cli/examples/messaging/delete-topic.md new file mode 100644 index 000000000..0c73d69d6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/delete-topic.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging delete-topic \ + --topic-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/delete.md b/examples/2.3.x/console-cli/examples/messaging/delete.md new file mode 100644 index 000000000..46f67d378 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging delete \ + --message-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/get-message.md b/examples/2.3.x/console-cli/examples/messaging/get-message.md new file mode 100644 index 000000000..41d3a8b7c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/get-message.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging get-message \ + --message-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/get-provider.md b/examples/2.3.x/console-cli/examples/messaging/get-provider.md new file mode 100644 index 000000000..5b77fb6e6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/get-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging get-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/get-subscriber.md b/examples/2.3.x/console-cli/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..c65df5ecf --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/get-subscriber.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging get-subscriber \ + --topic-id '' \ + --subscriber-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/get-topic.md b/examples/2.3.x/console-cli/examples/messaging/get-topic.md new file mode 100644 index 000000000..089a693b1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/get-topic.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging get-topic \ + --topic-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/list-messages.md b/examples/2.3.x/console-cli/examples/messaging/list-messages.md new file mode 100644 index 000000000..fbbdea826 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/list-messages.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging list-messages \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/list-providers.md b/examples/2.3.x/console-cli/examples/messaging/list-providers.md new file mode 100644 index 000000000..787ee524a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/list-providers.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging list-providers \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/list-subscribers.md b/examples/2.3.x/console-cli/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..ce26b127b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/list-subscribers.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging list-subscribers \ + --topic-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/list-targets.md b/examples/2.3.x/console-cli/examples/messaging/list-targets.md new file mode 100644 index 000000000..95e2f2cc5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/list-targets.md @@ -0,0 +1,5 @@ +```bash +appwrite messaging list-targets \ + --message-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/list-topics.md b/examples/2.3.x/console-cli/examples/messaging/list-topics.md new file mode 100644 index 000000000..3cb2a5dd2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/list-topics.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging list-topics \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-apns-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..c09eab950 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-apns-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-apns-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..89169da29 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-appwrite-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-email.md b/examples/2.3.x/console-cli/examples/messaging/update-email.md new file mode 100644 index 000000000..aa96d4a0b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-email.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-email \ + --message-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-fcm-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..09e614643 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-fcm-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-fcm-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..b8d9a0b3f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-mailgun-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..34f5de178 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-msg-91-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-push.md b/examples/2.3.x/console-cli/examples/messaging/update-push.md new file mode 100644 index 000000000..c4b315e79 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-push.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-push \ + --message-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-resend-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..ba2561d76 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-resend-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-resend-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..11fffbd22 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-sendgrid-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-ses-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..f47e9cd9a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-ses-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-ses-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-sms.md b/examples/2.3.x/console-cli/examples/messaging/update-sms.md new file mode 100644 index 000000000..c6130ad8c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-sms.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-sms \ + --message-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-smtp-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..1282b1805 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-smtp-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-smtp-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-telesign-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..1baed4ad8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-telesign-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-telesign-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..dc8277eb1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-textmagic-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-topic.md b/examples/2.3.x/console-cli/examples/messaging/update-topic.md new file mode 100644 index 000000000..f1858f883 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-topic.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-topic \ + --topic-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-twilio-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..3aa7eee2f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-twilio-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-twilio-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/messaging/update-vonage-provider.md b/examples/2.3.x/console-cli/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..7a166a95f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/messaging/update-vonage-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite messaging update-vonage-provider \ + --provider-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/authorize-post.md b/examples/2.3.x/console-cli/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..032a9df37 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/authorize-post.md @@ -0,0 +1,3 @@ +```bash +appwrite oauth2 authorize-post +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/authorize.md b/examples/2.3.x/console-cli/examples/oauth2/authorize.md new file mode 100644 index 000000000..f1a40a099 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/authorize.md @@ -0,0 +1,3 @@ +```bash +appwrite oauth2 authorize +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/create-device-authorization.md b/examples/2.3.x/console-cli/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..a9c91f059 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/create-device-authorization.md @@ -0,0 +1,3 @@ +```bash +appwrite oauth2 create-device-authorization +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/create-grant.md b/examples/2.3.x/console-cli/examples/oauth2/create-grant.md new file mode 100644 index 000000000..a99087aff --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/create-grant.md @@ -0,0 +1,4 @@ +```bash +appwrite oauth2 create-grant \ + --user-code '' +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/create-par.md b/examples/2.3.x/console-cli/examples/oauth2/create-par.md new file mode 100644 index 000000000..da93b0066 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/create-par.md @@ -0,0 +1,6 @@ +```bash +appwrite oauth2 create-par \ + --client-id '' \ + --redirect-uri https://example.com \ + --response-type code +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/create-token.md b/examples/2.3.x/console-cli/examples/oauth2/create-token.md new file mode 100644 index 000000000..3564bc441 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/create-token.md @@ -0,0 +1,4 @@ +```bash +appwrite oauth2 create-token \ + --grant-type '' +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/get-grant.md b/examples/2.3.x/console-cli/examples/oauth2/get-grant.md new file mode 100644 index 000000000..68b0d0672 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/get-grant.md @@ -0,0 +1,4 @@ +```bash +appwrite oauth2 get-grant \ + --grant-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/list-organizations.md b/examples/2.3.x/console-cli/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..40cc3e465 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/list-organizations.md @@ -0,0 +1,3 @@ +```bash +appwrite list-organizations +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/list-projects.md b/examples/2.3.x/console-cli/examples/oauth2/list-projects.md new file mode 100644 index 000000000..5c2f974b8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/list-projects.md @@ -0,0 +1,3 @@ +```bash +appwrite list-projects +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/reject.md b/examples/2.3.x/console-cli/examples/oauth2/reject.md new file mode 100644 index 000000000..ddc5e5796 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/reject.md @@ -0,0 +1,4 @@ +```bash +appwrite oauth2 reject \ + --grant-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/revoke.md b/examples/2.3.x/console-cli/examples/oauth2/revoke.md new file mode 100644 index 000000000..da472606d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/revoke.md @@ -0,0 +1,4 @@ +```bash +appwrite oauth2 revoke \ + --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 new file mode 100644 index 000000000..3b4a3ffe1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,6 @@ +```bash +appwrite organization create-ephemeral-project-key \ + --project-id '' \ + --scopes one two three \ + --duration 600 +``` diff --git a/examples/2.3.x/console-cli/examples/organization/create-installation.md b/examples/2.3.x/console-cli/examples/organization/create-installation.md new file mode 100644 index 000000000..23885d158 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/create-installation.md @@ -0,0 +1,4 @@ +```bash +appwrite organization create-installation \ + --app-id '' +``` 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 new file mode 100644 index 000000000..984ffbaca --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/create-membership.md @@ -0,0 +1,4 @@ +```bash +appwrite organization create-membership \ + --roles one two three +``` diff --git a/examples/2.3.x/console-cli/examples/organization/create-project.md b/examples/2.3.x/console-cli/examples/organization/create-project.md new file mode 100644 index 000000000..bf3e7c00c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/create-project.md @@ -0,0 +1,5 @@ +```bash +appwrite organization create-project \ + --project-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/delete-installation.md b/examples/2.3.x/console-cli/examples/organization/delete-installation.md new file mode 100644 index 000000000..ee47ab162 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/delete-installation.md @@ -0,0 +1,4 @@ +```bash +appwrite organization delete-installation \ + --installation-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/delete-membership.md b/examples/2.3.x/console-cli/examples/organization/delete-membership.md new file mode 100644 index 000000000..1cd96d5de --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/delete-membership.md @@ -0,0 +1,4 @@ +```bash +appwrite organization delete-membership \ + --membership-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/delete-project-key.md b/examples/2.3.x/console-cli/examples/organization/delete-project-key.md new file mode 100644 index 000000000..30df2f964 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/delete-project-key.md @@ -0,0 +1,5 @@ +```bash +appwrite organization delete-project-key \ + --project-id '' \ + --key-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/delete-project.md b/examples/2.3.x/console-cli/examples/organization/delete-project.md new file mode 100644 index 000000000..3adffb749 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/delete-project.md @@ -0,0 +1,4 @@ +```bash +appwrite organization delete-project \ + --project-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/delete.md b/examples/2.3.x/console-cli/examples/organization/delete.md new file mode 100644 index 000000000..864489a3c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/delete.md @@ -0,0 +1,3 @@ +```bash +appwrite organization delete +``` diff --git a/examples/2.3.x/console-cli/examples/organization/get-installation.md b/examples/2.3.x/console-cli/examples/organization/get-installation.md new file mode 100644 index 000000000..5e908ee7f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/get-installation.md @@ -0,0 +1,4 @@ +```bash +appwrite organization get-installation \ + --installation-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/get-membership.md b/examples/2.3.x/console-cli/examples/organization/get-membership.md new file mode 100644 index 000000000..026941df6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/get-membership.md @@ -0,0 +1,4 @@ +```bash +appwrite organization get-membership \ + --membership-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/get-project-key.md b/examples/2.3.x/console-cli/examples/organization/get-project-key.md new file mode 100644 index 000000000..8d456ae3d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/get-project-key.md @@ -0,0 +1,5 @@ +```bash +appwrite organization get-project-key \ + --project-id '' \ + --key-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/get-project.md b/examples/2.3.x/console-cli/examples/organization/get-project.md new file mode 100644 index 000000000..b646de3ef --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/get-project.md @@ -0,0 +1,4 @@ +```bash +appwrite organization get-project \ + --project-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/get.md b/examples/2.3.x/console-cli/examples/organization/get.md new file mode 100644 index 000000000..ab0f4ad6e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/get.md @@ -0,0 +1,3 @@ +```bash +appwrite organization get +``` diff --git a/examples/2.3.x/console-cli/examples/organization/list-installations.md b/examples/2.3.x/console-cli/examples/organization/list-installations.md new file mode 100644 index 000000000..503017022 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/list-installations.md @@ -0,0 +1,4 @@ +```bash +appwrite organization list-installations \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/organization/list-memberships.md b/examples/2.3.x/console-cli/examples/organization/list-memberships.md new file mode 100644 index 000000000..41d520a20 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/list-memberships.md @@ -0,0 +1,4 @@ +```bash +appwrite organization list-memberships \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/organization/list-project-keys.md b/examples/2.3.x/console-cli/examples/organization/list-project-keys.md new file mode 100644 index 000000000..e6e71de72 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/list-project-keys.md @@ -0,0 +1,5 @@ +```bash +appwrite organization list-project-keys \ + --project-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/organization/list-projects.md b/examples/2.3.x/console-cli/examples/organization/list-projects.md new file mode 100644 index 000000000..e9562a36a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/list-projects.md @@ -0,0 +1,4 @@ +```bash +appwrite organization list-projects \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/organization/update-installation.md b/examples/2.3.x/console-cli/examples/organization/update-installation.md new file mode 100644 index 000000000..699813a29 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/update-installation.md @@ -0,0 +1,4 @@ +```bash +appwrite organization update-installation \ + --installation-id '' +``` 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 new file mode 100644 index 000000000..162ad6414 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/update-membership.md @@ -0,0 +1,5 @@ +```bash +appwrite organization update-membership \ + --membership-id '' \ + --roles one two three +``` 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 new file mode 100644 index 000000000..418c81190 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/update-project-key.md @@ -0,0 +1,7 @@ +```bash +appwrite organization update-project-key \ + --project-id '' \ + --key-id '' \ + --name '' \ + --scopes one two three +``` diff --git a/examples/2.3.x/console-cli/examples/organization/update-project.md b/examples/2.3.x/console-cli/examples/organization/update-project.md new file mode 100644 index 000000000..967236421 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/update-project.md @@ -0,0 +1,5 @@ +```bash +appwrite organization update-project \ + --project-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/update.md b/examples/2.3.x/console-cli/examples/organization/update.md new file mode 100644 index 000000000..84f44e05e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/organization/update.md @@ -0,0 +1,4 @@ +```bash +appwrite organization update \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/presences/delete.md b/examples/2.3.x/console-cli/examples/presences/delete.md new file mode 100644 index 000000000..10b3e84b2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/presences/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite presences delete \ + --presence-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/presences/get.md b/examples/2.3.x/console-cli/examples/presences/get.md new file mode 100644 index 000000000..745f34d00 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/presences/get.md @@ -0,0 +1,4 @@ +```bash +appwrite presences get \ + --presence-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/presences/list.md b/examples/2.3.x/console-cli/examples/presences/list.md new file mode 100644 index 000000000..83c776663 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/presences/list.md @@ -0,0 +1,4 @@ +```bash +appwrite presences list \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/project/create-android-platform.md b/examples/2.3.x/console-cli/examples/project/create-android-platform.md new file mode 100644 index 000000000..8bbbf384f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-android-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project create-android-platform \ + --platform-id '' \ + --name '' \ + --application-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/create-apple-platform.md b/examples/2.3.x/console-cli/examples/project/create-apple-platform.md new file mode 100644 index 000000000..a901050c3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-apple-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project create-apple-platform \ + --platform-id '' \ + --name '' \ + --bundle-identifier '' +``` 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 new file mode 100644 index 000000000..d4ab3852b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-ephemeral-key.md @@ -0,0 +1,5 @@ +```bash +appwrite project create-ephemeral-key \ + --scopes one two three \ + --duration 600 +``` diff --git a/examples/2.3.x/console-cli/examples/project/create-linux-platform.md b/examples/2.3.x/console-cli/examples/project/create-linux-platform.md new file mode 100644 index 000000000..beb8f9240 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-linux-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project create-linux-platform \ + --platform-id '' \ + --name '' \ + --package-name '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/create-mock-phone.md b/examples/2.3.x/console-cli/examples/project/create-mock-phone.md new file mode 100644 index 000000000..3fb1f7bf1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-mock-phone.md @@ -0,0 +1,5 @@ +```bash +appwrite project create-mock-phone \ + --number +12065550100 \ + --otp '' +``` 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 new file mode 100644 index 000000000..01393020b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-smtp-test.md @@ -0,0 +1,4 @@ +```bash +appwrite project create-smtp-test \ + --emails one two three +``` diff --git a/examples/2.3.x/console-cli/examples/project/create-variable.md b/examples/2.3.x/console-cli/examples/project/create-variable.md new file mode 100644 index 000000000..e269a7d26 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-variable.md @@ -0,0 +1,6 @@ +```bash +appwrite project create-variable \ + --variable-id '' \ + --key '' \ + --value '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/create-web-platform.md b/examples/2.3.x/console-cli/examples/project/create-web-platform.md new file mode 100644 index 000000000..acd9dd12a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-web-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project create-web-platform \ + --platform-id '' \ + --name '' \ + --hostname app.example.com +``` diff --git a/examples/2.3.x/console-cli/examples/project/create-windows-platform.md b/examples/2.3.x/console-cli/examples/project/create-windows-platform.md new file mode 100644 index 000000000..80a9ada87 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/create-windows-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project create-windows-platform \ + --platform-id '' \ + --name '' \ + --package-identifier-name '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/delete-key.md b/examples/2.3.x/console-cli/examples/project/delete-key.md new file mode 100644 index 000000000..40a519d00 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/delete-key.md @@ -0,0 +1,4 @@ +```bash +appwrite project delete-key \ + --key-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/delete-mock-phone.md b/examples/2.3.x/console-cli/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..7e817c34c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/delete-mock-phone.md @@ -0,0 +1,4 @@ +```bash +appwrite project delete-mock-phone \ + --number +12065550100 +``` diff --git a/examples/2.3.x/console-cli/examples/project/delete-platform.md b/examples/2.3.x/console-cli/examples/project/delete-platform.md new file mode 100644 index 000000000..d9e3a2e7c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/delete-platform.md @@ -0,0 +1,4 @@ +```bash +appwrite project delete-platform \ + --platform-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/delete-variable.md b/examples/2.3.x/console-cli/examples/project/delete-variable.md new file mode 100644 index 000000000..b6dcdd953 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/delete-variable.md @@ -0,0 +1,4 @@ +```bash +appwrite project delete-variable \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/delete.md b/examples/2.3.x/console-cli/examples/project/delete.md new file mode 100644 index 000000000..376dee039 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/delete.md @@ -0,0 +1,3 @@ +```bash +appwrite project delete +``` diff --git a/examples/2.3.x/console-cli/examples/project/get-email-template.md b/examples/2.3.x/console-cli/examples/project/get-email-template.md new file mode 100644 index 000000000..f9219fd71 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/get-email-template.md @@ -0,0 +1,4 @@ +```bash +appwrite project get-email-template \ + --template-id verification +``` diff --git a/examples/2.3.x/console-cli/examples/project/get-key.md b/examples/2.3.x/console-cli/examples/project/get-key.md new file mode 100644 index 000000000..3cc64f5bf --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/get-key.md @@ -0,0 +1,4 @@ +```bash +appwrite project get-key \ + --key-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/get-mock-phone.md b/examples/2.3.x/console-cli/examples/project/get-mock-phone.md new file mode 100644 index 000000000..a4437830b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/get-mock-phone.md @@ -0,0 +1,4 @@ +```bash +appwrite project get-mock-phone \ + --number +12065550100 +``` diff --git a/examples/2.3.x/console-cli/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/console-cli/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..1c54d95c9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,4 @@ +```bash +appwrite project get-o-auth-2-provider \ + --provider-id amazon +``` diff --git a/examples/2.3.x/console-cli/examples/project/get-platform.md b/examples/2.3.x/console-cli/examples/project/get-platform.md new file mode 100644 index 000000000..3bd70b1d2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/get-platform.md @@ -0,0 +1,4 @@ +```bash +appwrite project get-platform \ + --platform-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/get-policy.md b/examples/2.3.x/console-cli/examples/project/get-policy.md new file mode 100644 index 000000000..3ad505055 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/get-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project get-policy \ + --policy-id password-dictionary +``` diff --git a/examples/2.3.x/console-cli/examples/project/get-variable.md b/examples/2.3.x/console-cli/examples/project/get-variable.md new file mode 100644 index 000000000..c2de87ac3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/get-variable.md @@ -0,0 +1,4 @@ +```bash +appwrite project get-variable \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/get.md b/examples/2.3.x/console-cli/examples/project/get.md new file mode 100644 index 000000000..a1a1b4b5f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/get.md @@ -0,0 +1,3 @@ +```bash +appwrite project get +``` diff --git a/examples/2.3.x/console-cli/examples/project/list-email-templates.md b/examples/2.3.x/console-cli/examples/project/list-email-templates.md new file mode 100644 index 000000000..ea26ea338 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/list-email-templates.md @@ -0,0 +1,4 @@ +```bash +appwrite project list-email-templates \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/project/list-keys.md b/examples/2.3.x/console-cli/examples/project/list-keys.md new file mode 100644 index 000000000..ce3e44e3b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/list-keys.md @@ -0,0 +1,4 @@ +```bash +appwrite project list-keys \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/project/list-mock-phones.md b/examples/2.3.x/console-cli/examples/project/list-mock-phones.md new file mode 100644 index 000000000..16a0b9304 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/list-mock-phones.md @@ -0,0 +1,4 @@ +```bash +appwrite project list-mock-phones \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/console-cli/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..fe4d21d13 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,4 @@ +```bash +appwrite project list-o-auth-2-providers \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/project/list-platforms.md b/examples/2.3.x/console-cli/examples/project/list-platforms.md new file mode 100644 index 000000000..0c61bb5f2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/list-platforms.md @@ -0,0 +1,4 @@ +```bash +appwrite project list-platforms \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/project/list-policies.md b/examples/2.3.x/console-cli/examples/project/list-policies.md new file mode 100644 index 000000000..61aa6d4bd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/list-policies.md @@ -0,0 +1,4 @@ +```bash +appwrite project list-policies \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/project/list-variables.md b/examples/2.3.x/console-cli/examples/project/list-variables.md new file mode 100644 index 000000000..5ab4c9d9e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/list-variables.md @@ -0,0 +1,4 @@ +```bash +appwrite project list-variables \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-android-platform.md b/examples/2.3.x/console-cli/examples/project/update-android-platform.md new file mode 100644 index 000000000..41e0aa643 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-android-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project update-android-platform \ + --platform-id '' \ + --name '' \ + --application-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-apple-platform.md b/examples/2.3.x/console-cli/examples/project/update-apple-platform.md new file mode 100644 index 000000000..ecbc3ab35 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-apple-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project update-apple-platform \ + --platform-id '' \ + --name '' \ + --bundle-identifier '' +``` 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 new file mode 100644 index 000000000..45ca9a749 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-auth-method.md @@ -0,0 +1,5 @@ +```bash +appwrite project update-auth-method \ + --method-id email-password \ + --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 new file mode 100644 index 000000000..dfd873344 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-deny-aliased-email-policy \ + --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 new file mode 100644 index 000000000..ddbfc636b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-deny-corporate-email-policy \ + --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 new file mode 100644 index 000000000..1764d04dc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-deny-disposable-email-policy \ + --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 new file mode 100644 index 000000000..c12ac1265 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-deny-free-email-policy \ + --enabled false +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-email-template.md b/examples/2.3.x/console-cli/examples/project/update-email-template.md new file mode 100644 index 000000000..4b1d0976f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-email-template.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-email-template \ + --template-id verification +``` 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 new file mode 100644 index 000000000..bb7159140 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-key.md @@ -0,0 +1,6 @@ +```bash +appwrite project update-key \ + --key-id '' \ + --name '' \ + --scopes one two three +``` 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 new file mode 100644 index 000000000..df4703c72 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-labels.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-labels \ + --labels one two three +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-linux-platform.md b/examples/2.3.x/console-cli/examples/project/update-linux-platform.md new file mode 100644 index 000000000..a6c5f7b8b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-linux-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project update-linux-platform \ + --platform-id '' \ + --name '' \ + --package-name '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/console-cli/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..e700fd9de --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-membership-privacy-policy +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/console-cli/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..3757cdd2d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-mfa-factors-policy.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-mfa-factors-policy +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-mock-phone.md b/examples/2.3.x/console-cli/examples/project/update-mock-phone.md new file mode 100644 index 000000000..e32ea9175 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-mock-phone.md @@ -0,0 +1,5 @@ +```bash +appwrite project update-mock-phone \ + --number +12065550100 \ + --otp '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..fd478a992 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-amazon.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-amazon +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-apple.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..6b74296b4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-apple +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..025140f8a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-appwrite.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-appwrite +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..84fc78203 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-auth-0.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-auth-0 +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..9eaf8366c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-authentik.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-authentik +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..fb1146551 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-autodesk.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-autodesk +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-bitbucket.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..685fa8d2e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-bitbucket.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-bitbucket +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..48426eb37 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-bitly.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-bitly +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-box.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..e9ad37c7a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-box.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-box +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-cloudflare.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..1c631d20c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-cloudflare.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-cloudflare +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-dailymotion.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..36897064c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-dailymotion.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-dailymotion +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-discord.md new file mode 100644 index 000000000..83362d114 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-discord.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-discord +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-disqus.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..d34026f39 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-disqus.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-disqus +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..d2c2ee970 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-dropbox.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-dropbox +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..c8ed2e1c6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-etsy.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-etsy +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..a9d50ec4e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-facebook.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-facebook +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..a689ce49d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-figma.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-figma +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-fusion-auth.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..f22e1e407 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-fusion-auth +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-git-hub.md new file mode 100644 index 000000000..a3b08096d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-git-hub.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-git-hub +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-gitlab.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..fd883f2c6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-gitlab.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-gitlab +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-google.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..aab34410d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-google.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-google +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..1f3b22943 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-hugging-face.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-hugging-face +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..2506904aa --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-kakao.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-kakao +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-keycloak.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..39ca172b2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-keycloak +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..ed41a4c38 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-kick.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-kick +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-linkedin.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..f2bfef2bc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-linkedin.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-linkedin +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-microsoft.md new file mode 100644 index 000000000..1eb97419c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-microsoft.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-microsoft +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..249e6bc04 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-notion.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-notion +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..70446b62f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-oidc +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-okta.md new file mode 100644 index 000000000..e98bb24bd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-okta +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..56afb4c0c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-paypal-sandbox.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-paypal-sandbox +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..2a84b3507 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-paypal.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-paypal +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..0e6ec3a8a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-podio.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-podio +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-resend.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..b28867c24 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-resend.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-resend +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..b4832b0c6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-salesforce.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-salesforce +``` 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 new file mode 100644 index 000000000..a2a3596d9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-server.md @@ -0,0 +1,5 @@ +```bash +appwrite project update-o-auth-2-server \ + --enabled false \ + --authorization-url https://example.com +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..039856987 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-slack.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-slack +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-spotify.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..3d9d8efe3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-spotify.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-spotify +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-stripe.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..cc317881e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-stripe.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-stripe +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..628e83e04 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tik-tok.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-tik-tok +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tradeshift-sandbox.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..cf13b34b5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tradeshift-sandbox.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-tradeshift-sandbox +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..1bf3e8896 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-tradeshift.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-tradeshift +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..cb4f970dc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-twitch.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-twitch +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-word-press.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..51db13835 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-word-press.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-word-press +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-yahoo.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..1cac8450a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-yahoo.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-yahoo +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-yandex.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..8d3670559 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-yandex.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-yandex +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-zoho.md new file mode 100644 index 000000000..54dd7d072 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-zoho.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-zoho +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-zoom.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..ee5bbf743 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-zoom.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-zoom +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2x.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..e1b988ddf --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2x.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2x +``` 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 new file mode 100644 index 000000000..37b9a564e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-password-dictionary-policy \ + --enabled false +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-password-history-policy.md b/examples/2.3.x/console-cli/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..4d5fa257a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-password-history-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-password-history-policy \ + --total 1 +``` 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 new file mode 100644 index 000000000..5adb1391a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-password-personal-data-policy \ + --enabled false +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-password-pwned-policy.md b/examples/2.3.x/console-cli/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..e16602019 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-password-pwned-policy.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-password-pwned-policy +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-password-strength-policy.md b/examples/2.3.x/console-cli/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..baa7ca9f5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-password-strength-policy.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-password-strength-policy +``` 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 new file mode 100644 index 000000000..ff486476e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-protocol.md @@ -0,0 +1,5 @@ +```bash +appwrite project update-protocol \ + --protocol-id rest \ + --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 new file mode 100644 index 000000000..778224817 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-service.md @@ -0,0 +1,5 @@ +```bash +appwrite project update-service \ + --service-id account \ + --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 new file mode 100644 index 000000000..67e666be0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-session-alert-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-session-alert-policy \ + --enabled false +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-session-duration-policy.md b/examples/2.3.x/console-cli/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..a454de14c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-session-duration-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-session-duration-policy \ + --duration 60 +``` 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 new file mode 100644 index 000000000..14a54b82b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-session-invalidation-policy \ + --enabled false +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-session-limit-policy.md b/examples/2.3.x/console-cli/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..b706a9eb9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-session-limit-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-session-limit-policy \ + --total 1 +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-smtp.md b/examples/2.3.x/console-cli/examples/project/update-smtp.md new file mode 100644 index 000000000..bb7cd389d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-smtp.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-smtp +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-user-limit-policy.md b/examples/2.3.x/console-cli/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..fcdecd602 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-user-limit-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-user-limit-policy \ + --total 0 +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-variable.md b/examples/2.3.x/console-cli/examples/project/update-variable.md new file mode 100644 index 000000000..d1b03cadf --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-variable.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-variable \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-web-platform.md b/examples/2.3.x/console-cli/examples/project/update-web-platform.md new file mode 100644 index 000000000..3b770fad3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-web-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project update-web-platform \ + --platform-id '' \ + --name '' \ + --hostname app.example.com +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-windows-platform.md b/examples/2.3.x/console-cli/examples/project/update-windows-platform.md new file mode 100644 index 000000000..b9853e947 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-windows-platform.md @@ -0,0 +1,6 @@ +```bash +appwrite project update-windows-platform \ + --platform-id '' \ + --name '' \ + --package-identifier-name '' +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/create-api-rule.md b/examples/2.3.x/console-cli/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..54c672f4e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/create-api-rule.md @@ -0,0 +1,4 @@ +```bash +appwrite proxy create-api-rule \ + --domain example.com +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/create-function-rule.md b/examples/2.3.x/console-cli/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..60e985d4a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/create-function-rule.md @@ -0,0 +1,5 @@ +```bash +appwrite proxy create-function-rule \ + --domain example.com \ + --function-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/create-invalidation.md b/examples/2.3.x/console-cli/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..a9c10e111 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/create-invalidation.md @@ -0,0 +1,5 @@ +```bash +appwrite proxy create-invalidation \ + --domain example.com \ + --type tag +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/create-redirect-rule.md b/examples/2.3.x/console-cli/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..f01b2a8a6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/create-redirect-rule.md @@ -0,0 +1,8 @@ +```bash +appwrite proxy create-redirect-rule \ + --domain example.com \ + --url https://example.com \ + --status-code 301 \ + --resource-id '' \ + --resource-type site +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/create-site-rule.md b/examples/2.3.x/console-cli/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..2f92f789d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/create-site-rule.md @@ -0,0 +1,5 @@ +```bash +appwrite proxy create-site-rule \ + --domain example.com \ + --site-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/delete-rule.md b/examples/2.3.x/console-cli/examples/proxy/delete-rule.md new file mode 100644 index 000000000..57ad3bfa2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/delete-rule.md @@ -0,0 +1,4 @@ +```bash +appwrite proxy delete-rule \ + --rule-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/get-rule.md b/examples/2.3.x/console-cli/examples/proxy/get-rule.md new file mode 100644 index 000000000..ec3a65fc5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/get-rule.md @@ -0,0 +1,4 @@ +```bash +appwrite proxy get-rule \ + --rule-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/list-rules.md b/examples/2.3.x/console-cli/examples/proxy/list-rules.md new file mode 100644 index 000000000..219fdfc76 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/list-rules.md @@ -0,0 +1,4 @@ +```bash +appwrite proxy list-rules \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/proxy/update-rule-status.md b/examples/2.3.x/console-cli/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..dfec60623 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/proxy/update-rule-status.md @@ -0,0 +1,4 @@ +```bash +appwrite proxy update-rule-status \ + --rule-id '' +``` 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 new file mode 100644 index 000000000..1a357aea2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/create-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite sites create-deployment \ + --site-id '' \ + --code 'path/to/file.png' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/console-cli/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..5bfaee5d8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite sites create-duplicate-deployment \ + --site-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/create-template-deployment.md b/examples/2.3.x/console-cli/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..85cf64bfe --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/create-template-deployment.md @@ -0,0 +1,9 @@ +```bash +appwrite sites create-template-deployment \ + --site-id '' \ + --repository '' \ + --owner '' \ + --root-directory '' \ + --type branch \ + --reference '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/create-variable.md b/examples/2.3.x/console-cli/examples/sites/create-variable.md new file mode 100644 index 000000000..96c315229 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/create-variable.md @@ -0,0 +1,7 @@ +```bash +appwrite sites create-variable \ + --site-id '' \ + --variable-id '' \ + --key '' \ + --value '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/create-vcs-deployment.md b/examples/2.3.x/console-cli/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..8e90c68a9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/create-vcs-deployment.md @@ -0,0 +1,6 @@ +```bash +appwrite sites create-vcs-deployment \ + --site-id '' \ + --type branch \ + --reference '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/create.md b/examples/2.3.x/console-cli/examples/sites/create.md new file mode 100644 index 000000000..b35ddb107 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/create.md @@ -0,0 +1,7 @@ +```bash +appwrite sites create \ + --site-id '' \ + --name '' \ + --framework analog \ + --build-runtime node-14.5 +``` diff --git a/examples/2.3.x/console-cli/examples/sites/delete-deployment.md b/examples/2.3.x/console-cli/examples/sites/delete-deployment.md new file mode 100644 index 000000000..0ce19d756 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/delete-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite sites delete-deployment \ + --site-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/delete-log.md b/examples/2.3.x/console-cli/examples/sites/delete-log.md new file mode 100644 index 000000000..4b169297a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/delete-log.md @@ -0,0 +1,5 @@ +```bash +appwrite sites delete-log \ + --site-id '' \ + --log-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/delete-variable.md b/examples/2.3.x/console-cli/examples/sites/delete-variable.md new file mode 100644 index 000000000..d732c6115 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/delete-variable.md @@ -0,0 +1,5 @@ +```bash +appwrite sites delete-variable \ + --site-id '' \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/delete.md b/examples/2.3.x/console-cli/examples/sites/delete.md new file mode 100644 index 000000000..0abffe51d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite sites delete \ + --site-id '' +``` 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 new file mode 100644 index 000000000..2a033d018 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/get-deployment-download.md @@ -0,0 +1,5 @@ +```bash +appwrite sites get-deployment-download \ + --site-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/get-deployment.md b/examples/2.3.x/console-cli/examples/sites/get-deployment.md new file mode 100644 index 000000000..ed21bff46 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/get-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite sites get-deployment \ + --site-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/get-log.md b/examples/2.3.x/console-cli/examples/sites/get-log.md new file mode 100644 index 000000000..d0fc1cc08 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/get-log.md @@ -0,0 +1,5 @@ +```bash +appwrite sites get-log \ + --site-id '' \ + --log-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/get-variable.md b/examples/2.3.x/console-cli/examples/sites/get-variable.md new file mode 100644 index 000000000..4f9c4cc90 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/get-variable.md @@ -0,0 +1,5 @@ +```bash +appwrite sites get-variable \ + --site-id '' \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/get.md b/examples/2.3.x/console-cli/examples/sites/get.md new file mode 100644 index 000000000..e800e72e2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/get.md @@ -0,0 +1,4 @@ +```bash +appwrite sites get \ + --site-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/list-deployments.md b/examples/2.3.x/console-cli/examples/sites/list-deployments.md new file mode 100644 index 000000000..7ff8a22fa --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/list-deployments.md @@ -0,0 +1,5 @@ +```bash +appwrite sites list-deployments \ + --site-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/sites/list-frameworks.md b/examples/2.3.x/console-cli/examples/sites/list-frameworks.md new file mode 100644 index 000000000..809b725f6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/list-frameworks.md @@ -0,0 +1,3 @@ +```bash +appwrite sites list-frameworks +``` diff --git a/examples/2.3.x/console-cli/examples/sites/list-logs.md b/examples/2.3.x/console-cli/examples/sites/list-logs.md new file mode 100644 index 000000000..9b060e155 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/list-logs.md @@ -0,0 +1,5 @@ +```bash +appwrite sites list-logs \ + --site-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/sites/list-specifications.md b/examples/2.3.x/console-cli/examples/sites/list-specifications.md new file mode 100644 index 000000000..6107240c3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/list-specifications.md @@ -0,0 +1,3 @@ +```bash +appwrite sites list-specifications +``` diff --git a/examples/2.3.x/console-cli/examples/sites/list-variables.md b/examples/2.3.x/console-cli/examples/sites/list-variables.md new file mode 100644 index 000000000..480cfcfd2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/list-variables.md @@ -0,0 +1,5 @@ +```bash +appwrite sites list-variables \ + --site-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/sites/list.md b/examples/2.3.x/console-cli/examples/sites/list.md new file mode 100644 index 000000000..025a917dd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/list.md @@ -0,0 +1,4 @@ +```bash +appwrite sites list \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/sites/update-deployment-status.md b/examples/2.3.x/console-cli/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..bf0a8d1a5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/update-deployment-status.md @@ -0,0 +1,5 @@ +```bash +appwrite sites update-deployment-status \ + --site-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/update-site-deployment.md b/examples/2.3.x/console-cli/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..396ff8b7f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/update-site-deployment.md @@ -0,0 +1,5 @@ +```bash +appwrite sites update-site-deployment \ + --site-id '' \ + --deployment-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/update-variable.md b/examples/2.3.x/console-cli/examples/sites/update-variable.md new file mode 100644 index 000000000..c667eca16 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/update-variable.md @@ -0,0 +1,5 @@ +```bash +appwrite sites update-variable \ + --site-id '' \ + --variable-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/sites/update.md b/examples/2.3.x/console-cli/examples/sites/update.md new file mode 100644 index 000000000..9f7a455b5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/sites/update.md @@ -0,0 +1,6 @@ +```bash +appwrite sites update \ + --site-id '' \ + --name '' \ + --framework analog +``` diff --git a/examples/2.3.x/console-cli/examples/storage/create-bucket.md b/examples/2.3.x/console-cli/examples/storage/create-bucket.md new file mode 100644 index 000000000..0baa69676 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/create-bucket.md @@ -0,0 +1,5 @@ +```bash +appwrite storage create-bucket \ + --bucket-id '' \ + --name '' +``` 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 new file mode 100644 index 000000000..c5b90a5c3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/create-file.md @@ -0,0 +1,6 @@ +```bash +appwrite storage create-file \ + --bucket-id '' \ + --file-id '' \ + --file 'path/to/file.png' +``` diff --git a/examples/2.3.x/console-cli/examples/storage/delete-bucket.md b/examples/2.3.x/console-cli/examples/storage/delete-bucket.md new file mode 100644 index 000000000..8c7b37152 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/delete-bucket.md @@ -0,0 +1,4 @@ +```bash +appwrite storage delete-bucket \ + --bucket-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/storage/delete-file.md b/examples/2.3.x/console-cli/examples/storage/delete-file.md new file mode 100644 index 000000000..637b5de3c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/delete-file.md @@ -0,0 +1,5 @@ +```bash +appwrite storage delete-file \ + --bucket-id '' \ + --file-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/storage/get-bucket.md b/examples/2.3.x/console-cli/examples/storage/get-bucket.md new file mode 100644 index 000000000..0faabb102 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/get-bucket.md @@ -0,0 +1,4 @@ +```bash +appwrite storage get-bucket \ + --bucket-id '' +``` 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 new file mode 100644 index 000000000..dd8880eab --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/get-file-download.md @@ -0,0 +1,5 @@ +```bash +appwrite storage get-file-download \ + --bucket-id '' \ + --file-id '' +``` 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 new file mode 100644 index 000000000..e088ab221 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/get-file-preview.md @@ -0,0 +1,5 @@ +```bash +appwrite storage get-file-preview \ + --bucket-id '' \ + --file-id '' +``` 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 new file mode 100644 index 000000000..92409c4aa --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/get-file-view.md @@ -0,0 +1,5 @@ +```bash +appwrite storage get-file-view \ + --bucket-id '' \ + --file-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/storage/get-file.md b/examples/2.3.x/console-cli/examples/storage/get-file.md new file mode 100644 index 000000000..f8271b5b4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/get-file.md @@ -0,0 +1,5 @@ +```bash +appwrite storage get-file \ + --bucket-id '' \ + --file-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/storage/list-buckets.md b/examples/2.3.x/console-cli/examples/storage/list-buckets.md new file mode 100644 index 000000000..3208c83d6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/list-buckets.md @@ -0,0 +1,4 @@ +```bash +appwrite storage list-buckets \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/storage/list-files.md b/examples/2.3.x/console-cli/examples/storage/list-files.md new file mode 100644 index 000000000..d6e297341 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/list-files.md @@ -0,0 +1,5 @@ +```bash +appwrite storage list-files \ + --bucket-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/storage/update-bucket.md b/examples/2.3.x/console-cli/examples/storage/update-bucket.md new file mode 100644 index 000000000..8c11b683f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/update-bucket.md @@ -0,0 +1,5 @@ +```bash +appwrite storage update-bucket \ + --bucket-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/storage/update-file.md b/examples/2.3.x/console-cli/examples/storage/update-file.md new file mode 100644 index 000000000..50cda08e3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/storage/update-file.md @@ -0,0 +1,5 @@ +```bash +appwrite storage update-file \ + --bucket-id '' \ + --file-id '' +``` 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 new file mode 100644 index 000000000..f1e9c85c5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-big-int-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..7ead222a6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-boolean-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-cutover.md b/examples/2.3.x/console-cli/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..465c45f50 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-cutover.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb create-cutover \ + --database-id '' \ + --migration-id '' +``` 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 new file mode 100644 index 000000000..da3632a4a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-datetime-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..5d2b7cb2a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-email-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-email-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..0b1bb126c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-enum-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb create-enum-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --elements "active" "inactive" \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-failover.md b/examples/2.3.x/console-cli/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..982a4eea3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-failover.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb create-failover \ + --database-id '' +``` 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 new file mode 100644 index 000000000..4021c25ee --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-float-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-float-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..e65d50ea7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-index.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb create-index \ + --database-id '' \ + --table-id '' \ + --key '' \ + --type key \ + --columns one two three +``` 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 new file mode 100644 index 000000000..b647af7e3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-integer-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-integer-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..9b05de2e1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-ip-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-ip-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..6f484b321 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-line-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-line-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..00655468e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-longtext-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..348b4c0d6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-mediumtext-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-migration.md b/examples/2.3.x/console-cli/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..aa0685329 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-migration.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb create-migration \ + --database-id '' \ + --specification s-1vcpu-1gb +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-operations.md b/examples/2.3.x/console-cli/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..9b4428e2d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb create-operations \ + --transaction-id '' +``` 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 new file mode 100644 index 000000000..7f0754ef0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-point-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-point-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..03bc4192c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-polygon-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..8ec22c10f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-relationship-column \ + --database-id '' \ + --table-id '' \ + --related-table-id '' \ + --type oneToOne +``` 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 new file mode 100644 index 000000000..c44e11505 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-row.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-row \ + --database-id '' \ + --table-id '' \ + --row-id '' \ + --data '{ "key": "value" }' +``` 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 new file mode 100644 index 000000000..6e02c78dc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-rows.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb create-rows \ + --database-id '' \ + --table-id '' \ + --rows one two three +``` 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 new file mode 100644 index 000000000..33c99a9df --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-string-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb create-string-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --size 1 \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-table.md b/examples/2.3.x/console-cli/examples/tablesdb/create-table.md new file mode 100644 index 000000000..7707bd1c1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-table.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb create-table \ + --database-id '' \ + --table-id '' \ + --name '' +``` 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 new file mode 100644 index 000000000..773c9c36e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-text-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-text-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-transaction.md b/examples/2.3.x/console-cli/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..149932ed0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-transaction.md @@ -0,0 +1,3 @@ +```bash +appwrite tablesdb create-transaction +``` 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 new file mode 100644 index 000000000..b01d7b965 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-url-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb create-url-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..4049c3956 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb create-varchar-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --size 1 \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create.md b/examples/2.3.x/console-cli/examples/tablesdb/create.md new file mode 100644 index 000000000..b096dd66d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/create.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb create \ + --database-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/console-cli/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..40a4df3ee --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb decrement-row-column \ + --database-id '' \ + --table-id '' \ + --row-id '' \ + --column '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/delete-column.md b/examples/2.3.x/console-cli/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..a98ca510b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/delete-column.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb delete-column \ + --database-id '' \ + --table-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/delete-index.md b/examples/2.3.x/console-cli/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..9e741898f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/delete-index.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb delete-index \ + --database-id '' \ + --table-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/delete-migration.md b/examples/2.3.x/console-cli/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..f3afa3846 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/delete-migration.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb delete-migration \ + --database-id '' \ + --migration-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/delete-row.md b/examples/2.3.x/console-cli/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..f5a8cefca --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/delete-row.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb delete-row \ + --database-id '' \ + --table-id '' \ + --row-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/delete-rows.md b/examples/2.3.x/console-cli/examples/tablesdb/delete-rows.md new file mode 100644 index 000000000..9f1f22c5b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/delete-rows.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb delete-rows \ + --database-id '' \ + --table-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/delete-table.md b/examples/2.3.x/console-cli/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..e0f265e22 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/delete-table.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb delete-table \ + --database-id '' \ + --table-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/delete-transaction.md b/examples/2.3.x/console-cli/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..94efd46ab --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/delete-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb delete-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/delete.md b/examples/2.3.x/console-cli/examples/tablesdb/delete.md new file mode 100644 index 000000000..39e8acfa7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb delete \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get-column.md b/examples/2.3.x/console-cli/examples/tablesdb/get-column.md new file mode 100644 index 000000000..09edc5371 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get-column.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb get-column \ + --database-id '' \ + --table-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get-index.md b/examples/2.3.x/console-cli/examples/tablesdb/get-index.md new file mode 100644 index 000000000..42b525ac7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get-index.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb get-index \ + --database-id '' \ + --table-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get-migration.md b/examples/2.3.x/console-cli/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..e922bb4d5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get-migration.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb get-migration \ + --database-id '' \ + --migration-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get-replicas.md b/examples/2.3.x/console-cli/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..1a0d22f99 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get-replicas.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb get-replicas \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get-row.md b/examples/2.3.x/console-cli/examples/tablesdb/get-row.md new file mode 100644 index 000000000..c5968fed8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get-row.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb get-row \ + --database-id '' \ + --table-id '' \ + --row-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get-status.md b/examples/2.3.x/console-cli/examples/tablesdb/get-status.md new file mode 100644 index 000000000..a796f8da1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get-status.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb get-status \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get-table.md b/examples/2.3.x/console-cli/examples/tablesdb/get-table.md new file mode 100644 index 000000000..e2a41bc66 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get-table.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb get-table \ + --database-id '' \ + --table-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get-transaction.md b/examples/2.3.x/console-cli/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..5d378a5d1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb get-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/get.md b/examples/2.3.x/console-cli/examples/tablesdb/get.md new file mode 100644 index 000000000..ccf78a8d2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/get.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb get \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/increment-row-column.md b/examples/2.3.x/console-cli/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..1d0cd9288 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/increment-row-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb increment-row-column \ + --database-id '' \ + --table-id '' \ + --row-id '' \ + --column '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list-columns.md b/examples/2.3.x/console-cli/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..7fb2fdce8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list-columns.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb list-columns \ + --database-id '' \ + --table-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list-indexes.md b/examples/2.3.x/console-cli/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..fc6e57c75 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list-indexes.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb list-indexes \ + --database-id '' \ + --table-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list-migrations.md b/examples/2.3.x/console-cli/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..4f77b811d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list-migrations.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb list-migrations \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list-operations.md b/examples/2.3.x/console-cli/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..f68eb584f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb list-operations \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list-rows.md b/examples/2.3.x/console-cli/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..df1493de5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list-rows.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb list-rows \ + --database-id '' \ + --table-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list-specifications.md b/examples/2.3.x/console-cli/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..70ed43945 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list-specifications.md @@ -0,0 +1,3 @@ +```bash +appwrite tablesdb list-specifications +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list-tables.md b/examples/2.3.x/console-cli/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..1381c2558 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list-tables.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb list-tables \ + --database-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list-transactions.md b/examples/2.3.x/console-cli/examples/tablesdb/list-transactions.md new file mode 100644 index 000000000..58802bf7b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list-transactions.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb list-transactions \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/list.md b/examples/2.3.x/console-cli/examples/tablesdb/list.md new file mode 100644 index 000000000..97db8a14b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/list.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb list \ + --limit 25 +``` 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 new file mode 100644 index 000000000..4166589c6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-big-int-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..3f060bf71 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-boolean-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..27087b030 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-datetime-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..6068c567c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-email-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-email-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..b1acb10b7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-enum-column.md @@ -0,0 +1,9 @@ +```bash +appwrite tablesdb update-enum-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --elements "active" "inactive" \ + --required false \ + --default 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 new file mode 100644 index 000000000..a6ca8d8eb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-float-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-float-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..ee9ca7f8f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-integer-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-integer-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..4cf98de9c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-ip-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-ip-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..e4bb8acbf --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-line-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb update-line-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..c65db39b3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-longtext-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default '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 new file mode 100644 index 000000000..da61b0d5e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-mediumtext-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default '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 new file mode 100644 index 000000000..c1608cc4a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-point-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb update-point-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --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 new file mode 100644 index 000000000..30ac311a1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,7 @@ +```bash +appwrite tablesdb update-polygon-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..057fe25c4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb update-relationship-column \ + --database-id '' \ + --table-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-row.md b/examples/2.3.x/console-cli/examples/tablesdb/update-row.md new file mode 100644 index 000000000..0fd5d107c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-row.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb update-row \ + --database-id '' \ + --table-id '' \ + --row-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-rows.md b/examples/2.3.x/console-cli/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..2e18af7e7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-rows.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb update-rows \ + --database-id '' \ + --table-id '' \ + --limit 25 +``` 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 new file mode 100644 index 000000000..04a5c67b1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-string-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-string-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 'Hello World' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-table.md b/examples/2.3.x/console-cli/examples/tablesdb/update-table.md new file mode 100644 index 000000000..930ef0662 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-table.md @@ -0,0 +1,5 @@ +```bash +appwrite tablesdb update-table \ + --database-id '' \ + --table-id '' +``` 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 new file mode 100644 index 000000000..075d5b346 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-text-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-text-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 'Hello World' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-transaction.md b/examples/2.3.x/console-cli/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..74a235453 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb update-transaction \ + --transaction-id '' +``` 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 new file mode 100644 index 000000000..a25b355d9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-url-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-url-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 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 new file mode 100644 index 000000000..28667f42e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,8 @@ +```bash +appwrite tablesdb update-varchar-column \ + --database-id '' \ + --table-id '' \ + --key '' \ + --required false \ + --default 'Hello World' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update.md b/examples/2.3.x/console-cli/examples/tablesdb/update.md new file mode 100644 index 000000000..e7364a75b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/update.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb update \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/upsert-row.md b/examples/2.3.x/console-cli/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..37e8aae96 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/upsert-row.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb upsert-row \ + --database-id '' \ + --table-id '' \ + --row-id '' +``` 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 new file mode 100644 index 000000000..2a435ca54 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tablesdb/upsert-rows.md @@ -0,0 +1,6 @@ +```bash +appwrite tablesdb upsert-rows \ + --database-id '' \ + --table-id '' \ + --rows one two three +``` diff --git a/examples/2.3.x/console-cli/examples/teams/create-installation.md b/examples/2.3.x/console-cli/examples/teams/create-installation.md new file mode 100644 index 000000000..c7f4a27d0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/create-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite teams create-installation \ + --team-id '' \ + --app-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/create-membership.md b/examples/2.3.x/console-cli/examples/teams/create-membership.md new file mode 100644 index 000000000..1105702d5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/create-membership.md @@ -0,0 +1,5 @@ +```bash +appwrite teams create-membership \ + --team-id '' \ + --roles one two three +``` diff --git a/examples/2.3.x/console-cli/examples/teams/create.md b/examples/2.3.x/console-cli/examples/teams/create.md new file mode 100644 index 000000000..c89888c11 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/create.md @@ -0,0 +1,5 @@ +```bash +appwrite teams create \ + --team-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/delete-installation.md b/examples/2.3.x/console-cli/examples/teams/delete-installation.md new file mode 100644 index 000000000..eb4a5b538 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/delete-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite teams delete-installation \ + --team-id '' \ + --installation-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/delete-membership.md b/examples/2.3.x/console-cli/examples/teams/delete-membership.md new file mode 100644 index 000000000..2d763ec35 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/delete-membership.md @@ -0,0 +1,5 @@ +```bash +appwrite teams delete-membership \ + --team-id '' \ + --membership-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/delete.md b/examples/2.3.x/console-cli/examples/teams/delete.md new file mode 100644 index 000000000..22e23d6f9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite teams delete \ + --team-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/get-installation.md b/examples/2.3.x/console-cli/examples/teams/get-installation.md new file mode 100644 index 000000000..eff4043a6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/get-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite teams get-installation \ + --team-id '' \ + --installation-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/get-membership.md b/examples/2.3.x/console-cli/examples/teams/get-membership.md new file mode 100644 index 000000000..407d83835 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/get-membership.md @@ -0,0 +1,5 @@ +```bash +appwrite teams get-membership \ + --team-id '' \ + --membership-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/get-prefs.md b/examples/2.3.x/console-cli/examples/teams/get-prefs.md new file mode 100644 index 000000000..b40a1bc2d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/get-prefs.md @@ -0,0 +1,4 @@ +```bash +appwrite teams get-prefs \ + --team-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/get.md b/examples/2.3.x/console-cli/examples/teams/get.md new file mode 100644 index 000000000..f76d49fb1 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/get.md @@ -0,0 +1,4 @@ +```bash +appwrite teams get \ + --team-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/list-installations.md b/examples/2.3.x/console-cli/examples/teams/list-installations.md new file mode 100644 index 000000000..e36046f6e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/list-installations.md @@ -0,0 +1,5 @@ +```bash +appwrite teams list-installations \ + --team-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/teams/list-memberships.md b/examples/2.3.x/console-cli/examples/teams/list-memberships.md new file mode 100644 index 000000000..d0d76584a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/list-memberships.md @@ -0,0 +1,5 @@ +```bash +appwrite teams list-memberships \ + --team-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/teams/list.md b/examples/2.3.x/console-cli/examples/teams/list.md new file mode 100644 index 000000000..8a783324a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/list.md @@ -0,0 +1,4 @@ +```bash +appwrite teams list \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/teams/update-installation.md b/examples/2.3.x/console-cli/examples/teams/update-installation.md new file mode 100644 index 000000000..56576422a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/update-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite teams update-installation \ + --team-id '' \ + --installation-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/teams/update-membership-status.md b/examples/2.3.x/console-cli/examples/teams/update-membership-status.md new file mode 100644 index 000000000..6cfbe941e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/update-membership-status.md @@ -0,0 +1,7 @@ +```bash +appwrite teams update-membership-status \ + --team-id '' \ + --membership-id '' \ + --user-id '' \ + --secret '' +``` 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 new file mode 100644 index 000000000..b885d3fd4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/update-membership.md @@ -0,0 +1,6 @@ +```bash +appwrite teams update-membership \ + --team-id '' \ + --membership-id '' \ + --roles one two three +``` diff --git a/examples/2.3.x/console-cli/examples/teams/update-name.md b/examples/2.3.x/console-cli/examples/teams/update-name.md new file mode 100644 index 000000000..4c2587643 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/update-name.md @@ -0,0 +1,5 @@ +```bash +appwrite teams update-name \ + --team-id '' \ + --name '' +``` 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 new file mode 100644 index 000000000..dd9b45cba --- /dev/null +++ b/examples/2.3.x/console-cli/examples/teams/update-prefs.md @@ -0,0 +1,5 @@ +```bash +appwrite teams update-prefs \ + --team-id '' \ + --prefs '{ "key": "value" }' +``` diff --git a/examples/2.3.x/console-cli/examples/tokens/create-file-token.md b/examples/2.3.x/console-cli/examples/tokens/create-file-token.md new file mode 100644 index 000000000..a2278ca63 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tokens/create-file-token.md @@ -0,0 +1,5 @@ +```bash +appwrite tokens create-file-token \ + --bucket-id '' \ + --file-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tokens/delete.md b/examples/2.3.x/console-cli/examples/tokens/delete.md new file mode 100644 index 000000000..368543d5d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tokens/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite tokens delete \ + --token-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tokens/get.md b/examples/2.3.x/console-cli/examples/tokens/get.md new file mode 100644 index 000000000..5d431d8e4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tokens/get.md @@ -0,0 +1,4 @@ +```bash +appwrite tokens get \ + --token-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/tokens/list.md b/examples/2.3.x/console-cli/examples/tokens/list.md new file mode 100644 index 000000000..ac160c95f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tokens/list.md @@ -0,0 +1,6 @@ +```bash +appwrite tokens list \ + --bucket-id '' \ + --file-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/tokens/update.md b/examples/2.3.x/console-cli/examples/tokens/update.md new file mode 100644 index 000000000..1da862381 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/tokens/update.md @@ -0,0 +1,4 @@ +```bash +appwrite tokens update \ + --token-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-argon-2-user.md b/examples/2.3.x/console-cli/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..a1af340f8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-argon-2-user.md @@ -0,0 +1,6 @@ +```bash +appwrite users create-argon-2-user \ + --user-id '' \ + --email email@example.com \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-bcrypt-user.md b/examples/2.3.x/console-cli/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..1ef7456ae --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-bcrypt-user.md @@ -0,0 +1,6 @@ +```bash +appwrite users create-bcrypt-user \ + --user-id '' \ + --email email@example.com \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-jwt.md b/examples/2.3.x/console-cli/examples/users/create-jwt.md new file mode 100644 index 000000000..13c8d8d40 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-jwt.md @@ -0,0 +1,4 @@ +```bash +appwrite users create-jwt \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-md-5-user.md b/examples/2.3.x/console-cli/examples/users/create-md-5-user.md new file mode 100644 index 000000000..3d475e336 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-md-5-user.md @@ -0,0 +1,6 @@ +```bash +appwrite users create-md-5-user \ + --user-id '' \ + --email email@example.com \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/console-cli/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..387f7f432 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,4 @@ +```bash +appwrite users create-mfa-recovery-codes \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-ph-pass-user.md b/examples/2.3.x/console-cli/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..89ce92e56 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-ph-pass-user.md @@ -0,0 +1,6 @@ +```bash +appwrite users create-ph-pass-user \ + --user-id '' \ + --email email@example.com \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/console-cli/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..820bda8c3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,9 @@ +```bash +appwrite users create-scrypt-modified-user \ + --user-id '' \ + --email email@example.com \ + --password password \ + --password-salt '' \ + --password-salt-separator '' \ + --password-signer-key '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-scrypt-user.md b/examples/2.3.x/console-cli/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..5a06135e4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-scrypt-user.md @@ -0,0 +1,11 @@ +```bash +appwrite users create-scrypt-user \ + --user-id '' \ + --email email@example.com \ + --password password \ + --password-salt '' \ + --password-cpu 8 \ + --password-memory 65536 \ + --password-parallel 1 \ + --password-length 64 +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-session.md b/examples/2.3.x/console-cli/examples/users/create-session.md new file mode 100644 index 000000000..f9a4f2315 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-session.md @@ -0,0 +1,4 @@ +```bash +appwrite users create-session \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-sha-user.md b/examples/2.3.x/console-cli/examples/users/create-sha-user.md new file mode 100644 index 000000000..a7251a7e9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-sha-user.md @@ -0,0 +1,6 @@ +```bash +appwrite users create-sha-user \ + --user-id '' \ + --email email@example.com \ + --password password +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-target.md b/examples/2.3.x/console-cli/examples/users/create-target.md new file mode 100644 index 000000000..6f7a1eac9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-target.md @@ -0,0 +1,7 @@ +```bash +appwrite users create-target \ + --user-id '' \ + --target-id '' \ + --provider-type email \ + --identifier '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/create-token.md b/examples/2.3.x/console-cli/examples/users/create-token.md new file mode 100644 index 000000000..1c3ed3b97 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create-token.md @@ -0,0 +1,4 @@ +```bash +appwrite users create-token \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/create.md b/examples/2.3.x/console-cli/examples/users/create.md new file mode 100644 index 000000000..54e253253 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/create.md @@ -0,0 +1,4 @@ +```bash +appwrite users create \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/delete-identity.md b/examples/2.3.x/console-cli/examples/users/delete-identity.md new file mode 100644 index 000000000..e87bde4d2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/delete-identity.md @@ -0,0 +1,4 @@ +```bash +appwrite users delete-identity \ + --identity-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/console-cli/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..b3e818345 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,5 @@ +```bash +appwrite users delete-mfa-authenticator \ + --user-id '' \ + --type totp +``` diff --git a/examples/2.3.x/console-cli/examples/users/delete-session.md b/examples/2.3.x/console-cli/examples/users/delete-session.md new file mode 100644 index 000000000..d7050f693 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/delete-session.md @@ -0,0 +1,5 @@ +```bash +appwrite users delete-session \ + --user-id '' \ + --session-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/delete-sessions.md b/examples/2.3.x/console-cli/examples/users/delete-sessions.md new file mode 100644 index 000000000..70d2db43a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/delete-sessions.md @@ -0,0 +1,4 @@ +```bash +appwrite users delete-sessions \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/delete-target.md b/examples/2.3.x/console-cli/examples/users/delete-target.md new file mode 100644 index 000000000..9c1a74d36 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/delete-target.md @@ -0,0 +1,5 @@ +```bash +appwrite users delete-target \ + --user-id '' \ + --target-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/delete.md b/examples/2.3.x/console-cli/examples/users/delete.md new file mode 100644 index 000000000..e2f4ac223 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite users delete \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/get-mfa-challenge.md b/examples/2.3.x/console-cli/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..5b75c59a9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/get-mfa-challenge.md @@ -0,0 +1,5 @@ +```bash +appwrite users get-mfa-challenge \ + --user-id '' \ + --challenge-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/console-cli/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..35ad080ba --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,4 @@ +```bash +appwrite users get-mfa-recovery-codes \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/get-prefs.md b/examples/2.3.x/console-cli/examples/users/get-prefs.md new file mode 100644 index 000000000..dd4f7fb09 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/get-prefs.md @@ -0,0 +1,4 @@ +```bash +appwrite users get-prefs \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/get-target.md b/examples/2.3.x/console-cli/examples/users/get-target.md new file mode 100644 index 000000000..0120f25ee --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/get-target.md @@ -0,0 +1,5 @@ +```bash +appwrite users get-target \ + --user-id '' \ + --target-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/get.md b/examples/2.3.x/console-cli/examples/users/get.md new file mode 100644 index 000000000..50a5c748e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/get.md @@ -0,0 +1,4 @@ +```bash +appwrite users get \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/list-identities.md b/examples/2.3.x/console-cli/examples/users/list-identities.md new file mode 100644 index 000000000..49032aa1b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/list-identities.md @@ -0,0 +1,4 @@ +```bash +appwrite users list-identities \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/users/list-memberships.md b/examples/2.3.x/console-cli/examples/users/list-memberships.md new file mode 100644 index 000000000..12ee4aaf2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/list-memberships.md @@ -0,0 +1,5 @@ +```bash +appwrite users list-memberships \ + --user-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/users/list-mfa-factors.md b/examples/2.3.x/console-cli/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..2e03ae190 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/list-mfa-factors.md @@ -0,0 +1,4 @@ +```bash +appwrite users list-mfa-factors \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/list-sessions.md b/examples/2.3.x/console-cli/examples/users/list-sessions.md new file mode 100644 index 000000000..edfe8c314 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/list-sessions.md @@ -0,0 +1,4 @@ +```bash +appwrite users list-sessions \ + --user-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/list-targets.md b/examples/2.3.x/console-cli/examples/users/list-targets.md new file mode 100644 index 000000000..257667b7e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/list-targets.md @@ -0,0 +1,5 @@ +```bash +appwrite users list-targets \ + --user-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/users/list.md b/examples/2.3.x/console-cli/examples/users/list.md new file mode 100644 index 000000000..7d1e4bc2e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/list.md @@ -0,0 +1,4 @@ +```bash +appwrite users list \ + --limit 25 +``` 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 new file mode 100644 index 000000000..68a53d9ec --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-email-verification.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-email-verification \ + --user-id '' \ + --email-verification false +``` diff --git a/examples/2.3.x/console-cli/examples/users/update-email.md b/examples/2.3.x/console-cli/examples/users/update-email.md new file mode 100644 index 000000000..40d38ae73 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-email.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-email \ + --user-id '' \ + --email email@example.com +``` 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 new file mode 100644 index 000000000..1669722ab --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-impersonator.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-impersonator \ + --user-id '' \ + --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 new file mode 100644 index 000000000..68f7fc081 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-labels.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-labels \ + --user-id '' \ + --labels one two three +``` diff --git a/examples/2.3.x/console-cli/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/console-cli/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..c3f7c72a8 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,4 @@ +```bash +appwrite users update-mfa-recovery-codes \ + --user-id '' +``` 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 new file mode 100644 index 000000000..68c09a524 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-mfa.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-mfa \ + --user-id '' \ + --mfa false +``` diff --git a/examples/2.3.x/console-cli/examples/users/update-name.md b/examples/2.3.x/console-cli/examples/users/update-name.md new file mode 100644 index 000000000..fc6be3c42 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-name.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-name \ + --user-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/users/update-password.md b/examples/2.3.x/console-cli/examples/users/update-password.md new file mode 100644 index 000000000..df9d36405 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-password.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-password \ + --user-id '' \ + --password password +``` 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 new file mode 100644 index 000000000..c161f06fd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-phone-verification.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-phone-verification \ + --user-id '' \ + --phone-verification false +``` diff --git a/examples/2.3.x/console-cli/examples/users/update-phone.md b/examples/2.3.x/console-cli/examples/users/update-phone.md new file mode 100644 index 000000000..5392a9696 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-phone.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-phone \ + --user-id '' \ + --number +12065550100 +``` 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 new file mode 100644 index 000000000..b7942f73f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-prefs.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-prefs \ + --user-id '' \ + --prefs '{ "key": "value" }' +``` 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 new file mode 100644 index 000000000..5312d0c71 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-status.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-status \ + --user-id '' \ + --status false +``` diff --git a/examples/2.3.x/console-cli/examples/users/update-target.md b/examples/2.3.x/console-cli/examples/users/update-target.md new file mode 100644 index 000000000..5eeb2b028 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/users/update-target.md @@ -0,0 +1,5 @@ +```bash +appwrite users update-target \ + --user-id '' \ + --target-id '' +``` 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 new file mode 100644 index 000000000..c03fd786c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-collection.md @@ -0,0 +1,7 @@ +```bash +appwrite vectorsdb create-collection \ + --database-id '' \ + --collection-id '' \ + --name '' \ + --dimension 1 +``` 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 new file mode 100644 index 000000000..4fdd19bd7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-document.md @@ -0,0 +1,7 @@ +```bash +appwrite vectorsdb create-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' \ + --data '{ "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 new file mode 100644 index 000000000..a47c7dc0b --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb create-documents \ + --database-id '' \ + --collection-id '' \ + --documents one two three +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create-failover.md b/examples/2.3.x/console-cli/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..109a84b03 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-failover.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb create-failover \ + --database-id '' +``` 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 new file mode 100644 index 000000000..98d47f7de --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-index.md @@ -0,0 +1,8 @@ +```bash +appwrite vectorsdb create-index \ + --database-id '' \ + --collection-id '' \ + --key '' \ + --type hnsw_euclidean \ + --attributes one two three +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create-operations.md b/examples/2.3.x/console-cli/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..6ce4e7c22 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb create-operations \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create-query.md b/examples/2.3.x/console-cli/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..582a16dcd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-query.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb create-query \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create-transaction.md b/examples/2.3.x/console-cli/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..490406a3f --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-transaction.md @@ -0,0 +1,3 @@ +```bash +appwrite vectorsdb create-transaction +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create.md b/examples/2.3.x/console-cli/examples/vectorsdb/create.md new file mode 100644 index 000000000..a863caa15 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create.md @@ -0,0 +1,5 @@ +```bash +appwrite vectorsdb create \ + --database-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/delete-collection.md b/examples/2.3.x/console-cli/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..9f123c9d5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/delete-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite vectorsdb delete-collection \ + --database-id '' \ + --collection-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/delete-document.md b/examples/2.3.x/console-cli/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..78029bce2 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/delete-document.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb delete-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/delete-documents.md b/examples/2.3.x/console-cli/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..b9a531b73 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/delete-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb delete-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/delete-index.md b/examples/2.3.x/console-cli/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..ce3f8a91c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/delete-index.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb delete-index \ + --database-id '' \ + --collection-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/console-cli/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..59062aef5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb delete-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/delete.md b/examples/2.3.x/console-cli/examples/vectorsdb/delete.md new file mode 100644 index 000000000..d681a332c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb delete \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/get-collection.md b/examples/2.3.x/console-cli/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..0759bb8c5 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/get-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite vectorsdb get-collection \ + --database-id '' \ + --collection-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/get-document.md b/examples/2.3.x/console-cli/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..17571f5cd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/get-document.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb get-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/get-index.md b/examples/2.3.x/console-cli/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..9444017b9 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/get-index.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb get-index \ + --database-id '' \ + --collection-id '' \ + --key '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/get-replicas.md b/examples/2.3.x/console-cli/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..5e92f3c87 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/get-replicas.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb get-replicas \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/get-status.md b/examples/2.3.x/console-cli/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..cb997703c --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/get-status.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb get-status \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/get-transaction.md b/examples/2.3.x/console-cli/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..ca23c4943 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/get-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb get-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/get.md b/examples/2.3.x/console-cli/examples/vectorsdb/get.md new file mode 100644 index 000000000..2faaf41a7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/get.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb get \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/list-collections.md b/examples/2.3.x/console-cli/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..13cae17fd --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/list-collections.md @@ -0,0 +1,5 @@ +```bash +appwrite vectorsdb list-collections \ + --database-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/list-documents.md b/examples/2.3.x/console-cli/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..3cf9203cc --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/list-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb list-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/list-indexes.md b/examples/2.3.x/console-cli/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..cec349c74 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/list-indexes.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb list-indexes \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/list-operations.md b/examples/2.3.x/console-cli/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..8bdad3302 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/list-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb list-operations \ + --database-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/list-specifications.md b/examples/2.3.x/console-cli/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..7cceb489a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/list-specifications.md @@ -0,0 +1,3 @@ +```bash +appwrite vectorsdb list-specifications +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/list-transactions.md b/examples/2.3.x/console-cli/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..526e7a149 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/list-transactions.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb list-transactions \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/list.md b/examples/2.3.x/console-cli/examples/vectorsdb/list.md new file mode 100644 index 000000000..4168e0dd6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/list.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb list \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/update-collection.md b/examples/2.3.x/console-cli/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..4d962a905 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/update-collection.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb update-collection \ + --database-id '' \ + --collection-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/update-document.md b/examples/2.3.x/console-cli/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..ae1856c10 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/update-document.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb update-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/update-documents.md b/examples/2.3.x/console-cli/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..90eebc50e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/update-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb update-documents \ + --database-id '' \ + --collection-id '' \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/update-transaction.md b/examples/2.3.x/console-cli/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..cfcb79f80 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/update-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite vectorsdb update-transaction \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/update.md b/examples/2.3.x/console-cli/examples/vectorsdb/update.md new file mode 100644 index 000000000..4ba16bd63 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/update.md @@ -0,0 +1,5 @@ +```bash +appwrite vectorsdb update \ + --database-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/upsert-document.md b/examples/2.3.x/console-cli/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..74ca86e14 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/upsert-document.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb upsert-document \ + --database-id '' \ + --collection-id '' \ + --document-id '' +``` 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 new file mode 100644 index 000000000..01ca49d71 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectorsdb upsert-documents \ + --database-id '' \ + --collection-id '' \ + --documents one two three +``` diff --git a/examples/2.3.x/console-cli/examples/webhooks/create.md b/examples/2.3.x/console-cli/examples/webhooks/create.md new file mode 100644 index 000000000..5683ae0e3 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/webhooks/create.md @@ -0,0 +1,7 @@ +```bash +appwrite webhooks create \ + --webhook-id '' \ + --url https://example.com/webhook \ + --name '' \ + --events one two three +``` diff --git a/examples/2.3.x/console-cli/examples/webhooks/delete.md b/examples/2.3.x/console-cli/examples/webhooks/delete.md new file mode 100644 index 000000000..5c7707ab7 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/webhooks/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite webhooks delete \ + --webhook-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/webhooks/get.md b/examples/2.3.x/console-cli/examples/webhooks/get.md new file mode 100644 index 000000000..135e6b512 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/webhooks/get.md @@ -0,0 +1,4 @@ +```bash +appwrite webhooks get \ + --webhook-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/webhooks/list.md b/examples/2.3.x/console-cli/examples/webhooks/list.md new file mode 100644 index 000000000..bbf2f8ac0 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/webhooks/list.md @@ -0,0 +1,4 @@ +```bash +appwrite webhooks list \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/webhooks/update-secret.md b/examples/2.3.x/console-cli/examples/webhooks/update-secret.md new file mode 100644 index 000000000..f42a4eba4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/webhooks/update-secret.md @@ -0,0 +1,4 @@ +```bash +appwrite webhooks update-secret \ + --webhook-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/webhooks/update.md b/examples/2.3.x/console-cli/examples/webhooks/update.md new file mode 100644 index 000000000..5a62554f4 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/webhooks/update.md @@ -0,0 +1,7 @@ +```bash +appwrite webhooks update \ + --webhook-id '' \ + --name '' \ + --url https://example.com/webhook \ + --events one two three +``` diff --git a/examples/2.3.x/console-python/examples/account/create-anonymous-session.md b/examples/2.3.x/console-python/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..e6d4ba9f5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-anonymous-session.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.create_anonymous_session() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-billing-address.md b/examples/2.3.x/console-python/examples/account/create-billing-address.md new file mode 100644 index 000000000..627fea022 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-billing-address.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import BillingAddress + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: BillingAddress = account.create_billing_address( + country = '', + city = '', + street_address = '', + address_line2 = '', # optional + state = '', # optional + postal_code = '' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..e40405df1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-email-password-session.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.create_email_password_session( + email = 'email@example.com', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-email-token.md b/examples/2.3.x/console-python/examples/account/create-email-token.md new file mode 100644 index 000000000..45e0d342a --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-email-token.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_email_token( + user_id = '', + email = 'email@example.com', + phrase = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-email-verification-otp.md b/examples/2.3.x/console-python/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..fae8cd163 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-email-verification-otp.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_email_verification_otp( + phrase = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-email-verification.md b/examples/2.3.x/console-python/examples/account/create-email-verification.md new file mode 100644 index 000000000..c1af6b2c8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-email-verification.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_email_verification( + url = 'https://example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-id-token-session.md b/examples/2.3.x/console-python/examples/account/create-id-token-session.md new file mode 100644 index 000000000..58ee234b9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-id-token-session.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session +from appwrite_console.enums import IdTokenProvider + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.create_id_token_session( + provider = IdTokenProvider.APPLE, + id_token = '', + nonce = '', # optional + access_token = '', # optional + access_token_expiry = 0, # optional + name = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-jwt.md b/examples/2.3.x/console-python/examples/account/create-jwt.md new file mode 100644 index 000000000..3955d69cd --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-jwt.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Jwt + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Jwt = account.create_jwt( + duration = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-key.md b/examples/2.3.x/console-python/examples/account/create-key.md new file mode 100644 index 000000000..e5c33220e --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-key.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Key +from appwrite_console.enums import AccountKeyScopes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Key = account.create_key( + name = '', + scopes = [AccountKeyScopes.ACCOUNT], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-magic-url-token.md b/examples/2.3.x/console-python/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..a846caa35 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-magic-url-token.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_magic_url_token( + user_id = '', + email = 'email@example.com', + url = 'https://example.com', # optional + phrase = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-mfa-authenticator.md b/examples/2.3.x/console-python/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..62a56340b --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-mfa-authenticator.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import MfaType +from appwrite_console.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: MfaType = account.create_mfa_authenticator( + type = AuthenticatorType.TOTP +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-mfa-challenge.md b/examples/2.3.x/console-python/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..ce040132f --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-mfa-challenge.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import MfaChallenge +from appwrite_console.enums import AuthenticationFactor + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: MfaChallenge = account.create_mfa_challenge( + factor = AuthenticationFactor.EMAIL +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/console-python/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..70659bf86 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import MfaRecoveryCodes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: MfaRecoveryCodes = account.create_mfa_recovery_codes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-o-auth-2-session.md b/examples/2.3.x/console-python/examples/account/create-o-auth-2-session.md new file mode 100644 index 000000000..715581e93 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-o-auth-2-session.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.enums import OAuthProvider + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: str = account.create_o_auth2_session( + provider = OAuthProvider.AMAZON, + success = 'https://example.com', # optional + failure = 'https://example.com', # optional + scopes = [] # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-o-auth-2-token.md b/examples/2.3.x/console-python/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..8b171cdc2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-o-auth-2-token.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.enums import OAuthProvider + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: str = account.create_o_auth2_token( + provider = OAuthProvider.AMAZON, + success = 'https://example.com', # optional + failure = 'https://example.com', # optional + scopes = [] # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-payment-method.md b/examples/2.3.x/console-python/examples/account/create-payment-method.md new file mode 100644 index 000000000..404709a38 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-payment-method.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import PaymentMethod + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: PaymentMethod = account.create_payment_method() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-phone-token.md b/examples/2.3.x/console-python/examples/account/create-phone-token.md new file mode 100644 index 000000000..09ddf97fb --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-phone-token.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_phone_token( + user_id = '', + phone = '+12065550100' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-phone-verification.md b/examples/2.3.x/console-python/examples/account/create-phone-verification.md new file mode 100644 index 000000000..74151c430 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-phone-verification.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_phone_verification() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-push-target.md b/examples/2.3.x/console-python/examples/account/create-push-target.md new file mode 100644 index 000000000..50b667066 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-push-target.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Target + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Target = account.create_push_target( + target_id = '', + identifier = '', + provider_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-recovery-otp.md b/examples/2.3.x/console-python/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..a46fda685 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-recovery-otp.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_recovery_otp( + email = 'email@example.com', + phrase = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-recovery.md b/examples/2.3.x/console-python/examples/account/create-recovery.md new file mode 100644 index 000000000..eec660c87 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-recovery.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_recovery( + email = 'email@example.com', + url = 'https://example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-session.md b/examples/2.3.x/console-python/examples/account/create-session.md new file mode 100644 index 000000000..d67eef44a --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-session.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.create_session( + user_id = '', + secret = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create-verification.md b/examples/2.3.x/console-python/examples/account/create-verification.md new file mode 100644 index 000000000..0dd8d560c --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create-verification.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.create_verification( + url = 'https://example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/create.md b/examples/2.3.x/console-python/examples/account/create.md new file mode 100644 index 000000000..55286af8d --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/create.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.create( + user_id = '', + email = 'email@example.com', + password = 'password', + name = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-billing-address.md b/examples/2.3.x/console-python/examples/account/delete-billing-address.md new file mode 100644 index 000000000..99d6c12e5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-billing-address.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_billing_address( + billing_address_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-consent-token.md b/examples/2.3.x/console-python/examples/account/delete-consent-token.md new file mode 100644 index 000000000..6088359fd --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-consent-token.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_consent_token( + consent_id = '', + token_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-consent.md b/examples/2.3.x/console-python/examples/account/delete-consent.md new file mode 100644 index 000000000..bbad92a9c --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-consent.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_consent( + consent_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-identity.md b/examples/2.3.x/console-python/examples/account/delete-identity.md new file mode 100644 index 000000000..d8ced4343 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_identity( + identity_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-key.md b/examples/2.3.x/console-python/examples/account/delete-key.md new file mode 100644 index 000000000..47588c061 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-key.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_key( + key_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/console-python/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..d05d27a51 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_mfa_authenticator( + type = AuthenticatorType.TOTP +) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-payment-method.md b/examples/2.3.x/console-python/examples/account/delete-payment-method.md new file mode 100644 index 000000000..1f9180bc8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-payment-method.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_payment_method( + payment_method_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-push-target.md b/examples/2.3.x/console-python/examples/account/delete-push-target.md new file mode 100644 index 000000000..9c86cd2c2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-push-target.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_push_target( + target_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/account/delete-session.md b/examples/2.3.x/console-python/examples/account/delete-session.md new file mode 100644 index 000000000..fb5105f4c --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-session.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_session( + session_id = '' +) +``` 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 new file mode 100644 index 000000000..db350d07f --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete_sessions() +``` diff --git a/examples/2.3.x/console-python/examples/account/delete.md b/examples/2.3.x/console-python/examples/account/delete.md new file mode 100644 index 000000000..25dab7fea --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/delete.md @@ -0,0 +1,12 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result = account.delete() +``` diff --git a/examples/2.3.x/console-python/examples/account/get-billing-address.md b/examples/2.3.x/console-python/examples/account/get-billing-address.md new file mode 100644 index 000000000..db8f67e0b --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-billing-address.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import BillingAddress + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: BillingAddress = account.get_billing_address( + billing_address_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get-consent-token.md b/examples/2.3.x/console-python/examples/account/get-consent-token.md new file mode 100644 index 000000000..2587dc51b --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-consent-token.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Oauth2ConsentToken + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Oauth2ConsentToken = account.get_consent_token( + consent_id = '', + token_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get-consent.md b/examples/2.3.x/console-python/examples/account/get-consent.md new file mode 100644 index 000000000..9645e1997 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-consent.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Oauth2Consent + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Oauth2Consent = account.get_consent( + consent_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get-coupon.md b/examples/2.3.x/console-python/examples/account/get-coupon.md new file mode 100644 index 000000000..dba2f6082 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-coupon.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Coupon + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Coupon = account.get_coupon( + coupon_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get-key.md b/examples/2.3.x/console-python/examples/account/get-key.md new file mode 100644 index 000000000..42d1f6742 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-key.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Key + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Key = account.get_key( + key_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/console-python/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..52898049b --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import MfaRecoveryCodes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: MfaRecoveryCodes = account.get_mfa_recovery_codes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get-payment-method.md b/examples/2.3.x/console-python/examples/account/get-payment-method.md new file mode 100644 index 000000000..1d27a3712 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-payment-method.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import PaymentMethod + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: PaymentMethod = account.get_payment_method( + payment_method_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get-prefs.md b/examples/2.3.x/console-python/examples/account/get-prefs.md new file mode 100644 index 000000000..103ac5ed1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-prefs.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Preferences + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Preferences = account.get_prefs() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get-session.md b/examples/2.3.x/console-python/examples/account/get-session.md new file mode 100644 index 000000000..c2a990cf3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get-session.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.get_session( + session_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/get.md b/examples/2.3.x/console-python/examples/account/get.md new file mode 100644 index 000000000..6ddeb60ea --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/get.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.get() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/list-billing-addresses.md b/examples/2.3.x/console-python/examples/account/list-billing-addresses.md new file mode 100644 index 000000000..2b7d01d39 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-billing-addresses.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import BillingAddressList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: BillingAddressList = account.list_billing_addresses( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/list-consent-tokens.md b/examples/2.3.x/console-python/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..58cbf15aa --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-consent-tokens.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Oauth2ConsentTokenList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Oauth2ConsentTokenList = account.list_consent_tokens( + consent_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/list-consents.md b/examples/2.3.x/console-python/examples/account/list-consents.md new file mode 100644 index 000000000..2435f37ef --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-consents.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Oauth2ConsentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Oauth2ConsentList = account.list_consents( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/list-identities.md b/examples/2.3.x/console-python/examples/account/list-identities.md new file mode 100644 index 000000000..0851a9796 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-identities.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import IdentityList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: IdentityList = account.list_identities( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/list-invoices.md b/examples/2.3.x/console-python/examples/account/list-invoices.md new file mode 100644 index 000000000..5cb07b9dd --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-invoices.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import InvoiceList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: InvoiceList = account.list_invoices( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/list-keys.md b/examples/2.3.x/console-python/examples/account/list-keys.md new file mode 100644 index 000000000..d095257cc --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-keys.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import KeyList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: KeyList = account.list_keys( + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/list-mfa-factors.md b/examples/2.3.x/console-python/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..d66a5bd8a --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-mfa-factors.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import MfaFactors + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: MfaFactors = account.list_mfa_factors() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/list-payment-methods.md b/examples/2.3.x/console-python/examples/account/list-payment-methods.md new file mode 100644 index 000000000..8e8055c73 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-payment-methods.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import PaymentMethodList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: PaymentMethodList = account.list_payment_methods( + queries = [] # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..02834b821 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/list-sessions.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import SessionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: SessionList = account.list_sessions() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-billing-address.md b/examples/2.3.x/console-python/examples/account/update-billing-address.md new file mode 100644 index 000000000..4d7af92ea --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-billing-address.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import BillingAddress + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: BillingAddress = account.update_billing_address( + billing_address_id = '', + country = '', + city = '', + street_address = '', + address_line2 = '', # optional + state = '', # optional + postal_code = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-email-verification-otp.md b/examples/2.3.x/console-python/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..6741c76fc --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-email-verification-otp.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.update_email_verification_otp( + user_id = '', + secret = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-email-verification.md b/examples/2.3.x/console-python/examples/account/update-email-verification.md new file mode 100644 index 000000000..24df8839f --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-email-verification.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.update_email_verification( + user_id = '', + secret = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-email.md b/examples/2.3.x/console-python/examples/account/update-email.md new file mode 100644 index 000000000..9481920c8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-email.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.update_email( + email = 'email@example.com', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-key.md b/examples/2.3.x/console-python/examples/account/update-key.md new file mode 100644 index 000000000..80073fc7b --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-key.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Key +from appwrite_console.enums import AccountKeyScopes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Key = account.update_key( + key_id = '', + name = '', + scopes = [AccountKeyScopes.ACCOUNT], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-magic-url-session.md b/examples/2.3.x/console-python/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..62615ec50 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-magic-url-session.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.update_magic_url_session( + user_id = '', + secret = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-mfa-authenticator.md b/examples/2.3.x/console-python/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..6896b678c --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-mfa-authenticator.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User +from appwrite_console.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.update_mfa_authenticator( + type = AuthenticatorType.TOTP, + otp = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-mfa-challenge.md b/examples/2.3.x/console-python/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..096882fa1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-mfa-challenge.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.update_mfa_challenge( + challenge_id = '', + otp = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/console-python/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..b8d4ff2ff --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import MfaRecoveryCodes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: MfaRecoveryCodes = account.update_mfa_recovery_codes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-mfa.md b/examples/2.3.x/console-python/examples/account/update-mfa.md new file mode 100644 index 000000000..ece35a30a --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-mfa.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.update_mfa( + mfa = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-name.md b/examples/2.3.x/console-python/examples/account/update-name.md new file mode 100644 index 000000000..d6910e743 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-name.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.update_name( + name = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-password.md b/examples/2.3.x/console-python/examples/account/update-password.md new file mode 100644 index 000000000..37311f933 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-password.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.update_password( + password = 'password', + old_password = 'password' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-payment-method-mandate-options.md b/examples/2.3.x/console-python/examples/account/update-payment-method-mandate-options.md new file mode 100644 index 000000000..2fca81644 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-payment-method-mandate-options.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import PaymentMethod + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: PaymentMethod = account.update_payment_method_mandate_options( + payment_method_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-payment-method-provider.md b/examples/2.3.x/console-python/examples/account/update-payment-method-provider.md new file mode 100644 index 000000000..eb235bf14 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-payment-method-provider.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import PaymentMethod + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: PaymentMethod = account.update_payment_method_provider( + payment_method_id = '', + provider_method_id = '', + name = '', + state = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-payment-method.md b/examples/2.3.x/console-python/examples/account/update-payment-method.md new file mode 100644 index 000000000..4c4a446ca --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-payment-method.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import PaymentMethod + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: PaymentMethod = account.update_payment_method( + payment_method_id = '', + expiry_month = 1, + expiry_year = 2026, + state = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-phone-session.md b/examples/2.3.x/console-python/examples/account/update-phone-session.md new file mode 100644 index 000000000..88cc71382 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-phone-session.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.update_phone_session( + user_id = '', + secret = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-phone-verification.md b/examples/2.3.x/console-python/examples/account/update-phone-verification.md new file mode 100644 index 000000000..cb193321a --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-phone-verification.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.update_phone_verification( + user_id = '', + secret = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-phone.md b/examples/2.3.x/console-python/examples/account/update-phone.md new file mode 100644 index 000000000..ce899a564 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-phone.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.update_phone( + phone = '+12065550100', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-prefs.md b/examples/2.3.x/console-python/examples/account/update-prefs.md new file mode 100644 index 000000000..368bb71c9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-prefs.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.update_prefs( + prefs = { + "language": "en", + "timezone": "UTC", + "darkTheme": True + } +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-push-target.md b/examples/2.3.x/console-python/examples/account/update-push-target.md new file mode 100644 index 000000000..c844d743c --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-push-target.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Target + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Target = account.update_push_target( + target_id = '', + identifier = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-recovery-otp.md b/examples/2.3.x/console-python/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..d4bd7e1cb --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-recovery-otp.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.update_recovery_otp( + user_id = '', + secret = '', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-recovery.md b/examples/2.3.x/console-python/examples/account/update-recovery.md new file mode 100644 index 000000000..bad4f2b48 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-recovery.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.update_recovery( + user_id = '', + secret = '', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-session.md b/examples/2.3.x/console-python/examples/account/update-session.md new file mode 100644 index 000000000..bb8b4b7e9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-session.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Session = account.update_session( + session_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-status.md b/examples/2.3.x/console-python/examples/account/update-status.md new file mode 100644 index 000000000..aa2134eb7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-status.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: User = account.update_status() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/account/update-verification.md b/examples/2.3.x/console-python/examples/account/update-verification.md new file mode 100644 index 000000000..69652aa10 --- /dev/null +++ b/examples/2.3.x/console-python/examples/account/update-verification.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.account import Account +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +account = Account(client) + +result: Token = account.update_verification( + user_id = '', + secret = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/activities/get-event.md b/examples/2.3.x/console-python/examples/activities/get-event.md new file mode 100644 index 000000000..b5538d778 --- /dev/null +++ b/examples/2.3.x/console-python/examples/activities/get-event.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.activities import Activities +from appwrite_console.models import ActivityEvent + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +activities = Activities(client) + +result: ActivityEvent = activities.get_event( + event_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/activities/list-events.md b/examples/2.3.x/console-python/examples/activities/list-events.md new file mode 100644 index 000000000..cf701739f --- /dev/null +++ b/examples/2.3.x/console-python/examples/activities/list-events.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.activities import Activities +from appwrite_console.models import ActivityEventList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +activities = Activities(client) + +result: ActivityEventList = activities.list_events( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/advisor/delete-report.md b/examples/2.3.x/console-python/examples/advisor/delete-report.md new file mode 100644 index 000000000..ecdcfc107 --- /dev/null +++ b/examples/2.3.x/console-python/examples/advisor/delete-report.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.advisor import Advisor + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +advisor = Advisor(client) + +result = advisor.delete_report( + report_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/advisor/get-insight.md b/examples/2.3.x/console-python/examples/advisor/get-insight.md new file mode 100644 index 000000000..6c6f1f8c8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/advisor/get-insight.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.advisor import Advisor +from appwrite_console.models import Insight + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +advisor = Advisor(client) + +result: Insight = advisor.get_insight( + report_id = '', + insight_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/advisor/get-report.md b/examples/2.3.x/console-python/examples/advisor/get-report.md new file mode 100644 index 000000000..1e0ad3f36 --- /dev/null +++ b/examples/2.3.x/console-python/examples/advisor/get-report.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.advisor import Advisor +from appwrite_console.models import Report + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +advisor = Advisor(client) + +result: Report = advisor.get_report( + report_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/advisor/list-insights.md b/examples/2.3.x/console-python/examples/advisor/list-insights.md new file mode 100644 index 000000000..21056b3a4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/advisor/list-insights.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.advisor import Advisor +from appwrite_console.models import InsightList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +advisor = Advisor(client) + +result: InsightList = advisor.list_insights( + report_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/advisor/list-reports.md b/examples/2.3.x/console-python/examples/advisor/list-reports.md new file mode 100644 index 000000000..624309613 --- /dev/null +++ b/examples/2.3.x/console-python/examples/advisor/list-reports.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.advisor import Advisor +from appwrite_console.models import ReportList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +advisor = Advisor(client) + +result: ReportList = advisor.list_reports( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/affiliates/create-link.md b/examples/2.3.x/console-python/examples/affiliates/create-link.md new file mode 100644 index 000000000..b36394b4f --- /dev/null +++ b/examples/2.3.x/console-python/examples/affiliates/create-link.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.affiliates import Affiliates +from appwrite_console.models import AffiliateLink + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +affiliates = Affiliates(client) + +result: AffiliateLink = affiliates.create_link( + link_id = '', + name = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/affiliates/delete-link.md b/examples/2.3.x/console-python/examples/affiliates/delete-link.md new file mode 100644 index 000000000..a457de24d --- /dev/null +++ b/examples/2.3.x/console-python/examples/affiliates/delete-link.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.affiliates import Affiliates + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +affiliates = Affiliates(client) + +result = affiliates.delete_link( + link_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/affiliates/get-link.md b/examples/2.3.x/console-python/examples/affiliates/get-link.md new file mode 100644 index 000000000..689b47b16 --- /dev/null +++ b/examples/2.3.x/console-python/examples/affiliates/get-link.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.affiliates import Affiliates +from appwrite_console.models import AffiliateLink + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +affiliates = Affiliates(client) + +result: AffiliateLink = affiliates.get_link( + link_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/affiliates/list-links.md b/examples/2.3.x/console-python/examples/affiliates/list-links.md new file mode 100644 index 000000000..d29c7a944 --- /dev/null +++ b/examples/2.3.x/console-python/examples/affiliates/list-links.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.affiliates import Affiliates +from appwrite_console.models import AffiliateLinkList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +affiliates = Affiliates(client) + +result: AffiliateLinkList = affiliates.list_links( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/affiliates/list-referrals.md b/examples/2.3.x/console-python/examples/affiliates/list-referrals.md new file mode 100644 index 000000000..f4c254bb9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/affiliates/list-referrals.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.affiliates import Affiliates +from appwrite_console.models import AffiliateReferralList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +affiliates = Affiliates(client) + +result: AffiliateReferralList = affiliates.list_referrals( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/affiliates/list-rewards.md b/examples/2.3.x/console-python/examples/affiliates/list-rewards.md new file mode 100644 index 000000000..b9f36b7c4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/affiliates/list-rewards.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.affiliates import Affiliates +from appwrite_console.models import AffiliateRewardList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +affiliates = Affiliates(client) + +result: AffiliateRewardList = affiliates.list_rewards( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/affiliates/update-reward.md b/examples/2.3.x/console-python/examples/affiliates/update-reward.md new file mode 100644 index 000000000..da3bb0b2a --- /dev/null +++ b/examples/2.3.x/console-python/examples/affiliates/update-reward.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.affiliates import Affiliates +from appwrite_console.models import AffiliateReward + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +affiliates = Affiliates(client) + +result: AffiliateReward = affiliates.update_reward( + reward_id = '', + status = 'claimed', + organization_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/create-installation-token.md b/examples/2.3.x/console-python/examples/apps/create-installation-token.md new file mode 100644 index 000000000..3d1db2cfe --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/create-installation-token.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import Oauth2Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: Oauth2Token = apps.create_installation_token( + app_id = '', + installation_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/create-key.md b/examples/2.3.x/console-python/examples/apps/create-key.md new file mode 100644 index 000000000..75c190b51 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/create-key.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppKey + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppKey = apps.create_key( + app_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/create-secret.md b/examples/2.3.x/console-python/examples/apps/create-secret.md new file mode 100644 index 000000000..f6a89970a --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/create-secret.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppSecretPlaintext + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppSecretPlaintext = apps.create_secret( + app_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/create.md b/examples/2.3.x/console-python/examples/apps/create.md new file mode 100644 index 000000000..5c7afd772 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/create.md @@ -0,0 +1,35 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import App + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: App = apps.create( + app_id = '', + name = '', + redirect_uris = [], + description = '', # optional + client_uri = 'https://example.com', # optional + logo_uri = 'https://example.com', # optional + privacy_policy_url = 'https://example.com', # optional + terms_url = 'https://example.com', # optional + contacts = [], # optional + tagline = '', # optional + tags = [], # optional + images = [], # optional + support_url = 'https://example.com', # optional + data_deletion_url = 'https://example.com', # optional + post_logout_redirect_uris = [], # optional + enabled = False, # optional + type = 'public', # optional + device_flow = False, # optional + team_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/delete-installation.md b/examples/2.3.x/console-python/examples/apps/delete-installation.md new file mode 100644 index 000000000..196366d8a --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/delete-installation.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result = apps.delete_installation( + app_id = '', + installation_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/apps/delete-key.md b/examples/2.3.x/console-python/examples/apps/delete-key.md new file mode 100644 index 000000000..0411b7548 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/delete-key.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result = apps.delete_key( + app_id = '', + key_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/apps/delete-secret.md b/examples/2.3.x/console-python/examples/apps/delete-secret.md new file mode 100644 index 000000000..2fbaeb71d --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/delete-secret.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result = apps.delete_secret( + app_id = '', + secret_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/apps/delete-tokens.md b/examples/2.3.x/console-python/examples/apps/delete-tokens.md new file mode 100644 index 000000000..640fc7b7c --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/delete-tokens.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result = apps.delete_tokens( + app_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/apps/delete.md b/examples/2.3.x/console-python/examples/apps/delete.md new file mode 100644 index 000000000..9674bc422 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result = apps.delete( + app_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/apps/get-installation.md b/examples/2.3.x/console-python/examples/apps/get-installation.md new file mode 100644 index 000000000..7fdb42c02 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/get-installation.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppInstallation + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppInstallation = apps.get_installation( + app_id = '', + installation_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/get-key.md b/examples/2.3.x/console-python/examples/apps/get-key.md new file mode 100644 index 000000000..b79b810f1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/get-key.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppKey + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppKey = apps.get_key( + app_id = '', + key_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/get-secret.md b/examples/2.3.x/console-python/examples/apps/get-secret.md new file mode 100644 index 000000000..736ca9073 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/get-secret.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppSecret + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppSecret = apps.get_secret( + app_id = '', + secret_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/get.md b/examples/2.3.x/console-python/examples/apps/get.md new file mode 100644 index 000000000..d8dcffd54 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import App + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: App = apps.get( + app_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/list-installation-scopes.md b/examples/2.3.x/console-python/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..f1483500d --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/list-installation-scopes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppScopeList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppScopeList = apps.list_installation_scopes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/list-installations.md b/examples/2.3.x/console-python/examples/apps/list-installations.md new file mode 100644 index 000000000..d965acac1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/list-installations.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppInstallationList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppInstallationList = apps.list_installations( + app_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/list-keys.md b/examples/2.3.x/console-python/examples/apps/list-keys.md new file mode 100644 index 000000000..fd44ea96d --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/list-keys.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppKeyList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppKeyList = apps.list_keys( + app_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/console-python/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..b4ca8f492 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppScopeList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppScopeList = apps.list_o_auth2_scopes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/list-secrets.md b/examples/2.3.x/console-python/examples/apps/list-secrets.md new file mode 100644 index 000000000..b8f674cb0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/list-secrets.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppSecretList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppSecretList = apps.list_secrets( + app_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/list.md b/examples/2.3.x/console-python/examples/apps/list.md new file mode 100644 index 000000000..259ceb1b9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/list.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import AppsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: AppsList = apps.list( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/update-labels.md b/examples/2.3.x/console-python/examples/apps/update-labels.md new file mode 100644 index 000000000..324de27a0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/update-labels.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import App + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: App = apps.update_labels( + app_id = '', + labels = [] +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/update-team.md b/examples/2.3.x/console-python/examples/apps/update-team.md new file mode 100644 index 000000000..09691e897 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/update-team.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import App + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: App = apps.update_team( + app_id = '', + team_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/apps/update.md b/examples/2.3.x/console-python/examples/apps/update.md new file mode 100644 index 000000000..ac6a388d6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/apps/update.md @@ -0,0 +1,36 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.apps import Apps +from appwrite_console.models import App + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +apps = Apps(client) + +result: App = apps.update( + app_id = '', + name = '', + description = '', # optional + client_uri = 'https://example.com', # optional + logo_uri = 'https://example.com', # optional + privacy_policy_url = 'https://example.com', # optional + terms_url = 'https://example.com', # optional + contacts = [], # optional + tagline = '', # optional + tags = [], # optional + images = [], # optional + support_url = 'https://example.com', # optional + data_deletion_url = 'https://example.com', # optional + enabled = False, # optional + redirect_uris = [], # optional + post_logout_redirect_uris = [], # optional + type = 'public', # optional + device_flow = False, # optional + installation_scopes = [], # optional + installation_redirect_url = 'https://example.com' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-browser.md b/examples/2.3.x/console-python/examples/avatars/get-browser.md new file mode 100644 index 000000000..ef469e2d1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.avatars import Avatars +from appwrite_console.enums import Browser + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +avatars = Avatars(client) + +result: bytes = avatars.get_browser( + code = Browser.AVANT_BROWSER, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-credit-card.md b/examples/2.3.x/console-python/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..f9ee5b865 --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.avatars import Avatars +from appwrite_console.enums import CreditCard + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +avatars = Avatars(client) + +result: bytes = avatars.get_credit_card( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-favicon.md b/examples/2.3.x/console-python/examples/avatars/get-favicon.md new file mode 100644 index 000000000..04f1a4a93 --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +```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: bytes = avatars.get_favicon( + url = 'https://example.com' +) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-flag.md b/examples/2.3.x/console-python/examples/avatars/get-flag.md new file mode 100644 index 000000000..0e69f14bb --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.avatars import Avatars +from appwrite_console.enums import Flag + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +avatars = Avatars(client) + +result: bytes = avatars.get_flag( + code = Flag.AFGHANISTAN, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-image.md b/examples/2.3.x/console-python/examples/avatars/get-image.md new file mode 100644 index 000000000..f642a9a87 --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +```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: bytes = avatars.get_image( + url = 'https://example.com', + width = 0, # optional + height = 0 # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-initials.md b/examples/2.3.x/console-python/examples/avatars/get-initials.md new file mode 100644 index 000000000..197c2f659 --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +```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: bytes = avatars.get_initials( + name = '', # optional + width = 0, # optional + height = 0, # optional + background = 'FFFFFF' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-photo.md b/examples/2.3.x/console-python/examples/avatars/get-photo.md new file mode 100644 index 000000000..55ac46375 --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-photo.md @@ -0,0 +1,21 @@ +```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: bytes = avatars.get_photo( + width = 0, # optional + height = 0, # optional + quality = 0, # optional + output = 'png', # optional + rating = 'g', # optional + user_id = 'current()', # optional + email_hash = '', # optional + name = '' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-qr.md b/examples/2.3.x/console-python/examples/avatars/get-qr.md new file mode 100644 index 000000000..7a1b0b80e --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-qr.md @@ -0,0 +1,17 @@ +```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: bytes = avatars.get_qr( + text = '', + size = 1, # optional + margin = 0, # optional + download = False # optional +) +``` 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 new file mode 100644 index 000000000..5f74ca094 --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/get-screenshot.md @@ -0,0 +1,40 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.avatars import Avatars +from appwrite_console.enums import BrowserTheme +from appwrite_console.enums import Timezone +from appwrite_console.enums import BrowserPermission +from appwrite_console.enums import ImageFormat + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +avatars = Avatars(client) + +result: bytes = avatars.get_screenshot( + url = 'https://example.com', + headers = { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, # optional + viewport_width = 1920, # optional + viewport_height = 1080, # optional + scale = 2, # optional + theme = BrowserTheme.DARK, # optional + user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', # optional + fullpage = True, # optional + locale = 'en-US', # optional + timezone = Timezone.AFRICA_ABIDJAN, # optional + latitude = 37.7749, # optional + longitude = -122.4194, # optional + accuracy = 100, # optional + touch = True, # optional + permissions = [BrowserPermission.GEOLOCATION, BrowserPermission.NOTIFICATIONS], # optional + sleep = 3, # optional + width = 800, # optional + height = 600, # optional + quality = 85, # optional + output = ImageFormat.JPEG # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/backups/create-archive.md b/examples/2.3.x/console-python/examples/backups/create-archive.md new file mode 100644 index 000000000..500e331f1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/create-archive.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupArchive +from appwrite_console.enums import BackupServices + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupArchive = backups.create_archive( + services = [BackupServices.DATABASES], + resource_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/create-policy.md b/examples/2.3.x/console-python/examples/backups/create-policy.md new file mode 100644 index 000000000..8711f9b87 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/create-policy.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupPolicy +from appwrite_console.enums import BackupServices + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupPolicy = backups.create_policy( + policy_id = '', + services = [BackupServices.DATABASES], + retention = 1, + schedule = '', + name = '', # optional + resource_id = '', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/create-restoration.md b/examples/2.3.x/console-python/examples/backups/create-restoration.md new file mode 100644 index 000000000..8872a5b5c --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/create-restoration.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupRestoration +from appwrite_console.enums import BackupServices + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupRestoration = backups.create_restoration( + archive_id = '', + services = [BackupServices.DATABASES], + new_resource_id = '', # optional + new_resource_name = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/delete-archive.md b/examples/2.3.x/console-python/examples/backups/delete-archive.md new file mode 100644 index 000000000..d5e0237b4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/delete-archive.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result = backups.delete_archive( + archive_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/backups/delete-policy.md b/examples/2.3.x/console-python/examples/backups/delete-policy.md new file mode 100644 index 000000000..5e1ee65f9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/delete-policy.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result = backups.delete_policy( + policy_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/backups/get-archive.md b/examples/2.3.x/console-python/examples/backups/get-archive.md new file mode 100644 index 000000000..a092877ac --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/get-archive.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupArchive + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupArchive = backups.get_archive( + archive_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/get-policy.md b/examples/2.3.x/console-python/examples/backups/get-policy.md new file mode 100644 index 000000000..22922ca5f --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/get-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupPolicy = backups.get_policy( + policy_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/get-restoration.md b/examples/2.3.x/console-python/examples/backups/get-restoration.md new file mode 100644 index 000000000..b3503c905 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/get-restoration.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupRestoration + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupRestoration = backups.get_restoration( + restoration_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/list-archives.md b/examples/2.3.x/console-python/examples/backups/list-archives.md new file mode 100644 index 000000000..3203f3695 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/list-archives.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupArchiveList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupArchiveList = backups.list_archives( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/list-policies.md b/examples/2.3.x/console-python/examples/backups/list-policies.md new file mode 100644 index 000000000..9260dbd72 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/list-policies.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupPolicyList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupPolicyList = backups.list_policies( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/list-restorations.md b/examples/2.3.x/console-python/examples/backups/list-restorations.md new file mode 100644 index 000000000..c8437b559 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/list-restorations.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupRestorationList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupRestorationList = backups.list_restorations( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/backups/update-policy.md b/examples/2.3.x/console-python/examples/backups/update-policy.md new file mode 100644 index 000000000..168af0dc5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/backups/update-policy.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.backups import Backups +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +backups = Backups(client) + +result: BackupPolicy = backups.update_policy( + policy_id = '', + name = '', # optional + retention = 1, # optional + schedule = '', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/create-program-membership.md b/examples/2.3.x/console-python/examples/console/create-program-membership.md new file mode 100644 index 000000000..f0b6ee54e --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/create-program-membership.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: Organization = console.create_program_membership( + program_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/create-source.md b/examples/2.3.x/console-python/examples/console/create-source.md new file mode 100644 index 000000000..8daf9e445 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/create-source.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result = console.create_source( + ref = '', # optional + referrer = 'https://example.com', # optional + utm_source = '', # optional + utm_campaign = '', # optional + utm_medium = '' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/console/get-campaign.md b/examples/2.3.x/console-python/examples/console/get-campaign.md new file mode 100644 index 000000000..16f5b1047 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/get-campaign.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import Campaign + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: Campaign = console.get_campaign( + campaign_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/get-coupon.md b/examples/2.3.x/console-python/examples/console/get-coupon.md new file mode 100644 index 000000000..c22ec82d0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/get-coupon.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import Coupon + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: Coupon = console.get_coupon( + coupon_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/get-email-template.md b/examples/2.3.x/console-python/examples/console/get-email-template.md new file mode 100644 index 000000000..c78bbd253 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/get-email-template.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import EmailTemplate +from appwrite_console.enums import ProjectEmailTemplateId +from appwrite_console.enums import ProjectEmailTemplateLocale + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: EmailTemplate = console.get_email_template( + template_id = ProjectEmailTemplateId.VERIFICATION, + locale = ProjectEmailTemplateLocale.AF # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/get-plan.md b/examples/2.3.x/console-python/examples/console/get-plan.md new file mode 100644 index 000000000..d6b3436ee --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/get-plan.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import BillingPlan + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: BillingPlan = console.get_plan( + plan_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/get-plans.md b/examples/2.3.x/console-python/examples/console/get-plans.md new file mode 100644 index 000000000..16c921337 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/get-plans.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import BillingPlanList +from appwrite_console.enums import Platform + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: BillingPlanList = console.get_plans( + platform = Platform.APPWRITE # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/get-program.md b/examples/2.3.x/console-python/examples/console/get-program.md new file mode 100644 index 000000000..af21ce492 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/get-program.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import Program + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: Program = console.get_program( + program_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/get-resource.md b/examples/2.3.x/console-python/examples/console/get-resource.md new file mode 100644 index 000000000..33e787062 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/get-resource.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.enums import ConsoleResourceType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result = console.get_resource( + value = '', + type = ConsoleResourceType.RULES +) +``` diff --git a/examples/2.3.x/console-python/examples/console/list-databases.md b/examples/2.3.x/console-python/examples/console/list-databases.md new file mode 100644 index 000000000..cdd8355d9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/list-databases.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import DatabaseList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: DatabaseList = console.list_databases( + queries = [], # optional + search = '', # optional + total = False # optional +) + +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 new file mode 100644 index 000000000..7acf8ad66 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/list-o-auth-2-providers.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import ConsoleOAuth2ProviderList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: ConsoleOAuth2ProviderList = console.list_o_auth2_providers() + +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 new file mode 100644 index 000000000..7dff56c55 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/list-organization-scopes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import ConsoleKeyScopeList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: ConsoleKeyScopeList = console.list_organization_scopes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/list-postgres-extensions.md b/examples/2.3.x/console-python/examples/console/list-postgres-extensions.md new file mode 100644 index 000000000..d10d56828 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/list-postgres-extensions.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import PostgresExtensionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: PostgresExtensionList = console.list_postgres_extensions() + +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 new file mode 100644 index 000000000..85fb60dd3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/list-project-scopes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import ConsoleKeyScopeList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: ConsoleKeyScopeList = console.list_project_scopes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/list-regions.md b/examples/2.3.x/console-python/examples/console/list-regions.md new file mode 100644 index 000000000..aa29bfaa9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/list-regions.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import ConsoleRegionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: ConsoleRegionList = console.list_regions() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/suggest-columns.md b/examples/2.3.x/console-python/examples/console/suggest-columns.md new file mode 100644 index 000000000..3fa78c7c4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/suggest-columns.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import ColumnList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: ColumnList = console.suggest_columns( + database_id = '', + table_id = '', + context = '', # optional + min = 1, # optional + max = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/suggest-indexes.md b/examples/2.3.x/console-python/examples/console/suggest-indexes.md new file mode 100644 index 000000000..e86ec3945 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/suggest-indexes.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import ColumnIndexList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: ColumnIndexList = console.suggest_indexes( + database_id = '', + table_id = '', + min = 1, # optional + max = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/suggest-queries.md b/examples/2.3.x/console-python/examples/console/suggest-queries.md new file mode 100644 index 000000000..cd674a419 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/suggest-queries.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.enums import QuerySuggestionResource + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result = console.suggest_queries( + resource = QuerySuggestionResource.ACTIVITIES, + input = '', + database_id = '', # optional + table_id = '' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/console/variables.md b/examples/2.3.x/console-python/examples/console/variables.md new file mode 100644 index 000000000..d6e4fb149 --- /dev/null +++ b/examples/2.3.x/console-python/examples/console/variables.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.console import Console +from appwrite_console.models import ConsoleVariables + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +console = Console(client) + +result: ConsoleVariables = console.variables() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-big-int-attribute.md b/examples/2.3.x/console-python/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..0ea2f6b65 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-big-int-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeBigint + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeBigint = databases.create_big_int_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + min = 0, # optional + max = 1000000, # optional + default = 0, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-boolean-attribute.md b/examples/2.3.x/console-python/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..7dcba5a29 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-boolean-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeBoolean + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeBoolean = databases.create_boolean_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = False, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-collection.md b/examples/2.3.x/console-python/examples/databases/create-collection.md new file mode 100644 index 000000000..e45269611 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Collection +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Collection = databases.create_collection( + database_id = '', + collection_id = '', + name = '', + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + attributes = [], # optional + indexes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-datetime-attribute.md b/examples/2.3.x/console-python/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..78f425b42 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-datetime-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeDatetime + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeDatetime = databases.create_datetime_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = '2020-10-15T06:38:00.000+00:00', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-document.md b/examples/2.3.x/console-python/examples/databases/create-document.md new file mode 100644 index 000000000..66e6a3a80 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-document.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Document = databases.create_document( + database_id = '', + collection_id = '', + document_id = '', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # 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 new file mode 100644 index 000000000..39d39625b --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: DocumentList = databases.create_documents( + database_id = '', + collection_id = '', + documents = [], + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-email-attribute.md b/examples/2.3.x/console-python/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..87735752b --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-email-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeEmail + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeEmail = databases.create_email_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-enum-attribute.md b/examples/2.3.x/console-python/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..a49822ac3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-enum-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeEnum + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeEnum = databases.create_enum_attribute( + database_id = '', + collection_id = '', + key = '', + elements = ["active", "inactive"], + required = False, + default = 'active', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-float-attribute.md b/examples/2.3.x/console-python/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..69b86d11c --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-float-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeFloat + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeFloat = databases.create_float_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + min = 0, # optional + max = 100, # optional + default = 10.5, # optional + array = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..1310e83d6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-index.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Index +from appwrite_console.enums import DatabasesIndexType +from appwrite_console.enums import OrderBy + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Index = databases.create_index( + database_id = '', + collection_id = '', + key = '', + type = DatabasesIndexType.KEY, + attributes = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-integer-attribute.md b/examples/2.3.x/console-python/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..e83f4300a --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-integer-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeInteger + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeInteger = databases.create_integer_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + min = 0, # optional + max = 100, # optional + default = 10, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-ip-attribute.md b/examples/2.3.x/console-python/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..b583e2c22 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-ip-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeIp + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeIp = databases.create_ip_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = '192.0.2.0', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-line-attribute.md b/examples/2.3.x/console-python/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..2678384f0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-line-attribute.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeLine + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeLine = databases.create_line_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = [[1, 2], [3, 4], [5, 6]] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-longtext-attribute.md b/examples/2.3.x/console-python/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..5b75786b5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-longtext-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeLongtext + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeLongtext = databases.create_longtext_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/console-python/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..3c2aea466 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeMediumtext + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeMediumtext = databases.create_mediumtext_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-operations.md b/examples/2.3.x/console-python/examples/databases/create-operations.md new file mode 100644 index 000000000..515d44f05 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-operations.md @@ -0,0 +1,28 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Transaction = databases.create_operations( + transaction_id = '', + operations = [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-point-attribute.md b/examples/2.3.x/console-python/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..e534da797 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-point-attribute.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributePoint + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributePoint = databases.create_point_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = [1, 2] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-polygon-attribute.md b/examples/2.3.x/console-python/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..22a546218 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-polygon-attribute.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributePolygon + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributePolygon = databases.create_polygon_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-relationship-attribute.md b/examples/2.3.x/console-python/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..a76585419 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-relationship-attribute.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeRelationship +from appwrite_console.enums import RelationshipType +from appwrite_console.enums import RelationMutate + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeRelationship = databases.create_relationship_attribute( + database_id = '', + collection_id = '', + related_collection_id = '', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-string-attribute.md b/examples/2.3.x/console-python/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..e967f9234 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-string-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeString + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeString = databases.create_string_attribute( + database_id = '', + collection_id = '', + key = '', + size = 1, + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-text-attribute.md b/examples/2.3.x/console-python/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..18c1de1d4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-text-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeText + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeText = databases.create_text_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-transaction.md b/examples/2.3.x/console-python/examples/databases/create-transaction.md new file mode 100644 index 000000000..904cfbd44 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-transaction.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Transaction = databases.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-url-attribute.md b/examples/2.3.x/console-python/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..60e5712d9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-url-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeUrl + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeUrl = databases.create_url_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create-varchar-attribute.md b/examples/2.3.x/console-python/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..c932c3594 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create-varchar-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeVarchar + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeVarchar = databases.create_varchar_attribute( + database_id = '', + collection_id = '', + key = '', + size = 1, + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/create.md b/examples/2.3.x/console-python/examples/databases/create.md new file mode 100644 index 000000000..9dc44c326 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/create.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Database = databases.create( + database_id = '', + name = '', + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/decrement-document-attribute.md b/examples/2.3.x/console-python/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..ba01f83a1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/decrement-document-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Document = databases.decrement_document_attribute( + database_id = '', + collection_id = '', + document_id = '', + attribute = '', + value = 1, # optional + min = 0, # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/delete-attribute.md b/examples/2.3.x/console-python/examples/databases/delete-attribute.md new file mode 100644 index 000000000..c7bd04f6e --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/delete-attribute.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result = databases.delete_attribute( + database_id = '', + collection_id = '', + key = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/databases/delete-collection.md b/examples/2.3.x/console-python/examples/databases/delete-collection.md new file mode 100644 index 000000000..cc820e32d --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result = databases.delete_collection( + database_id = '', + collection_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/databases/delete-document.md b/examples/2.3.x/console-python/examples/databases/delete-document.md new file mode 100644 index 000000000..7ff9a4453 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/delete-document.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result = databases.delete_document( + database_id = '', + collection_id = '', + document_id = '', + transaction_id = '' # 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 new file mode 100644 index 000000000..94d91cb1b --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/delete-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: DocumentList = databases.delete_documents( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/delete-index.md b/examples/2.3.x/console-python/examples/databases/delete-index.md new file mode 100644 index 000000000..049e10c16 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/delete-index.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result = databases.delete_index( + database_id = '', + collection_id = '', + key = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/databases/delete-transaction.md b/examples/2.3.x/console-python/examples/databases/delete-transaction.md new file mode 100644 index 000000000..e12d3bf3f --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/delete-transaction.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result = databases.delete_transaction( + transaction_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/databases/delete.md b/examples/2.3.x/console-python/examples/databases/delete.md new file mode 100644 index 000000000..6e9d5959a --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result = databases.delete( + database_id = '' +) +``` 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 new file mode 100644 index 000000000..bd077abaa --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/get-attribute.md @@ -0,0 +1,29 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeBoolean +from appwrite_console.models import AttributeInteger +from appwrite_console.models import AttributeFloat +from appwrite_console.models import AttributeEmail +from appwrite_console.models import AttributeEnum +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 AttributeString +from typing import Union + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Union[AttributeBoolean, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributeString] = databases.get_attribute( + database_id = '', + collection_id = '', + key = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/get-collection.md b/examples/2.3.x/console-python/examples/databases/get-collection.md new file mode 100644 index 000000000..e7d825cc1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/get-collection.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Collection + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Collection = databases.get_collection( + database_id = '', + collection_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/get-document.md b/examples/2.3.x/console-python/examples/databases/get-document.md new file mode 100644 index 000000000..64393381d --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/get-document.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Document = databases.get_document( + database_id = '', + collection_id = '', + document_id = '', + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/get-index.md b/examples/2.3.x/console-python/examples/databases/get-index.md new file mode 100644 index 000000000..bf1bef509 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/get-index.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Index + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Index = databases.get_index( + database_id = '', + collection_id = '', + key = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/get-transaction.md b/examples/2.3.x/console-python/examples/databases/get-transaction.md new file mode 100644 index 000000000..e5d7a60f6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/get-transaction.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Transaction = databases.get_transaction( + transaction_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/get.md b/examples/2.3.x/console-python/examples/databases/get.md new file mode 100644 index 000000000..f7d905138 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Database = databases.get( + database_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/increment-document-attribute.md b/examples/2.3.x/console-python/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..78d6a2c1e --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/increment-document-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Document = databases.increment_document_attribute( + database_id = '', + collection_id = '', + document_id = '', + attribute = '', + value = 1, # optional + max = 100, # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/list-attributes.md b/examples/2.3.x/console-python/examples/databases/list-attributes.md new file mode 100644 index 000000000..94ff042c8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/list-attributes.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeList = databases.list_attributes( + database_id = '', + collection_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/list-collections.md b/examples/2.3.x/console-python/examples/databases/list-collections.md new file mode 100644 index 000000000..573a35d91 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/list-collections.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import CollectionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: CollectionList = databases.list_collections( + database_id = '', + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/list-documents.md b/examples/2.3.x/console-python/examples/databases/list-documents.md new file mode 100644 index 000000000..9484e47e2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/list-documents.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: DocumentList = databases.list_documents( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/list-indexes.md b/examples/2.3.x/console-python/examples/databases/list-indexes.md new file mode 100644 index 000000000..177b8e5d8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/list-indexes.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import IndexList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: IndexList = databases.list_indexes( + database_id = '', + collection_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..868d95522 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/list-transactions.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import TransactionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: TransactionList = databases.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/list.md b/examples/2.3.x/console-python/examples/databases/list.md new file mode 100644 index 000000000..f9ce2c8b7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/list.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import DatabaseList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: DatabaseList = databases.list( + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-big-int-attribute.md b/examples/2.3.x/console-python/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..bd8eab464 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-big-int-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeBigint + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeBigint = databases.update_big_int_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 0, + min = 0, # optional + max = 1000000, # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-boolean-attribute.md b/examples/2.3.x/console-python/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..4eaf97618 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-boolean-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeBoolean + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeBoolean = databases.update_boolean_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = False, + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-collection.md b/examples/2.3.x/console-python/examples/databases/update-collection.md new file mode 100644 index 000000000..4a1bd4c48 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-collection.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Collection +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Collection = databases.update_collection( + database_id = '', + collection_id = '', + name = '', # optional + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-datetime-attribute.md b/examples/2.3.x/console-python/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..f7e4e9b05 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-datetime-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeDatetime + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeDatetime = databases.update_datetime_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = '2020-10-15T06:38:00.000+00:00', + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-document.md b/examples/2.3.x/console-python/examples/databases/update-document.md new file mode 100644 index 000000000..7cc99f4b6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-document.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Document = databases.update_document( + database_id = '', + collection_id = '', + document_id = '', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-documents.md b/examples/2.3.x/console-python/examples/databases/update-documents.md new file mode 100644 index 000000000..c34d5cc0f --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-documents.md @@ -0,0 +1,27 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: DocumentList = databases.update_documents( + database_id = '', + collection_id = '', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-email-attribute.md b/examples/2.3.x/console-python/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..ec8bd1650 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-email-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeEmail + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeEmail = databases.update_email_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-enum-attribute.md b/examples/2.3.x/console-python/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..051195cae --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-enum-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeEnum + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeEnum = databases.update_enum_attribute( + database_id = '', + collection_id = '', + key = '', + elements = ["active", "inactive"], + required = False, + default = 'active', + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-float-attribute.md b/examples/2.3.x/console-python/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..c5a2034c2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-float-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeFloat + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeFloat = databases.update_float_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 10.5, + min = 0, # optional + max = 100, # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-integer-attribute.md b/examples/2.3.x/console-python/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..50970cfdd --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-integer-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeInteger + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeInteger = databases.update_integer_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 10, + min = 0, # optional + max = 100, # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-ip-attribute.md b/examples/2.3.x/console-python/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..f5cf6403e --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-ip-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeIp + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeIp = databases.update_ip_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = '192.0.2.0', + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-line-attribute.md b/examples/2.3.x/console-python/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..81c8f04d9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-line-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeLine + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeLine = databases.update_line_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = [[1, 2], [3, 4], [5, 6]], # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-longtext-attribute.md b/examples/2.3.x/console-python/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..382d66e80 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-longtext-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeLongtext + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeLongtext = databases.update_longtext_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'Hello World', + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/console-python/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..bcaa2a382 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeMediumtext + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeMediumtext = databases.update_mediumtext_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'Hello World', + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-point-attribute.md b/examples/2.3.x/console-python/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..9d2990d4e --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-point-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributePoint + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributePoint = databases.update_point_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = [1, 2], # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-polygon-attribute.md b/examples/2.3.x/console-python/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..27ad1d023 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-polygon-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributePolygon + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributePolygon = databases.update_polygon_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-relationship-attribute.md b/examples/2.3.x/console-python/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..bd19d048a --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-relationship-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeRelationship +from appwrite_console.enums import RelationMutate + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeRelationship = databases.update_relationship_attribute( + database_id = '', + collection_id = '', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-string-attribute.md b/examples/2.3.x/console-python/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..9e5d89a13 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-string-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeString + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeString = databases.update_string_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'Hello World', + size = 1, # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-text-attribute.md b/examples/2.3.x/console-python/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..62cbeebd2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-text-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeText + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeText = databases.update_text_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'Hello World', + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-transaction.md b/examples/2.3.x/console-python/examples/databases/update-transaction.md new file mode 100644 index 000000000..68f46e98e --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-transaction.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Transaction = databases.update_transaction( + transaction_id = '', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-url-attribute.md b/examples/2.3.x/console-python/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..768919428 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-url-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeUrl + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeUrl = databases.update_url_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update-varchar-attribute.md b/examples/2.3.x/console-python/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..9bf4e3722 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update-varchar-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import AttributeVarchar + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: AttributeVarchar = databases.update_varchar_attribute( + database_id = '', + collection_id = '', + key = '', + required = False, + default = 'Hello World', + size = 1, # optional + new_key = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/update.md b/examples/2.3.x/console-python/examples/databases/update.md new file mode 100644 index 000000000..0ad1eadb9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/update.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Database = databases.update( + database_id = '', + name = '', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/databases/upsert-document.md b/examples/2.3.x/console-python/examples/databases/upsert-document.md new file mode 100644 index 000000000..3d552ff44 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/upsert-document.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: Document = databases.upsert_document( + database_id = '', + collection_id = '', + document_id = '', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # 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 new file mode 100644 index 000000000..2cde1e4f9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/databases/upsert-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.databases import Databases +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +databases = Databases(client) + +result: DocumentList = databases.upsert_documents( + database_id = '', + collection_id = '', + documents = [], + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/create-collection.md b/examples/2.3.x/console-python/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..b2655c46f --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/create-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Collection +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.create_collection( + database_id = '', + collection_id = '', + name = '', + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + attributes = [], # optional + indexes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/create-document.md b/examples/2.3.x/console-python/examples/documentsdb/create-document.md new file mode 100644 index 000000000..c94e06aa5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/create-document.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Document = documents_db.create_document( + database_id = '', + collection_id = '', + document_id = '', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..e4b9926ea --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/create-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.create_documents( + database_id = '', + collection_id = '', + documents = [], + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/create-failover.md b/examples/2.3.x/console-python/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..611436335 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/create-failover.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DedicatedDatabase = documents_db.create_failover( + database_id = '', + target_replica_id = '' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..9f6ed7f5f --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/create-index.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Index +from appwrite_console.enums import DocumentsDBIndexType +from appwrite_console.enums import OrderBy + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Index = documents_db.create_index( + database_id = '', + collection_id = '', + key = '', + type = DocumentsDBIndexType.KEY, + attributes = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/create-transaction.md b/examples/2.3.x/console-python/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..3cdf59d06 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/create-transaction.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/create.md b/examples/2.3.x/console-python/examples/documentsdb/create.md new file mode 100644 index 000000000..f095c5f8b --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/create.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Database = documents_db.create( + database_id = '', + name = '', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/console-python/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..19bae4d53 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Document = documents_db.decrement_document_attribute( + database_id = '', + collection_id = '', + document_id = '', + attribute = '', + value = 1, # optional + min = 0, # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/delete-collection.md b/examples/2.3.x/console-python/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..fc0a744a9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/delete-collection.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result = documents_db.delete_collection( + database_id = '', + collection_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/delete-document.md b/examples/2.3.x/console-python/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..befb0d240 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/delete-document.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result = documents_db.delete_document( + database_id = '', + collection_id = '', + document_id = '', + transaction_id = '' # 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 new file mode 100644 index 000000000..a772b969a --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/delete-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.delete_documents( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/delete-index.md b/examples/2.3.x/console-python/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..91cc85bfb --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/delete-index.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result = documents_db.delete_index( + database_id = '', + collection_id = '', + key = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/delete-transaction.md b/examples/2.3.x/console-python/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..8a268eb63 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result = documents_db.delete_transaction( + transaction_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/delete.md b/examples/2.3.x/console-python/examples/documentsdb/delete.md new file mode 100644 index 000000000..58221eb95 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result = documents_db.delete( + database_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/get-collection.md b/examples/2.3.x/console-python/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..293e184af --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/get-collection.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Collection + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.get_collection( + database_id = '', + collection_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/get-document.md b/examples/2.3.x/console-python/examples/documentsdb/get-document.md new file mode 100644 index 000000000..9ab67e7b9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/get-document.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Document = documents_db.get_document( + database_id = '', + collection_id = '', + document_id = '', + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/get-index.md b/examples/2.3.x/console-python/examples/documentsdb/get-index.md new file mode 100644 index 000000000..249382356 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/get-index.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Index + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Index = documents_db.get_index( + database_id = '', + collection_id = '', + key = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/get-replicas.md b/examples/2.3.x/console-python/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..9ad696e95 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/get-replicas.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DedicatedDatabaseReplicas + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DedicatedDatabaseReplicas = documents_db.get_replicas( + database_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/get-status.md b/examples/2.3.x/console-python/examples/documentsdb/get-status.md new file mode 100644 index 000000000..e8613a5c1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/get-status.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DatabaseStatus + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DatabaseStatus = documents_db.get_status( + database_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/get-transaction.md b/examples/2.3.x/console-python/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..9ae11c6fa --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/get-transaction.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.get_transaction( + transaction_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/get.md b/examples/2.3.x/console-python/examples/documentsdb/get.md new file mode 100644 index 000000000..1e568db26 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Database = documents_db.get( + database_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/console-python/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..8da46d052 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Document = documents_db.increment_document_attribute( + database_id = '', + collection_id = '', + document_id = '', + attribute = '', + value = 1, # optional + max = 100, # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/list-collections.md b/examples/2.3.x/console-python/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..7f6666765 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/list-collections.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import CollectionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: CollectionList = documents_db.list_collections( + database_id = '', + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/list-documents.md b/examples/2.3.x/console-python/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..017135fe1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/list-documents.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.list_documents( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/list-indexes.md b/examples/2.3.x/console-python/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..c84f81690 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/list-indexes.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import IndexList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: IndexList = documents_db.list_indexes( + database_id = '', + collection_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/list-operations.md b/examples/2.3.x/console-python/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..1155fd34a --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/list-operations.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DedicatedDatabaseOperationList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DedicatedDatabaseOperationList = documents_db.list_operations( + database_id = '', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/list-specifications.md b/examples/2.3.x/console-python/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..1524017b2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/list-specifications.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DedicatedDatabaseSpecificationList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DedicatedDatabaseSpecificationList = documents_db.list_specifications() + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..cb1db3563 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/list-transactions.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import TransactionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: TransactionList = documents_db.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/list.md b/examples/2.3.x/console-python/examples/documentsdb/list.md new file mode 100644 index 000000000..170ca54e6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/list.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DatabaseList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DatabaseList = documents_db.list( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/update-collection.md b/examples/2.3.x/console-python/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..25a5bcfa5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/update-collection.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Collection +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.update_collection( + database_id = '', + collection_id = '', + name = '', + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/update-document.md b/examples/2.3.x/console-python/examples/documentsdb/update-document.md new file mode 100644 index 000000000..01031f0bc --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/update-document.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Document = documents_db.update_document( + database_id = '', + collection_id = '', + document_id = '', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/update-documents.md b/examples/2.3.x/console-python/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..64a4340d3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/update-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.update_documents( + database_id = '', + collection_id = '', + data = {}, # optional + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/update-transaction.md b/examples/2.3.x/console-python/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..9311b9b12 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/update-transaction.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.update_transaction( + transaction_id = '', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/update.md b/examples/2.3.x/console-python/examples/documentsdb/update.md new file mode 100644 index 000000000..784eb57fe --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/update.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Database = documents_db.update( + database_id = '', + name = '', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/upsert-document.md b/examples/2.3.x/console-python/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..7672f4271 --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/upsert-document.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: Document = documents_db.upsert_document( + database_id = '', + collection_id = '', + document_id = '', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/documentsdb/upsert-documents.md b/examples/2.3.x/console-python/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..9cf057d7a --- /dev/null +++ b/examples/2.3.x/console-python/examples/documentsdb/upsert-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.documents_db import DocumentsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.upsert_documents( + database_id = '', + collection_id = '', + documents = [], + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/console-python/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..182922da5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_google_workspace( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/console-python/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..f809477df --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_i_cloud( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-preset-mailgun.md b/examples/2.3.x/console-python/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..89ff728fd --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-preset-mailgun.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_mailgun( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-preset-outlook.md b/examples/2.3.x/console-python/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..f8e1a4fa6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-preset-outlook.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_outlook( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/console-python/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..f29e68e9e --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_proton_mail( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-preset-zoho.md b/examples/2.3.x/console-python/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..09f5e9b30 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-preset-zoho.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_zoho( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-purchase.md b/examples/2.3.x/console-python/examples/domains/create-purchase.md new file mode 100644 index 000000000..6efaa01d4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-purchase.md @@ -0,0 +1,28 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainPurchase + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainPurchase = domains.create_purchase( + domain = 'example.com', + organization_id = '', + first_name = '', + last_name = '', + email = 'email@example.com', + phone = '+12065550100', + billing_address_id = '', + payment_method_id = '', + address_line3 = '', # optional + company_name = '', # optional + period_years = 1, # optional + auto_renewal = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-a.md b/examples/2.3.x/console-python/examples/domains/create-record-a.md new file mode 100644 index 000000000..9a4803589 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-a.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_a( + domain_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-aaaa.md b/examples/2.3.x/console-python/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..f20a0b75a --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-aaaa.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_aaaa( + domain_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-alias.md b/examples/2.3.x/console-python/examples/domains/create-record-alias.md new file mode 100644 index 000000000..57eadef6f --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-alias.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_alias( + domain_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-caa.md b/examples/2.3.x/console-python/examples/domains/create-record-caa.md new file mode 100644 index 000000000..7517a1c0e --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-caa.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_caa( + domain_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-cname.md b/examples/2.3.x/console-python/examples/domains/create-record-cname.md new file mode 100644 index 000000000..243b74935 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-cname.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_cname( + domain_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-https.md b/examples/2.3.x/console-python/examples/domains/create-record-https.md new file mode 100644 index 000000000..0e9b65c60 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-https.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_https( + domain_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-mx.md b/examples/2.3.x/console-python/examples/domains/create-record-mx.md new file mode 100644 index 000000000..0baa557b2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-mx.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_mx( + domain_id = '', + name = '', + value = '', + ttl = 1, + priority = 0, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-ns.md b/examples/2.3.x/console-python/examples/domains/create-record-ns.md new file mode 100644 index 000000000..c4868c5e3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-ns.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_ns( + domain_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-srv.md b/examples/2.3.x/console-python/examples/domains/create-record-srv.md new file mode 100644 index 000000000..54e27d659 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-srv.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_srv( + domain_id = '', + name = '', + value = '', + ttl = 1, + priority = 0, + weight = 0, + port = 0, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-record-txt.md b/examples/2.3.x/console-python/examples/domains/create-record-txt.md new file mode 100644 index 000000000..653e1d451 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-record-txt.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.create_record_txt( + domain_id = '', + name = '', + ttl = 1, + value = '', # optional + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-transfer-in.md b/examples/2.3.x/console-python/examples/domains/create-transfer-in.md new file mode 100644 index 000000000..1c4634a8e --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-transfer-in.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainPurchase + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainPurchase = domains.create_transfer_in( + domain = 'example.com', + organization_id = '', + auth_code = '', + payment_method_id = '', + auto_renewal = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create-transfer-out.md b/examples/2.3.x/console-python/examples/domains/create-transfer-out.md new file mode 100644 index 000000000..4e75fab32 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create-transfer-out.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainTransferOut + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainTransferOut = domains.create_transfer_out( + domain_id = '', + organization_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/create.md b/examples/2.3.x/console-python/examples/domains/create.md new file mode 100644 index 000000000..73a1d139f --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/create.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import Domain + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: Domain = domains.create( + team_id = '', + domain = 'example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/delete-record.md b/examples/2.3.x/console-python/examples/domains/delete-record.md new file mode 100644 index 000000000..f30b22d22 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/delete-record.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result = domains.delete_record( + domain_id = '', + record_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/domains/delete.md b/examples/2.3.x/console-python/examples/domains/delete.md new file mode 100644 index 000000000..e13027179 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result = domains.delete( + domain_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/console-python/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..3c2d18f75 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_google_workspace( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/console-python/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..b17f5a7f2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_i_cloud( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-preset-mailgun.md b/examples/2.3.x/console-python/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..4a0ab236d --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-preset-mailgun.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_mailgun( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-preset-outlook.md b/examples/2.3.x/console-python/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..322070ff2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-preset-outlook.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_outlook( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/console-python/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..25ac066ad --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_proton_mail( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-preset-zoho.md b/examples/2.3.x/console-python/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..ccbdd4bcb --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-preset-zoho.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_zoho( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-price.md b/examples/2.3.x/console-python/examples/domains/get-price.md new file mode 100644 index 000000000..fc89b712c --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-price.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainPrice +from appwrite_console.enums import DomainRegistrationType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainPrice = domains.get_price( + domain = 'example.com', + period_years = None, # optional + registration_type = DomainRegistrationType.NEW # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-record.md b/examples/2.3.x/console-python/examples/domains/get-record.md new file mode 100644 index 000000000..848128508 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-record.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.get_record( + domain_id = '', + record_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-transfer-status.md b/examples/2.3.x/console-python/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..411a98242 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-transfer-status.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainTransferStatus + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainTransferStatus = domains.get_transfer_status( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get-zone.md b/examples/2.3.x/console-python/examples/domains/get-zone.md new file mode 100644 index 000000000..7997f7511 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get-zone.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result = domains.get_zone( + domain_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/domains/get.md b/examples/2.3.x/console-python/examples/domains/get.md new file mode 100644 index 000000000..d83333b5a --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import Domain + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: Domain = domains.get( + domain_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/list-prices.md b/examples/2.3.x/console-python/examples/domains/list-prices.md new file mode 100644 index 000000000..f4c7f42f6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/list-prices.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainPricesList +from appwrite_console.enums import DomainRegistrationType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainPricesList = domains.list_prices( + domains = [], + period_years = None, # optional + registration_type = DomainRegistrationType.NEW # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/list-records.md b/examples/2.3.x/console-python/examples/domains/list-records.md new file mode 100644 index 000000000..d7232b2e9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/list-records.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecordsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecordsList = domains.list_records( + domain_id = '', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/list-suggestions.md b/examples/2.3.x/console-python/examples/domains/list-suggestions.md new file mode 100644 index 000000000..bc14cc306 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/list-suggestions.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainSuggestionsList +from appwrite_console.enums import DomainSuggestionType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainSuggestionsList = domains.list_suggestions( + query = '', + tlds = [], # optional + limit = None, # optional + filter_type = DomainSuggestionType.PREMIUM, # optional + price_max = None, # optional + price_min = None # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/list.md b/examples/2.3.x/console-python/examples/domains/list.md new file mode 100644 index 000000000..8bbba7ca5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/list.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainsList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainsList = domains.list( + queries = [], # optional + search = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-auto-renewal.md b/examples/2.3.x/console-python/examples/domains/update-auto-renewal.md new file mode 100644 index 000000000..55c9da990 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-auto-renewal.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import Domain + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: Domain = domains.update_auto_renewal( + domain_id = '', + auto_renewal = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-nameservers.md b/examples/2.3.x/console-python/examples/domains/update-nameservers.md new file mode 100644 index 000000000..36ee1d1aa --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-nameservers.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import Domain + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: Domain = domains.update_nameservers( + domain_id = '', + nameservers = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-purchase.md b/examples/2.3.x/console-python/examples/domains/update-purchase.md new file mode 100644 index 000000000..b0fcf1276 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-purchase.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainPurchase + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainPurchase = domains.update_purchase( + invoice_id = '', + organization_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-a.md b/examples/2.3.x/console-python/examples/domains/update-record-a.md new file mode 100644 index 000000000..9a8b15ccc --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-a.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_a( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-aaaa.md b/examples/2.3.x/console-python/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..1c943aa14 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-aaaa.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_aaaa( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-alias.md b/examples/2.3.x/console-python/examples/domains/update-record-alias.md new file mode 100644 index 000000000..e6273d698 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-alias.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_alias( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-caa.md b/examples/2.3.x/console-python/examples/domains/update-record-caa.md new file mode 100644 index 000000000..eb44ff7d3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-caa.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_caa( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-cname.md b/examples/2.3.x/console-python/examples/domains/update-record-cname.md new file mode 100644 index 000000000..3df89c072 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-cname.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_cname( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-https.md b/examples/2.3.x/console-python/examples/domains/update-record-https.md new file mode 100644 index 000000000..360c31bb7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-https.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_https( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-mx.md b/examples/2.3.x/console-python/examples/domains/update-record-mx.md new file mode 100644 index 000000000..e3f86a0c0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-mx.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_mx( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + priority = 0, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-ns.md b/examples/2.3.x/console-python/examples/domains/update-record-ns.md new file mode 100644 index 000000000..f37f94094 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-ns.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_ns( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-srv.md b/examples/2.3.x/console-python/examples/domains/update-record-srv.md new file mode 100644 index 000000000..ffa22f0ad --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-srv.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_srv( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + priority = 0, + weight = 0, + port = 0, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-record-txt.md b/examples/2.3.x/console-python/examples/domains/update-record-txt.md new file mode 100644 index 000000000..c2d1f7086 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-record-txt.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DnsRecord + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DnsRecord = domains.update_record_txt( + domain_id = '', + record_id = '', + name = '', + value = '', + ttl = 1, + comment = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-team.md b/examples/2.3.x/console-python/examples/domains/update-team.md new file mode 100644 index 000000000..0b2b8c73f --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-team.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import Domain + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: Domain = domains.update_team( + domain_id = '', + team_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-transfer-in.md b/examples/2.3.x/console-python/examples/domains/update-transfer-in.md new file mode 100644 index 000000000..44b78a5e2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-transfer-in.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import DomainPurchase + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: DomainPurchase = domains.update_transfer_in( + invoice_id = '', + organization_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/update-zone.md b/examples/2.3.x/console-python/examples/domains/update-zone.md new file mode 100644 index 000000000..14f4954b0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/update-zone.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import Domain + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: Domain = domains.update_zone( + domain_id = '', + content = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/domains/verify-nameservers.md b/examples/2.3.x/console-python/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..7ebf0c7bc --- /dev/null +++ b/examples/2.3.x/console-python/examples/domains/verify-nameservers.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.domains import Domains +from appwrite_console.models import Domain + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +domains = Domains(client) + +result: Domain = domains.verify_nameservers( + domain_id = '' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..1ed437b62 --- /dev/null +++ b/examples/2.3.x/console-python/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.embeddings import Embeddings +from appwrite_console.models import EmbeddingList +from appwrite_console.enums import EmbeddingModel + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +embeddings = Embeddings(client) + +result: EmbeddingList = embeddings.create_text_embeddings( + texts = [], + model = EmbeddingModel.NOMIC_EMBED_TEXT # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/create-deployment.md b/examples/2.3.x/console-python/examples/functions/create-deployment.md new file mode 100644 index 000000000..954d3a806 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/create-deployment.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.input_file import InputFile +from appwrite_console.models import Deployment + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Deployment = functions.create_deployment( + function_id = '', + code = InputFile.from_path('file.png'), + activate = False, + entrypoint = '', # optional + commands = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/console-python/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..19f335c56 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Deployment + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Deployment = functions.create_duplicate_deployment( + function_id = '', + deployment_id = '', + build_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/create-execution.md b/examples/2.3.x/console-python/examples/functions/create-execution.md new file mode 100644 index 000000000..1f3ce8f85 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/create-execution.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Execution +from appwrite_console.enums import ExecutionMethod + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Execution = functions.create_execution( + function_id = '', + body = '', # optional + async = False, # optional + path = '', # optional + method = ExecutionMethod.GET, # optional + headers = {}, # optional + scheduled_at = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/create-template-deployment.md b/examples/2.3.x/console-python/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..7e2b51d2b --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/create-template-deployment.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Deployment +from appwrite_console.enums import TemplateReferenceType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Deployment = functions.create_template_deployment( + function_id = '', + repository = '', + owner = '', + root_directory = '', + type = TemplateReferenceType.COMMIT, + reference = '', + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/create-variable.md b/examples/2.3.x/console-python/examples/functions/create-variable.md new file mode 100644 index 000000000..43b63545f --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/create-variable.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Variable + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Variable = functions.create_variable( + function_id = '', + variable_id = '', + key = '', + value = '', + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/create-vcs-deployment.md b/examples/2.3.x/console-python/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..4c5825c1f --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/create-vcs-deployment.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Deployment +from appwrite_console.enums import VCSReferenceType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Deployment = functions.create_vcs_deployment( + function_id = '', + type = VCSReferenceType.BRANCH, + reference = '', + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/create.md b/examples/2.3.x/console-python/examples/functions/create.md new file mode 100644 index 000000000..53f14dd56 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/create.md @@ -0,0 +1,40 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Function +from appwrite_console.enums import Runtime +from appwrite_console.enums import ProjectKeyScopes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Function = functions.create( + function_id = '', + name = '', + runtime = Runtime.NODE_14_5, + execute = ["any"], # optional + events = [], # optional + schedule = '0 0 * * *', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '', # optional + commands = '', # optional + scopes = [ProjectKeyScopes.PROJECT_READ], # optional + installation_id = '', # optional + provider_repository_id = '', # optional + provider_branch = '', # optional + provider_silent_mode = False, # optional + provider_root_directory = '', # optional + provider_branches = [], # optional + provider_paths = [], # optional + build_specification = 's-1vcpu-512mb', # optional + runtime_specification = 's-1vcpu-512mb', # optional + deployment_retention = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/delete-deployment.md b/examples/2.3.x/console-python/examples/functions/delete-deployment.md new file mode 100644 index 000000000..546b346fe --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result = functions.delete_deployment( + function_id = '', + deployment_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/functions/delete-execution.md b/examples/2.3.x/console-python/examples/functions/delete-execution.md new file mode 100644 index 000000000..7db0c8bc0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result = functions.delete_execution( + function_id = '', + execution_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/functions/delete-variable.md b/examples/2.3.x/console-python/examples/functions/delete-variable.md new file mode 100644 index 000000000..555572e52 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result = functions.delete_variable( + function_id = '', + variable_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/functions/delete.md b/examples/2.3.x/console-python/examples/functions/delete.md new file mode 100644 index 000000000..2ebe9e9ac --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result = functions.delete( + function_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/functions/get-deployment-download.md b/examples/2.3.x/console-python/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..53120af0b --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/get-deployment-download.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.enums import DeploymentDownloadType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: bytes = functions.get_deployment_download( + function_id = '', + deployment_id = '', + type = DeploymentDownloadType.SOURCE, # optional + token = '' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/functions/get-deployment.md b/examples/2.3.x/console-python/examples/functions/get-deployment.md new file mode 100644 index 000000000..702eb5c10 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/get-deployment.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Deployment + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Deployment = functions.get_deployment( + function_id = '', + deployment_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/get-execution.md b/examples/2.3.x/console-python/examples/functions/get-execution.md new file mode 100644 index 000000000..532f612d2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/get-execution.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Execution + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Execution = functions.get_execution( + function_id = '', + execution_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/get-template.md b/examples/2.3.x/console-python/examples/functions/get-template.md new file mode 100644 index 000000000..7b4954624 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/get-template.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import TemplateFunction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: TemplateFunction = functions.get_template( + template_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/get-variable.md b/examples/2.3.x/console-python/examples/functions/get-variable.md new file mode 100644 index 000000000..2b840b399 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/get-variable.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Variable + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Variable = functions.get_variable( + function_id = '', + variable_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/get.md b/examples/2.3.x/console-python/examples/functions/get.md new file mode 100644 index 000000000..41ea48ce0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Function + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Function = functions.get( + function_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/list-deployments.md b/examples/2.3.x/console-python/examples/functions/list-deployments.md new file mode 100644 index 000000000..aa1ca7c69 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/list-deployments.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import DeploymentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: DeploymentList = functions.list_deployments( + function_id = '', + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/list-executions.md b/examples/2.3.x/console-python/examples/functions/list-executions.md new file mode 100644 index 000000000..7a4fc4a5a --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/list-executions.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import ExecutionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: ExecutionList = functions.list_executions( + function_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..f34385651 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/list-runtimes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import RuntimeList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: RuntimeList = functions.list_runtimes() + +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 new file mode 100644 index 000000000..5bb501568 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/list-specifications.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import SpecificationList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: SpecificationList = functions.list_specifications( + type = 'runtimes' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/list-templates.md b/examples/2.3.x/console-python/examples/functions/list-templates.md new file mode 100644 index 000000000..b5702bf70 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/list-templates.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import TemplateFunctionList +from appwrite_console.enums import Runtime +from appwrite_console.enums import FunctionTemplateUseCase + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: TemplateFunctionList = functions.list_templates( + runtimes = [Runtime.NODE_14_5], # optional + use_cases = [FunctionTemplateUseCase.STARTER], # optional + limit = 1, # optional + offset = 0, # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/list-variables.md b/examples/2.3.x/console-python/examples/functions/list-variables.md new file mode 100644 index 000000000..0613695a7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/list-variables.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import VariableList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: VariableList = functions.list_variables( + function_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/list.md b/examples/2.3.x/console-python/examples/functions/list.md new file mode 100644 index 000000000..5f0d43f85 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/list.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import FunctionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: FunctionList = functions.list( + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/update-deployment-status.md b/examples/2.3.x/console-python/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..84d4ff7dc --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/update-deployment-status.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Deployment + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Deployment = functions.update_deployment_status( + function_id = '', + deployment_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/update-function-deployment.md b/examples/2.3.x/console-python/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..e5adc6028 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/update-function-deployment.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Function + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Function = functions.update_function_deployment( + function_id = '', + deployment_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/update-variable.md b/examples/2.3.x/console-python/examples/functions/update-variable.md new file mode 100644 index 000000000..a65ef4d6f --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/update-variable.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Variable + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Variable = functions.update_variable( + function_id = '', + variable_id = '', + key = '', # optional + value = '', # optional + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/functions/update.md b/examples/2.3.x/console-python/examples/functions/update.md new file mode 100644 index 000000000..0c61e7d98 --- /dev/null +++ b/examples/2.3.x/console-python/examples/functions/update.md @@ -0,0 +1,40 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.functions import Functions +from appwrite_console.models import Function +from appwrite_console.enums import Runtime +from appwrite_console.enums import ProjectKeyScopes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +functions = Functions(client) + +result: Function = functions.update( + function_id = '', + name = '', + runtime = Runtime.NODE_14_5, # optional + execute = ["any"], # optional + events = [], # optional + schedule = '0 0 * * *', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '', # optional + commands = '', # optional + scopes = [ProjectKeyScopes.PROJECT_READ], # optional + installation_id = '', # optional + provider_repository_id = '', # optional + provider_branch = '', # optional + provider_silent_mode = False, # optional + provider_root_directory = '', # optional + provider_branches = [], # optional + provider_paths = [], # optional + build_specification = 's-1vcpu-512mb', # optional + runtime_specification = 's-1vcpu-512mb', # optional + deployment_retention = 0 # 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 new file mode 100644 index 000000000..3b9d4fd4a --- /dev/null +++ b/examples/2.3.x/console-python/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.graphql import Graphql + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +graphql = Graphql(client) + +result = graphql.mutation( + query = {} +) +``` diff --git a/examples/2.3.x/console-python/examples/graphql/query.md b/examples/2.3.x/console-python/examples/graphql/query.md new file mode 100644 index 000000000..111ee1fc3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/graphql/query.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.graphql import Graphql + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +graphql = Graphql(client) + +result = graphql.query( + query = {} +) +``` diff --git a/examples/2.3.x/console-python/examples/locale/get.md b/examples/2.3.x/console-python/examples/locale/get.md new file mode 100644 index 000000000..10472729f --- /dev/null +++ b/examples/2.3.x/console-python/examples/locale/get.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.locale import Locale +from appwrite_console.models import Locale as LocaleModel + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +locale = Locale(client) + +result: LocaleModel = locale.get() + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..1da3d63d4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/locale/list-codes.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.locale import Locale +from appwrite_console.models import LocaleCodeList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +locale = Locale(client) + +result: LocaleCodeList = locale.list_codes() + +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 new file mode 100644 index 000000000..4e8f44fe9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/locale/list-continents.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.locale import Locale +from appwrite_console.models import ContinentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +locale = Locale(client) + +result: ContinentList = locale.list_continents() + +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 new file mode 100644 index 000000000..7b70b948e --- /dev/null +++ b/examples/2.3.x/console-python/examples/locale/list-countries-eu.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.locale import Locale +from appwrite_console.models import CountryList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +locale = Locale(client) + +result: CountryList = locale.list_countries_eu() + +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 new file mode 100644 index 000000000..2b9c8233c --- /dev/null +++ b/examples/2.3.x/console-python/examples/locale/list-countries-phones.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.locale import Locale +from appwrite_console.models import PhoneList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +locale = Locale(client) + +result: PhoneList = locale.list_countries_phones() + +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 new file mode 100644 index 000000000..096755844 --- /dev/null +++ b/examples/2.3.x/console-python/examples/locale/list-countries.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.locale import Locale +from appwrite_console.models import CountryList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +locale = Locale(client) + +result: CountryList = locale.list_countries() + +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 new file mode 100644 index 000000000..8d523fb68 --- /dev/null +++ b/examples/2.3.x/console-python/examples/locale/list-currencies.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.locale import Locale +from appwrite_console.models import CurrencyList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +locale = Locale(client) + +result: CurrencyList = locale.list_currencies() + +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 new file mode 100644 index 000000000..e1ef07e7b --- /dev/null +++ b/examples/2.3.x/console-python/examples/locale/list-languages.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.locale import Locale +from appwrite_console.models import LanguageList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +locale = Locale(client) + +result: LanguageList = locale.list_languages() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-apns-provider.md b/examples/2.3.x/console-python/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..c3d6716a9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-apns-provider.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_apns_provider( + provider_id = '', + name = '', + auth_key = '', # optional + auth_key_id = '', # optional + team_id = '', # optional + bundle_id = '', # optional + sandbox = False, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/console-python/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..323854b92 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_appwrite_provider( + provider_id = '', + name = '', + enabled = False, # optional + qos = 0, # optional + expiry = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-email.md b/examples/2.3.x/console-python/examples/messaging/create-email.md new file mode 100644 index 000000000..9967bb2ef --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-email.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Message + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +messaging = Messaging(client) + +result: Message = messaging.create_email( + message_id = '', + subject = '', + content = '', + topics = [], # optional + users = [], # optional + targets = [], # optional + cc = [], # optional + bcc = [], # optional + attachments = [], # optional + reply_to_email = 'email@example.com', # optional + reply_to_name = '', # 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/create-fcm-provider.md b/examples/2.3.x/console-python/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..d317e333b --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-fcm-provider.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_fcm_provider( + provider_id = '', + name = '', + service_account_json = {}, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/console-python/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..775ac795a --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_mailgun_provider( + provider_id = '', + name = '', + api_key = '', # optional + domain = 'example.com', # optional + is_eu_region = False, # optional + from_name = '', # optional + from_email = 'email@example.com', # optional + reply_to_name = '', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/console-python/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..2099cac53 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_msg91_provider( + provider_id = '', + name = '', + template_id = '', # optional + sender_id = '', # optional + auth_key = '', # optional + enabled = 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 new file mode 100644 index 000000000..6843674be --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-push.md @@ -0,0 +1,36 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Message +from appwrite_console.enums import MessagePriority + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +messaging = Messaging(client) + +result: Message = messaging.create_push( + message_id = '', + title = '', # optional + body = '<BODY>', # optional + topics = [], # optional + users = [], # optional + targets = [], # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '<ID1:ID2>', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = 1, # optional + draft = False, # optional + scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-resend-provider.md b/examples/2.3.x/console-python/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..7964ccb0c --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-resend-provider.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_resend_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/console-python/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..ec17774c6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-ses-provider.md b/examples/2.3.x/console-python/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..e987eec20 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-ses-provider.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_ses_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + access_key = '<ACCESS_KEY>', # optional + secret_key = '<SECRET_KEY>', # optional + region = '<REGION>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-sms.md b/examples/2.3.x/console-python/examples/messaging/create-sms.md new file mode 100644 index 000000000..bd09726ae --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-sms.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Message + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Message = messaging.create_sms( + message_id = '<MESSAGE_ID>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + draft = 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/create-smtp-provider.md b/examples/2.3.x/console-python/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..4f94f3174 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-smtp-provider.md @@ -0,0 +1,31 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider +from appwrite_console.enums import SmtpEncryption + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + host = '<HOST>', + port = 587, # optional + username = '<USERNAME>', # optional + password = 'password', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-subscriber.md b/examples/2.3.x/console-python/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..06054c231 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-subscriber.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Subscriber + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Subscriber = messaging.create_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>', + target_id = '<TARGET_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-telesign-provider.md b/examples/2.3.x/console-python/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..86a0bc213 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-telesign-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/console-python/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..9dd287793 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-topic.md b/examples/2.3.x/console-python/examples/messaging/create-topic.md new file mode 100644 index 000000000..e9ad6fe69 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-topic.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Topic + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Topic = messaging.create_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', + subscribe = ["any"], # optional + qos = 0, # optional + expiry = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-twilio-provider.md b/examples/2.3.x/console-python/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..905eb5e57 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-twilio-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '<FROM>', # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-vonage-provider.md b/examples/2.3.x/console-python/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..9b37baeb5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/create-vonage-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.create_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/delete-provider.md b/examples/2.3.x/console-python/examples/messaging/delete-provider.md new file mode 100644 index 000000000..d96365727 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/delete-provider.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result = messaging.delete_provider( + provider_id = '<PROVIDER_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/delete-subscriber.md b/examples/2.3.x/console-python/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..2d09b6914 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result = messaging.delete_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/delete-topic.md b/examples/2.3.x/console-python/examples/messaging/delete-topic.md new file mode 100644 index 000000000..3a3bf1ef0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/delete-topic.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result = messaging.delete_topic( + topic_id = '<TOPIC_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/delete.md b/examples/2.3.x/console-python/examples/messaging/delete.md new file mode 100644 index 000000000..d91340f86 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result = messaging.delete( + message_id = '<MESSAGE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/get-message.md b/examples/2.3.x/console-python/examples/messaging/get-message.md new file mode 100644 index 000000000..17d8ff063 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/get-message.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Message + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Message = messaging.get_message( + message_id = '<MESSAGE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/get-provider.md b/examples/2.3.x/console-python/examples/messaging/get-provider.md new file mode 100644 index 000000000..5dad34351 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/get-provider.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.get_provider( + provider_id = '<PROVIDER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/get-subscriber.md b/examples/2.3.x/console-python/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..65d9b6347 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/get-subscriber.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Subscriber + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Subscriber = messaging.get_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/get-topic.md b/examples/2.3.x/console-python/examples/messaging/get-topic.md new file mode 100644 index 000000000..39193dd21 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/get-topic.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Topic + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Topic = messaging.get_topic( + topic_id = '<TOPIC_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/list-messages.md b/examples/2.3.x/console-python/examples/messaging/list-messages.md new file mode 100644 index 000000000..f192018db --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/list-messages.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import MessageList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: MessageList = messaging.list_messages( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/list-providers.md b/examples/2.3.x/console-python/examples/messaging/list-providers.md new file mode 100644 index 000000000..52dfccb86 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/list-providers.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import ProviderList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: ProviderList = messaging.list_providers( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/list-subscribers.md b/examples/2.3.x/console-python/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..04da36f32 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/list-subscribers.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import SubscriberList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: SubscriberList = messaging.list_subscribers( + topic_id = '<TOPIC_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/list-targets.md b/examples/2.3.x/console-python/examples/messaging/list-targets.md new file mode 100644 index 000000000..165613073 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/list-targets.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import TargetList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: TargetList = messaging.list_targets( + message_id = '<MESSAGE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/list-topics.md b/examples/2.3.x/console-python/examples/messaging/list-topics.md new file mode 100644 index 000000000..e581538b0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/list-topics.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import TopicList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: TopicList = messaging.list_topics( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-apns-provider.md b/examples/2.3.x/console-python/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..88f610961 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-apns-provider.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/console-python/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..8e1114a55 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_appwrite_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + qos = 0, # optional + expiry = 0 # 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 new file mode 100644 index 000000000..2a60946db --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-email.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Message + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Message = messaging.update_email( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + subject = '<SUBJECT>', # optional + content = '<CONTENT>', # optional + draft = False, # optional + html = False, # optional + cc = [], # optional + bcc = [], # 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 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-fcm-provider.md b/examples/2.3.x/console-python/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..4e79db37b --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-fcm-provider.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + service_account_json = {} # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/console-python/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..21c323603 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + api_key = '<API_KEY>', # optional + domain = 'example.com', # optional + is_eu_region = False, # optional + enabled = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/console-python/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..09a481594 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>' # 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 new file mode 100644 index 000000000..1adf64f8d --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-push.md @@ -0,0 +1,36 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Message +from appwrite_console.enums import MessagePriority + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Message = messaging.update_push( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + title = '<TITLE>', # optional + body = '<BODY>', # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '<ID1:ID2>', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = 1, # optional + draft = False, # optional + scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-resend-provider.md b/examples/2.3.x/console-python/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..c797f3828 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-resend-provider.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_resend_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/console-python/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..651042725 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-ses-provider.md b/examples/2.3.x/console-python/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..810b209b7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-ses-provider.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_ses_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + access_key = '<ACCESS_KEY>', # optional + secret_key = '<SECRET_KEY>', # optional + region = '<REGION>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # 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 new file mode 100644 index 000000000..8660189c7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-sms.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Message + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Message = messaging.update_sms( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + content = '<CONTENT>', # optional + draft = 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-smtp-provider.md b/examples/2.3.x/console-python/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..751f6666a --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-smtp-provider.md @@ -0,0 +1,31 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider +from appwrite_console.enums import SmtpEncryption + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + host = '<HOST>', # optional + port = 1, # optional + username = '<USERNAME>', # optional + password = 'password', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-telesign-provider.md b/examples/2.3.x/console-python/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..3512419b3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-telesign-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/console-python/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..ca6d1835f --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-topic.md b/examples/2.3.x/console-python/examples/messaging/update-topic.md new file mode 100644 index 000000000..5e5dca450 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-topic.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Topic + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Topic = messaging.update_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', # optional + subscribe = ["any"], # optional + qos = 0, # optional + expiry = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-twilio-provider.md b/examples/2.3.x/console-python/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..75c56ee0d --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-twilio-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + from = '<FROM>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/messaging/update-vonage-provider.md b/examples/2.3.x/console-python/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..d422cadc7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/messaging/update-vonage-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.messaging import Messaging +from appwrite_console.models import Provider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +messaging = Messaging(client) + +result: Provider = messaging.update_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + from = '<FROM>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/create-appwrite-migration.md b/examples/2.3.x/console-python/examples/migrations/create-appwrite-migration.md new file mode 100644 index 000000000..f86d1c293 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration +from appwrite_console.enums import AppwriteMigrationResource +from appwrite_console.enums import OnDuplicate + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.create_appwrite_migration( + resources = [AppwriteMigrationResource.USER], + endpoint = 'https://example.com', + project_id = '<PROJECT_ID>', + api_key = '<API_KEY>', + on_duplicate = OnDuplicate.FAIL # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/create-csv-export.md b/examples/2.3.x/console-python/examples/migrations/create-csv-export.md new file mode 100644 index 000000000..cc3a0da2b --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/create-csv-export.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.create_csv_export( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + filename = '<FILENAME>', + columns = [], # optional + queries = [], # optional + delimiter = '<DELIMITER>', # optional + enclosure = '<ENCLOSURE>', # optional + escape = '<ESCAPE>', # optional + header = False, # optional + notify = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/create-csv-import.md b/examples/2.3.x/console-python/examples/migrations/create-csv-import.md new file mode 100644 index 000000000..1b4642044 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/create-csv-import.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration +from appwrite_console.enums import OnDuplicate + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.create_csv_import( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + internal_file = False, # optional + on_duplicate = OnDuplicate.FAIL # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/create-firebase-migration.md b/examples/2.3.x/console-python/examples/migrations/create-firebase-migration.md new file mode 100644 index 000000000..2b1f09ef9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/create-firebase-migration.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration +from appwrite_console.enums import FirebaseMigrationResource + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.create_firebase_migration( + resources = [FirebaseMigrationResource.USER], + service_account = '<SERVICE_ACCOUNT>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/create-json-export.md b/examples/2.3.x/console-python/examples/migrations/create-json-export.md new file mode 100644 index 000000000..e3a85a2c3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/create-json-export.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.create_json_export( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + filename = '<FILENAME>', + columns = [], # optional + queries = [], # optional + notify = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/create-json-import.md b/examples/2.3.x/console-python/examples/migrations/create-json-import.md new file mode 100644 index 000000000..2bdb81d0b --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/create-json-import.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration +from appwrite_console.enums import OnDuplicate + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.create_json_import( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + internal_file = False, # optional + on_duplicate = OnDuplicate.FAIL # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/create-n-host-migration.md b/examples/2.3.x/console-python/examples/migrations/create-n-host-migration.md new file mode 100644 index 000000000..44a83c5fc --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/create-n-host-migration.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration +from appwrite_console.enums import NHostMigrationResource + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.create_n_host_migration( + resources = [NHostMigrationResource.USER], + subdomain = '<SUBDOMAIN>', + region = '<REGION>', + admin_secret = '<ADMIN_SECRET>', + database = '<DATABASE>', + username = '<USERNAME>', + password = 'password', + port = 5432 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/create-supabase-migration.md b/examples/2.3.x/console-python/examples/migrations/create-supabase-migration.md new file mode 100644 index 000000000..c015dd873 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/create-supabase-migration.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration +from appwrite_console.enums import SupabaseMigrationResource + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.create_supabase_migration( + resources = [SupabaseMigrationResource.USER], + endpoint = 'https://example.com', + api_key = '<API_KEY>', + database_host = '<DATABASE_HOST>', + username = '<USERNAME>', + password = 'password', + port = 5432 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/delete.md b/examples/2.3.x/console-python/examples/migrations/delete.md new file mode 100644 index 000000000..855d99d96 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result = migrations.delete( + migration_id = '<MIGRATION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/get-appwrite-report.md b/examples/2.3.x/console-python/examples/migrations/get-appwrite-report.md new file mode 100644 index 000000000..b9f61f59a --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/get-appwrite-report.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import MigrationReport +from appwrite_console.enums import AppwriteMigrationResource + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: MigrationReport = migrations.get_appwrite_report( + resources = [AppwriteMigrationResource.USER], + endpoint = 'https://example.com', + project_id = '<PROJECT_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/get-firebase-report.md b/examples/2.3.x/console-python/examples/migrations/get-firebase-report.md new file mode 100644 index 000000000..b09fc2fae --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/get-firebase-report.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import MigrationReport +from appwrite_console.enums import FirebaseMigrationResource + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: MigrationReport = migrations.get_firebase_report( + resources = [FirebaseMigrationResource.USER], + service_account = '<SERVICE_ACCOUNT>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/get-n-host-report.md b/examples/2.3.x/console-python/examples/migrations/get-n-host-report.md new file mode 100644 index 000000000..c40b931d2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/get-n-host-report.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import MigrationReport +from appwrite_console.enums import NHostMigrationResource + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: MigrationReport = migrations.get_n_host_report( + resources = [NHostMigrationResource.USER], + subdomain = '<SUBDOMAIN>', + region = '<REGION>', + admin_secret = '<ADMIN_SECRET>', + database = '<DATABASE>', + username = '<USERNAME>', + password = 'password', + port = 5432 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/get-supabase-report.md b/examples/2.3.x/console-python/examples/migrations/get-supabase-report.md new file mode 100644 index 000000000..9b6889ab4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/get-supabase-report.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import MigrationReport +from appwrite_console.enums import SupabaseMigrationResource + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: MigrationReport = migrations.get_supabase_report( + resources = [SupabaseMigrationResource.USER], + endpoint = 'https://example.com', + api_key = '<API_KEY>', + database_host = '<DATABASE_HOST>', + username = '<USERNAME>', + password = 'password', + port = 5432 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/get.md b/examples/2.3.x/console-python/examples/migrations/get.md new file mode 100644 index 000000000..2bd046968 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.get( + migration_id = '<MIGRATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/list.md b/examples/2.3.x/console-python/examples/migrations/list.md new file mode 100644 index 000000000..329e09aed --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/list.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import MigrationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: MigrationList = migrations.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/migrations/retry.md b/examples/2.3.x/console-python/examples/migrations/retry.md new file mode 100644 index 000000000..3552db3f3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/migrations/retry.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.migrations import Migrations +from appwrite_console.models import Migration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +migrations = Migrations(client) + +result: Migration = migrations.retry( + migration_id = '<MIGRATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/create-backup-policy.md b/examples/2.3.x/console-python/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..84b9d89a1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/create-backup-policy.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: BackupPolicy = mongo.create_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', + schedule = '', + retention = 1, + type = 'full', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/create-backup.md b/examples/2.3.x/console-python/examples/mongo/create-backup.md new file mode 100644 index 000000000..8d5d10f0b --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/create-backup.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseBackup + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseBackup = mongo.create_backup( + database_id = '<DATABASE_ID>', + type = 'full' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/create-branch.md b/examples/2.3.x/console-python/examples/mongo/create-branch.md new file mode 100644 index 000000000..b2075b046 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/create-branch.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>', # optional + ttl = 300 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/create-failover.md b/examples/2.3.x/console-python/examples/mongo/create-failover.md new file mode 100644 index 000000000..792333687 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/create-failover.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/create-migration.md b/examples/2.3.x/console-python/examples/mongo/create-migration.md new file mode 100644 index 000000000..1ef6dbb61 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/create-migration.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create_migration( + database_id = '<DATABASE_ID>', + target_type = 'shared', + specification = '<SPECIFICATION>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/create-restoration.md b/examples/2.3.x/console-python/examples/mongo/create-restoration.md new file mode 100644 index 000000000..21ab8b525 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/create-restoration.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseRestoration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseRestoration = mongo.create_restoration( + database_id = '<DATABASE_ID>', + type = 'backup', # optional + backup_id = '<BACKUP_ID>', # optional + target_database_id = '<TARGET_DATABASE_ID>', # optional + target_time = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/create-upgrade.md b/examples/2.3.x/console-python/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..c4ba8cc89 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/create-upgrade.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create_upgrade( + database_id = '<DATABASE_ID>', + target_version = '<TARGET_VERSION>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/create.md b/examples/2.3.x/console-python/examples/mongo/create.md new file mode 100644 index 000000000..e97865c71 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/create.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + version = '17', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/delete-backup-policy.md b/examples/2.3.x/console-python/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..dc4bc01b6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/delete-backup-policy.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result = mongo.delete_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/delete-backup.md b/examples/2.3.x/console-python/examples/mongo/delete-backup.md new file mode 100644 index 000000000..f638c8cbe --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/delete-backup.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result = mongo.delete_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/delete-branch.md b/examples/2.3.x/console-python/examples/mongo/delete-branch.md new file mode 100644 index 000000000..18ee284b6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/delete-branch.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.delete_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/delete.md b/examples/2.3.x/console-python/examples/mongo/delete.md new file mode 100644 index 000000000..d892d074a --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result = mongo.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/get-backup-policy.md b/examples/2.3.x/console-python/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..04ce2536e --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/get-backup-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: BackupPolicy = mongo.get_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/get-backup.md b/examples/2.3.x/console-python/examples/mongo/get-backup.md new file mode 100644 index 000000000..d8f63c169 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/get-backup.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseBackup + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseBackup = mongo.get_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/get-pitr.md b/examples/2.3.x/console-python/examples/mongo/get-pitr.md new file mode 100644 index 000000000..78825ae90 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/get-pitr.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabasePITRWindows + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabasePITRWindows = mongo.get_pitr( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/get-replicas.md b/examples/2.3.x/console-python/examples/mongo/get-replicas.md new file mode 100644 index 000000000..3ba9717f6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/get-replicas.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseReplicas + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseReplicas = mongo.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/get-restoration.md b/examples/2.3.x/console-python/examples/mongo/get-restoration.md new file mode 100644 index 000000000..42cfb3b7f --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/get-restoration.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseRestoration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseRestoration = mongo.get_restoration( + database_id = '<DATABASE_ID>', + restoration_id = '<RESTORATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/get-status.md b/examples/2.3.x/console-python/examples/mongo/get-status.md new file mode 100644 index 000000000..5929f0258 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/get-status.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DatabaseStatus + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DatabaseStatus = mongo.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/get.md b/examples/2.3.x/console-python/examples/mongo/get.md new file mode 100644 index 000000000..15645350f --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/list-backup-policies.md b/examples/2.3.x/console-python/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..7fac12c12 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/list-backup-policies.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import BackupPolicyList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: BackupPolicyList = mongo.list_backup_policies( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/list-backups.md b/examples/2.3.x/console-python/examples/mongo/list-backups.md new file mode 100644 index 000000000..8aff62589 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/list-backups.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseBackupList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseBackupList = mongo.list_backups( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/list-branches.md b/examples/2.3.x/console-python/examples/mongo/list-branches.md new file mode 100644 index 000000000..ead7dbf43 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/list-branches.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseBranchList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseBranchList = mongo.list_branches( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/list-operations.md b/examples/2.3.x/console-python/examples/mongo/list-operations.md new file mode 100644 index 000000000..87da1124b --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/list-operations.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseOperationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseOperationList = mongo.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/list-restorations.md b/examples/2.3.x/console-python/examples/mongo/list-restorations.md new file mode 100644 index 000000000..911f32347 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/list-restorations.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseRestorationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseRestorationList = mongo.list_restorations( + database_id = '<DATABASE_ID>', + status = 'pending', # optional + type = 'backup', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/list-specifications.md b/examples/2.3.x/console-python/examples/mongo/list-specifications.md new file mode 100644 index 000000000..c0d2b5600 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/list-specifications.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseSpecificationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseSpecificationList = mongo.list_specifications() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/list.md b/examples/2.3.x/console-python/examples/mongo/list.md new file mode 100644 index 000000000..dfa28e5f8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/list.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseList = mongo.list( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/update-backup-policy.md b/examples/2.3.x/console-python/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..da12e766a --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/update-backup-policy.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: BackupPolicy = mongo.update_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', # optional + schedule = '', # optional + retention = 1, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/update-backup-storage.md b/examples/2.3.x/console-python/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..d56bd37ae --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/update-backup-storage.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseBackupStorage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseBackupStorage = mongo.update_backup_storage( + database_id = '<DATABASE_ID>', + provider = 's3', + bucket = '<BUCKET>', + access_key = '<ACCESS_KEY>', + secret_key = '<SECRET_KEY>', + region = '<REGION>', # optional + prefix = '<PREFIX>', # optional + endpoint = '<ENDPOINT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/update-credentials.md b/examples/2.3.x/console-python/examples/mongo/update-credentials.md new file mode 100644 index 000000000..17a756d6a --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/update-credentials.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabaseOperation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabaseOperation = mongo.update_credentials( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/update-maintenance.md b/examples/2.3.x/console-python/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..833153123 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/update-maintenance.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.update_maintenance( + database_id = '<DATABASE_ID>', + day = 'sun', + hour_utc = 0 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mongo/update.md b/examples/2.3.x/console-python/examples/mongo/update.md new file mode 100644 index 000000000..91d379bfa --- /dev/null +++ b/examples/2.3.x/console-python/examples/mongo/update.md @@ -0,0 +1,37 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mongo import Mongo +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + status = 'ready', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0, # optional + metrics_trace_sample_rate = None, # optional + metrics_slow_query_log_threshold_ms = 0, # optional + sql_api_enabled = False, # optional + sql_api_allowed_statements = [], # optional + sql_api_max_rows = 1, # optional + sql_api_max_bytes = 1024, # optional + sql_api_timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create-backup-policy.md b/examples/2.3.x/console-python/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..48cfa7323 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create-backup-policy.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: BackupPolicy = mysql.create_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', + schedule = '', + retention = 1, + type = 'full', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create-backup.md b/examples/2.3.x/console-python/examples/mysql/create-backup.md new file mode 100644 index 000000000..25cdfffcf --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create-backup.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseBackup + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseBackup = mysql.create_backup( + database_id = '<DATABASE_ID>', + type = 'full' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create-branch.md b/examples/2.3.x/console-python/examples/mysql/create-branch.md new file mode 100644 index 000000000..b109dbf3c --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create-branch.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>', # optional + ttl = 300 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create-execution.md b/examples/2.3.x/console-python/examples/mysql/create-execution.md new file mode 100644 index 000000000..1a1820939 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create-execution.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseExecution + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseExecution = mysql.create_execution( + database_id = '<DATABASE_ID>', + sql = '<SQL>', + bindings = {}, # optional + timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create-failover.md b/examples/2.3.x/console-python/examples/mysql/create-failover.md new file mode 100644 index 000000000..d616ca104 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create-failover.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create-migration.md b/examples/2.3.x/console-python/examples/mysql/create-migration.md new file mode 100644 index 000000000..8945072ca --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create-migration.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create_migration( + database_id = '<DATABASE_ID>', + target_type = 'shared', + specification = '<SPECIFICATION>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create-restoration.md b/examples/2.3.x/console-python/examples/mysql/create-restoration.md new file mode 100644 index 000000000..2ed44b96a --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create-restoration.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseRestoration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseRestoration = mysql.create_restoration( + database_id = '<DATABASE_ID>', + type = 'backup', # optional + backup_id = '<BACKUP_ID>', # optional + target_database_id = '<TARGET_DATABASE_ID>', # optional + target_time = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create-upgrade.md b/examples/2.3.x/console-python/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..eab3f1e6e --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create-upgrade.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create_upgrade( + database_id = '<DATABASE_ID>', + target_version = '<TARGET_VERSION>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/create.md b/examples/2.3.x/console-python/examples/mysql/create.md new file mode 100644 index 000000000..0159a3702 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/create.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + version = '17', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/delete-backup-policy.md b/examples/2.3.x/console-python/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..e4b7c9ea7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/delete-backup-policy.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result = mysql.delete_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/delete-backup.md b/examples/2.3.x/console-python/examples/mysql/delete-backup.md new file mode 100644 index 000000000..51e0fc013 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/delete-backup.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result = mysql.delete_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/delete-branch.md b/examples/2.3.x/console-python/examples/mysql/delete-branch.md new file mode 100644 index 000000000..667fc85d4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/delete-branch.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.delete_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/delete.md b/examples/2.3.x/console-python/examples/mysql/delete.md new file mode 100644 index 000000000..002afa1d2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result = mysql.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/get-backup-policy.md b/examples/2.3.x/console-python/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..311af7037 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/get-backup-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: BackupPolicy = mysql.get_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/get-backup.md b/examples/2.3.x/console-python/examples/mysql/get-backup.md new file mode 100644 index 000000000..70fc76be2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/get-backup.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseBackup + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseBackup = mysql.get_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/get-pitr.md b/examples/2.3.x/console-python/examples/mysql/get-pitr.md new file mode 100644 index 000000000..706ff77d3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/get-pitr.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabasePITRWindows + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabasePITRWindows = mysql.get_pitr( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/get-pooler.md b/examples/2.3.x/console-python/examples/mysql/get-pooler.md new file mode 100644 index 000000000..fd3c1f725 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/get-pooler.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabasePooler + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabasePooler = mysql.get_pooler( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/get-replicas.md b/examples/2.3.x/console-python/examples/mysql/get-replicas.md new file mode 100644 index 000000000..76d7e543c --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/get-replicas.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseReplicas + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseReplicas = mysql.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/get-restoration.md b/examples/2.3.x/console-python/examples/mysql/get-restoration.md new file mode 100644 index 000000000..c1360d18f --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/get-restoration.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseRestoration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseRestoration = mysql.get_restoration( + database_id = '<DATABASE_ID>', + restoration_id = '<RESTORATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/get-status.md b/examples/2.3.x/console-python/examples/mysql/get-status.md new file mode 100644 index 000000000..ed780b373 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/get-status.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DatabaseStatus + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DatabaseStatus = mysql.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/get.md b/examples/2.3.x/console-python/examples/mysql/get.md new file mode 100644 index 000000000..4e03f210b --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/list-backup-policies.md b/examples/2.3.x/console-python/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..932935106 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/list-backup-policies.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import BackupPolicyList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: BackupPolicyList = mysql.list_backup_policies( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/list-backups.md b/examples/2.3.x/console-python/examples/mysql/list-backups.md new file mode 100644 index 000000000..514061f1e --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/list-backups.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseBackupList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseBackupList = mysql.list_backups( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/list-branches.md b/examples/2.3.x/console-python/examples/mysql/list-branches.md new file mode 100644 index 000000000..1ab1d6a6b --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/list-branches.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseBranchList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseBranchList = mysql.list_branches( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/list-operations.md b/examples/2.3.x/console-python/examples/mysql/list-operations.md new file mode 100644 index 000000000..53c404b36 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/list-operations.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseOperationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseOperationList = mysql.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/list-restorations.md b/examples/2.3.x/console-python/examples/mysql/list-restorations.md new file mode 100644 index 000000000..063b9e04f --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/list-restorations.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseRestorationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseRestorationList = mysql.list_restorations( + database_id = '<DATABASE_ID>', + status = 'pending', # optional + type = 'backup', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/list-specifications.md b/examples/2.3.x/console-python/examples/mysql/list-specifications.md new file mode 100644 index 000000000..da4680c7a --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/list-specifications.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseSpecificationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseSpecificationList = mysql.list_specifications() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/list.md b/examples/2.3.x/console-python/examples/mysql/list.md new file mode 100644 index 000000000..a52711608 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/list.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseList = mysql.list( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/update-backup-policy.md b/examples/2.3.x/console-python/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..1307e2839 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/update-backup-policy.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: BackupPolicy = mysql.update_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', # optional + schedule = '', # optional + retention = 1, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/update-backup-storage.md b/examples/2.3.x/console-python/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..535046d7f --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/update-backup-storage.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseBackupStorage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseBackupStorage = mysql.update_backup_storage( + database_id = '<DATABASE_ID>', + provider = 's3', + bucket = '<BUCKET>', + access_key = '<ACCESS_KEY>', + secret_key = '<SECRET_KEY>', + region = '<REGION>', # optional + prefix = '<PREFIX>', # optional + endpoint = '<ENDPOINT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/update-credentials.md b/examples/2.3.x/console-python/examples/mysql/update-credentials.md new file mode 100644 index 000000000..b441c036a --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/update-credentials.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabaseOperation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabaseOperation = mysql.update_credentials( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/update-maintenance.md b/examples/2.3.x/console-python/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..0628e0085 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/update-maintenance.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.update_maintenance( + database_id = '<DATABASE_ID>', + day = 'sun', + hour_utc = 0 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/update-pooler.md b/examples/2.3.x/console-python/examples/mysql/update-pooler.md new file mode 100644 index 000000000..c2d15254e --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/update-pooler.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabasePooler + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabasePooler = mysql.update_pooler( + database_id = '<DATABASE_ID>', + mode = 'transaction', # optional + max_connections = 10, # optional + default_pool_size = 1, # optional + read_write_splitting = False, # optional + pooler_cpu_request = '<POOLER_CPU_REQUEST>', # optional + pooler_cpu_limit = '<POOLER_CPU_LIMIT>', # optional + pooler_memory_request = '<POOLER_MEMORY_REQUEST>', # optional + pooler_memory_limit = '<POOLER_MEMORY_LIMIT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/mysql/update.md b/examples/2.3.x/console-python/examples/mysql/update.md new file mode 100644 index 000000000..be9201c30 --- /dev/null +++ b/examples/2.3.x/console-python/examples/mysql/update.md @@ -0,0 +1,37 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.mysql import Mysql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + status = 'ready', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0, # optional + metrics_trace_sample_rate = None, # optional + metrics_slow_query_log_threshold_ms = 0, # optional + sql_api_enabled = False, # optional + sql_api_allowed_statements = [], # optional + sql_api_max_rows = 1, # optional + sql_api_max_bytes = 1024, # optional + sql_api_timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/notifications/list.md b/examples/2.3.x/console-python/examples/notifications/list.md new file mode 100644 index 000000000..378c548ad --- /dev/null +++ b/examples/2.3.x/console-python/examples/notifications/list.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.notifications import Notifications +from appwrite_console.models import NotificationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +notifications = Notifications(client) + +result: NotificationList = notifications.list( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/notifications/update.md b/examples/2.3.x/console-python/examples/notifications/update.md new file mode 100644 index 000000000..24cef0527 --- /dev/null +++ b/examples/2.3.x/console-python/examples/notifications/update.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.notifications import Notifications +from appwrite_console.models import Notification + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +notifications = Notifications(client) + +result: Notification = notifications.update( + notification_id = '<NOTIFICATION_ID>', + read = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/approve.md b/examples/2.3.x/console-python/examples/oauth2/approve.md new file mode 100644 index 000000000..5beff206a --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/approve.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2Approve + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2Approve = oauth2.approve( + grant_id = '<GRANT_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + scope = '<SCOPE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/authorize-post.md b/examples/2.3.x/console-python/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..747a672e4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/authorize-post.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2Authorize + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2Authorize = oauth2.authorize_post( + client_id = '<CLIENT_ID>', # optional + redirect_uri = 'https://example.com', # optional + response_type = '', # optional + scope = '<SCOPE>', # optional + state = '<STATE>', # optional + nonce = '<NONCE>', # optional + code_challenge = '<CODE_CHALLENGE>', # optional + code_challenge_method = 's256', # optional + prompt = '<PROMPT>', # optional + max_age = 0, # optional + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + resource = '', # optional + audience = '<AUDIENCE>', # optional + request_uri = '<REQUEST_URI>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/authorize.md b/examples/2.3.x/console-python/examples/oauth2/authorize.md new file mode 100644 index 000000000..b226d424b --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/authorize.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2Authorize + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2Authorize = oauth2.authorize( + client_id = '<CLIENT_ID>', # optional + redirect_uri = 'https://example.com', # optional + response_type = '', # optional + scope = '<SCOPE>', # optional + state = '<STATE>', # optional + nonce = '<NONCE>', # optional + code_challenge = '<CODE_CHALLENGE>', # optional + code_challenge_method = 's256', # optional + prompt = '<PROMPT>', # optional + max_age = 0, # optional + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + resource = '', # optional + audience = '<AUDIENCE>', # optional + request_uri = '<REQUEST_URI>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/create-device-authorization.md b/examples/2.3.x/console-python/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..7214b0968 --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/create-device-authorization.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2DeviceAuthorization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2DeviceAuthorization = oauth2.create_device_authorization( + client_id = '<CLIENT_ID>', # optional + scope = '<SCOPE>', # optional + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + resource = '', # optional + audience = '<AUDIENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/create-grant.md b/examples/2.3.x/console-python/examples/oauth2/create-grant.md new file mode 100644 index 000000000..da42ea393 --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/create-grant.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2Grant + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2Grant = oauth2.create_grant( + user_code = '<USER_CODE>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/create-par.md b/examples/2.3.x/console-python/examples/oauth2/create-par.md new file mode 100644 index 000000000..8151c4838 --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/create-par.md @@ -0,0 +1,29 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2PAR + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2PAR = oauth2.create_par( + client_id = '<CLIENT_ID>', + redirect_uri = 'https://example.com', + response_type = 'code', + scope = '<SCOPE>', # optional + state = '<STATE>', # optional + nonce = '<NONCE>', # optional + code_challenge = '<CODE_CHALLENGE>', # optional + code_challenge_method = 's256', # optional + prompt = '<PROMPT>', # optional + max_age = 0, # optional + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + resource = '', # optional + audience = '<AUDIENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/create-token.md b/examples/2.3.x/console-python/examples/oauth2/create-token.md new file mode 100644 index 000000000..e8ca7cb89 --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/create-token.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2Token + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2Token = oauth2.create_token( + grant_type = '<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 + resource = '', # optional + audience = '<AUDIENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/get-grant.md b/examples/2.3.x/console-python/examples/oauth2/get-grant.md new file mode 100644 index 000000000..9a6ddc3bb --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/get-grant.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2Grant + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2Grant = oauth2.get_grant( + grant_id = '<GRANT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/list-organizations.md b/examples/2.3.x/console-python/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..a4c85fc65 --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/list-organizations.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2OrganizationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2OrganizationList = oauth2.list_organizations( + limit = 1, # optional + offset = 0, # optional + search = '<SEARCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/list-projects.md b/examples/2.3.x/console-python/examples/oauth2/list-projects.md new file mode 100644 index 000000000..e8790c55d --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/list-projects.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2ProjectList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2ProjectList = oauth2.list_projects( + limit = 1, # optional + offset = 0, # optional + search = '<SEARCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/logout-post.md b/examples/2.3.x/console-python/examples/oauth2/logout-post.md new file mode 100644 index 000000000..7695bd360 --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/logout-post.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result = oauth2.logout_post( + id_token_hint = '<ID_TOKEN_HINT>', # optional + logout_hint = '<LOGOUT_HINT>', # optional + client_id = '<CLIENT_ID>', # optional + post_logout_redirect_uri = 'https://example.com', # optional + state = '<STATE>', # optional + ui_locales = '<UI_LOCALES>' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/logout.md b/examples/2.3.x/console-python/examples/oauth2/logout.md new file mode 100644 index 000000000..e79f8f14d --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/logout.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result = oauth2.logout( + id_token_hint = '<ID_TOKEN_HINT>', # optional + logout_hint = '<LOGOUT_HINT>', # optional + client_id = '<CLIENT_ID>', # optional + post_logout_redirect_uri = 'https://example.com', # optional + state = '<STATE>', # optional + ui_locales = '<UI_LOCALES>' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/reject.md b/examples/2.3.x/console-python/examples/oauth2/reject.md new file mode 100644 index 000000000..437e7245a --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/reject.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 +from appwrite_console.models import Oauth2Reject + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result: Oauth2Reject = oauth2.reject( + grant_id = '<GRANT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/oauth2/revoke.md b/examples/2.3.x/console-python/examples/oauth2/revoke.md new file mode 100644 index 000000000..b0e3e992c --- /dev/null +++ b/examples/2.3.x/console-python/examples/oauth2/revoke.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.oauth2 import Oauth2 + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +oauth2 = Oauth2(client) + +result = oauth2.revoke( + 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/console-python/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/console-python/examples/organization/create-ephemeral-project-key.md new file mode 100644 index 000000000..925f94809 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import EphemeralKey +from appwrite_console.enums import ProjectKeyScopes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: EphemeralKey = organization.create_ephemeral_project_key( + project_id = '<PROJECT_ID>', + scopes = [ProjectKeyScopes.PROJECT_READ], + duration = 600 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/create-installation.md b/examples/2.3.x/console-python/examples/organization/create-installation.md new file mode 100644 index 000000000..8a93f3b44 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/create-installation.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import AppInstallation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: AppInstallation = organization.create_installation( + app_id = '<APP_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/create-key.md b/examples/2.3.x/console-python/examples/organization/create-key.md new file mode 100644 index 000000000..5eed9c198 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/create-key.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Key +from appwrite_console.enums import OrganizationKeyScopes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Key = organization.create_key( + key_id = '<KEY_ID>', + name = '<NAME>', + scopes = [OrganizationKeyScopes.PROJECTS_READ], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/create-membership.md b/examples/2.3.x/console-python/examples/organization/create-membership.md new file mode 100644 index 000000000..e15b1b953 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/create-membership.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Membership + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Membership = organization.create_membership( + roles = [], + email = 'email@example.com', # optional + user_id = '<USER_ID>', # optional + phone = '+12065550100', # optional + url = 'https://example.com', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..e0843bae1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/create-project-key.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Key +from appwrite_console.enums import ProjectKeyScopes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Key = organization.create_project_key( + project_id = '<PROJECT_ID>', + key_id = '<KEY_ID>', + name = '<NAME>', + scopes = [ProjectKeyScopes.PROJECT_READ], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/create-project.md b/examples/2.3.x/console-python/examples/organization/create-project.md new file mode 100644 index 000000000..885d70ab4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/create-project.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Project +from appwrite_console.enums import Region + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Project = organization.create_project( + project_id = '<PROJECT_ID>', + name = '<NAME>', + region = Region.FRA # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/delete-installation.md b/examples/2.3.x/console-python/examples/organization/delete-installation.md new file mode 100644 index 000000000..1f71f29d5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/delete-installation.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result = organization.delete_installation( + installation_id = '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organization/delete-key.md b/examples/2.3.x/console-python/examples/organization/delete-key.md new file mode 100644 index 000000000..e60ae7d62 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/delete-key.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result = organization.delete_key( + key_id = '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organization/delete-membership.md b/examples/2.3.x/console-python/examples/organization/delete-membership.md new file mode 100644 index 000000000..f44694d08 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/delete-membership.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result = organization.delete_membership( + membership_id = '<MEMBERSHIP_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organization/delete-project-key.md b/examples/2.3.x/console-python/examples/organization/delete-project-key.md new file mode 100644 index 000000000..2f218c64a --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/delete-project-key.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result = organization.delete_project_key( + project_id = '<PROJECT_ID>', + key_id = '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organization/delete-project.md b/examples/2.3.x/console-python/examples/organization/delete-project.md new file mode 100644 index 000000000..9ef51e595 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/delete-project.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result = organization.delete_project( + project_id = '<PROJECT_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organization/delete.md b/examples/2.3.x/console-python/examples/organization/delete.md new file mode 100644 index 000000000..a813c1772 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/delete.md @@ -0,0 +1,12 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result = organization.delete() +``` diff --git a/examples/2.3.x/console-python/examples/organization/get-installation.md b/examples/2.3.x/console-python/examples/organization/get-installation.md new file mode 100644 index 000000000..b022391c3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/get-installation.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import AppInstallation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: AppInstallation = organization.get_installation( + installation_id = '<INSTALLATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/get-key.md b/examples/2.3.x/console-python/examples/organization/get-key.md new file mode 100644 index 000000000..6ad12c85b --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/get-key.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Key + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Key = organization.get_key( + key_id = '<KEY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/get-membership.md b/examples/2.3.x/console-python/examples/organization/get-membership.md new file mode 100644 index 000000000..ed976053c --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/get-membership.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Membership + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Membership = organization.get_membership( + membership_id = '<MEMBERSHIP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/get-project-key.md b/examples/2.3.x/console-python/examples/organization/get-project-key.md new file mode 100644 index 000000000..9875a52e2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/get-project-key.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Key + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Key = organization.get_project_key( + project_id = '<PROJECT_ID>', + key_id = '<KEY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/get-project.md b/examples/2.3.x/console-python/examples/organization/get-project.md new file mode 100644 index 000000000..32fced344 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/get-project.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Project + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Project = organization.get_project( + project_id = '<PROJECT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/get.md b/examples/2.3.x/console-python/examples/organization/get.md new file mode 100644 index 000000000..932c8fd23 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/get.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Organization as OrganizationModel + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: OrganizationModel = organization.get() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/list-installations.md b/examples/2.3.x/console-python/examples/organization/list-installations.md new file mode 100644 index 000000000..39f18bf46 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/list-installations.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import AppInstallationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: AppInstallationList = organization.list_installations( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/list-keys.md b/examples/2.3.x/console-python/examples/organization/list-keys.md new file mode 100644 index 000000000..eeaa59dba --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/list-keys.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import KeyList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: KeyList = organization.list_keys( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/list-memberships.md b/examples/2.3.x/console-python/examples/organization/list-memberships.md new file mode 100644 index 000000000..dd1527aa6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/list-memberships.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import MembershipList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: MembershipList = organization.list_memberships( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/list-project-keys.md b/examples/2.3.x/console-python/examples/organization/list-project-keys.md new file mode 100644 index 000000000..503d1c2c6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/list-project-keys.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import KeyList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: KeyList = organization.list_project_keys( + project_id = '<PROJECT_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/list-projects.md b/examples/2.3.x/console-python/examples/organization/list-projects.md new file mode 100644 index 000000000..14d466731 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/list-projects.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import ProjectList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: ProjectList = organization.list_projects( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/update-installation.md b/examples/2.3.x/console-python/examples/organization/update-installation.md new file mode 100644 index 000000000..5ee52b06b --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/update-installation.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import AppInstallation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: AppInstallation = organization.update_installation( + installation_id = '<INSTALLATION_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/update-key.md b/examples/2.3.x/console-python/examples/organization/update-key.md new file mode 100644 index 000000000..55d2bd13f --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/update-key.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Key +from appwrite_console.enums import OrganizationKeyScopes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Key = organization.update_key( + key_id = '<KEY_ID>', + name = '<NAME>', + scopes = [OrganizationKeyScopes.PROJECTS_READ], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/update-membership.md b/examples/2.3.x/console-python/examples/organization/update-membership.md new file mode 100644 index 000000000..6d0c3e82f --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/update-membership.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Membership + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Membership = organization.update_membership( + membership_id = '<MEMBERSHIP_ID>', + roles = [] +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..b17a46a2d --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/update-project-key.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Key +from appwrite_console.enums import ProjectKeyScopes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Key = organization.update_project_key( + project_id = '<PROJECT_ID>', + key_id = '<KEY_ID>', + name = '<NAME>', + scopes = [ProjectKeyScopes.PROJECT_READ], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/update-project.md b/examples/2.3.x/console-python/examples/organization/update-project.md new file mode 100644 index 000000000..47a423a8d --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/update-project.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Project + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: Project = organization.update_project( + project_id = '<PROJECT_ID>', + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organization/update.md b/examples/2.3.x/console-python/examples/organization/update.md new file mode 100644 index 000000000..0e9238cca --- /dev/null +++ b/examples/2.3.x/console-python/examples/organization/update.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organization import Organization +from appwrite_console.models import Organization as OrganizationModel + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organization = Organization(client) + +result: OrganizationModel = organization.update( + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/add-credit.md b/examples/2.3.x/console-python/examples/organizations/add-credit.md new file mode 100644 index 000000000..18e2b4bef --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/add-credit.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Credit + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Credit = organizations.add_credit( + organization_id = '<ORGANIZATION_ID>', + coupon_id = '<COUPON_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/confirm-addon-payment.md b/examples/2.3.x/console-python/examples/organizations/confirm-addon-payment.md new file mode 100644 index 000000000..d6d488f23 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/confirm-addon-payment.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Addon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Addon = organizations.confirm_addon_payment( + organization_id = '<ORGANIZATION_ID>', + addon_id = '<ADDON_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/create-baa-addon.md b/examples/2.3.x/console-python/examples/organizations/create-baa-addon.md new file mode 100644 index 000000000..0b4a32a37 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/create-baa-addon.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Addon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Addon = organizations.create_baa_addon( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/create-downgrade-feedback.md b/examples/2.3.x/console-python/examples/organizations/create-downgrade-feedback.md new file mode 100644 index 000000000..83fb57c0d --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/create-downgrade-feedback.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import DowngradeFeedback + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: DowngradeFeedback = organizations.create_downgrade_feedback( + organization_id = '<ORGANIZATION_ID>', + reason = '<REASON>', + message = '<MESSAGE>', + from_plan_id = '<FROM_PLAN_ID>', + to_plan_id = '<TO_PLAN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/create-invoice-payment.md b/examples/2.3.x/console-python/examples/organizations/create-invoice-payment.md new file mode 100644 index 000000000..fa86049e5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/create-invoice-payment.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Invoice + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Invoice = organizations.create_invoice_payment( + organization_id = '<ORGANIZATION_ID>', + invoice_id = '<INVOICE_ID>', + payment_method_id = '<PAYMENT_METHOD_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/create-plan-estimation.md b/examples/2.3.x/console-python/examples/organizations/create-plan-estimation.md new file mode 100644 index 000000000..f4e12899e --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/create-plan-estimation.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import EstimationPlanChange + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: EstimationPlanChange = organizations.create_plan_estimation( + organization_id = '<ORGANIZATION_ID>', + billing_plan = 'tier-0', + invites = [], # optional + coupon_id = '<COUPON_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/create-premium-geo-db-addon.md b/examples/2.3.x/console-python/examples/organizations/create-premium-geo-db-addon.md new file mode 100644 index 000000000..0d1095c17 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/create-premium-geo-db-addon.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Addon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Addon = organizations.create_premium_geo_db_addon( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/create.md b/examples/2.3.x/console-python/examples/organizations/create.md new file mode 100644 index 000000000..bafc030c8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/create.md @@ -0,0 +1,29 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization +from appwrite_console.models import PaymentAuthentication +from typing import Union +from appwrite_console.enums import Platform + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Union[Organization, PaymentAuthentication] = organizations.create( + organization_id = '<ORGANIZATION_ID>', + name = '<NAME>', + billing_plan = 'tier-0', + payment_method_id = '<PAYMENT_METHOD_ID>', # optional + billing_address_id = '<BILLING_ADDRESS_ID>', # optional + invites = [], # optional + coupon_id = '<COUPON_ID>', # optional + tax_id = '<TAX_ID>', # optional + budget = 0, # optional + platform = Platform.APPWRITE # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/delete-addon.md b/examples/2.3.x/console-python/examples/organizations/delete-addon.md new file mode 100644 index 000000000..2d4ccac4a --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/delete-addon.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result = organizations.delete_addon( + organization_id = '<ORGANIZATION_ID>', + addon_id = '<ADDON_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/delete-backup-payment-method.md b/examples/2.3.x/console-python/examples/organizations/delete-backup-payment-method.md new file mode 100644 index 000000000..018753776 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/delete-backup-payment-method.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.delete_backup_payment_method( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/delete-billing-address.md b/examples/2.3.x/console-python/examples/organizations/delete-billing-address.md new file mode 100644 index 000000000..c071d801a --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/delete-billing-address.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result = organizations.delete_billing_address( + organization_id = '<ORGANIZATION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/delete-default-payment-method.md b/examples/2.3.x/console-python/examples/organizations/delete-default-payment-method.md new file mode 100644 index 000000000..8abd7ab5a --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/delete-default-payment-method.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.delete_default_payment_method( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/delete.md b/examples/2.3.x/console-python/examples/organizations/delete.md new file mode 100644 index 000000000..b3dc1c486 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result = organizations.delete( + organization_id = '<ORGANIZATION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/estimation-create-organization.md b/examples/2.3.x/console-python/examples/organizations/estimation-create-organization.md new file mode 100644 index 000000000..8b40ac9b5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/estimation-create-organization.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Estimation +from appwrite_console.enums import Platform + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Estimation = organizations.estimation_create_organization( + billing_plan = 'tier-0', + payment_method_id = '<PAYMENT_METHOD_ID>', # optional + invites = [], # optional + coupon_id = '<COUPON_ID>', # optional + platform = Platform.APPWRITE # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/estimation-delete-organization.md b/examples/2.3.x/console-python/examples/organizations/estimation-delete-organization.md new file mode 100644 index 000000000..b7508f74d --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/estimation-delete-organization.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import EstimationDeleteOrganization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: EstimationDeleteOrganization = organizations.estimation_delete_organization( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/estimation-update-plan.md b/examples/2.3.x/console-python/examples/organizations/estimation-update-plan.md new file mode 100644 index 000000000..80ef4544e --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/estimation-update-plan.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import EstimationUpdatePlan + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: EstimationUpdatePlan = organizations.estimation_update_plan( + organization_id = '<ORGANIZATION_ID>', + billing_plan = 'tier-0', + invites = [], # optional + coupon_id = '<COUPON_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-addon-price.md b/examples/2.3.x/console-python/examples/organizations/get-addon-price.md new file mode 100644 index 000000000..b0979bee5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-addon-price.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import AddonPrice +from appwrite_console.enums import AddonKey + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: AddonPrice = organizations.get_addon_price( + organization_id = '<ORGANIZATION_ID>', + addon = AddonKey.BAA +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-addon.md b/examples/2.3.x/console-python/examples/organizations/get-addon.md new file mode 100644 index 000000000..2fe3e5293 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-addon.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Addon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Addon = organizations.get_addon( + organization_id = '<ORGANIZATION_ID>', + addon_id = '<ADDON_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-aggregation.md b/examples/2.3.x/console-python/examples/organizations/get-aggregation.md new file mode 100644 index 000000000..1bd2f135d --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-aggregation.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import AggregationTeam + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: AggregationTeam = organizations.get_aggregation( + organization_id = '<ORGANIZATION_ID>', + aggregation_id = '<AGGREGATION_ID>', + limit = 0, # optional + offset = None # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-available-credits.md b/examples/2.3.x/console-python/examples/organizations/get-available-credits.md new file mode 100644 index 000000000..e38b84f67 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-available-credits.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import CreditAvailable + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: CreditAvailable = organizations.get_available_credits( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-billing-address.md b/examples/2.3.x/console-python/examples/organizations/get-billing-address.md new file mode 100644 index 000000000..8e259a518 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-billing-address.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import BillingAddress + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: BillingAddress = organizations.get_billing_address( + organization_id = '<ORGANIZATION_ID>', + billing_address_id = '<BILLING_ADDRESS_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-credit.md b/examples/2.3.x/console-python/examples/organizations/get-credit.md new file mode 100644 index 000000000..8e6a7462a --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-credit.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Credit + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Credit = organizations.get_credit( + organization_id = '<ORGANIZATION_ID>', + credit_id = '<CREDIT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-invoice-download.md b/examples/2.3.x/console-python/examples/organizations/get-invoice-download.md new file mode 100644 index 000000000..7116e7819 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-invoice-download.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: bytes = organizations.get_invoice_download( + organization_id = '<ORGANIZATION_ID>', + invoice_id = '<INVOICE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-invoice-view.md b/examples/2.3.x/console-python/examples/organizations/get-invoice-view.md new file mode 100644 index 000000000..1f2ff2fed --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-invoice-view.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: bytes = organizations.get_invoice_view( + organization_id = '<ORGANIZATION_ID>', + invoice_id = '<INVOICE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-invoice.md b/examples/2.3.x/console-python/examples/organizations/get-invoice.md new file mode 100644 index 000000000..e2142f728 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-invoice.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Invoice + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Invoice = organizations.get_invoice( + organization_id = '<ORGANIZATION_ID>', + invoice_id = '<INVOICE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-payment-method.md b/examples/2.3.x/console-python/examples/organizations/get-payment-method.md new file mode 100644 index 000000000..8b4bba42c --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-payment-method.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import PaymentMethod + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: PaymentMethod = organizations.get_payment_method( + organization_id = '<ORGANIZATION_ID>', + payment_method_id = '<PAYMENT_METHOD_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-plan.md b/examples/2.3.x/console-python/examples/organizations/get-plan.md new file mode 100644 index 000000000..cc5a545f3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-plan.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import BillingPlan + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: BillingPlan = organizations.get_plan( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-scopes.md b/examples/2.3.x/console-python/examples/organizations/get-scopes.md new file mode 100644 index 000000000..93fa5be52 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-scopes.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Roles + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Roles = organizations.get_scopes( + organization_id = '<ORGANIZATION_ID>', + project_id = '<PROJECT_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/get-usage.md b/examples/2.3.x/console-python/examples/organizations/get-usage.md new file mode 100644 index 000000000..69ffcdf65 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/get-usage.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import UsageOrganization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: UsageOrganization = organizations.get_usage( + organization_id = '<ORGANIZATION_ID>', + start_date = '2020-10-15T06:38:00.000+00:00', # optional + end_date = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/list-addons.md b/examples/2.3.x/console-python/examples/organizations/list-addons.md new file mode 100644 index 000000000..85b544f53 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/list-addons.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import AddonList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: AddonList = organizations.list_addons( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/list-aggregations.md b/examples/2.3.x/console-python/examples/organizations/list-aggregations.md new file mode 100644 index 000000000..61e2ce5ea --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/list-aggregations.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import AggregationTeamList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: AggregationTeamList = organizations.list_aggregations( + organization_id = '<ORGANIZATION_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/list-credits.md b/examples/2.3.x/console-python/examples/organizations/list-credits.md new file mode 100644 index 000000000..5e2ea96e9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/list-credits.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import CreditList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: CreditList = organizations.list_credits( + organization_id = '<ORGANIZATION_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/list-invoices.md b/examples/2.3.x/console-python/examples/organizations/list-invoices.md new file mode 100644 index 000000000..5ff6c30ee --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/list-invoices.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import InvoiceList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: InvoiceList = organizations.list_invoices( + organization_id = '<ORGANIZATION_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/list-regions.md b/examples/2.3.x/console-python/examples/organizations/list-regions.md new file mode 100644 index 000000000..718a585a1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/list-regions.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import ConsoleRegionList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: ConsoleRegionList = organizations.list_regions( + organization_id = '<ORGANIZATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/list.md b/examples/2.3.x/console-python/examples/organizations/list.md new file mode 100644 index 000000000..c7cf9af00 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/list.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import OrganizationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: OrganizationList = organizations.list( + queries = [], # optional + search = '<SEARCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/set-backup-payment-method.md b/examples/2.3.x/console-python/examples/organizations/set-backup-payment-method.md new file mode 100644 index 000000000..15fda43ff --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/set-backup-payment-method.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.set_backup_payment_method( + organization_id = '<ORGANIZATION_ID>', + payment_method_id = '<PAYMENT_METHOD_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/set-billing-address.md b/examples/2.3.x/console-python/examples/organizations/set-billing-address.md new file mode 100644 index 000000000..baa81bb2e --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/set-billing-address.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.set_billing_address( + organization_id = '<ORGANIZATION_ID>', + billing_address_id = '<BILLING_ADDRESS_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/set-billing-email.md b/examples/2.3.x/console-python/examples/organizations/set-billing-email.md new file mode 100644 index 000000000..3be1575a0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/set-billing-email.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.set_billing_email( + organization_id = '<ORGANIZATION_ID>', + billing_email = 'email@example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/set-billing-tax-id.md b/examples/2.3.x/console-python/examples/organizations/set-billing-tax-id.md new file mode 100644 index 000000000..f64753008 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/set-billing-tax-id.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.set_billing_tax_id( + organization_id = '<ORGANIZATION_ID>', + tax_id = '<TAX_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/set-default-payment-method.md b/examples/2.3.x/console-python/examples/organizations/set-default-payment-method.md new file mode 100644 index 000000000..5a679d236 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/set-default-payment-method.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.set_default_payment_method( + organization_id = '<ORGANIZATION_ID>', + payment_method_id = '<PAYMENT_METHOD_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/update-budget.md b/examples/2.3.x/console-python/examples/organizations/update-budget.md new file mode 100644 index 000000000..3998cd47e --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/update-budget.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.update_budget( + organization_id = '<ORGANIZATION_ID>', + budget = 0, + alerts = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/update-plan.md b/examples/2.3.x/console-python/examples/organizations/update-plan.md new file mode 100644 index 000000000..6588c0932 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/update-plan.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.update_plan( + organization_id = '<ORGANIZATION_ID>', + billing_plan = 'tier-0', + payment_method_id = '<PAYMENT_METHOD_ID>', # optional + billing_address_id = '<BILLING_ADDRESS_ID>', # optional + invites = [], # optional + coupon_id = '<COUPON_ID>', # optional + tax_id = '<TAX_ID>', # optional + budget = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/validate-invoice.md b/examples/2.3.x/console-python/examples/organizations/validate-invoice.md new file mode 100644 index 000000000..52310da36 --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/validate-invoice.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Invoice + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Invoice = organizations.validate_invoice( + organization_id = '<ORGANIZATION_ID>', + invoice_id = '<INVOICE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/organizations/validate-payment.md b/examples/2.3.x/console-python/examples/organizations/validate-payment.md new file mode 100644 index 000000000..88f58b82a --- /dev/null +++ b/examples/2.3.x/console-python/examples/organizations/validate-payment.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.organizations import Organizations +from appwrite_console.models import Organization + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +organizations = Organizations(client) + +result: Organization = organizations.validate_payment( + organization_id = '<ORGANIZATION_ID>', + invites = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-backup-policy.md b/examples/2.3.x/console-python/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..6d66857ed --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-backup-policy.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: BackupPolicy = postgresql.create_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', + schedule = '', + retention = 1, + type = 'full', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-backup.md b/examples/2.3.x/console-python/examples/postgresql/create-backup.md new file mode 100644 index 000000000..a4b3e680b --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-backup.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseBackup + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBackup = postgresql.create_backup( + database_id = '<DATABASE_ID>', + type = 'full' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-branch.md b/examples/2.3.x/console-python/examples/postgresql/create-branch.md new file mode 100644 index 000000000..0891b4ea1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-branch.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>', # optional + ttl = 300 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-execution.md b/examples/2.3.x/console-python/examples/postgresql/create-execution.md new file mode 100644 index 000000000..d46962fa0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-execution.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseExecution + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseExecution = postgresql.create_execution( + database_id = '<DATABASE_ID>', + sql = '<SQL>', + bindings = {}, # optional + timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-extension.md b/examples/2.3.x/console-python/examples/postgresql/create-extension.md new file mode 100644 index 000000000..5945ce235 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-extension.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_extension( + database_id = '<DATABASE_ID>', + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-failover.md b/examples/2.3.x/console-python/examples/postgresql/create-failover.md new file mode 100644 index 000000000..6f8919cd8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-failover.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-migration.md b/examples/2.3.x/console-python/examples/postgresql/create-migration.md new file mode 100644 index 000000000..4e0673734 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-migration.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_migration( + database_id = '<DATABASE_ID>', + target_type = 'shared', + specification = '<SPECIFICATION>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-restoration.md b/examples/2.3.x/console-python/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..7ba2f7729 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-restoration.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseRestoration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseRestoration = postgresql.create_restoration( + database_id = '<DATABASE_ID>', + type = 'backup', # optional + backup_id = '<BACKUP_ID>', # optional + target_database_id = '<TARGET_DATABASE_ID>', # optional + target_time = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create-upgrade.md b/examples/2.3.x/console-python/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..aeceabcec --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create-upgrade.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_upgrade( + database_id = '<DATABASE_ID>', + target_version = '<TARGET_VERSION>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/create.md b/examples/2.3.x/console-python/examples/postgresql/create.md new file mode 100644 index 000000000..28f7992e7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/create.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + version = '17', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/console-python/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..ab5f65d8d --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result = postgresql.delete_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/delete-backup.md b/examples/2.3.x/console-python/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..70bf11271 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/delete-backup.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result = postgresql.delete_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/delete-branch.md b/examples/2.3.x/console-python/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..6478f4c06 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/delete-branch.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.delete_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/delete-extension.md b/examples/2.3.x/console-python/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..7608de7dc --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/delete-extension.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.delete_extension( + database_id = '<DATABASE_ID>', + extension_name = '<EXTENSION_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/delete.md b/examples/2.3.x/console-python/examples/postgresql/delete.md new file mode 100644 index 000000000..6558f461e --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result = postgresql.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/get-backup-policy.md b/examples/2.3.x/console-python/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..bcbd0cded --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/get-backup-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: BackupPolicy = postgresql.get_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/get-backup.md b/examples/2.3.x/console-python/examples/postgresql/get-backup.md new file mode 100644 index 000000000..fd99b0a5f --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/get-backup.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseBackup + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBackup = postgresql.get_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/get-pitr.md b/examples/2.3.x/console-python/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..6ffba6417 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/get-pitr.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabasePITRWindows + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabasePITRWindows = postgresql.get_pitr( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/get-pooler.md b/examples/2.3.x/console-python/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..d962738ac --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/get-pooler.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabasePooler + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabasePooler = postgresql.get_pooler( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/get-replicas.md b/examples/2.3.x/console-python/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..997366cbe --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/get-replicas.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseReplicas + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseReplicas = postgresql.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/get-restoration.md b/examples/2.3.x/console-python/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..cd2f027ef --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/get-restoration.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseRestoration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseRestoration = postgresql.get_restoration( + database_id = '<DATABASE_ID>', + restoration_id = '<RESTORATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/get-status.md b/examples/2.3.x/console-python/examples/postgresql/get-status.md new file mode 100644 index 000000000..f33000383 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/get-status.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DatabaseStatus + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DatabaseStatus = postgresql.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/get.md b/examples/2.3.x/console-python/examples/postgresql/get.md new file mode 100644 index 000000000..17c19de5c --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/list-backup-policies.md b/examples/2.3.x/console-python/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..91a64855b --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/list-backup-policies.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import BackupPolicyList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: BackupPolicyList = postgresql.list_backup_policies( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/list-backups.md b/examples/2.3.x/console-python/examples/postgresql/list-backups.md new file mode 100644 index 000000000..b474a741b --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/list-backups.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseBackupList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBackupList = postgresql.list_backups( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/list-branches.md b/examples/2.3.x/console-python/examples/postgresql/list-branches.md new file mode 100644 index 000000000..882584566 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/list-branches.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseBranchList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBranchList = postgresql.list_branches( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/list-extensions.md b/examples/2.3.x/console-python/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..058671512 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/list-extensions.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseExtensions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseExtensions = postgresql.list_extensions( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/list-operations.md b/examples/2.3.x/console-python/examples/postgresql/list-operations.md new file mode 100644 index 000000000..795f68304 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/list-operations.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseOperationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseOperationList = postgresql.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/list-restorations.md b/examples/2.3.x/console-python/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..e16352244 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/list-restorations.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseRestorationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseRestorationList = postgresql.list_restorations( + database_id = '<DATABASE_ID>', + status = 'pending', # optional + type = 'backup', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/list-specifications.md b/examples/2.3.x/console-python/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..1215dace0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/list-specifications.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseSpecificationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseSpecificationList = postgresql.list_specifications() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/list.md b/examples/2.3.x/console-python/examples/postgresql/list.md new file mode 100644 index 000000000..414ec6c92 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/list.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseList = postgresql.list( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/update-backup-policy.md b/examples/2.3.x/console-python/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..2827e38ac --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/update-backup-policy.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import BackupPolicy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: BackupPolicy = postgresql.update_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', # optional + schedule = '', # optional + retention = 1, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/update-backup-storage.md b/examples/2.3.x/console-python/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..06ca0c042 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/update-backup-storage.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseBackupStorage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBackupStorage = postgresql.update_backup_storage( + database_id = '<DATABASE_ID>', + provider = 's3', + bucket = '<BUCKET>', + access_key = '<ACCESS_KEY>', + secret_key = '<SECRET_KEY>', + region = '<REGION>', # optional + prefix = '<PREFIX>', # optional + endpoint = '<ENDPOINT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/update-credentials.md b/examples/2.3.x/console-python/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..115a1c259 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/update-credentials.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabaseOperation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabaseOperation = postgresql.update_credentials( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/update-maintenance.md b/examples/2.3.x/console-python/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..fe02b9aa8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/update-maintenance.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.update_maintenance( + database_id = '<DATABASE_ID>', + day = 'sun', + hour_utc = 0 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/update-pooler.md b/examples/2.3.x/console-python/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..3237744df --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/update-pooler.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabasePooler + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabasePooler = postgresql.update_pooler( + database_id = '<DATABASE_ID>', + mode = 'transaction', # optional + max_connections = 10, # optional + default_pool_size = 1, # optional + read_write_splitting = False, # optional + pooler_cpu_request = '<POOLER_CPU_REQUEST>', # optional + pooler_cpu_limit = '<POOLER_CPU_LIMIT>', # optional + pooler_memory_request = '<POOLER_MEMORY_REQUEST>', # optional + pooler_memory_limit = '<POOLER_MEMORY_LIMIT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/postgresql/update.md b/examples/2.3.x/console-python/examples/postgresql/update.md new file mode 100644 index 000000000..792a3cc13 --- /dev/null +++ b/examples/2.3.x/console-python/examples/postgresql/update.md @@ -0,0 +1,37 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.postgresql import Postgresql +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + status = 'ready', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0, # optional + metrics_trace_sample_rate = None, # optional + metrics_slow_query_log_threshold_ms = 0, # optional + sql_api_enabled = False, # optional + sql_api_allowed_statements = [], # optional + sql_api_max_rows = 1, # optional + sql_api_max_bytes = 1024, # optional + sql_api_timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/presences/delete.md b/examples/2.3.x/console-python/examples/presences/delete.md new file mode 100644 index 000000000..f2673b12b --- /dev/null +++ b/examples/2.3.x/console-python/examples/presences/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.presences import Presences + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +presences = Presences(client) + +result = presences.delete( + presence_id = '<PRESENCE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/presences/get-usage.md b/examples/2.3.x/console-python/examples/presences/get-usage.md new file mode 100644 index 000000000..22676e2da --- /dev/null +++ b/examples/2.3.x/console-python/examples/presences/get-usage.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.presences import Presences +from appwrite_console.models import UsagePresence +from appwrite_console.enums import UsageRange + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +presences = Presences(client) + +result: UsagePresence = presences.get_usage( + range = UsageRange.TWENTY_FOUR_HOURS # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/presences/get.md b/examples/2.3.x/console-python/examples/presences/get.md new file mode 100644 index 000000000..b0bcfd690 --- /dev/null +++ b/examples/2.3.x/console-python/examples/presences/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.presences import Presences +from appwrite_console.models import Presence + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +presences = Presences(client) + +result: Presence = presences.get( + presence_id = '<PRESENCE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/presences/list.md b/examples/2.3.x/console-python/examples/presences/list.md new file mode 100644 index 000000000..cbc49f461 --- /dev/null +++ b/examples/2.3.x/console-python/examples/presences/list.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.presences import Presences +from appwrite_console.models import PresenceList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +presences = Presences(client) + +result: PresenceList = presences.list( + queries = [], # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/presences/update.md b/examples/2.3.x/console-python/examples/presences/update.md new file mode 100644 index 000000000..adf1fd5aa --- /dev/null +++ b/examples/2.3.x/console-python/examples/presences/update.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.presences import Presences +from appwrite_console.models import Presence +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +presences = Presences(client) + +result: Presence = presences.update( + presence_id = '<PRESENCE_ID>', + status = '<STATUS>', # optional + expires_at = '2020-10-15T06:38:00.000+00:00', # optional + metadata = {}, # optional + permissions = [Permission.read(Role.any())], # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/presences/upsert.md b/examples/2.3.x/console-python/examples/presences/upsert.md new file mode 100644 index 000000000..942eea347 --- /dev/null +++ b/examples/2.3.x/console-python/examples/presences/upsert.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.presences import Presences +from appwrite_console.models import Presence +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +presences = Presences(client) + +result: Presence = presences.upsert( + presence_id = '<PRESENCE_ID>', + status = '<STATUS>', + permissions = [Permission.read(Role.any())], # optional + expires_at = '2020-10-15T06:38:00.000+00:00', # optional + metadata = {} # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/create-android-platform.md b/examples/2.3.x/console-python/examples/project/create-android-platform.md new file mode 100644 index 000000000..f87262aa0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-android-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformAndroid + +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: PlatformAndroid = project.create_android_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + application_id = '<APPLICATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/create-apple-platform.md b/examples/2.3.x/console-python/examples/project/create-apple-platform.md new file mode 100644 index 000000000..e285f2c79 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-apple-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformApple + +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: PlatformApple = project.create_apple_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + bundle_identifier = '<BUNDLE_IDENTIFIER>' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..41fb5da61 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-ephemeral-key.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import EphemeralKey +from appwrite_console.enums import ProjectKeyScopes + +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: EphemeralKey = project.create_ephemeral_key( + scopes = [ProjectKeyScopes.PROJECT_READ], + duration = 600 +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..75eed1da8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-key.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Key +from appwrite_console.enums import ProjectKeyScopes + +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: Key = project.create_key( + key_id = '<KEY_ID>', + name = '<NAME>', + scopes = [ProjectKeyScopes.PROJECT_READ], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/create-linux-platform.md b/examples/2.3.x/console-python/examples/project/create-linux-platform.md new file mode 100644 index 000000000..ab921284c --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-linux-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformLinux + +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: PlatformLinux = project.create_linux_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + package_name = '<PACKAGE_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/create-mock-phone.md b/examples/2.3.x/console-python/examples/project/create-mock-phone.md new file mode 100644 index 000000000..19a4e6365 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-mock-phone.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import MockNumber + +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: MockNumber = project.create_mock_phone( + number = '+12065550100', + otp = '<OTP>' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..6eb08cfb7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-smtp-test.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project + +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 = project.create_smtp_test( + emails = [] +) +``` diff --git a/examples/2.3.x/console-python/examples/project/create-variable.md b/examples/2.3.x/console-python/examples/project/create-variable.md new file mode 100644 index 000000000..81eaa491d --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-variable.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Variable + +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: Variable = project.create_variable( + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/create-web-platform.md b/examples/2.3.x/console-python/examples/project/create-web-platform.md new file mode 100644 index 000000000..28bb66a53 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-web-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformWeb + +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: PlatformWeb = project.create_web_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + hostname = 'app.example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/create-windows-platform.md b/examples/2.3.x/console-python/examples/project/create-windows-platform.md new file mode 100644 index 000000000..327dc88a2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/create-windows-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformWindows + +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: PlatformWindows = project.create_windows_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + package_identifier_name = '<PACKAGE_IDENTIFIER_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/delete-key.md b/examples/2.3.x/console-python/examples/project/delete-key.md new file mode 100644 index 000000000..068e2c97d --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/delete-key.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project + +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 = project.delete_key( + key_id = '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/project/delete-mock-phone.md b/examples/2.3.x/console-python/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..27240f053 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/delete-mock-phone.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project + +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 = project.delete_mock_phone( + number = '+12065550100' +) +``` diff --git a/examples/2.3.x/console-python/examples/project/delete-platform.md b/examples/2.3.x/console-python/examples/project/delete-platform.md new file mode 100644 index 000000000..c492b3769 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/delete-platform.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project + +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 = project.delete_platform( + platform_id = '<PLATFORM_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/project/delete-variable.md b/examples/2.3.x/console-python/examples/project/delete-variable.md new file mode 100644 index 000000000..c4f469acd --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/delete-variable.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project + +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 = project.delete_variable( + variable_id = '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/project/delete.md b/examples/2.3.x/console-python/examples/project/delete.md new file mode 100644 index 000000000..99d4dc177 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/delete.md @@ -0,0 +1,12 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project + +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 = project.delete() +``` diff --git a/examples/2.3.x/console-python/examples/project/get-email-template.md b/examples/2.3.x/console-python/examples/project/get-email-template.md new file mode 100644 index 000000000..576389474 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/get-email-template.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import EmailTemplate +from appwrite_console.enums import ProjectEmailTemplateId +from appwrite_console.enums import ProjectEmailTemplateLocale + +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: EmailTemplate = project.get_email_template( + template_id = ProjectEmailTemplateId.VERIFICATION, + locale = ProjectEmailTemplateLocale.AF # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/get-key.md b/examples/2.3.x/console-python/examples/project/get-key.md new file mode 100644 index 000000000..8ded29998 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/get-key.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Key + +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: Key = project.get_key( + key_id = '<KEY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/get-mock-phone.md b/examples/2.3.x/console-python/examples/project/get-mock-phone.md new file mode 100644 index 000000000..04fc00909 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/get-mock-phone.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import MockNumber + +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: MockNumber = project.get_mock_phone( + number = '+12065550100' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..031e2abcf --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,63 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Github +from appwrite_console.models import OAuth2Discord +from appwrite_console.models import OAuth2Figma +from appwrite_console.models import OAuth2Dropbox +from appwrite_console.models import OAuth2Dailymotion +from appwrite_console.models import OAuth2Bitbucket +from appwrite_console.models import OAuth2Bitly +from appwrite_console.models import OAuth2Box +from appwrite_console.models import OAuth2Autodesk +from appwrite_console.models import OAuth2Google +from appwrite_console.models import OAuth2Zoom +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 OAuth2Twitch +from appwrite_console.models import OAuth2Stripe +from appwrite_console.models import OAuth2Spotify +from appwrite_console.models import OAuth2Slack +from appwrite_console.models import OAuth2Podio +from appwrite_console.models import OAuth2Notion +from appwrite_console.models import OAuth2Salesforce +from appwrite_console.models import OAuth2Yahoo +from appwrite_console.models import OAuth2HuggingFace +from appwrite_console.models import OAuth2Resend +from appwrite_console.models import OAuth2Cloudflare +from appwrite_console.models import OAuth2Linkedin +from appwrite_console.models import OAuth2Disqus +from appwrite_console.models import OAuth2Amazon +from appwrite_console.models import OAuth2Etsy +from appwrite_console.models import OAuth2Facebook +from appwrite_console.models import OAuth2Tradeshift +from appwrite_console.models import OAuth2Paypal +from appwrite_console.models import OAuth2Gitlab +from appwrite_console.models import OAuth2Authentik +from appwrite_console.models import OAuth2Auth0 +from appwrite_console.models import OAuth2FusionAuth +from appwrite_console.models import OAuth2Keycloak +from appwrite_console.models import OAuth2Oidc +from appwrite_console.models import OAuth2Apple +from appwrite_console.models import OAuth2Okta +from appwrite_console.models import OAuth2Kick +from appwrite_console.models import OAuth2Microsoft +from appwrite_console.models import OAuth2TikTok +from appwrite_console.models import OAuth2Kakao +from typing import Union +from appwrite_console.enums import ProjectOAuthProviderId + +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: 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( + provider_id = ProjectOAuthProviderId.AMAZON +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/get-platform.md b/examples/2.3.x/console-python/examples/project/get-platform.md new file mode 100644 index 000000000..2fb9c7e3b --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/get-platform.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformWeb +from appwrite_console.models import PlatformApple +from appwrite_console.models import PlatformAndroid +from appwrite_console.models import PlatformWindows +from appwrite_console.models import PlatformLinux +from typing import Union + +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: Union[PlatformWeb, PlatformApple, PlatformAndroid, PlatformWindows, PlatformLinux] = project.get_platform( + platform_id = '<PLATFORM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/get-policy.md b/examples/2.3.x/console-python/examples/project/get-policy.md new file mode 100644 index 000000000..94493ce94 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/get-policy.md @@ -0,0 +1,34 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PolicyPasswordDictionary +from appwrite_console.models import PolicyPasswordHistory +from appwrite_console.models import PolicyPasswordStrength +from appwrite_console.models import PolicyPasswordPersonalData +from appwrite_console.models import PolicyPasswordPwned +from appwrite_console.models import PolicySessionAlert +from appwrite_console.models import PolicySessionDuration +from appwrite_console.models import PolicySessionInvalidation +from appwrite_console.models import PolicySessionLimit +from appwrite_console.models import PolicyUserLimit +from appwrite_console.models import PolicyMembershipPrivacy +from appwrite_console.models import PolicyMfaFactors +from appwrite_console.models import PolicyDenyAliasedEmail +from appwrite_console.models import PolicyDenyDisposableEmail +from appwrite_console.models import PolicyDenyFreeEmail +from appwrite_console.models import PolicyDenyCorporateEmail +from typing import Union +from appwrite_console.enums import ProjectPolicyId + +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: Union[PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicyPasswordPwned, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyMfaFactors, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail, PolicyDenyCorporateEmail] = project.get_policy( + policy_id = ProjectPolicyId.PASSWORD_DICTIONARY +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/get-variable.md b/examples/2.3.x/console-python/examples/project/get-variable.md new file mode 100644 index 000000000..2dc987605 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/get-variable.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Variable + +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: Variable = project.get_variable( + variable_id = '<VARIABLE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/get.md b/examples/2.3.x/console-python/examples/project/get.md new file mode 100644 index 000000000..bbf148940 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/get.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.get() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/list-email-templates.md b/examples/2.3.x/console-python/examples/project/list-email-templates.md new file mode 100644 index 000000000..313fb8f74 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/list-email-templates.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import EmailTemplateList + +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: EmailTemplateList = project.list_email_templates( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/list-keys.md b/examples/2.3.x/console-python/examples/project/list-keys.md new file mode 100644 index 000000000..2282f5632 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/list-keys.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import KeyList + +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: KeyList = project.list_keys( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/list-mock-phones.md b/examples/2.3.x/console-python/examples/project/list-mock-phones.md new file mode 100644 index 000000000..ad35e75b6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/list-mock-phones.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import MockNumberList + +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: MockNumberList = project.list_mock_phones( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/console-python/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..bdb8e4f0d --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2ProviderList + +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: OAuth2ProviderList = project.list_o_auth2_providers( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/list-platforms.md b/examples/2.3.x/console-python/examples/project/list-platforms.md new file mode 100644 index 000000000..4a1578350 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/list-platforms.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformList + +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: PlatformList = project.list_platforms( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/list-policies.md b/examples/2.3.x/console-python/examples/project/list-policies.md new file mode 100644 index 000000000..b5d83a7b1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/list-policies.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PolicyList + +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: PolicyList = project.list_policies( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/list-variables.md b/examples/2.3.x/console-python/examples/project/list-variables.md new file mode 100644 index 000000000..0f444b523 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/list-variables.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import VariableList + +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: VariableList = project.list_variables( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-android-platform.md b/examples/2.3.x/console-python/examples/project/update-android-platform.md new file mode 100644 index 000000000..4d4910f58 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-android-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformAndroid + +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: PlatformAndroid = project.update_android_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + application_id = '<APPLICATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-apple-platform.md b/examples/2.3.x/console-python/examples/project/update-apple-platform.md new file mode 100644 index 000000000..e50f16f7e --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-apple-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformApple + +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: PlatformApple = project.update_apple_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + bundle_identifier = '<BUNDLE_IDENTIFIER>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-auth-method.md b/examples/2.3.x/console-python/examples/project/update-auth-method.md new file mode 100644 index 000000000..ca94a61c9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-auth-method.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel +from appwrite_console.enums import ProjectAuthMethodId + +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: ProjectModel = project.update_auth_method( + method_id = ProjectAuthMethodId.EMAIL_PASSWORD, + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/console-python/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..4906286fc --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_deny_aliased_email_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/console-python/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..a00928c2e --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_deny_corporate_email_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/console-python/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..f2e3ea67b --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_deny_disposable_email_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/console-python/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..575ffed8e --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_deny_free_email_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-email-template.md b/examples/2.3.x/console-python/examples/project/update-email-template.md new file mode 100644 index 000000000..9c88af22f --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-email-template.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import EmailTemplate +from appwrite_console.enums import ProjectEmailTemplateId +from appwrite_console.enums import ProjectEmailTemplateLocale + +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: EmailTemplate = project.update_email_template( + template_id = ProjectEmailTemplateId.VERIFICATION, + locale = ProjectEmailTemplateLocale.AF, # optional + subject = '<SUBJECT>', # optional + message = '<MESSAGE>', # optional + sender_name = '<SENDER_NAME>', # optional + sender_email = 'email@example.com', # optional + reply_to_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..2f948dde4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-key.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Key +from appwrite_console.enums import ProjectKeyScopes + +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: Key = project.update_key( + key_id = '<KEY_ID>', + name = '<NAME>', + scopes = [ProjectKeyScopes.PROJECT_READ], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..32afbb13a --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-labels.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_labels( + labels = [] +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-linux-platform.md b/examples/2.3.x/console-python/examples/project/update-linux-platform.md new file mode 100644 index 000000000..dd2399905 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-linux-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformLinux + +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: PlatformLinux = project.update_linux_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + package_name = '<PACKAGE_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/console-python/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..4f7c723ef --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_membership_privacy_policy( + user_id = False, # optional + user_email = False, # optional + user_phone = False, # optional + user_name = False, # optional + user_mfa = False, # optional + user_accessed_at = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/console-python/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..9754116cd --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-mfa-factors-policy.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_mfa_factors_policy( + totp = False, # optional + email = False, # optional + phone = False, # optional + custom = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-mock-phone.md b/examples/2.3.x/console-python/examples/project/update-mock-phone.md new file mode 100644 index 000000000..be9832756 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-mock-phone.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import MockNumber + +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: MockNumber = project.update_mock_phone( + number = '+12065550100', + otp = '<OTP>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..9ee9d53d7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-amazon.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Amazon + +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: OAuth2Amazon = project.update_o_auth2_amazon( + 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-apple.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..12daf1a8e --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Apple + +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: OAuth2Apple = project.update_o_auth2_apple( + service_id = '<SERVICE_ID>', # optional + key_id = '<KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + p8_file = '<P8_FILE>', # optional + native_client_ids = [], # optional + enabled = False, # optional + native_enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..165252c38 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-appwrite.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Appwrite + +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: OAuth2Appwrite = project.update_o_auth2_appwrite( + 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-auth-0.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..27f4b0b88 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-auth-0.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Auth0 + +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: OAuth2Auth0 = project.update_o_auth2_auth0( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + endpoint = '<ENDPOINT>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..4d8794f19 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-authentik.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Authentik + +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: OAuth2Authentik = project.update_o_auth2_authentik( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + endpoint = '<ENDPOINT>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..4c09de8a4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-autodesk.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Autodesk + +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: OAuth2Autodesk = project.update_o_auth2_autodesk( + 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-bitbucket.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..c66b6b16c --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-bitbucket.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Bitbucket + +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: OAuth2Bitbucket = project.update_o_auth2_bitbucket( + key = '<KEY>', # optional + secret = '<SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..983d889c1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-bitly.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Bitly + +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: OAuth2Bitly = project.update_o_auth2_bitly( + 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-box.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..c637f975d --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-box.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Box + +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: OAuth2Box = project.update_o_auth2_box( + 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-cloudflare.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..ac48b59a4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-cloudflare.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Cloudflare + +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: OAuth2Cloudflare = project.update_o_auth2_cloudflare( + 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-dailymotion.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..1f5a3e8f1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-dailymotion.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Dailymotion + +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: OAuth2Dailymotion = project.update_o_auth2_dailymotion( + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..5487c5c00 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-discord.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Discord + +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: OAuth2Discord = project.update_o_auth2_discord( + 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-disqus.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..1f4329519 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-disqus.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Disqus + +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: OAuth2Disqus = project.update_o_auth2_disqus( + public_key = '<PUBLIC_KEY>', # optional + secret_key = '<SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..70bc69fd3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-dropbox.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Dropbox + +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: OAuth2Dropbox = project.update_o_auth2_dropbox( + app_key = '<APP_KEY>', # optional + app_secret = '<APP_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..42b6aebac --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-etsy.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Etsy + +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: OAuth2Etsy = project.update_o_auth2_etsy( + key_string = '<KEY_STRING>', # optional + shared_secret = '<SHARED_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..e736fcfb8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-facebook.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Facebook + +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: OAuth2Facebook = project.update_o_auth2_facebook( + app_id = '<APP_ID>', # optional + app_secret = '<APP_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..361ca8abc --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-figma.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Figma + +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: OAuth2Figma = project.update_o_auth2_figma( + 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-fusion-auth.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..f3185bdce --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2FusionAuth + +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: OAuth2FusionAuth = project.update_o_auth2_fusion_auth( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + endpoint = '<ENDPOINT>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..4cd8a08c8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-git-hub.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Github + +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: OAuth2Github = project.update_o_auth2_git_hub( + 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-gitlab.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..15f5e69c9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-gitlab.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Gitlab + +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: OAuth2Gitlab = project.update_o_auth2_gitlab( + application_id = '<APPLICATION_ID>', # optional + secret = '<SECRET>', # optional + endpoint = 'https://example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-google.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..d07bddb9c --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-google.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Google +from appwrite_console.enums import ProjectOAuth2GooglePrompt + +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: OAuth2Google = project.update_o_auth2_google( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2GooglePrompt.NONE], # optional + native_client_ids = [], # optional + enabled = False, # optional + native_enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..5ae81f655 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-hugging-face.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2HuggingFace + +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: OAuth2HuggingFace = project.update_o_auth2_hugging_face( + 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-kakao.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..49da8ef7a --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-kakao.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Kakao + +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: OAuth2Kakao = project.update_o_auth2_kakao( + 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-keycloak.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..a1fae56b0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Keycloak + +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: OAuth2Keycloak = project.update_o_auth2_keycloak( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + endpoint = '<ENDPOINT>', # optional + realm_name = '<REALM_NAME>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..f0d842cd5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-kick.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Kick + +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: OAuth2Kick = project.update_o_auth2_kick( + 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-linkedin.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..24c80f2b2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-linkedin.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Linkedin + +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: OAuth2Linkedin = project.update_o_auth2_linkedin( + client_id = '<CLIENT_ID>', # optional + primary_client_secret = '<PRIMARY_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-microsoft.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-microsoft.md new file mode 100644 index 000000000..c70f3e974 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-microsoft.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Microsoft + +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: OAuth2Microsoft = project.update_o_auth2_microsoft( + application_id = '<APPLICATION_ID>', # optional + application_secret = '<APPLICATION_SECRET>', # optional + tenant = '<TENANT>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..e9f92d351 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-notion.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Notion + +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: OAuth2Notion = project.update_o_auth2_notion( + oauth_client_id = '<OAUTH_CLIENT_ID>', # optional + oauth_client_secret = '<OAUTH_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-oidc.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..c38669f96 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Oidc +from appwrite_console.enums import ProjectOAuth2OidcPrompt + +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: OAuth2Oidc = project.update_o_auth2_oidc( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + well_known_url = 'https://example.com', # optional + authorization_url = 'https://example.com', # optional + token_url = 'https://example.com', # optional + user_info_url = 'https://example.com', # optional + prompt = [ProjectOAuth2OidcPrompt.NONE], # optional + max_age = 0, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..459dac8da --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Okta + +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: OAuth2Okta = project.update_o_auth2_okta( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + domain = 'example.com', # optional + authorization_server_id = '<AUTHORIZATION_SERVER_ID>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..af231ec41 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-paypal-sandbox.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Paypal + +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: OAuth2Paypal = project.update_o_auth2_paypal_sandbox( + client_id = '<CLIENT_ID>', # optional + secret_key = '<SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..57149450b --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-paypal.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Paypal + +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: OAuth2Paypal = project.update_o_auth2_paypal( + client_id = '<CLIENT_ID>', # optional + secret_key = '<SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..bc0e79b8c --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-podio.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Podio + +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: OAuth2Podio = project.update_o_auth2_podio( + 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-resend.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..a69aa853d --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-resend.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Resend + +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: OAuth2Resend = project.update_o_auth2_resend( + 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-salesforce.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..3742515b8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-salesforce.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Salesforce + +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: OAuth2Salesforce = project.update_o_auth2_salesforce( + customer_key = '<CUSTOMER_KEY>', # optional + customer_secret = '<CUSTOMER_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-server.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..ce189df27 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-server.md @@ -0,0 +1,32 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_o_auth2_server( + enabled = False, + authorization_url = 'https://example.com', + scopes = [], # optional + authorization_details_types = [], # optional + access_token_duration = 60, # optional + refresh_token_duration = 60, # optional + public_access_token_duration = 60, # optional + public_refresh_token_duration = 60, # optional + installation_access_token_duration = 60, # optional + confidential_pkce = False, # optional + verification_url = 'https://example.com', # optional + user_code_length = 6, # optional + user_code_format = 'numeric', # optional + device_code_duration = 60, # optional + default_scopes = [], # optional + installation_scopes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..801e29b62 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-slack.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Slack + +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: OAuth2Slack = project.update_o_auth2_slack( + 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-spotify.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..90dda166e --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-spotify.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Spotify + +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: OAuth2Spotify = project.update_o_auth2_spotify( + 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-stripe.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..176a5ef47 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-stripe.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Stripe + +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: OAuth2Stripe = project.update_o_auth2_stripe( + client_id = '<CLIENT_ID>', # optional + api_secret_key = '<API_SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..8958af63f --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-tik-tok.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2TikTok + +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: OAuth2TikTok = project.update_o_auth2_tik_tok( + 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-tradeshift-sandbox.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..5094a0dca --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-tradeshift-sandbox.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Tradeshift + +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: OAuth2Tradeshift = project.update_o_auth2_tradeshift_sandbox( + oauth2_client_id = '<OAUTH2_CLIENT_ID>', # optional + oauth2_client_secret = '<OAUTH2_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-tradeshift.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..d522de69d --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-tradeshift.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Tradeshift + +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: OAuth2Tradeshift = project.update_o_auth2_tradeshift( + oauth2_client_id = '<OAUTH2_CLIENT_ID>', # optional + oauth2_client_secret = '<OAUTH2_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-twitch.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..7909c25f3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-twitch.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Twitch + +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: OAuth2Twitch = project.update_o_auth2_twitch( + 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-word-press.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..44da9f006 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-word-press.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2WordPress + +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: OAuth2WordPress = project.update_o_auth2_word_press( + 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-yahoo.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..3135155a5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-yahoo.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Yahoo + +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: OAuth2Yahoo = project.update_o_auth2_yahoo( + 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-yandex.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..f62a57029 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-yandex.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Yandex + +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: OAuth2Yandex = project.update_o_auth2_yandex( + 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 new file mode 100644 index 000000000..92f5ede73 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-zoho.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Zoho + +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: OAuth2Zoho = project.update_o_auth2_zoho( + 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-zoom.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..d95f93cbe --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-zoom.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Zoom + +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: OAuth2Zoom = project.update_o_auth2_zoom( + 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-2x.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..8d7f42b9c --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2x.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2X + +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: OAuth2X = project.update_o_auth2_x( + customer_key = '<CUSTOMER_KEY>', # optional + secret_key = '<SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/console-python/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..b0c1296b3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_password_dictionary_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-password-history-policy.md b/examples/2.3.x/console-python/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..e24c87b4b --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-password-history-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_password_history_policy( + total = 1 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/console-python/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..2e4eb1504 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_password_personal_data_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-password-pwned-policy.md b/examples/2.3.x/console-python/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..d16101215 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-password-pwned-policy.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_password_pwned_policy( + enabled = False, # optional + sessions = False, # optional + users = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-password-strength-policy.md b/examples/2.3.x/console-python/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..a1200a7bb --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-password-strength-policy.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PolicyPasswordStrength + +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: PolicyPasswordStrength = project.update_password_strength_policy( + min = 8, # optional + uppercase = False, # optional + lowercase = False, # optional + number = False, # optional + symbols = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-protocol.md b/examples/2.3.x/console-python/examples/project/update-protocol.md new file mode 100644 index 000000000..9d1f05557 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-protocol.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel +from appwrite_console.enums import ProjectProtocolId + +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: ProjectModel = project.update_protocol( + protocol_id = ProjectProtocolId.REST, + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-service.md b/examples/2.3.x/console-python/examples/project/update-service.md new file mode 100644 index 000000000..b93d6bad7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-service.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel +from appwrite_console.enums import ProjectServiceId + +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: ProjectModel = project.update_service( + service_id = ProjectServiceId.ACCOUNT, + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-session-alert-policy.md b/examples/2.3.x/console-python/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..70c29ffda --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-session-alert-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_session_alert_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-session-duration-policy.md b/examples/2.3.x/console-python/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..2e6fade56 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-session-duration-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_session_duration_policy( + duration = 60 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/console-python/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..b904ecf2e --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_session_invalidation_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-session-limit-policy.md b/examples/2.3.x/console-python/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..333496db2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-session-limit-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_session_limit_policy( + total = 1 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-smtp.md b/examples/2.3.x/console-python/examples/project/update-smtp.md new file mode 100644 index 000000000..9d94cda43 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-smtp.md @@ -0,0 +1,27 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel +from appwrite_console.enums import ProjectSMTPSecure + +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: ProjectModel = project.update_smtp( + host = 'example.com', # optional + port = 587, # optional + username = '<USERNAME>', # optional + password = 'password', # optional + sender_email = 'email@example.com', # optional + sender_name = '<SENDER_NAME>', # optional + reply_to_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + secure = ProjectSMTPSecure.TLS, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-user-limit-policy.md b/examples/2.3.x/console-python/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..93f5a3382 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-user-limit-policy.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Project as ProjectModel + +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: ProjectModel = project.update_user_limit_policy( + total = 0 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-variable.md b/examples/2.3.x/console-python/examples/project/update-variable.md new file mode 100644 index 000000000..022f37b2b --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-variable.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import Variable + +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: Variable = project.update_variable( + variable_id = '<VARIABLE_ID>', + key = '<KEY>', # optional + value = '<VALUE>', # optional + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-web-platform.md b/examples/2.3.x/console-python/examples/project/update-web-platform.md new file mode 100644 index 000000000..0311712d4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-web-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformWeb + +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: PlatformWeb = project.update_web_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + hostname = 'app.example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-windows-platform.md b/examples/2.3.x/console-python/examples/project/update-windows-platform.md new file mode 100644 index 000000000..7efe825ec --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-windows-platform.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import PlatformWindows + +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: PlatformWindows = project.update_windows_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + package_identifier_name = '<PACKAGE_IDENTIFIER_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/confirm-addon-payment.md b/examples/2.3.x/console-python/examples/projects/confirm-addon-payment.md new file mode 100644 index 000000000..b5e3113e6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/confirm-addon-payment.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import Addon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: Addon = projects.confirm_addon_payment( + project_id = '<PROJECT_ID>', + addon_id = '<ADDON_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/create-premium-geo-db-addon.md b/examples/2.3.x/console-python/examples/projects/create-premium-geo-db-addon.md new file mode 100644 index 000000000..36b1e9ab0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/create-premium-geo-db-addon.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import Addon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: Addon = projects.create_premium_geo_db_addon( + project_id = '<PROJECT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/create-schedule.md b/examples/2.3.x/console-python/examples/projects/create-schedule.md new file mode 100644 index 000000000..e501ed9e1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/create-schedule.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import Schedule +from appwrite_console.enums import ScheduleResourceType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: Schedule = projects.create_schedule( + project_id = '<PROJECT_ID>', + resource_type = ScheduleResourceType.FUNCTION, + resource_id = '<RESOURCE_ID>', + schedule = '0 0 * * *', + active = False, # optional + data = {} # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/delete-addon.md b/examples/2.3.x/console-python/examples/projects/delete-addon.md new file mode 100644 index 000000000..08310773d --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/delete-addon.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result = projects.delete_addon( + project_id = '<PROJECT_ID>', + addon_id = '<ADDON_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/projects/get-addon-price.md b/examples/2.3.x/console-python/examples/projects/get-addon-price.md new file mode 100644 index 000000000..57928ba8c --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/get-addon-price.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import AddonPrice + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: AddonPrice = projects.get_addon_price( + project_id = '<PROJECT_ID>', + addon = 'baa' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/get-addon.md b/examples/2.3.x/console-python/examples/projects/get-addon.md new file mode 100644 index 000000000..89e223fa1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/get-addon.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import Addon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: Addon = projects.get_addon( + project_id = '<PROJECT_ID>', + addon_id = '<ADDON_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/get-schedule.md b/examples/2.3.x/console-python/examples/projects/get-schedule.md new file mode 100644 index 000000000..5dfd1f942 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/get-schedule.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import Schedule + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: Schedule = projects.get_schedule( + project_id = '<PROJECT_ID>', + schedule_id = '<SCHEDULE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/list-addons.md b/examples/2.3.x/console-python/examples/projects/list-addons.md new file mode 100644 index 000000000..adc5aa762 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/list-addons.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import AddonList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: AddonList = projects.list_addons( + project_id = '<PROJECT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/list-schedules.md b/examples/2.3.x/console-python/examples/projects/list-schedules.md new file mode 100644 index 000000000..75461c4dc --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/list-schedules.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import ScheduleList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: ScheduleList = projects.list_schedules( + project_id = '<PROJECT_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/list-stages.md b/examples/2.3.x/console-python/examples/projects/list-stages.md new file mode 100644 index 000000000..567a73519 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/list-stages.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import StageList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: StageList = projects.list_stages( + project_id = '<PROJECT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/update-console-access.md b/examples/2.3.x/console-python/examples/projects/update-console-access.md new file mode 100644 index 000000000..f92b1bfd7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/update-console-access.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result = projects.update_console_access( + project_id = '<PROJECT_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/projects/update-stage.md b/examples/2.3.x/console-python/examples/projects/update-stage.md new file mode 100644 index 000000000..afc9b272c --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/update-stage.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import Stage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: Stage = projects.update_stage( + project_id = '<PROJECT_ID>', + stage_id = '<STAGE_ID>', + skip = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/projects/update-status.md b/examples/2.3.x/console-python/examples/projects/update-status.md new file mode 100644 index 000000000..b503d1da9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/update-status.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.enums import Status + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result = projects.update_status( + project_id = '<PROJECT_ID>', + status = Status.ACTIVE +) +``` diff --git a/examples/2.3.x/console-python/examples/projects/update-team.md b/examples/2.3.x/console-python/examples/projects/update-team.md new file mode 100644 index 000000000..a5f0835be --- /dev/null +++ b/examples/2.3.x/console-python/examples/projects/update-team.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.projects import Projects +from appwrite_console.models import Project + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +projects = Projects(client) + +result: Project = projects.update_team( + project_id = '<PROJECT_ID>', + team_id = '<TEAM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/create-api-rule.md b/examples/2.3.x/console-python/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..bf509b0f4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/create-api-rule.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy +from appwrite_console.models import ProxyRule + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result: ProxyRule = proxy.create_api_rule( + domain = 'example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/create-function-rule.md b/examples/2.3.x/console-python/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..485dec96a --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/create-function-rule.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy +from appwrite_console.models import ProxyRule + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result: ProxyRule = proxy.create_function_rule( + domain = 'example.com', + function_id = '<FUNCTION_ID>', + branch = '<BRANCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/create-invalidation.md b/examples/2.3.x/console-python/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..c394e27f8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/create-invalidation.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy +from appwrite_console.models import ProxyInvalidation +from appwrite_console.enums import InvalidationType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result: ProxyInvalidation = proxy.create_invalidation( + domain = 'example.com', + type = InvalidationType.TAG, + reference = '<REFERENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/create-redirect-rule.md b/examples/2.3.x/console-python/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..8c79b19fb --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/create-redirect-rule.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy +from appwrite_console.models import ProxyRule +from appwrite_console.enums import StatusCode +from appwrite_console.enums import ProxyResourceType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result: ProxyRule = proxy.create_redirect_rule( + domain = 'example.com', + url = 'https://example.com', + status_code = StatusCode.MOVEDPERMANENTLY, + resource_id = '<RESOURCE_ID>', + resource_type = ProxyResourceType.SITE +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/create-site-rule.md b/examples/2.3.x/console-python/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..33f55d081 --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/create-site-rule.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy +from appwrite_console.models import ProxyRule + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result: ProxyRule = proxy.create_site_rule( + domain = 'example.com', + site_id = '<SITE_ID>', + branch = '<BRANCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/delete-rule.md b/examples/2.3.x/console-python/examples/proxy/delete-rule.md new file mode 100644 index 000000000..06df56d07 --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/delete-rule.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result = proxy.delete_rule( + rule_id = '<RULE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/get-rule.md b/examples/2.3.x/console-python/examples/proxy/get-rule.md new file mode 100644 index 000000000..f0bc23322 --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/get-rule.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy +from appwrite_console.models import ProxyRule + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result: ProxyRule = proxy.get_rule( + rule_id = '<RULE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/list-rules.md b/examples/2.3.x/console-python/examples/proxy/list-rules.md new file mode 100644 index 000000000..fd7205f5d --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/list-rules.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy +from appwrite_console.models import ProxyRuleList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result: ProxyRuleList = proxy.list_rules( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/proxy/update-rule-status.md b/examples/2.3.x/console-python/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..0f3f777f8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/proxy/update-rule-status.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.proxy import Proxy +from appwrite_console.models import ProxyRule + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +proxy = Proxy(client) + +result: ProxyRule = proxy.update_rule_status( + rule_id = '<RULE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/create-deployment.md b/examples/2.3.x/console-python/examples/sites/create-deployment.md new file mode 100644 index 000000000..84013db13 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/create-deployment.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.input_file import InputFile +from appwrite_console.models import Deployment + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Deployment = sites.create_deployment( + site_id = '<SITE_ID>', + code = InputFile.from_path('file.png'), + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/console-python/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..ca66209e3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Deployment + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Deployment = sites.create_duplicate_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/create-template-deployment.md b/examples/2.3.x/console-python/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..7c7b1d169 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/create-template-deployment.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Deployment +from appwrite_console.enums import TemplateReferenceType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Deployment = sites.create_template_deployment( + site_id = '<SITE_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + type = TemplateReferenceType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/create-variable.md b/examples/2.3.x/console-python/examples/sites/create-variable.md new file mode 100644 index 000000000..d60d83613 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/create-variable.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Variable + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Variable = sites.create_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/create-vcs-deployment.md b/examples/2.3.x/console-python/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..8041a1a3b --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/create-vcs-deployment.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Deployment +from appwrite_console.enums import VCSReferenceType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Deployment = sites.create_vcs_deployment( + site_id = '<SITE_ID>', + type = VCSReferenceType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/create.md b/examples/2.3.x/console-python/examples/sites/create.md new file mode 100644 index 000000000..4c50854c7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/create.md @@ -0,0 +1,44 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Site +from appwrite_console.enums import Framework +from appwrite_console.enums import BuildRuntime +from appwrite_console.enums import Adapter +from appwrite_console.enums import ProjectKeyScopes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Site = sites.create( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = Framework.ANALOG, + build_runtime = BuildRuntime.NODE_14_5, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + start_command = '<START_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + adapter = Adapter.STATIC, # optional + installation_id = '<INSTALLATION_ID>', # optional + fallback_file = '<FALLBACK_FILE>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches = [], # optional + provider_paths = [], # optional + build_specification = 's-1vcpu-512mb', # optional + runtime_specification = 's-1vcpu-512mb', # optional + deployment_retention = 0, # optional + scopes = [ProjectKeyScopes.PROJECT_READ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/delete-deployment.md b/examples/2.3.x/console-python/examples/sites/delete-deployment.md new file mode 100644 index 000000000..fe9577fa1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result = sites.delete_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/sites/delete-log.md b/examples/2.3.x/console-python/examples/sites/delete-log.md new file mode 100644 index 000000000..05188856d --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result = sites.delete_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/sites/delete-variable.md b/examples/2.3.x/console-python/examples/sites/delete-variable.md new file mode 100644 index 000000000..fe2563176 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result = sites.delete_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/sites/delete.md b/examples/2.3.x/console-python/examples/sites/delete.md new file mode 100644 index 000000000..346a4587f --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result = sites.delete( + site_id = '<SITE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/sites/get-deployment-download.md b/examples/2.3.x/console-python/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..0cae57f34 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/get-deployment-download.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.enums import DeploymentDownloadType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: bytes = sites.get_deployment_download( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE, # optional + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/sites/get-deployment.md b/examples/2.3.x/console-python/examples/sites/get-deployment.md new file mode 100644 index 000000000..97b2f0a26 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/get-deployment.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Deployment + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Deployment = sites.get_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/get-log.md b/examples/2.3.x/console-python/examples/sites/get-log.md new file mode 100644 index 000000000..e29d2c4bd --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/get-log.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Execution + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Execution = sites.get_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/get-template.md b/examples/2.3.x/console-python/examples/sites/get-template.md new file mode 100644 index 000000000..b31e7e952 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/get-template.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import TemplateSite + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: TemplateSite = sites.get_template( + template_id = '<TEMPLATE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/get-variable.md b/examples/2.3.x/console-python/examples/sites/get-variable.md new file mode 100644 index 000000000..88d63f43d --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/get-variable.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Variable + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Variable = sites.get_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/get.md b/examples/2.3.x/console-python/examples/sites/get.md new file mode 100644 index 000000000..82d75f21a --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Site + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Site = sites.get( + site_id = '<SITE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/list-deployments.md b/examples/2.3.x/console-python/examples/sites/list-deployments.md new file mode 100644 index 000000000..f38912cb6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/list-deployments.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import DeploymentList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: DeploymentList = sites.list_deployments( + site_id = '<SITE_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..a765ccbdc --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/list-frameworks.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import FrameworkList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: FrameworkList = sites.list_frameworks() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/list-logs.md b/examples/2.3.x/console-python/examples/sites/list-logs.md new file mode 100644 index 000000000..d65ef1acb --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/list-logs.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import ExecutionList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: ExecutionList = sites.list_logs( + site_id = '<SITE_ID>', + queries = [], # optional + 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 new file mode 100644 index 000000000..3ea154b3a --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/list-specifications.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import SpecificationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: SpecificationList = sites.list_specifications( + type = 'runtimes' # 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 new file mode 100644 index 000000000..737df7edf --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/list-templates.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import TemplateSiteList +from appwrite_console.enums import Framework +from appwrite_console.enums import SiteTemplateUseCase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: TemplateSiteList = sites.list_templates( + frameworks = [Framework.ANALOG], # optional + use_cases = [SiteTemplateUseCase.PORTFOLIO], # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/list-variables.md b/examples/2.3.x/console-python/examples/sites/list-variables.md new file mode 100644 index 000000000..e89d19989 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/list-variables.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import VariableList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: VariableList = sites.list_variables( + site_id = '<SITE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/list.md b/examples/2.3.x/console-python/examples/sites/list.md new file mode 100644 index 000000000..1dd6493b5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/list.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import SiteList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: SiteList = sites.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/update-deployment-status.md b/examples/2.3.x/console-python/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..27ecc4dd1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/update-deployment-status.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Deployment + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Deployment = sites.update_deployment_status( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/update-site-deployment.md b/examples/2.3.x/console-python/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..a6b8de25e --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/update-site-deployment.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Site + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Site = sites.update_site_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/update-variable.md b/examples/2.3.x/console-python/examples/sites/update-variable.md new file mode 100644 index 000000000..8f2633900 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/update-variable.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Variable + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Variable = sites.update_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', # optional + value = '<VALUE>', # optional + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/sites/update.md b/examples/2.3.x/console-python/examples/sites/update.md new file mode 100644 index 000000000..6910e6496 --- /dev/null +++ b/examples/2.3.x/console-python/examples/sites/update.md @@ -0,0 +1,44 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.sites import Sites +from appwrite_console.models import Site +from appwrite_console.enums import Framework +from appwrite_console.enums import BuildRuntime +from appwrite_console.enums import Adapter +from appwrite_console.enums import ProjectKeyScopes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +sites = Sites(client) + +result: Site = sites.update( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = Framework.ANALOG, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + start_command = '<START_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + build_runtime = BuildRuntime.NODE_14_5, # optional + adapter = Adapter.STATIC, # optional + fallback_file = '<FALLBACK_FILE>', # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches = [], # optional + provider_paths = [], # optional + build_specification = 's-1vcpu-512mb', # optional + runtime_specification = 's-1vcpu-512mb', # optional + deployment_retention = 0, # optional + scopes = [ProjectKeyScopes.PROJECT_READ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/storage/create-bucket.md b/examples/2.3.x/console-python/examples/storage/create-bucket.md new file mode 100644 index 000000000..0803edc5d --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/create-bucket.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.models import Bucket +from appwrite_console.enums import Compression +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: Bucket = storage.create_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = Compression.NONE, # optional + encryption = False, # optional + antivirus = False, # optional + transformations = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/storage/create-file.md b/examples/2.3.x/console-python/examples/storage/create-file.md new file mode 100644 index 000000000..dd6a85c28 --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/create-file.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.input_file import InputFile +from appwrite_console.models import File +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: File = storage.create_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + file = InputFile.from_path('file.png'), + permissions = [Permission.read(Role.any())], # optional + folder = 'photos/2026' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/storage/delete-bucket.md b/examples/2.3.x/console-python/examples/storage/delete-bucket.md new file mode 100644 index 000000000..22660e227 --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result = storage.delete_bucket( + bucket_id = '<BUCKET_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/storage/delete-file.md b/examples/2.3.x/console-python/examples/storage/delete-file.md new file mode 100644 index 000000000..12ca116e2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result = storage.delete_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/storage/get-bucket.md b/examples/2.3.x/console-python/examples/storage/get-bucket.md new file mode 100644 index 000000000..3e222c5ab --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/get-bucket.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.models import Bucket + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: Bucket = storage.get_bucket( + bucket_id = '<BUCKET_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/storage/get-file-download.md b/examples/2.3.x/console-python/examples/storage/get-file-download.md new file mode 100644 index 000000000..6c272faae --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: bytes = storage.get_file_download( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/storage/get-file-preview.md b/examples/2.3.x/console-python/examples/storage/get-file-preview.md new file mode 100644 index 000000000..a5edaa9fe --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/get-file-preview.md @@ -0,0 +1,29 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.enums import ImageGravity +from appwrite_console.enums import ImageFormat + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: bytes = storage.get_file_preview( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + width = 0, # optional + height = 0, # optional + gravity = ImageGravity.AUTO, # optional + quality = -1, # optional + border_width = 0, # optional + border_color = 'FFFFFF', # optional + border_radius = 0, # optional + opacity = 0, # optional + rotation = -360, # optional + background = 'FFFFFF', # optional + output = ImageFormat.JPG, # optional + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/storage/get-file-view.md b/examples/2.3.x/console-python/examples/storage/get-file-view.md new file mode 100644 index 000000000..b5b3fda74 --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: bytes = storage.get_file_view( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/storage/get-file.md b/examples/2.3.x/console-python/examples/storage/get-file.md new file mode 100644 index 000000000..16218cf67 --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/get-file.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.models import File + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: File = storage.get_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/storage/list-buckets.md b/examples/2.3.x/console-python/examples/storage/list-buckets.md new file mode 100644 index 000000000..deca8ceec --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/list-buckets.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.models import BucketList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: BucketList = storage.list_buckets( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/storage/list-files.md b/examples/2.3.x/console-python/examples/storage/list-files.md new file mode 100644 index 000000000..8ec4c6f13 --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/list-files.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.models import FileList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: FileList = storage.list_files( + bucket_id = '<BUCKET_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/storage/update-bucket.md b/examples/2.3.x/console-python/examples/storage/update-bucket.md new file mode 100644 index 000000000..e4b2fc34b --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/update-bucket.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.models import Bucket +from appwrite_console.enums import Compression +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: Bucket = storage.update_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = Compression.NONE, # optional + encryption = False, # optional + antivirus = False, # optional + transformations = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/storage/update-file.md b/examples/2.3.x/console-python/examples/storage/update-file.md new file mode 100644 index 000000000..56a2a6ef1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/storage/update-file.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.storage import Storage +from appwrite_console.models import File +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +storage = Storage(client) + +result: File = storage.update_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + name = '<NAME>', # optional + permissions = [Permission.read(Role.any())] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..64a5613a0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnBigint + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnBigint = tables_db.create_big_int_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 1000000, # optional + default = 0, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..9b2f7078e --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnBoolean + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnBoolean = tables_db.create_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = False, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-cutover.md b/examples/2.3.x/console-python/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..f8689a180 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-cutover.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DatabaseMigration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DatabaseMigration = tables_db.create_cutover( + database_id = '<DATABASE_ID>', + migration_id = '<MIGRATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..e0f2cab52 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnDatetime + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnDatetime = tables_db.create_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = '2020-10-15T06:38:00.000+00:00', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-email-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..57016c75e --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-email-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnEmail + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnEmail = tables_db.create_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'email@example.com', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-enum-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..43643e9e8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-enum-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnEnum + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnEnum = tables_db.create_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + elements = ["active", "inactive"], + required = False, + default = 'active', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-failover.md b/examples/2.3.x/console-python/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..b4ae82dfe --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-failover.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DedicatedDatabase = tables_db.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-float-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..a40fafed5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-float-column.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnFloat + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnFloat = tables_db.create_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 100, # optional + default = 10.5, # optional + array = 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 new file mode 100644 index 000000000..c8c849d91 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-index.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnIndex +from appwrite_console.enums import TablesDBIndexType +from appwrite_console.enums import OrderBy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnIndex = tables_db.create_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + type = TablesDBIndexType.KEY, + columns = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-integer-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..b4345d565 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-integer-column.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnInteger + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnInteger = tables_db.create_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 100, # optional + default = 10, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-ip-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..644e6ae44 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-ip-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnIp + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnIp = tables_db.create_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = '192.0.2.0', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-line-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..bd8e2fa85 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-line-column.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnLine + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnLine = tables_db.create_line_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [[1, 2], [3, 4], [5, 6]] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..e1756116e --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnLongtext + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnLongtext = tables_db.create_longtext_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..40eed2a58 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnMediumtext + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnMediumtext = tables_db.create_mediumtext_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-migration.md b/examples/2.3.x/console-python/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..cb31f425f --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-migration.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DatabaseMigration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DatabaseMigration = tables_db.create_migration( + database_id = '<DATABASE_ID>', + specification = 's-1vcpu-1gb', + auto_cutover = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-operations.md b/examples/2.3.x/console-python/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..9ac84f483 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-operations.md @@ -0,0 +1,28 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Transaction = tables_db.create_operations( + transaction_id = '<TRANSACTION_ID>', + operations = [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-point-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..920acdb43 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-point-column.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnPoint + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnPoint = tables_db.create_point_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [1, 2] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..420b4ba97 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnPolygon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnPolygon = tables_db.create_polygon_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..5434aa253 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnRelationship +from appwrite_console.enums import RelationshipType +from appwrite_console.enums import RelationMutate + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnRelationship = tables_db.create_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + related_table_id = '<RELATED_TABLE_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '<KEY>', # optional + two_way_key = '<TWO_WAY_KEY>', # optional + on_delete = RelationMutate.CASCADE # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-row.md b/examples/2.3.x/console-python/examples/tablesdb/create-row.md new file mode 100644 index 000000000..ad974ca24 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-row.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Row +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Row = tables_db.create_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..130cd62a0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-rows.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import RowList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: RowList = tables_db.create_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-string-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..58cca81d2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-string-column.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnString + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnString = tables_db.create_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + size = 1, + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-table.md b/examples/2.3.x/console-python/examples/tablesdb/create-table.md new file mode 100644 index 000000000..07d67a5d1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-table.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Table +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Table = tables_db.create_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + row_security = False, # optional + enabled = False, # optional + columns = [], # optional + indexes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-text-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..e7482f68a --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-text-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnText + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnText = tables_db.create_text_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-transaction.md b/examples/2.3.x/console-python/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..27a02acdd --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-transaction.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Transaction = tables_db.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-url-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..32c295a41 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-url-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnUrl + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnUrl = tables_db.create_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'https://example.com', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/console-python/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..4951dc9e2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnVarchar + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnVarchar = tables_db.create_varchar_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + size = 1, + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/create.md b/examples/2.3.x/console-python/examples/tablesdb/create.md new file mode 100644 index 000000000..22262d4ff --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/create.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Database = tables_db.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/console-python/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..527443f8e --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Row + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Row = tables_db.decrement_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '<COLUMN>', + value = 1, # optional + min = 0, # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/delete-column.md b/examples/2.3.x/console-python/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..483e7ff0b --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/delete-column.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result = tables_db.delete_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/delete-index.md b/examples/2.3.x/console-python/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..19971df8b --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/delete-index.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result = tables_db.delete_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/delete-migration.md b/examples/2.3.x/console-python/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..48dc230b3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/delete-migration.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result = tables_db.delete_migration( + database_id = '<DATABASE_ID>', + migration_id = '<MIGRATION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/delete-row.md b/examples/2.3.x/console-python/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..e2f28936e --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/delete-row.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result = tables_db.delete_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + 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 new file mode 100644 index 000000000..634996a45 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/delete-rows.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import RowList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: RowList = tables_db.delete_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/delete-table.md b/examples/2.3.x/console-python/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..b0240389e --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/delete-table.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result = tables_db.delete_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/delete-transaction.md b/examples/2.3.x/console-python/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..35e505167 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/delete-transaction.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result = tables_db.delete_transaction( + transaction_id = '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/delete.md b/examples/2.3.x/console-python/examples/tablesdb/delete.md new file mode 100644 index 000000000..33e49e9f1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result = tables_db.delete( + database_id = '<DATABASE_ID>' +) +``` 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 new file mode 100644 index 000000000..74ed8ae34 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get-column.md @@ -0,0 +1,29 @@ +```python +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 ColumnInteger +from appwrite_console.models import ColumnFloat +from appwrite_console.models import ColumnEmail +from appwrite_console.models import ColumnEnum +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 ColumnString +from typing import Union + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +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( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/get-index.md b/examples/2.3.x/console-python/examples/tablesdb/get-index.md new file mode 100644 index 000000000..ab2e45312 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get-index.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnIndex + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnIndex = tables_db.get_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/get-migration.md b/examples/2.3.x/console-python/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..fde093384 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get-migration.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DatabaseMigration + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DatabaseMigration = tables_db.get_migration( + database_id = '<DATABASE_ID>', + migration_id = '<MIGRATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/get-replicas.md b/examples/2.3.x/console-python/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..346228f2a --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get-replicas.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DedicatedDatabaseReplicas + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DedicatedDatabaseReplicas = tables_db.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/get-row.md b/examples/2.3.x/console-python/examples/tablesdb/get-row.md new file mode 100644 index 000000000..b19be002c --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get-row.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Row + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Row = tables_db.get_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/get-status.md b/examples/2.3.x/console-python/examples/tablesdb/get-status.md new file mode 100644 index 000000000..dc1962f39 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get-status.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DatabaseStatus + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DatabaseStatus = tables_db.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/get-table.md b/examples/2.3.x/console-python/examples/tablesdb/get-table.md new file mode 100644 index 000000000..6f6f0e53f --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get-table.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Table + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Table = tables_db.get_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/get-transaction.md b/examples/2.3.x/console-python/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..b4abd5078 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get-transaction.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Transaction = tables_db.get_transaction( + transaction_id = '<TRANSACTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/get.md b/examples/2.3.x/console-python/examples/tablesdb/get.md new file mode 100644 index 000000000..dc1e686b4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Database = tables_db.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/increment-row-column.md b/examples/2.3.x/console-python/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..fc3eb6071 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/increment-row-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Row + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Row = tables_db.increment_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '<COLUMN>', + value = 1, # optional + max = 100, # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/list-columns.md b/examples/2.3.x/console-python/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..684c0e943 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list-columns.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnList = tables_db.list_columns( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/list-indexes.md b/examples/2.3.x/console-python/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..6cecc89e5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list-indexes.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnIndexList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnIndexList = tables_db.list_indexes( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/list-migrations.md b/examples/2.3.x/console-python/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..0688c0dfd --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list-migrations.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DatabaseMigrationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DatabaseMigrationList = tables_db.list_migrations( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/list-operations.md b/examples/2.3.x/console-python/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..5680c88c9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list-operations.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DedicatedDatabaseOperationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DedicatedDatabaseOperationList = tables_db.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/list-rows.md b/examples/2.3.x/console-python/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..9c5a6231e --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list-rows.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import RowList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: RowList = tables_db.list_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/list-specifications.md b/examples/2.3.x/console-python/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..d263e99bc --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list-specifications.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DedicatedDatabaseSpecificationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DedicatedDatabaseSpecificationList = tables_db.list_specifications() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/list-tables.md b/examples/2.3.x/console-python/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..53563aff8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list-tables.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import TableList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: TableList = tables_db.list_tables( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..9d4098d79 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list-transactions.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import TransactionList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: TransactionList = tables_db.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/list.md b/examples/2.3.x/console-python/examples/tablesdb/list.md new file mode 100644 index 000000000..62c16b2b1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/list.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import DatabaseList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: DatabaseList = tables_db.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..89fbf3429 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnBigint + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnBigint = tables_db.update_big_int_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 0, + min = 0, # optional + max = 1000000, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..eea143eca --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnBoolean + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnBoolean = tables_db.update_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = False, + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..636558b91 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnDatetime + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnDatetime = tables_db.update_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = '2020-10-15T06:38:00.000+00:00', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-email-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..93559adb5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-email-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnEmail + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnEmail = tables_db.update_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'email@example.com', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-enum-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..21162e158 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-enum-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnEnum + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnEnum = tables_db.update_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + elements = ["active", "inactive"], + required = False, + default = 'active', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-float-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..7ff6e4f1e --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-float-column.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnFloat + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnFloat = tables_db.update_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 10.5, + min = 0, # optional + max = 100, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-integer-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..a4299f6ec --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-integer-column.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnInteger + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnInteger = tables_db.update_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 10, + min = 0, # optional + max = 100, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-ip-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..0db0315b4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-ip-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnIp + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnIp = tables_db.update_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = '192.0.2.0', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-line-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..2916a9b92 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-line-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnLine + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnLine = tables_db.update_line_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [[1, 2], [3, 4], [5, 6]], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..226838841 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnLongtext + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnLongtext = tables_db.update_longtext_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..a0403b7ca --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnMediumtext + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnMediumtext = tables_db.update_mediumtext_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-point-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..04b35ba7b --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-point-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnPoint + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnPoint = tables_db.update_point_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [1, 2], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..57d0a77e3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnPolygon + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnPolygon = tables_db.update_polygon_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..9732a9249 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnRelationship +from appwrite_console.enums import RelationMutate + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnRelationship = tables_db.update_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + on_delete = RelationMutate.CASCADE, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-row.md b/examples/2.3.x/console-python/examples/tablesdb/update-row.md new file mode 100644 index 000000000..2b5c71cdd --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-row.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Row +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Row = tables_db.update_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-rows.md b/examples/2.3.x/console-python/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..6084eb062 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-rows.md @@ -0,0 +1,27 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import RowList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: RowList = tables_db.update_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-string-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..1a8f44227 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-string-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnString + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnString = tables_db.update_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + size = 1, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-table.md b/examples/2.3.x/console-python/examples/tablesdb/update-table.md new file mode 100644 index 000000000..0ea73bb8f --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-table.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Table +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Table = tables_db.update_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', # optional + permissions = [Permission.read(Role.any())], # optional + row_security = False, # optional + enabled = False, # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-text-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..c64f6a6f6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-text-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnText + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnText = tables_db.update_text_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-transaction.md b/examples/2.3.x/console-python/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..49ddb8eee --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-transaction.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Transaction = tables_db.update_transaction( + transaction_id = '<TRANSACTION_ID>', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-url-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..f43c70d4d --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-url-column.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnUrl + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnUrl = tables_db.update_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'https://example.com', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/console-python/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..d84995082 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import ColumnVarchar + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: ColumnVarchar = tables_db.update_varchar_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + size = 1, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/update.md b/examples/2.3.x/console-python/examples/tablesdb/update.md new file mode 100644 index 000000000..1f534b5d4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/update.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Database = tables_db.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tablesdb/upsert-row.md b/examples/2.3.x/console-python/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..afb50eb45 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/upsert-row.md @@ -0,0 +1,30 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import Row +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: Row = tables_db.upsert_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..3c4e91fa8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tablesdb/upsert-rows.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tables_db import TablesDB +from appwrite_console.models import RowList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tables_db = TablesDB(client) + +result: RowList = tables_db.upsert_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/create-installation.md b/examples/2.3.x/console-python/examples/teams/create-installation.md new file mode 100644 index 000000000..4c2a4ef1d --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/create-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import AppInstallation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: AppInstallation = teams.create_installation( + team_id = '<TEAM_ID>', + app_id = '<APP_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..8b0d4dcd4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/create-membership.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Membership + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Membership = teams.create_membership( + team_id = '<TEAM_ID>', + roles = [], + email = 'email@example.com', # optional + user_id = '<USER_ID>', # optional + phone = '+12065550100', # optional + url = 'https://example.com', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/create.md b/examples/2.3.x/console-python/examples/teams/create.md new file mode 100644 index 000000000..9a0cf1a6b --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/create.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Team + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Team = teams.create( + team_id = '<TEAM_ID>', + name = '<NAME>', + roles = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/delete-installation.md b/examples/2.3.x/console-python/examples/teams/delete-installation.md new file mode 100644 index 000000000..bd2849126 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/delete-installation.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result = teams.delete_installation( + team_id = '<TEAM_ID>', + installation_id = '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/teams/delete-membership.md b/examples/2.3.x/console-python/examples/teams/delete-membership.md new file mode 100644 index 000000000..81f78e3f3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result = teams.delete_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/teams/delete.md b/examples/2.3.x/console-python/examples/teams/delete.md new file mode 100644 index 000000000..1bcfed2fb --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result = teams.delete( + team_id = '<TEAM_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/teams/get-installation.md b/examples/2.3.x/console-python/examples/teams/get-installation.md new file mode 100644 index 000000000..fa529737e --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/get-installation.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import AppInstallation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: AppInstallation = teams.get_installation( + team_id = '<TEAM_ID>', + installation_id = '<INSTALLATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/get-membership.md b/examples/2.3.x/console-python/examples/teams/get-membership.md new file mode 100644 index 000000000..15002a234 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/get-membership.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Membership + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Membership = teams.get_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/get-prefs.md b/examples/2.3.x/console-python/examples/teams/get-prefs.md new file mode 100644 index 000000000..ab1016eec --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/get-prefs.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Preferences + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Preferences = teams.get_prefs( + team_id = '<TEAM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/get.md b/examples/2.3.x/console-python/examples/teams/get.md new file mode 100644 index 000000000..6239e9fd8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Team + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Team = teams.get( + team_id = '<TEAM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/list-installations.md b/examples/2.3.x/console-python/examples/teams/list-installations.md new file mode 100644 index 000000000..62ccd084f --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/list-installations.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import AppInstallationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: AppInstallationList = teams.list_installations( + team_id = '<TEAM_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/list-memberships.md b/examples/2.3.x/console-python/examples/teams/list-memberships.md new file mode 100644 index 000000000..d19a3ea79 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/list-memberships.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import MembershipList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: MembershipList = teams.list_memberships( + team_id = '<TEAM_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/list.md b/examples/2.3.x/console-python/examples/teams/list.md new file mode 100644 index 000000000..0c9ba4453 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/list.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import TeamList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: TeamList = teams.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/update-installation.md b/examples/2.3.x/console-python/examples/teams/update-installation.md new file mode 100644 index 000000000..527841d50 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/update-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import AppInstallation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: AppInstallation = teams.update_installation( + team_id = '<TEAM_ID>', + installation_id = '<INSTALLATION_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/update-membership-status.md b/examples/2.3.x/console-python/examples/teams/update-membership-status.md new file mode 100644 index 000000000..5ccbb3fb2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/update-membership-status.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Membership + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Membership = teams.update_membership_status( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..17e59db8d --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/update-membership.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Membership + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Membership = teams.update_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + roles = [] +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/update-name.md b/examples/2.3.x/console-python/examples/teams/update-name.md new file mode 100644 index 000000000..042fb037f --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/update-name.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Team + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Team = teams.update_name( + team_id = '<TEAM_ID>', + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/teams/update-prefs.md b/examples/2.3.x/console-python/examples/teams/update-prefs.md new file mode 100644 index 000000000..2d60c5b7b --- /dev/null +++ b/examples/2.3.x/console-python/examples/teams/update-prefs.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.teams import Teams +from appwrite_console.models import Preferences + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +teams = Teams(client) + +result: Preferences = teams.update_prefs( + team_id = '<TEAM_ID>', + prefs = {} +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tokens/create-file-token.md b/examples/2.3.x/console-python/examples/tokens/create-file-token.md new file mode 100644 index 000000000..4808b6c85 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tokens/create-file-token.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tokens import Tokens +from appwrite_console.models import ResourceToken + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tokens = Tokens(client) + +result: ResourceToken = tokens.create_file_token( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tokens/delete.md b/examples/2.3.x/console-python/examples/tokens/delete.md new file mode 100644 index 000000000..2f518965b --- /dev/null +++ b/examples/2.3.x/console-python/examples/tokens/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tokens = Tokens(client) + +result = tokens.delete( + token_id = '<TOKEN_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/tokens/get.md b/examples/2.3.x/console-python/examples/tokens/get.md new file mode 100644 index 000000000..57d9c1b4d --- /dev/null +++ b/examples/2.3.x/console-python/examples/tokens/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tokens import Tokens +from appwrite_console.models import ResourceToken + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tokens = Tokens(client) + +result: ResourceToken = tokens.get( + token_id = '<TOKEN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tokens/list.md b/examples/2.3.x/console-python/examples/tokens/list.md new file mode 100644 index 000000000..f2b3883a9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tokens/list.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tokens import Tokens +from appwrite_console.models import ResourceTokenList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tokens = Tokens(client) + +result: ResourceTokenList = tokens.list( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/tokens/update.md b/examples/2.3.x/console-python/examples/tokens/update.md new file mode 100644 index 000000000..56fa49519 --- /dev/null +++ b/examples/2.3.x/console-python/examples/tokens/update.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.tokens import Tokens +from appwrite_console.models import ResourceToken + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +tokens = Tokens(client) + +result: ResourceToken = tokens.update( + token_id = '<TOKEN_ID>', + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +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 new file mode 100644 index 000000000..aed1418db --- /dev/null +++ b/examples/2.3.x/console-python/examples/usage/list-events.md @@ -0,0 +1,31 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.usage import Usage +from appwrite_console.models import UsageEventList +from appwrite_console.enums import UsageEventMetric +from appwrite_console.enums import UsageInterval +from appwrite_console.enums import UsageEventDimension +from appwrite_console.enums import UsageOrderBy +from appwrite_console.enums import UsageOrderDirection + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +usage = Usage(client) + +result: UsageEventList = usage.list_events( + metrics = [UsageEventMetric.NETWORK_REQUESTS], + queries = [], # optional + interval = UsageInterval.ONE_MINUTE, # optional + dimensions = [UsageEventDimension.PATH], # optional + start_at = '2020-10-15T06:38:00.000+00:00', # optional + end_at = '2020-10-15T06:38:00.000+00:00', # optional + order_by = UsageOrderBy.TIME, # optional + order_dir = UsageOrderDirection.ASC, # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..dde34126c --- /dev/null +++ b/examples/2.3.x/console-python/examples/usage/list-gauges.md @@ -0,0 +1,32 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.usage import Usage +from appwrite_console.models import UsageGaugeList +from appwrite_console.enums import UsageGaugeMetric +from appwrite_console.enums import UsageInterval +from appwrite_console.enums import UsageGaugeDimension +from appwrite_console.enums import UsageOrderBy +from appwrite_console.enums import UsageOrderDirection + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +usage = Usage(client) + +result: UsageGaugeList = usage.list_gauges( + metrics = [UsageGaugeMetric.TEAMS], + queries = [], # optional + interval = UsageInterval.ONE_MINUTE, # optional + dimensions = [UsageGaugeDimension.RESOURCEID], # optional + start_at = '2020-10-15T06:38:00.000+00:00', # optional + end_at = '2020-10-15T06:38:00.000+00:00', # optional + order_by = UsageOrderBy.TIME, # optional + order_dir = UsageOrderDirection.ASC, # optional + limit = 1, # optional + offset = 0, # optional + aggregate = 'last' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-argon-2-user.md b/examples/2.3.x/console-python/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..288370b5a --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-argon-2-user.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.create_argon2_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-bcrypt-user.md b/examples/2.3.x/console-python/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..fecd993ab --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-bcrypt-user.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.create_bcrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-jwt.md b/examples/2.3.x/console-python/examples/users/create-jwt.md new file mode 100644 index 000000000..624f24f94 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-jwt.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import Jwt + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: Jwt = users.create_jwt( + user_id = '<USER_ID>', + session_id = 'recent()', # optional + duration = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-md-5-user.md b/examples/2.3.x/console-python/examples/users/create-md-5-user.md new file mode 100644 index 000000000..cb0569dff --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-md-5-user.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.create_md5_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/console-python/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..6e0862aef --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import MfaRecoveryCodes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: MfaRecoveryCodes = users.create_mfa_recovery_codes( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-ph-pass-user.md b/examples/2.3.x/console-python/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..2dd3a6be8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-ph-pass-user.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.create_ph_pass_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/console-python/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..602c77fde --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.create_scrypt_modified_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_salt_separator = '<PASSWORD_SALT_SEPARATOR>', + password_signer_key = '<PASSWORD_SIGNER_KEY>', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-scrypt-user.md b/examples/2.3.x/console-python/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..f04c8f245 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-scrypt-user.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.create_scrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_cpu = 8, + password_memory = 65536, + password_parallel = 1, + password_length = 64, + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-session.md b/examples/2.3.x/console-python/examples/users/create-session.md new file mode 100644 index 000000000..1b651104d --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-session.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import Session + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: Session = users.create_session( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-sha-user.md b/examples/2.3.x/console-python/examples/users/create-sha-user.md new file mode 100644 index 000000000..54c1ebe6c --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-sha-user.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User +from appwrite_console.enums import PasswordHash + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.create_sha_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_version = PasswordHash.SHA1, # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-target.md b/examples/2.3.x/console-python/examples/users/create-target.md new file mode 100644 index 000000000..af5102aed --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-target.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import Target +from appwrite_console.enums import MessagingProviderType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: Target = users.create_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + provider_type = MessagingProviderType.EMAIL, + identifier = '<IDENTIFIER>', + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create-token.md b/examples/2.3.x/console-python/examples/users/create-token.md new file mode 100644 index 000000000..14a10d674 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create-token.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import Token + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: Token = users.create_token( + user_id = '<USER_ID>', + length = 4, # optional + expire = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/create.md b/examples/2.3.x/console-python/examples/users/create.md new file mode 100644 index 000000000..cd075d5c0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/create.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.create( + user_id = '<USER_ID>', + email = 'email@example.com', # optional + phone = '+12065550100', # optional + password = 'password', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/delete-identity.md b/examples/2.3.x/console-python/examples/users/delete-identity.md new file mode 100644 index 000000000..3794eb594 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result = users.delete_identity( + identity_id = '<IDENTITY_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/console-python/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..a8ec8ed59 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result = users.delete_mfa_authenticator( + user_id = '<USER_ID>', + type = AuthenticatorType.TOTP +) +``` diff --git a/examples/2.3.x/console-python/examples/users/delete-session.md b/examples/2.3.x/console-python/examples/users/delete-session.md new file mode 100644 index 000000000..9d94fc5df --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/delete-session.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result = users.delete_session( + user_id = '<USER_ID>', + session_id = '<SESSION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/users/delete-sessions.md b/examples/2.3.x/console-python/examples/users/delete-sessions.md new file mode 100644 index 000000000..3ab5646b3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result = users.delete_sessions( + user_id = '<USER_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/users/delete-target.md b/examples/2.3.x/console-python/examples/users/delete-target.md new file mode 100644 index 000000000..2863c5c9c --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/delete-target.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result = users.delete_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/users/delete.md b/examples/2.3.x/console-python/examples/users/delete.md new file mode 100644 index 000000000..eb147a736 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result = users.delete( + user_id = '<USER_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/users/get-mfa-challenge.md b/examples/2.3.x/console-python/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..ec4add6a7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/get-mfa-challenge.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import MfaChallengeSecret + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: MfaChallengeSecret = users.get_mfa_challenge( + user_id = '<USER_ID>', + challenge_id = '<CHALLENGE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/console-python/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..b6e5d4385 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import MfaRecoveryCodes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: MfaRecoveryCodes = users.get_mfa_recovery_codes( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/get-prefs.md b/examples/2.3.x/console-python/examples/users/get-prefs.md new file mode 100644 index 000000000..f29309b55 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/get-prefs.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import Preferences + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: Preferences = users.get_prefs( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/get-target.md b/examples/2.3.x/console-python/examples/users/get-target.md new file mode 100644 index 000000000..e60decb73 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/get-target.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import Target + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: Target = users.get_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/get-usage.md b/examples/2.3.x/console-python/examples/users/get-usage.md new file mode 100644 index 000000000..8a7b43583 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/get-usage.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import UsageUsers +from appwrite_console.enums import UsageRange + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: UsageUsers = users.get_usage( + range = UsageRange.VALUE24H # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/get.md b/examples/2.3.x/console-python/examples/users/get.md new file mode 100644 index 000000000..9073e39d3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.get( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/list-identities.md b/examples/2.3.x/console-python/examples/users/list-identities.md new file mode 100644 index 000000000..fab7a61c4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/list-identities.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import IdentityList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: IdentityList = users.list_identities( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/list-memberships.md b/examples/2.3.x/console-python/examples/users/list-memberships.md new file mode 100644 index 000000000..3bfe1467d --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/list-memberships.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import MembershipList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: MembershipList = users.list_memberships( + user_id = '<USER_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/list-mfa-factors.md b/examples/2.3.x/console-python/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..f93dd18de --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/list-mfa-factors.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import MfaFactors + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: MfaFactors = users.list_mfa_factors( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/list-sessions.md b/examples/2.3.x/console-python/examples/users/list-sessions.md new file mode 100644 index 000000000..63a3bc9ae --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/list-sessions.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import SessionList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: SessionList = users.list_sessions( + user_id = '<USER_ID>', + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/list-targets.md b/examples/2.3.x/console-python/examples/users/list-targets.md new file mode 100644 index 000000000..291d355fd --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/list-targets.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import TargetList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: TargetList = users.list_targets( + user_id = '<USER_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/list.md b/examples/2.3.x/console-python/examples/users/list.md new file mode 100644 index 000000000..df3206ed9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/list.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import UserList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: UserList = users.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-email-verification.md b/examples/2.3.x/console-python/examples/users/update-email-verification.md new file mode 100644 index 000000000..de6501226 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-email-verification.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_email_verification( + user_id = '<USER_ID>', + email_verification = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-email.md b/examples/2.3.x/console-python/examples/users/update-email.md new file mode 100644 index 000000000..c5a681cf4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-email.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_email( + user_id = '<USER_ID>', + email = 'email@example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-impersonator.md b/examples/2.3.x/console-python/examples/users/update-impersonator.md new file mode 100644 index 000000000..2096846a1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-impersonator.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_impersonator( + user_id = '<USER_ID>', + impersonator = False +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..2d6985024 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-labels.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_labels( + user_id = '<USER_ID>', + labels = [] +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/console-python/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..453c25aca --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import MfaRecoveryCodes + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: MfaRecoveryCodes = users.update_mfa_recovery_codes( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-mfa.md b/examples/2.3.x/console-python/examples/users/update-mfa.md new file mode 100644 index 000000000..da9e74a5a --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-mfa.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_mfa( + user_id = '<USER_ID>', + mfa = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-name.md b/examples/2.3.x/console-python/examples/users/update-name.md new file mode 100644 index 000000000..c1dd05be3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-name.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_name( + user_id = '<USER_ID>', + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-password.md b/examples/2.3.x/console-python/examples/users/update-password.md new file mode 100644 index 000000000..abb1fd042 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-password.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_password( + user_id = '<USER_ID>', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-phone-verification.md b/examples/2.3.x/console-python/examples/users/update-phone-verification.md new file mode 100644 index 000000000..958976a62 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-phone-verification.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_phone_verification( + user_id = '<USER_ID>', + phone_verification = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-phone.md b/examples/2.3.x/console-python/examples/users/update-phone.md new file mode 100644 index 000000000..2f4e9fce5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-phone.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_phone( + user_id = '<USER_ID>', + number = '+12065550100' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-prefs.md b/examples/2.3.x/console-python/examples/users/update-prefs.md new file mode 100644 index 000000000..cdd406f47 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-prefs.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import Preferences + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: Preferences = users.update_prefs( + user_id = '<USER_ID>', + prefs = {} +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-status.md b/examples/2.3.x/console-python/examples/users/update-status.md new file mode 100644 index 000000000..ebef57cf2 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-status.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import User + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: User = users.update_status( + user_id = '<USER_ID>', + status = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/users/update-target.md b/examples/2.3.x/console-python/examples/users/update-target.md new file mode 100644 index 000000000..76e362956 --- /dev/null +++ b/examples/2.3.x/console-python/examples/users/update-target.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.users import Users +from appwrite_console.models import Target + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +users = Users(client) + +result: Target = users.update_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + identifier = '<IDENTIFIER>', # optional + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vcs/create-repository-detection.md b/examples/2.3.x/console-python/examples/vcs/create-repository-detection.md new file mode 100644 index 000000000..afa01043b --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/create-repository-detection.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import DetectionRuntime +from appwrite_console.models import DetectionFramework +from typing import Union +from appwrite_console.enums import VCSDetectionType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: Union[DetectionRuntime, DetectionFramework] = vcs.create_repository_detection( + installation_id = '<INSTALLATION_ID>', + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', + type = VCSDetectionType.RUNTIME, + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vcs/create-repository.md b/examples/2.3.x/console-python/examples/vcs/create-repository.md new file mode 100644 index 000000000..da275f260 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/create-repository.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import ProviderRepository + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: ProviderRepository = vcs.create_repository( + installation_id = '<INSTALLATION_ID>', + name = '<NAME>', + private = False, + provider_namespace = '<PROVIDER_NAMESPACE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vcs/delete-installation.md b/examples/2.3.x/console-python/examples/vcs/delete-installation.md new file mode 100644 index 000000000..07eafedde --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/delete-installation.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result = vcs.delete_installation( + installation_id = '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/vcs/get-installation.md b/examples/2.3.x/console-python/examples/vcs/get-installation.md new file mode 100644 index 000000000..c7613cdde --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/get-installation.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import Installation + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: Installation = vcs.get_installation( + installation_id = '<INSTALLATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vcs/get-repository-contents.md b/examples/2.3.x/console-python/examples/vcs/get-repository-contents.md new file mode 100644 index 000000000..95a4505cc --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/get-repository-contents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import VcsContentList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: VcsContentList = vcs.get_repository_contents( + installation_id = '<INSTALLATION_ID>', + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_reference = '<PROVIDER_REFERENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vcs/get-repository.md b/examples/2.3.x/console-python/examples/vcs/get-repository.md new file mode 100644 index 000000000..76f3f3d7c --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/get-repository.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import ProviderRepository + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: ProviderRepository = vcs.get_repository( + installation_id = '<INSTALLATION_ID>', + provider_repository_id = '<PROVIDER_REPOSITORY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vcs/list-installations.md b/examples/2.3.x/console-python/examples/vcs/list-installations.md new file mode 100644 index 000000000..8ebdb7b92 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/list-installations.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import InstallationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: InstallationList = vcs.list_installations( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +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 new file mode 100644 index 000000000..c0fd41ee5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/list-namespaces.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import VcsNamespaceList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: VcsNamespaceList = vcs.list_namespaces( + installation_id = '<INSTALLATION_ID>', + search = '<SEARCH>', # optional + queries = [] # 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 new file mode 100644 index 000000000..40e097c5c --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/list-repositories.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import ProviderRepositoryRuntimeList +from appwrite_console.models import ProviderRepositoryFrameworkList +from typing import Union +from appwrite_console.enums import VCSDetectionType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: Union[ProviderRepositoryRuntimeList, ProviderRepositoryFrameworkList] = vcs.list_repositories( + installation_id = '<INSTALLATION_ID>', + type = VCSDetectionType.RUNTIME, + search = '<SEARCH>', # optional + queries = [] # 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 new file mode 100644 index 000000000..604a2a17c --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/list-repository-branches.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs +from appwrite_console.models import BranchList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result: BranchList = vcs.list_repository_branches( + installation_id = '<INSTALLATION_ID>', + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', + search = '<SEARCH>', # optional + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vcs/update-external-deployments.md b/examples/2.3.x/console-python/examples/vcs/update-external-deployments.md new file mode 100644 index 000000000..0caf0e3ca --- /dev/null +++ b/examples/2.3.x/console-python/examples/vcs/update-external-deployments.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vcs import Vcs + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vcs = Vcs(client) + +result = vcs.update_external_deployments( + installation_id = '<INSTALLATION_ID>', + repository_id = '<REPOSITORY_ID>', + provider_pull_request_id = '<PROVIDER_PULL_REQUEST_ID>' +) +``` 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 new file mode 100644 index 000000000..06934a98e --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-collection.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import VectorsdbCollection +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.create_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + dimension = 1, + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create-document.md b/examples/2.3.x/console-python/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..6ae96f242 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-document.md @@ -0,0 +1,34 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.create_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..6dbbfe5e0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.create_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create-failover.md b/examples/2.3.x/console-python/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..98bd5abc0 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-failover.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DedicatedDatabase + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DedicatedDatabase = vectors_db.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..9df8d59f8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-index.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Index +from appwrite_console.enums import VectorsDBIndexType +from appwrite_console.enums import OrderBy + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Index = vectors_db.create_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + type = VectorsDBIndexType.HNSW_EUCLIDEAN, + attributes = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..9cc0f70b1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-operations.md @@ -0,0 +1,28 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.create_operations( + transaction_id = '<TRANSACTION_ID>', + operations = [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create-query.md b/examples/2.3.x/console-python/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..e7b0a9af3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-query.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.create_query( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create-transaction.md b/examples/2.3.x/console-python/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..e95ba997c --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-transaction.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create.md b/examples/2.3.x/console-python/examples/vectorsdb/create.md new file mode 100644 index 000000000..ca84b2dff --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/create.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/delete-collection.md b/examples/2.3.x/console-python/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..90ef5a041 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/delete-collection.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/delete-document.md b/examples/2.3.x/console-python/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..3eac7ffd6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/delete-document.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + transaction_id = '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..15c1e4741 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/delete-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.delete_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/delete-index.md b/examples/2.3.x/console-python/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..3586c1620 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/delete-index.md @@ -0,0 +1,16 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/console-python/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..a397dc19c --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_transaction( + transaction_id = '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/delete.md b/examples/2.3.x/console-python/examples/vectorsdb/delete.md new file mode 100644 index 000000000..1b823fe97 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result = vectors_db.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/get-collection.md b/examples/2.3.x/console-python/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..c2d87d50a --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/get-collection.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import VectorsdbCollection + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.get_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/get-document.md b/examples/2.3.x/console-python/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..4bb11dfcd --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/get-document.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Document + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.get_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/get-index.md b/examples/2.3.x/console-python/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..0d2a419b7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/get-index.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Index + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Index = vectors_db.get_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/get-replicas.md b/examples/2.3.x/console-python/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..5b92acdd7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/get-replicas.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DedicatedDatabaseReplicas + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DedicatedDatabaseReplicas = vectors_db.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/get-status.md b/examples/2.3.x/console-python/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..0d31ec5aa --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/get-status.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DatabaseStatus + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DatabaseStatus = vectors_db.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/get-transaction.md b/examples/2.3.x/console-python/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..2daf9d308 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/get-transaction.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.get_transaction( + transaction_id = '<TRANSACTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/get.md b/examples/2.3.x/console-python/examples/vectorsdb/get.md new file mode 100644 index 000000000..a025bedc7 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/list-collections.md b/examples/2.3.x/console-python/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..242e2b83b --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/list-collections.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import VectorsdbCollectionList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: VectorsdbCollectionList = vectors_db.list_collections( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/list-documents.md b/examples/2.3.x/console-python/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..fec46db5f --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/list-documents.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.list_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/list-indexes.md b/examples/2.3.x/console-python/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..65dd17010 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/list-indexes.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import IndexList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: IndexList = vectors_db.list_indexes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/list-operations.md b/examples/2.3.x/console-python/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..e809f425f --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/list-operations.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DedicatedDatabaseOperationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DedicatedDatabaseOperationList = vectors_db.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/list-specifications.md b/examples/2.3.x/console-python/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..45fd5c09a --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/list-specifications.md @@ -0,0 +1,15 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DedicatedDatabaseSpecificationList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DedicatedDatabaseSpecificationList = vectors_db.list_specifications() + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..c7e0655db --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/list-transactions.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import TransactionList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: TransactionList = vectors_db.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/list.md b/examples/2.3.x/console-python/examples/vectorsdb/list.md new file mode 100644 index 000000000..15aacc7d3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/list.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DatabaseList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DatabaseList = vectors_db.list( + 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 new file mode 100644 index 000000000..8b34e235e --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/update-collection.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import VectorsdbCollection +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.update_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + dimension = 1, # optional + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/update-document.md b/examples/2.3.x/console-python/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..7449e7940 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/update-document.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.update_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/update-documents.md b/examples/2.3.x/console-python/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..ce2b2e112 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/update-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.update_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + data = {}, # optional + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/update-transaction.md b/examples/2.3.x/console-python/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..4522f8d12 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/update-transaction.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Transaction + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.update_transaction( + transaction_id = '<TRANSACTION_ID>', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/update.md b/examples/2.3.x/console-python/examples/vectorsdb/update.md new file mode 100644 index 000000000..1a9d863bb --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/update.md @@ -0,0 +1,22 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Database + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/vectorsdb/upsert-document.md b/examples/2.3.x/console-python/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..b50bb02c3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/upsert-document.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import Document +from appwrite_console.permission import Permission +from appwrite_console.role import Role + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.upsert_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..05b0d65f4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.vectors_db import VectorsDB +from appwrite_console.models import DocumentList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.upsert_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/create-bypass-rule.md b/examples/2.3.x/console-python/examples/waf/create-bypass-rule.md new file mode 100644 index 000000000..6161f0a50 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/create-bypass-rule.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleBypass + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleBypass = waf.create_bypass_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', + name = '<NAME>', + resource_id = '<RESOURCE_ID>', # optional + description = '<DESCRIPTION>', # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/create-challenge-rule.md b/examples/2.3.x/console-python/examples/waf/create-challenge-rule.md new file mode 100644 index 000000000..8a64b0355 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/create-challenge-rule.md @@ -0,0 +1,27 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleChallenge + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleChallenge = waf.create_challenge_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', + name = '<NAME>', + resource_id = '<RESOURCE_ID>', # optional + description = '<DESCRIPTION>', # optional + challenge_type = 'compute', # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '', # optional + difficulty = 1, # optional + ttl = 900 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/create-deny-rule.md b/examples/2.3.x/console-python/examples/waf/create-deny-rule.md new file mode 100644 index 000000000..cb0bdefc3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/create-deny-rule.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleDeny + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleDeny = waf.create_deny_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', + name = '<NAME>', + resource_id = '<RESOURCE_ID>', # optional + description = '<DESCRIPTION>', # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/create-rate-limit-rule.md b/examples/2.3.x/console-python/examples/waf/create-rate-limit-rule.md new file mode 100644 index 000000000..4612f21c8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/create-rate-limit-rule.md @@ -0,0 +1,29 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleRateLimit + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleRateLimit = waf.create_rate_limit_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', + name = '<NAME>', + limit = 1, + interval = 1, + resource_id = '<RESOURCE_ID>', # optional + description = '<DESCRIPTION>', # optional + key = 'ip', # optional + strategy = 'fixedWindow', # optional + max_bucket_size = 1, # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/create-redirect-rule.md b/examples/2.3.x/console-python/examples/waf/create-redirect-rule.md new file mode 100644 index 000000000..d19cbc0ab --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/create-redirect-rule.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleRedirect + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleRedirect = waf.create_redirect_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', + name = '<NAME>', + location = '<LOCATION>', + status_code = 300, + resource_id = '<RESOURCE_ID>', # optional + description = '<DESCRIPTION>', # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/delete-rule.md b/examples/2.3.x/console-python/examples/waf/delete-rule.md new file mode 100644 index 000000000..90c89a8b3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/delete-rule.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result = waf.delete_rule( + rule_id = '<RULE_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/waf/get-rule.md b/examples/2.3.x/console-python/examples/waf/get-rule.md new file mode 100644 index 000000000..9964570fc --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/get-rule.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRule + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRule = waf.get_rule( + rule_id = '<RULE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/list-rules.md b/examples/2.3.x/console-python/examples/waf/list-rules.md new file mode 100644 index 000000000..f2e92077a --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/list-rules.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleList = waf.list_rules( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/update-bypass-rule.md b/examples/2.3.x/console-python/examples/waf/update-bypass-rule.md new file mode 100644 index 000000000..de31d0629 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/update-bypass-rule.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleBypass + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleBypass = waf.update_bypass_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', # optional + resource_id = '<RESOURCE_ID>', # optional + name = '<NAME>', # optional + description = '<DESCRIPTION>', # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/update-challenge-rule.md b/examples/2.3.x/console-python/examples/waf/update-challenge-rule.md new file mode 100644 index 000000000..727b111d1 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/update-challenge-rule.md @@ -0,0 +1,27 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleChallenge + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleChallenge = waf.update_challenge_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', # optional + resource_id = '<RESOURCE_ID>', # optional + name = '<NAME>', # optional + description = '<DESCRIPTION>', # optional + challenge_type = 'compute', # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '', # optional + difficulty = 1, # optional + ttl = 900 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/update-deny-rule.md b/examples/2.3.x/console-python/examples/waf/update-deny-rule.md new file mode 100644 index 000000000..d880e8075 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/update-deny-rule.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleDeny + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleDeny = waf.update_deny_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', # optional + resource_id = '<RESOURCE_ID>', # optional + name = '<NAME>', # optional + description = '<DESCRIPTION>', # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/update-rate-limit-rule.md b/examples/2.3.x/console-python/examples/waf/update-rate-limit-rule.md new file mode 100644 index 000000000..34eb52c2a --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/update-rate-limit-rule.md @@ -0,0 +1,28 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleRateLimit + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleRateLimit = waf.update_rate_limit_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', # optional + resource_id = '<RESOURCE_ID>', # optional + name = '<NAME>', # optional + description = '<DESCRIPTION>', # optional + limit = 1, # optional + interval = 1, # optional + key = 'ip', # optional + max_bucket_size = 1, # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/waf/update-redirect-rule.md b/examples/2.3.x/console-python/examples/waf/update-redirect-rule.md new file mode 100644 index 000000000..4bf230c92 --- /dev/null +++ b/examples/2.3.x/console-python/examples/waf/update-redirect-rule.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.waf import Waf +from appwrite_console.models import WafRuleRedirect + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +waf = Waf(client) + +result: WafRuleRedirect = waf.update_redirect_rule( + rule_id = '<RULE_ID>', + resource_type = 'api', # optional + resource_id = '<RESOURCE_ID>', # optional + name = '<NAME>', # optional + description = '<DESCRIPTION>', # optional + location = '<LOCATION>', # optional + status_code = 300, # optional + priority = -100000, # optional + enabled = False, # optional + conditions = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/webhooks/create.md b/examples/2.3.x/console-python/examples/webhooks/create.md new file mode 100644 index 000000000..4f4e69b23 --- /dev/null +++ b/examples/2.3.x/console-python/examples/webhooks/create.md @@ -0,0 +1,25 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.webhooks import Webhooks +from appwrite_console.models import Webhook + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +webhooks = Webhooks(client) + +result: Webhook = webhooks.create( + webhook_id = '<WEBHOOK_ID>', + url = 'https://example.com/webhook', + name = '<NAME>', + events = [], + enabled = False, # optional + tls = False, # optional + auth_username = '<AUTH_USERNAME>', # optional + auth_password = 'password', # optional + secret = '<SECRET>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/webhooks/delete.md b/examples/2.3.x/console-python/examples/webhooks/delete.md new file mode 100644 index 000000000..8489cb806 --- /dev/null +++ b/examples/2.3.x/console-python/examples/webhooks/delete.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.webhooks import Webhooks + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +webhooks = Webhooks(client) + +result = webhooks.delete( + webhook_id = '<WEBHOOK_ID>' +) +``` diff --git a/examples/2.3.x/console-python/examples/webhooks/get.md b/examples/2.3.x/console-python/examples/webhooks/get.md new file mode 100644 index 000000000..20ce3c9a3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/webhooks/get.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.webhooks import Webhooks +from appwrite_console.models import Webhook + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +webhooks = Webhooks(client) + +result: Webhook = webhooks.get( + webhook_id = '<WEBHOOK_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/webhooks/list.md b/examples/2.3.x/console-python/examples/webhooks/list.md new file mode 100644 index 000000000..1ba84b6c5 --- /dev/null +++ b/examples/2.3.x/console-python/examples/webhooks/list.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.webhooks import Webhooks +from appwrite_console.models import WebhookList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +webhooks = Webhooks(client) + +result: WebhookList = webhooks.list( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/webhooks/update-secret.md b/examples/2.3.x/console-python/examples/webhooks/update-secret.md new file mode 100644 index 000000000..c4b1d830a --- /dev/null +++ b/examples/2.3.x/console-python/examples/webhooks/update-secret.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.webhooks import Webhooks +from appwrite_console.models import Webhook + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +webhooks = Webhooks(client) + +result: Webhook = webhooks.update_secret( + webhook_id = '<WEBHOOK_ID>', + secret = '<SECRET>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/webhooks/update.md b/examples/2.3.x/console-python/examples/webhooks/update.md new file mode 100644 index 000000000..c3f98e002 --- /dev/null +++ b/examples/2.3.x/console-python/examples/webhooks/update.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.webhooks import Webhooks +from appwrite_console.models import Webhook + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +webhooks = Webhooks(client) + +result: Webhook = webhooks.update( + webhook_id = '<WEBHOOK_ID>', + name = '<NAME>', + url = 'https://example.com/webhook', + events = [], + enabled = False, # optional + tls = False, # optional + auth_username = '<AUTH_USERNAME>', # optional + auth_password = 'password' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-web/examples/account/create-anonymous-session.md b/examples/2.3.x/console-web/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..baf532b85 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-anonymous-session.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-billing-address.md b/examples/2.3.x/console-web/examples/account/create-billing-address.md new file mode 100644 index 000000000..20912215e --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-billing-address.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createBillingAddress({ + country: '<COUNTRY>', + city: '<CITY>', + streetAddress: '<STREET_ADDRESS>', + addressLine2: '<ADDRESS_LINE2>', // optional + state: '<STATE>', // optional + postalCode: '<POSTAL_CODE>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..e962d2a57 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-email-password-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-email-token.md b/examples/2.3.x/console-web/examples/account/create-email-token.md new file mode 100644 index 000000000..7f788612e --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-email-token.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createEmailToken({ + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-email-verification-otp.md b/examples/2.3.x/console-web/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..7424c5bd0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-email-verification-otp.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createEmailVerificationOTP({ + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-email-verification.md b/examples/2.3.x/console-web/examples/account/create-email-verification.md new file mode 100644 index 000000000..fcc08c344 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-email-verification.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createEmailVerification({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-id-token-session.md b/examples/2.3.x/console-web/examples/account/create-id-token-session.md new file mode 100644 index 000000000..f54355ac6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-id-token-session.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Account, IdTokenProvider } 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 account = new Account(client); + +const result = await account.createIdTokenSession({ + provider: IdTokenProvider.Apple, + idToken: '<ID_TOKEN>', + nonce: '<NONCE>', // optional + accessToken: '<ACCESS_TOKEN>', // optional + accessTokenExpiry: 0, // optional + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-jwt.md b/examples/2.3.x/console-web/examples/account/create-jwt.md new file mode 100644 index 000000000..e107279dd --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-jwt.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createJWT({ + duration: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-key.md b/examples/2.3.x/console-web/examples/account/create-key.md new file mode 100644 index 000000000..34be11902 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-key.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account, AccountKeyScopes } 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 account = new Account(client); + +const result = await account.createKey({ + name: '<NAME>', + scopes: [AccountKeyScopes.Account], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-magic-url-token.md b/examples/2.3.x/console-web/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..0fbd00ee4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-magic-url-token.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createMagicURLToken({ + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-mfa-authenticator.md b/examples/2.3.x/console-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..8e31d83d1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticatorType } 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 account = new Account(client); + +const result = await account.createMFAAuthenticator({ + type: AuthenticatorType.Totp, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-mfa-challenge.md b/examples/2.3.x/console-web/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..b8d5ed48f --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticationFactor } 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 account = new Account(client); + +const result = await account.createMFAChallenge({ + factor: AuthenticationFactor.Email, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/console-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..5e0aa3e89 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-o-auth-2-session.md b/examples/2.3.x/console-web/examples/account/create-o-auth-2-session.md new file mode 100644 index 000000000..735fd2eac --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-o-auth-2-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, OAuthProvider } 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 account = new Account(client); + +account.createOAuth2Session({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +}); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-o-auth-2-token.md b/examples/2.3.x/console-web/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..cf961db67 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-o-auth-2-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, OAuthProvider } 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 account = new Account(client); + +account.createOAuth2Token({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +}); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-payment-method.md b/examples/2.3.x/console-web/examples/account/create-payment-method.md new file mode 100644 index 000000000..332f063ea --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-payment-method.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createPaymentMethod(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-phone-token.md b/examples/2.3.x/console-web/examples/account/create-phone-token.md new file mode 100644 index 000000000..74b578a88 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-phone-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createPhoneToken({ + userId: '<USER_ID>', + phone: '+12065550100', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-phone-verification.md b/examples/2.3.x/console-web/examples/account/create-phone-verification.md new file mode 100644 index 000000000..9e6c23a68 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-phone-verification.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-push-target.md b/examples/2.3.x/console-web/examples/account/create-push-target.md new file mode 100644 index 000000000..1e26cc917 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-push-target.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createPushTarget({ + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-recovery-otp.md b/examples/2.3.x/console-web/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..baf48cb9c --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-recovery-otp.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createRecoveryOTP({ + email: 'email@example.com', + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-recovery.md b/examples/2.3.x/console-web/examples/account/create-recovery.md new file mode 100644 index 000000000..383d39e9c --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-session.md b/examples/2.3.x/console-web/examples/account/create-session.md new file mode 100644 index 000000000..1918832a0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createSession({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create-verification.md b/examples/2.3.x/console-web/examples/account/create-verification.md new file mode 100644 index 000000000..772576a64 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create-verification.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.createVerification({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/create.md b/examples/2.3.x/console-web/examples/account/create.md new file mode 100644 index 000000000..06ff6123b --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/create.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.create({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-billing-address.md b/examples/2.3.x/console-web/examples/account/delete-billing-address.md new file mode 100644 index 000000000..eda14a735 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-billing-address.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deleteBillingAddress({ + billingAddressId: '<BILLING_ADDRESS_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-consent-token.md b/examples/2.3.x/console-web/examples/account/delete-consent-token.md new file mode 100644 index 000000000..c4bd22fa5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-consent-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deleteConsentToken({ + consentId: '<CONSENT_ID>', + tokenId: '<TOKEN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-consent.md b/examples/2.3.x/console-web/examples/account/delete-consent.md new file mode 100644 index 000000000..120afbb8c --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-consent.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deleteConsent({ + consentId: '<CONSENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-identity.md b/examples/2.3.x/console-web/examples/account/delete-identity.md new file mode 100644 index 000000000..12e35d530 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-identity.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deleteIdentity({ + identityId: '<IDENTITY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-key.md b/examples/2.3.x/console-web/examples/account/delete-key.md new file mode 100644 index 000000000..7e22fba5a --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deleteKey({ + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/console-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..b16e35949 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account, AuthenticatorType } 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 account = new Account(client); + +const result = await account.deleteMFAAuthenticator({ + type: AuthenticatorType.Totp, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-payment-method.md b/examples/2.3.x/console-web/examples/account/delete-payment-method.md new file mode 100644 index 000000000..386075685 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-payment-method.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deletePaymentMethod({ + paymentMethodId: '<PAYMENT_METHOD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-push-target.md b/examples/2.3.x/console-web/examples/account/delete-push-target.md new file mode 100644 index 000000000..8aab3e35e --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-push-target.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deletePushTarget({ + targetId: '<TARGET_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete-session.md b/examples/2.3.x/console-web/examples/account/delete-session.md new file mode 100644 index 000000000..6cdb3d4ac --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deleteSession({ + sessionId: '<SESSION_ID>', +}); + +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 new file mode 100644 index 000000000..b363c935c --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete-sessions.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/delete.md b/examples/2.3.x/console-web/examples/account/delete.md new file mode 100644 index 000000000..025be8e58 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/delete.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.delete(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-billing-address.md b/examples/2.3.x/console-web/examples/account/get-billing-address.md new file mode 100644 index 000000000..3be8f0517 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-billing-address.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getBillingAddress({ + billingAddressId: '<BILLING_ADDRESS_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-consent-token.md b/examples/2.3.x/console-web/examples/account/get-consent-token.md new file mode 100644 index 000000000..18c13ebd6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-consent-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getConsentToken({ + consentId: '<CONSENT_ID>', + tokenId: '<TOKEN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-consent.md b/examples/2.3.x/console-web/examples/account/get-consent.md new file mode 100644 index 000000000..1cd7874bf --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-consent.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getConsent({ + consentId: '<CONSENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-coupon.md b/examples/2.3.x/console-web/examples/account/get-coupon.md new file mode 100644 index 000000000..fa437bf0a --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-coupon.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getCoupon({ + couponId: '<COUPON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-key.md b/examples/2.3.x/console-web/examples/account/get-key.md new file mode 100644 index 000000000..035c7d12f --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getKey({ + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/console-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..e8cfcdaa6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-payment-method.md b/examples/2.3.x/console-web/examples/account/get-payment-method.md new file mode 100644 index 000000000..be8de9173 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-payment-method.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getPaymentMethod({ + paymentMethodId: '<PAYMENT_METHOD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-prefs.md b/examples/2.3.x/console-web/examples/account/get-prefs.md new file mode 100644 index 000000000..850d74223 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-prefs.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get-session.md b/examples/2.3.x/console-web/examples/account/get-session.md new file mode 100644 index 000000000..656077cea --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.getSession({ + sessionId: '<SESSION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/get.md b/examples/2.3.x/console-web/examples/account/get.md new file mode 100644 index 000000000..56f8d3816 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/get.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.get(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/list-billing-addresses.md b/examples/2.3.x/console-web/examples/account/list-billing-addresses.md new file mode 100644 index 000000000..6bf1a7d71 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-billing-addresses.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listBillingAddresses({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/list-consent-tokens.md b/examples/2.3.x/console-web/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..2ebe0e277 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-consent-tokens.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listConsentTokens({ + consentId: '<CONSENT_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/list-consents.md b/examples/2.3.x/console-web/examples/account/list-consents.md new file mode 100644 index 000000000..9bbe70f0e --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-consents.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listConsents({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/list-identities.md b/examples/2.3.x/console-web/examples/account/list-identities.md new file mode 100644 index 000000000..b3a989d07 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-identities.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listIdentities({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/list-invoices.md b/examples/2.3.x/console-web/examples/account/list-invoices.md new file mode 100644 index 000000000..99b676ee4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-invoices.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listInvoices({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/list-keys.md b/examples/2.3.x/console-web/examples/account/list-keys.md new file mode 100644 index 000000000..4384fd8bf --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-keys.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listKeys({ + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/list-mfa-factors.md b/examples/2.3.x/console-web/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..952b0b368 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-mfa-factors.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listMFAFactors(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/list-payment-methods.md b/examples/2.3.x/console-web/examples/account/list-payment-methods.md new file mode 100644 index 000000000..5818a6bbf --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-payment-methods.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listPaymentMethods({ + queries: [], // 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 new file mode 100644 index 000000000..2270ddfdf --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/list-sessions.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-billing-address.md b/examples/2.3.x/console-web/examples/account/update-billing-address.md new file mode 100644 index 000000000..6b4fea16d --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-billing-address.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateBillingAddress({ + billingAddressId: '<BILLING_ADDRESS_ID>', + country: '<COUNTRY>', + city: '<CITY>', + streetAddress: '<STREET_ADDRESS>', + addressLine2: '<ADDRESS_LINE2>', // optional + state: '<STATE>', // optional + postalCode: '<POSTAL_CODE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-email-verification-otp.md b/examples/2.3.x/console-web/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..204ec33ed --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-email-verification-otp.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateEmailVerificationOTP({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-email-verification.md b/examples/2.3.x/console-web/examples/account/update-email-verification.md new file mode 100644 index 000000000..a70d0af65 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-email-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateEmailVerification({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-email.md b/examples/2.3.x/console-web/examples/account/update-email.md new file mode 100644 index 000000000..1487da473 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-email.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-key.md b/examples/2.3.x/console-web/examples/account/update-key.md new file mode 100644 index 000000000..e417b06ba --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-key.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account, AccountKeyScopes } 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 account = new Account(client); + +const result = await account.updateKey({ + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [AccountKeyScopes.Account], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-magic-url-session.md b/examples/2.3.x/console-web/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..e0a2cb3c5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-magic-url-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateMagicURLSession({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-mfa-authenticator.md b/examples/2.3.x/console-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..19a8daf94 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account, AuthenticatorType } 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 account = new Account(client); + +const result = await account.updateMFAAuthenticator({ + type: AuthenticatorType.Totp, + otp: '<OTP>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-mfa-challenge.md b/examples/2.3.x/console-web/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..39ecea2fa --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateMFAChallenge({ + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/console-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..1e75b0962 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateMFARecoveryCodes(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-mfa.md b/examples/2.3.x/console-web/examples/account/update-mfa.md new file mode 100644 index 000000000..070761fde --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-mfa.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateMFA({ + mfa: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-name.md b/examples/2.3.x/console-web/examples/account/update-name.md new file mode 100644 index 000000000..40bffbf90 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-name.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateName({ + name: '<NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-password.md b/examples/2.3.x/console-web/examples/account/update-password.md new file mode 100644 index 000000000..3eab92885 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-password.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePassword({ + password: 'password', + oldPassword: 'password', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-payment-method-mandate-options.md b/examples/2.3.x/console-web/examples/account/update-payment-method-mandate-options.md new file mode 100644 index 000000000..5a233a16e --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-payment-method-mandate-options.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePaymentMethodMandateOptions({ + paymentMethodId: '<PAYMENT_METHOD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-payment-method-provider.md b/examples/2.3.x/console-web/examples/account/update-payment-method-provider.md new file mode 100644 index 000000000..f99cb7de7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-payment-method-provider.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePaymentMethodProvider({ + paymentMethodId: '<PAYMENT_METHOD_ID>', + providerMethodId: '<PROVIDER_METHOD_ID>', + name: '<NAME>', + state: '<STATE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-payment-method.md b/examples/2.3.x/console-web/examples/account/update-payment-method.md new file mode 100644 index 000000000..cd96a81ab --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-payment-method.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePaymentMethod({ + paymentMethodId: '<PAYMENT_METHOD_ID>', + expiryMonth: 1, + expiryYear: 2026, + state: '<STATE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-phone-session.md b/examples/2.3.x/console-web/examples/account/update-phone-session.md new file mode 100644 index 000000000..f1c43fe45 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-phone-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePhoneSession({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-phone-verification.md b/examples/2.3.x/console-web/examples/account/update-phone-verification.md new file mode 100644 index 000000000..ad5f9fb2a --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-phone-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePhoneVerification({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-phone.md b/examples/2.3.x/console-web/examples/account/update-phone.md new file mode 100644 index 000000000..b1f625282 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-phone.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePhone({ + phone: '+12065550100', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-prefs.md b/examples/2.3.x/console-web/examples/account/update-prefs.md new file mode 100644 index 000000000..41204cbba --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-prefs.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePrefs({ + prefs: { + language: 'en', + timezone: 'UTC', + darkTheme: true, + }, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-push-target.md b/examples/2.3.x/console-web/examples/account/update-push-target.md new file mode 100644 index 000000000..cd8db7d49 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-push-target.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updatePushTarget({ + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-recovery-otp.md b/examples/2.3.x/console-web/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..4d23d7c61 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-recovery-otp.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateRecoveryOTP({ + userId: '<USER_ID>', + secret: '<SECRET>', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-recovery.md b/examples/2.3.x/console-web/examples/account/update-recovery.md new file mode 100644 index 000000000..046b6aebf --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-recovery.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateRecovery({ + userId: '<USER_ID>', + secret: '<SECRET>', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-session.md b/examples/2.3.x/console-web/examples/account/update-session.md new file mode 100644 index 000000000..9bf22914e --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateSession({ + sessionId: '<SESSION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-status.md b/examples/2.3.x/console-web/examples/account/update-status.md new file mode 100644 index 000000000..7b93b08d6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-status.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/account/update-verification.md b/examples/2.3.x/console-web/examples/account/update-verification.md new file mode 100644 index 000000000..17de9ec04 --- /dev/null +++ b/examples/2.3.x/console-web/examples/account/update-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } 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 account = new Account(client); + +const result = await account.updateVerification({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/activities/get-event.md b/examples/2.3.x/console-web/examples/activities/get-event.md new file mode 100644 index 000000000..ea21580bd --- /dev/null +++ b/examples/2.3.x/console-web/examples/activities/get-event.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Activities } 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 activities = new Activities(client); + +const result = await activities.getEvent({ + eventId: '<EVENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/activities/list-events.md b/examples/2.3.x/console-web/examples/activities/list-events.md new file mode 100644 index 000000000..385132ebb --- /dev/null +++ b/examples/2.3.x/console-web/examples/activities/list-events.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Activities } 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 activities = new Activities(client); + +const result = await activities.listEvents({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/advisor/delete-report.md b/examples/2.3.x/console-web/examples/advisor/delete-report.md new file mode 100644 index 000000000..376cba72a --- /dev/null +++ b/examples/2.3.x/console-web/examples/advisor/delete-report.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Advisor } 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 advisor = new Advisor(client); + +const result = await advisor.deleteReport({ + reportId: '<REPORT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/advisor/get-insight.md b/examples/2.3.x/console-web/examples/advisor/get-insight.md new file mode 100644 index 000000000..5ec1b6e36 --- /dev/null +++ b/examples/2.3.x/console-web/examples/advisor/get-insight.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Advisor } 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 advisor = new Advisor(client); + +const result = await advisor.getInsight({ + reportId: '<REPORT_ID>', + insightId: '<INSIGHT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/advisor/get-report.md b/examples/2.3.x/console-web/examples/advisor/get-report.md new file mode 100644 index 000000000..4b96bf95f --- /dev/null +++ b/examples/2.3.x/console-web/examples/advisor/get-report.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Advisor } 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 advisor = new Advisor(client); + +const result = await advisor.getReport({ + reportId: '<REPORT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/advisor/list-insights.md b/examples/2.3.x/console-web/examples/advisor/list-insights.md new file mode 100644 index 000000000..8eb4cbc71 --- /dev/null +++ b/examples/2.3.x/console-web/examples/advisor/list-insights.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Advisor } 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 advisor = new Advisor(client); + +const result = await advisor.listInsights({ + reportId: '<REPORT_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/advisor/list-reports.md b/examples/2.3.x/console-web/examples/advisor/list-reports.md new file mode 100644 index 000000000..e76abbb01 --- /dev/null +++ b/examples/2.3.x/console-web/examples/advisor/list-reports.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Advisor } 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 advisor = new Advisor(client); + +const result = await advisor.listReports({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/affiliates/create-link.md b/examples/2.3.x/console-web/examples/affiliates/create-link.md new file mode 100644 index 000000000..1930a8206 --- /dev/null +++ b/examples/2.3.x/console-web/examples/affiliates/create-link.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Affiliates } 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 affiliates = new Affiliates(client); + +const result = await affiliates.createLink({ + linkId: '<LINK_ID>', + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/affiliates/delete-link.md b/examples/2.3.x/console-web/examples/affiliates/delete-link.md new file mode 100644 index 000000000..226a2bde9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/affiliates/delete-link.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Affiliates } 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 affiliates = new Affiliates(client); + +const result = await affiliates.deleteLink({ + linkId: '<LINK_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/affiliates/get-link.md b/examples/2.3.x/console-web/examples/affiliates/get-link.md new file mode 100644 index 000000000..14e3a375f --- /dev/null +++ b/examples/2.3.x/console-web/examples/affiliates/get-link.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Affiliates } 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 affiliates = new Affiliates(client); + +const result = await affiliates.getLink({ + linkId: '<LINK_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/affiliates/list-links.md b/examples/2.3.x/console-web/examples/affiliates/list-links.md new file mode 100644 index 000000000..3a422f783 --- /dev/null +++ b/examples/2.3.x/console-web/examples/affiliates/list-links.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Affiliates } 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 affiliates = new Affiliates(client); + +const result = await affiliates.listLinks({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/affiliates/list-referrals.md b/examples/2.3.x/console-web/examples/affiliates/list-referrals.md new file mode 100644 index 000000000..6598ac169 --- /dev/null +++ b/examples/2.3.x/console-web/examples/affiliates/list-referrals.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Affiliates } 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 affiliates = new Affiliates(client); + +const result = await affiliates.listReferrals({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/affiliates/list-rewards.md b/examples/2.3.x/console-web/examples/affiliates/list-rewards.md new file mode 100644 index 000000000..ee7d193a9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/affiliates/list-rewards.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Affiliates } 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 affiliates = new Affiliates(client); + +const result = await affiliates.listRewards({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/affiliates/update-reward.md b/examples/2.3.x/console-web/examples/affiliates/update-reward.md new file mode 100644 index 000000000..7c853a676 --- /dev/null +++ b/examples/2.3.x/console-web/examples/affiliates/update-reward.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Affiliates } 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 affiliates = new Affiliates(client); + +const result = await affiliates.updateReward({ + rewardId: '<REWARD_ID>', + status: 'claimed', + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/create-installation-token.md b/examples/2.3.x/console-web/examples/apps/create-installation-token.md new file mode 100644 index 000000000..60808d5b4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.createInstallationToken({ + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/create-key.md b/examples/2.3.x/console-web/examples/apps/create-key.md new file mode 100644 index 000000000..0553fd695 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/create-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const apps = new Apps(client); + +const result = await apps.createKey({ + appId: '<APP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/create-secret.md b/examples/2.3.x/console-web/examples/apps/create-secret.md new file mode 100644 index 000000000..bb60cceb1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/create-secret.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.createSecret({ + appId: '<APP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/create.md b/examples/2.3.x/console-web/examples/apps/create.md new file mode 100644 index 000000000..a7c6d9774 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/create.md @@ -0,0 +1,33 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.create({ + appId: '<APP_ID>', + name: '<NAME>', + redirectUris: [], + description: '<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: '<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: '<TEAM_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/delete-installation.md b/examples/2.3.x/console-web/examples/apps/delete-installation.md new file mode 100644 index 000000000..7bb3c64c2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.deleteInstallation({ + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/delete-key.md b/examples/2.3.x/console-web/examples/apps/delete-key.md new file mode 100644 index 000000000..b4f94f41b --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const apps = new Apps(client); + +const result = await apps.deleteKey({ + appId: '<APP_ID>', + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/delete-secret.md b/examples/2.3.x/console-web/examples/apps/delete-secret.md new file mode 100644 index 000000000..58a524975 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/delete-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.deleteSecret({ + appId: '<APP_ID>', + secretId: '<SECRET_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/delete-tokens.md b/examples/2.3.x/console-web/examples/apps/delete-tokens.md new file mode 100644 index 000000000..0f2ad4d9a --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/delete-tokens.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.deleteTokens({ + appId: '<APP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/delete.md b/examples/2.3.x/console-web/examples/apps/delete.md new file mode 100644 index 000000000..333faa606 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.delete({ + appId: '<APP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/get-installation.md b/examples/2.3.x/console-web/examples/apps/get-installation.md new file mode 100644 index 000000000..0095f7359 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.getInstallation({ + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/get-key.md b/examples/2.3.x/console-web/examples/apps/get-key.md new file mode 100644 index 000000000..46ebde55b --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/get-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const apps = new Apps(client); + +const result = await apps.getKey({ + appId: '<APP_ID>', + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/get-secret.md b/examples/2.3.x/console-web/examples/apps/get-secret.md new file mode 100644 index 000000000..65e9f7185 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/get-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.getSecret({ + appId: '<APP_ID>', + secretId: '<SECRET_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/get.md b/examples/2.3.x/console-web/examples/apps/get.md new file mode 100644 index 000000000..9e9b1b341 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.get({ + appId: '<APP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/list-installation-scopes.md b/examples/2.3.x/console-web/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..e6aee5cd6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/list-installation-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listInstallationScopes(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/list-installations.md b/examples/2.3.x/console-web/examples/apps/list-installations.md new file mode 100644 index 000000000..34c5318ca --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.listInstallations({ + appId: '<APP_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/list-keys.md b/examples/2.3.x/console-web/examples/apps/list-keys.md new file mode 100644 index 000000000..9b129252b --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/list-keys.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listKeys({ + appId: '<APP_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/console-web/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..d701935f7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.listOAuth2Scopes(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/list-secrets.md b/examples/2.3.x/console-web/examples/apps/list-secrets.md new file mode 100644 index 000000000..1c465a7ef --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/list-secrets.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.listSecrets({ + appId: '<APP_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/list.md b/examples/2.3.x/console-web/examples/apps/list.md new file mode 100644 index 000000000..ffb2bf9b7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.list({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/update-labels.md b/examples/2.3.x/console-web/examples/apps/update-labels.md new file mode 100644 index 000000000..ed6c11889 --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/update-labels.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.updateLabels({ + appId: '<APP_ID>', + labels: [], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/update-team.md b/examples/2.3.x/console-web/examples/apps/update-team.md new file mode 100644 index 000000000..15ec56bed --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/update-team.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.updateTeam({ + appId: '<APP_ID>', + teamId: '<TEAM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/apps/update.md b/examples/2.3.x/console-web/examples/apps/update.md new file mode 100644 index 000000000..94131e6bd --- /dev/null +++ b/examples/2.3.x/console-web/examples/apps/update.md @@ -0,0 +1,34 @@ +```javascript +import { Client, Apps } 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 apps = new Apps(client); + +const result = await apps.update({ + appId: '<APP_ID>', + name: '<NAME>', + description: '<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: '<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/console-web/examples/assistant/chat.md b/examples/2.3.x/console-web/examples/assistant/chat.md new file mode 100644 index 000000000..2131548db --- /dev/null +++ b/examples/2.3.x/console-web/examples/assistant/chat.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Assistant } 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 assistant = new Assistant(client); + +const result = await assistant.chat({ + prompt: '<PROMPT>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-browser.md b/examples/2.3.x/console-web/examples/avatars/get-browser.md new file mode 100644 index 000000000..5dd1daa6e --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, Browser } 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 = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-credit-card.md b/examples/2.3.x/console-web/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..dd3864861 --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, CreditCard } 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 = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-favicon.md b/examples/2.3.x/console-web/examples/avatars/get-favicon.md new file mode 100644 index 000000000..ccb69b0aa --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-favicon.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 = avatars.getFavicon({ + url: 'https://example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-flag.md b/examples/2.3.x/console-web/examples/avatars/get-flag.md new file mode 100644 index 000000000..cacde8ff1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Avatars, Flag } 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 = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-image.md b/examples/2.3.x/console-web/examples/avatars/get-image.md new file mode 100644 index 000000000..8cf0eaa2a --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +```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 = avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-initials.md b/examples/2.3.x/console-web/examples/avatars/get-initials.md new file mode 100644 index 000000000..ef898edda --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-initials.md @@ -0,0 +1,18 @@ +```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 = avatars.getInitials({ + name: '<NAME>', // optional + width: 0, // optional + height: 0, // optional + background: 'FFFFFF', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-photo.md b/examples/2.3.x/console-web/examples/avatars/get-photo.md new file mode 100644 index 000000000..1ca4ed7ef --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-photo.md @@ -0,0 +1,22 @@ +```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 = avatars.getPhoto({ + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: 'png', // optional + rating: 'g', // optional + userId: 'current()', // optional + emailHash: '<EMAIL_HASH>', // optional + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-qr.md b/examples/2.3.x/console-web/examples/avatars/get-qr.md new file mode 100644 index 000000000..f64488416 --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-qr.md @@ -0,0 +1,18 @@ +```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 = avatars.getQR({ + text: '<TEXT>', + size: 1, // optional + margin: 0, // optional + download: false, // optional +}); + +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 new file mode 100644 index 000000000..0869f5422 --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/get-screenshot.md @@ -0,0 +1,48 @@ +```javascript +import { + Client, + Avatars, + BrowserTheme, + Timezone, + BrowserPermission, + ImageFormat, +} 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 = avatars.getScreenshot({ + url: 'https://example.com', + headers: { + Authorization: 'Bearer token123', + 'X-Custom-Header': 'value', + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // 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 + locale: 'en-US', // optional + timezone: Timezone.AfricaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [ + BrowserPermission.Geolocation, + BrowserPermission.Notifications, + ], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: ImageFormat.Jpeg, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/create-archive.md b/examples/2.3.x/console-web/examples/backups/create-archive.md new file mode 100644 index 000000000..0e9f8584d --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/create-archive.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Backups, BackupServices } 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 backups = new Backups(client); + +const result = await backups.createArchive({ + services: [BackupServices.Databases], + resourceId: '<RESOURCE_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/create-policy.md b/examples/2.3.x/console-web/examples/backups/create-policy.md new file mode 100644 index 000000000..82370a16b --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/create-policy.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Backups, BackupServices } 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 backups = new Backups(client); + +const result = await backups.createPolicy({ + policyId: '<POLICY_ID>', + services: [BackupServices.Databases], + retention: 1, + schedule: '', + name: '<NAME>', // optional + resourceId: '<RESOURCE_ID>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/create-restoration.md b/examples/2.3.x/console-web/examples/backups/create-restoration.md new file mode 100644 index 000000000..33154b2d8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/create-restoration.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Backups, BackupServices } 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 backups = new Backups(client); + +const result = await backups.createRestoration({ + archiveId: '<ARCHIVE_ID>', + services: [BackupServices.Databases], + newResourceId: '<NEW_RESOURCE_ID>', // optional + newResourceName: '<NEW_RESOURCE_NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/delete-archive.md b/examples/2.3.x/console-web/examples/backups/delete-archive.md new file mode 100644 index 000000000..0c334b5bd --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/delete-archive.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.deleteArchive({ + archiveId: '<ARCHIVE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/delete-policy.md b/examples/2.3.x/console-web/examples/backups/delete-policy.md new file mode 100644 index 000000000..d212e3075 --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/delete-policy.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.deletePolicy({ + policyId: '<POLICY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/get-archive.md b/examples/2.3.x/console-web/examples/backups/get-archive.md new file mode 100644 index 000000000..3329425b0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/get-archive.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.getArchive({ + archiveId: '<ARCHIVE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/get-policy.md b/examples/2.3.x/console-web/examples/backups/get-policy.md new file mode 100644 index 000000000..91f04b2f1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/get-policy.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.getPolicy({ + policyId: '<POLICY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/get-restoration.md b/examples/2.3.x/console-web/examples/backups/get-restoration.md new file mode 100644 index 000000000..3be4bd749 --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/get-restoration.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.getRestoration({ + restorationId: '<RESTORATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/list-archives.md b/examples/2.3.x/console-web/examples/backups/list-archives.md new file mode 100644 index 000000000..1cfba0fed --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/list-archives.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.listArchives({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/list-policies.md b/examples/2.3.x/console-web/examples/backups/list-policies.md new file mode 100644 index 000000000..c67145c4b --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/list-policies.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.listPolicies({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/list-restorations.md b/examples/2.3.x/console-web/examples/backups/list-restorations.md new file mode 100644 index 000000000..1654b2e79 --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/list-restorations.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.listRestorations({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/backups/update-policy.md b/examples/2.3.x/console-web/examples/backups/update-policy.md new file mode 100644 index 000000000..0dbd8651d --- /dev/null +++ b/examples/2.3.x/console-web/examples/backups/update-policy.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Backups } 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 backups = new Backups(client); + +const result = await backups.updatePolicy({ + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + retention: 1, // optional + schedule: '', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/create-program-membership.md b/examples/2.3.x/console-web/examples/console/create-program-membership.md new file mode 100644 index 000000000..3c6d7a951 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/create-program-membership.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.createProgramMembership({ + programId: '<PROGRAM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/create-source.md b/examples/2.3.x/console-web/examples/console/create-source.md new file mode 100644 index 000000000..d981d8d88 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/create-source.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.createSource({ + ref: '<REF>', // optional + referrer: 'https://example.com', // optional + utmSource: '<UTM_SOURCE>', // optional + utmCampaign: '<UTM_CAMPAIGN>', // optional + utmMedium: '<UTM_MEDIUM>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/get-campaign.md b/examples/2.3.x/console-web/examples/console/get-campaign.md new file mode 100644 index 000000000..c9c1aaea3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/get-campaign.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.getCampaign({ + campaignId: '<CAMPAIGN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/get-coupon.md b/examples/2.3.x/console-web/examples/console/get-coupon.md new file mode 100644 index 000000000..b6fd2690c --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/get-coupon.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.getCoupon({ + couponId: '<COUPON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/get-email-template.md b/examples/2.3.x/console-web/examples/console/get-email-template.md new file mode 100644 index 000000000..0f1ca8936 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/get-email-template.md @@ -0,0 +1,21 @@ +```javascript +import { + Client, + Console, + ProjectEmailTemplateId, + ProjectEmailTemplateLocale, +} 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 xconsole = new Console(client); + +const result = await xconsole.getEmailTemplate({ + templateId: ProjectEmailTemplateId.Verification, + locale: ProjectEmailTemplateLocale.Af, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/get-plan.md b/examples/2.3.x/console-web/examples/console/get-plan.md new file mode 100644 index 000000000..cf5b96cb9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/get-plan.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.getPlan({ + planId: '<PLAN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/get-plans.md b/examples/2.3.x/console-web/examples/console/get-plans.md new file mode 100644 index 000000000..98cb395d3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/get-plans.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Console, Platform } 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 xconsole = new Console(client); + +const result = await xconsole.getPlans({ + platform: Platform.Appwrite, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/get-program.md b/examples/2.3.x/console-web/examples/console/get-program.md new file mode 100644 index 000000000..c276879c7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/get-program.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.getProgram({ + programId: '<PROGRAM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/get-resource.md b/examples/2.3.x/console-web/examples/console/get-resource.md new file mode 100644 index 000000000..76bd75a21 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/get-resource.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Console, ConsoleResourceType } 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 xconsole = new Console(client); + +const result = await xconsole.getResource({ + value: '<VALUE>', + type: ConsoleResourceType.Rules, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/list-databases.md b/examples/2.3.x/console-web/examples/console/list-databases.md new file mode 100644 index 000000000..d2097b350 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/list-databases.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.listDatabases({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +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 new file mode 100644 index 000000000..9270d3bb9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/list-o-auth-2-providers.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.listOAuth2Providers(); + +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 new file mode 100644 index 000000000..e6c927a03 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/list-organization-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.listOrganizationScopes(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/list-postgres-extensions.md b/examples/2.3.x/console-web/examples/console/list-postgres-extensions.md new file mode 100644 index 000000000..eec953d6d --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/list-postgres-extensions.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.listPostgresExtensions(); + +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 new file mode 100644 index 000000000..6ae757839 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/list-project-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.listProjectScopes(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/list-regions.md b/examples/2.3.x/console-web/examples/console/list-regions.md new file mode 100644 index 000000000..895a8abfc --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/list-regions.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.listRegions(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/suggest-columns.md b/examples/2.3.x/console-web/examples/console/suggest-columns.md new file mode 100644 index 000000000..e02d8775c --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/suggest-columns.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.suggestColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + context: '<CONTEXT>', // optional + min: 1, // optional + max: 1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/suggest-indexes.md b/examples/2.3.x/console-web/examples/console/suggest-indexes.md new file mode 100644 index 000000000..a0c59677a --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/suggest-indexes.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.suggestIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + min: 1, // optional + max: 1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/suggest-queries.md b/examples/2.3.x/console-web/examples/console/suggest-queries.md new file mode 100644 index 000000000..cfc1d5c25 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/suggest-queries.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Console, QuerySuggestionResource } 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 xconsole = new Console(client); + +const result = await xconsole.suggestQueries({ + resource: QuerySuggestionResource.Activities, + input: '<INPUT>', + databaseId: '<DATABASE_ID>', // optional + tableId: '<TABLE_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/variables.md b/examples/2.3.x/console-web/examples/console/variables.md new file mode 100644 index 000000000..60eed5580 --- /dev/null +++ b/examples/2.3.x/console-web/examples/console/variables.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Console } 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 xconsole = new Console(client); + +const result = await xconsole.variables(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-big-int-attribute.md b/examples/2.3.x/console-web/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..53071380a --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-big-int-attribute.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createBigIntAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 1000000, // optional + xdefault: 0, // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-boolean-attribute.md b/examples/2.3.x/console-web/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..d2ccb0802 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createBooleanAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: false, // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-collection.md b/examples/2.3.x/console-web/examples/databases/create-collection.md new file mode 100644 index 000000000..65a37a474 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-collection.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases, Permission, Role } 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 databases = new Databases(client); + +const result = await databases.createCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-datetime-attribute.md b/examples/2.3.x/console-web/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..7d32531ee --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-datetime-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: '2020-10-15T06:38:00.000+00:00', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-document.md b/examples/2.3.x/console-web/examples/databases/create-document.md new file mode 100644 index 000000000..4e814c977 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } 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 databases = new Databases(client); + +const result = await databases.createDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..e264c9297 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-email-attribute.md b/examples/2.3.x/console-web/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..20441c045 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-email-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createEmailAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'email@example.com', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-enum-attribute.md b/examples/2.3.x/console-web/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..821034f6f --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-enum-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createEnumAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + elements: ['active', 'inactive'], + required: false, + xdefault: 'active', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-float-attribute.md b/examples/2.3.x/console-web/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..25e65418e --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-float-attribute.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + xdefault: 10.5, // optional + array: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..01a86729b --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-index.md @@ -0,0 +1,26 @@ +```javascript +import { + Client, + Databases, + DatabasesIndexType, + OrderBy, +} 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 databases = new Databases(client); + +const result = await databases.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: DatabasesIndexType.Key, + attributes: [], + orders: [OrderBy.Asc], // optional + lengths: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-integer-attribute.md b/examples/2.3.x/console-web/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..18138ec2e --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-integer-attribute.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + xdefault: 10, // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-ip-attribute.md b/examples/2.3.x/console-web/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..83b9e5bfd --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-ip-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: '192.0.2.0', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-line-attribute.md b/examples/2.3.x/console-web/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..e4b532aec --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-line-attribute.md @@ -0,0 +1,23 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createLineAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [1, 2], + [3, 4], + [5, 6], + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-longtext-attribute.md b/examples/2.3.x/console-web/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..2fc6a4adb --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-longtext-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createLongtextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/console-web/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..d32095bfc --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createMediumtextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-operations.md b/examples/2.3.x/console-web/examples/databases/create-operations.md new file mode 100644 index 000000000..91dc151a2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createOperations({ + transactionId: '<TRANSACTION_ID>', + operations: [ + { + action: 'create', + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-point-attribute.md b/examples/2.3.x/console-web/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..9a40ca1fa --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-point-attribute.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createPointAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [1, 2], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-polygon-attribute.md b/examples/2.3.x/console-web/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..c1e0165f5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-polygon-attribute.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createPolygonAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [ + [1, 2], + [3, 4], + [5, 6], + [1, 2], + ], + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-relationship-attribute.md b/examples/2.3.x/console-web/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..b5bc81da2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-relationship-attribute.md @@ -0,0 +1,27 @@ +```javascript +import { + Client, + Databases, + RelationshipType, + RelationMutate, +} 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 databases = new Databases(client); + +const result = await databases.createRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: '<KEY>', // optional + twoWayKey: '<TWO_WAY_KEY>', // optional + onDelete: RelationMutate.Cascade, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-string-attribute.md b/examples/2.3.x/console-web/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..62a5c5e2f --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-string-attribute.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createStringAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-text-attribute.md b/examples/2.3.x/console-web/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..c79b9cf67 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-text-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createTextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-transaction.md b/examples/2.3.x/console-web/examples/databases/create-transaction.md new file mode 100644 index 000000000..ea5dff969 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-url-attribute.md b/examples/2.3.x/console-web/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..1c44cb9e5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-url-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createUrlAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'https://example.com', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create-varchar-attribute.md b/examples/2.3.x/console-web/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..ed35bd747 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create-varchar-attribute.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.createVarcharAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/create.md b/examples/2.3.x/console-web/examples/databases/create.md new file mode 100644 index 000000000..bac0e977f --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/create.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/decrement-document-attribute.md b/examples/2.3.x/console-web/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..275bfb039 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.decrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/delete-attribute.md b/examples/2.3.x/console-web/examples/databases/delete-attribute.md new file mode 100644 index 000000000..a3f89d4db --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/delete-attribute.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.deleteAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/delete-collection.md b/examples/2.3.x/console-web/examples/databases/delete-collection.md new file mode 100644 index 000000000..8a5962a8a --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/delete-collection.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/delete-document.md b/examples/2.3.x/console-web/examples/databases/delete-document.md new file mode 100644 index 000000000..d5e12a18f --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..fd68feeb7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/delete-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/delete-index.md b/examples/2.3.x/console-web/examples/databases/delete-index.md new file mode 100644 index 000000000..f1bd34fbe --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/delete-index.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/delete-transaction.md b/examples/2.3.x/console-web/examples/databases/delete-transaction.md new file mode 100644 index 000000000..680800e0e --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.deleteTransaction({ + transactionId: '<TRANSACTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/delete.md b/examples/2.3.x/console-web/examples/databases/delete.md new file mode 100644 index 000000000..30228d97b --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.delete({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/get-attribute.md b/examples/2.3.x/console-web/examples/databases/get-attribute.md new file mode 100644 index 000000000..e81686823 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/get-attribute.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.getAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/get-collection.md b/examples/2.3.x/console-web/examples/databases/get-collection.md new file mode 100644 index 000000000..7d696f170 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/get-collection.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/get-document.md b/examples/2.3.x/console-web/examples/databases/get-document.md new file mode 100644 index 000000000..d525527d6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/get-index.md b/examples/2.3.x/console-web/examples/databases/get-index.md new file mode 100644 index 000000000..58ce1ea4b --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/get-index.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/get-transaction.md b/examples/2.3.x/console-web/examples/databases/get-transaction.md new file mode 100644 index 000000000..3a3a2e90a --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.getTransaction({ + transactionId: '<TRANSACTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/get.md b/examples/2.3.x/console-web/examples/databases/get.md new file mode 100644 index 000000000..b0a7e7c84 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.get({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/increment-document-attribute.md b/examples/2.3.x/console-web/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..733e98c06 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/increment-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.incrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/list-attributes.md b/examples/2.3.x/console-web/examples/databases/list-attributes.md new file mode 100644 index 000000000..33ebc0b9d --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/list-attributes.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.listAttributes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/list-collections.md b/examples/2.3.x/console-web/examples/databases/list-collections.md new file mode 100644 index 000000000..c06ed1339 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/list-collections.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.listCollections({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/list-documents.md b/examples/2.3.x/console-web/examples/databases/list-documents.md new file mode 100644 index 000000000..830c6ca3b --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/list-indexes.md b/examples/2.3.x/console-web/examples/databases/list-indexes.md new file mode 100644 index 000000000..d537a018d --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/list-indexes.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..37f2fde74 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/list.md b/examples/2.3.x/console-web/examples/databases/list.md new file mode 100644 index 000000000..0b8497585 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-big-int-attribute.md b/examples/2.3.x/console-web/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..aa19ca5b9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-big-int-attribute.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateBigIntAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 0, + min: 0, // optional + max: 1000000, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-boolean-attribute.md b/examples/2.3.x/console-web/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..c3fb91724 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateBooleanAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: false, + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-collection.md b/examples/2.3.x/console-web/examples/databases/update-collection.md new file mode 100644 index 000000000..c54a45f81 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-collection.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases, Permission, Role } 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 databases = new Databases(client); + +const result = await databases.updateCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', // optional + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-datetime-attribute.md b/examples/2.3.x/console-web/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..38b6a4ad2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-datetime-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: '2020-10-15T06:38:00.000+00:00', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-document.md b/examples/2.3.x/console-web/examples/databases/update-document.md new file mode 100644 index 000000000..1aeec1ca1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } 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 databases = new Databases(client); + +const result = await databases.updateDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-documents.md b/examples/2.3.x/console-web/examples/databases/update-documents.md new file mode 100644 index 000000000..949f35812 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-documents.md @@ -0,0 +1,25 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-email-attribute.md b/examples/2.3.x/console-web/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..4a9cfc5c1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-email-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateEmailAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'email@example.com', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-enum-attribute.md b/examples/2.3.x/console-web/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..ffe1b42fd --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-enum-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateEnumAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + elements: ['active', 'inactive'], + required: false, + xdefault: 'active', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-float-attribute.md b/examples/2.3.x/console-web/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..07b91e97a --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-float-attribute.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 10.5, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-integer-attribute.md b/examples/2.3.x/console-web/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..1dad2fd7e --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-integer-attribute.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 10, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-ip-attribute.md b/examples/2.3.x/console-web/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..91e86d48c --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-ip-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: '192.0.2.0', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-line-attribute.md b/examples/2.3.x/console-web/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..1e43c8e50 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-line-attribute.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateLineAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [1, 2], + [3, 4], + [5, 6], + ], // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-longtext-attribute.md b/examples/2.3.x/console-web/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..6b30dc5f0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-longtext-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateLongtextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/console-web/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..1e8ec3e3d --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateMediumtextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-point-attribute.md b/examples/2.3.x/console-web/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..faa33befa --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-point-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updatePointAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [1, 2], // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-polygon-attribute.md b/examples/2.3.x/console-web/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..c9d40a4dc --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-polygon-attribute.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updatePolygonAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [ + [1, 2], + [3, 4], + [5, 6], + [1, 2], + ], + ], // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-relationship-attribute.md b/examples/2.3.x/console-web/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..40c7c5264 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Databases, RelationMutate } 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 databases = new Databases(client); + +const result = await databases.updateRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + onDelete: RelationMutate.Cascade, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-string-attribute.md b/examples/2.3.x/console-web/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..3fbbd6667 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-string-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateStringAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-text-attribute.md b/examples/2.3.x/console-web/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..8441402a2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-text-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateTextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-transaction.md b/examples/2.3.x/console-web/examples/databases/update-transaction.md new file mode 100644 index 000000000..4e30b4692 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateTransaction({ + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-url-attribute.md b/examples/2.3.x/console-web/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..be0192fdb --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-url-attribute.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateUrlAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'https://example.com', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update-varchar-attribute.md b/examples/2.3.x/console-web/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..aaa7d3926 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update-varchar-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.updateVarcharAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/update.md b/examples/2.3.x/console-web/examples/databases/update.md new file mode 100644 index 000000000..dcf5ad0c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/update.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/databases/upsert-document.md b/examples/2.3.x/console-web/examples/databases/upsert-document.md new file mode 100644 index 000000000..ec7e32b0f --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/upsert-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Databases, Permission, Role } 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 databases = new Databases(client); + +const result = await databases.upsertDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..5ee9d710e --- /dev/null +++ b/examples/2.3.x/console-web/examples/databases/upsert-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Databases } 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 databases = new Databases(client); + +const result = await databases.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/create-collection.md b/examples/2.3.x/console-web/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..36938f25f --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/create-collection.md @@ -0,0 +1,22 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/create-document.md b/examples/2.3.x/console-web/examples/documentsdb/create-document.md new file mode 100644 index 000000000..bde67443b --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/create-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..1c9613362 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/create-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/create-failover.md b/examples/2.3.x/console-web/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..39cafef13 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/create-failover.md @@ -0,0 +1,16 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..ec398d9df --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/create-index.md @@ -0,0 +1,26 @@ +```javascript +import { + Client, + DocumentsDB, + DocumentsDBIndexType, + OrderBy, +} 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: DocumentsDBIndexType.Key, + attributes: [], + orders: [OrderBy.Asc], // optional + lengths: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/create-transaction.md b/examples/2.3.x/console-web/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..81770ad54 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/create.md b/examples/2.3.x/console-web/examples/documentsdb/create.md new file mode 100644 index 000000000..e6ea3409f --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/create.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/console-web/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..853c8b21e --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.decrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/delete-collection.md b/examples/2.3.x/console-web/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..9b59e603b --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/delete-collection.md @@ -0,0 +1,16 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/delete-document.md b/examples/2.3.x/console-web/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..a2985bab8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..f9e603c05 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/delete-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/delete-index.md b/examples/2.3.x/console-web/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..27096d017 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/delete-index.md @@ -0,0 +1,17 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/delete-transaction.md b/examples/2.3.x/console-web/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..9ae98acf0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteTransaction({ + transactionId: '<TRANSACTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/delete.md b/examples/2.3.x/console-web/examples/documentsdb/delete.md new file mode 100644 index 000000000..03a4b9854 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.delete({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/get-collection.md b/examples/2.3.x/console-web/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..3a20069c7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/get-collection.md @@ -0,0 +1,16 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/get-document.md b/examples/2.3.x/console-web/examples/documentsdb/get-document.md new file mode 100644 index 000000000..48df62f50 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/get-index.md b/examples/2.3.x/console-web/examples/documentsdb/get-index.md new file mode 100644 index 000000000..565088475 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/get-index.md @@ -0,0 +1,17 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/get-replicas.md b/examples/2.3.x/console-web/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..5e9e4dd4c --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/get-replicas.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getReplicas({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/get-status.md b/examples/2.3.x/console-web/examples/documentsdb/get-status.md new file mode 100644 index 000000000..8a53e201f --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/get-status.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getStatus({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/get-transaction.md b/examples/2.3.x/console-web/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..5d6fe4b22 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getTransaction({ + transactionId: '<TRANSACTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/get.md b/examples/2.3.x/console-web/examples/documentsdb/get.md new file mode 100644 index 000000000..c7f67d518 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.get({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/console-web/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..3caa48d7a --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.incrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/list-collections.md b/examples/2.3.x/console-web/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..c0f532eab --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/list-collections.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listCollections({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/list-documents.md b/examples/2.3.x/console-web/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..8d0007567 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/list-indexes.md b/examples/2.3.x/console-web/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..cfe94f509 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/list-indexes.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/list-operations.md b/examples/2.3.x/console-web/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..d0ec3a087 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/list-operations.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/list-specifications.md b/examples/2.3.x/console-web/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..b5d87ea65 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/list-specifications.md @@ -0,0 +1,13 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listSpecifications(); + +console.log(result); +``` 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 new file mode 100644 index 000000000..cf97fb49a --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/list.md b/examples/2.3.x/console-web/examples/documentsdb/list.md new file mode 100644 index 000000000..daf093dec --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.list({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/update-collection.md b/examples/2.3.x/console-web/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..7bbdafc10 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/update-collection.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/update-document.md b/examples/2.3.x/console-web/examples/documentsdb/update-document.md new file mode 100644 index 000000000..ab279ca03 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/update-documents.md b/examples/2.3.x/console-web/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..90b6f272d --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/update-documents.md @@ -0,0 +1,19 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/update-transaction.md b/examples/2.3.x/console-web/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..f7f977d19 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateTransaction({ + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/update.md b/examples/2.3.x/console-web/examples/documentsdb/update.md new file mode 100644 index 000000000..bda623621 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/update.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/documentsdb/upsert-document.md b/examples/2.3.x/console-web/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..6a7c62905 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.upsertDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..fb5a380a9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/documentsdb/upsert-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } 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 documentsDB = new DocumentsDB(client); + +const result = await documentsDB.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/console-web/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..ea79a4e59 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createPresetGoogleWorkspace({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/console-web/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..4b39fc5ef --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createPresetICloud({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-preset-mailgun.md b/examples/2.3.x/console-web/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..90510b981 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-preset-mailgun.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createPresetMailgun({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-preset-outlook.md b/examples/2.3.x/console-web/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..07cf92770 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-preset-outlook.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createPresetOutlook({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/console-web/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..5841d976c --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createPresetProtonMail({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-preset-zoho.md b/examples/2.3.x/console-web/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..d00292d7b --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-preset-zoho.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createPresetZoho({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-purchase.md b/examples/2.3.x/console-web/examples/domains/create-purchase.md new file mode 100644 index 000000000..e0580e6c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-purchase.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createPurchase({ + domain: 'example.com', + organizationId: '<ORGANIZATION_ID>', + firstName: '<FIRST_NAME>', + lastName: '<LAST_NAME>', + email: 'email@example.com', + phone: '+12065550100', + billingAddressId: '<BILLING_ADDRESS_ID>', + paymentMethodId: '<PAYMENT_METHOD_ID>', + addressLine3: '<ADDRESS_LINE3>', // optional + companyName: '<COMPANY_NAME>', // optional + periodYears: 1, // optional + autoRenewal: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-a.md b/examples/2.3.x/console-web/examples/domains/create-record-a.md new file mode 100644 index 000000000..dcc7de1ae --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-a.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordA({ + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-aaaa.md b/examples/2.3.x/console-web/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..821e26705 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-aaaa.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordAAAA({ + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-alias.md b/examples/2.3.x/console-web/examples/domains/create-record-alias.md new file mode 100644 index 000000000..b0b8c0127 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-alias.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordAlias({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-caa.md b/examples/2.3.x/console-web/examples/domains/create-record-caa.md new file mode 100644 index 000000000..f75caa620 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-caa.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordCAA({ + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-cname.md b/examples/2.3.x/console-web/examples/domains/create-record-cname.md new file mode 100644 index 000000000..8c61fd503 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-cname.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordCNAME({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-https.md b/examples/2.3.x/console-web/examples/domains/create-record-https.md new file mode 100644 index 000000000..b1bb8059b --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-https.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordHTTPS({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-mx.md b/examples/2.3.x/console-web/examples/domains/create-record-mx.md new file mode 100644 index 000000000..58fca599d --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-mx.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordMX({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-ns.md b/examples/2.3.x/console-web/examples/domains/create-record-ns.md new file mode 100644 index 000000000..cfdee71ac --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-ns.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordNS({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-srv.md b/examples/2.3.x/console-web/examples/domains/create-record-srv.md new file mode 100644 index 000000000..54f4f958e --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-srv.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordSRV({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-record-txt.md b/examples/2.3.x/console-web/examples/domains/create-record-txt.md new file mode 100644 index 000000000..7681e278b --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-record-txt.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createRecordTXT({ + domainId: '<DOMAIN_ID>', + name: '', + ttl: 1, + value: '<VALUE>', // optional + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-transfer-in.md b/examples/2.3.x/console-web/examples/domains/create-transfer-in.md new file mode 100644 index 000000000..b5aac1ccc --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-transfer-in.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createTransferIn({ + domain: 'example.com', + organizationId: '<ORGANIZATION_ID>', + authCode: '<AUTH_CODE>', + paymentMethodId: '<PAYMENT_METHOD_ID>', + autoRenewal: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create-transfer-out.md b/examples/2.3.x/console-web/examples/domains/create-transfer-out.md new file mode 100644 index 000000000..8e34d604d --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create-transfer-out.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.createTransferOut({ + domainId: '<DOMAIN_ID>', + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/create.md b/examples/2.3.x/console-web/examples/domains/create.md new file mode 100644 index 000000000..bbf6d0797 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/create.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.create({ + teamId: '<TEAM_ID>', + domain: 'example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/delete-record.md b/examples/2.3.x/console-web/examples/domains/delete-record.md new file mode 100644 index 000000000..3e7727d30 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/delete-record.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.deleteRecord({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/delete.md b/examples/2.3.x/console-web/examples/domains/delete.md new file mode 100644 index 000000000..ef4375028 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.delete({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/console-web/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..c8068d2c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getPresetGoogleWorkspace({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/console-web/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..fa143f7eb --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getPresetICloud({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-preset-mailgun.md b/examples/2.3.x/console-web/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..2e94273ce --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-preset-mailgun.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getPresetMailgun({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-preset-outlook.md b/examples/2.3.x/console-web/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..a79860501 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-preset-outlook.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getPresetOutlook({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/console-web/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..844428ed9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getPresetProtonMail({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-preset-zoho.md b/examples/2.3.x/console-web/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..2d4babee8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-preset-zoho.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getPresetZoho({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-price.md b/examples/2.3.x/console-web/examples/domains/get-price.md new file mode 100644 index 000000000..4202f3ea9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-price.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Domains, DomainRegistrationType } 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 domains = new Domains(client); + +const result = await domains.getPrice({ + domain: 'example.com', + periodYears: null, // optional + registrationType: DomainRegistrationType.New, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-record.md b/examples/2.3.x/console-web/examples/domains/get-record.md new file mode 100644 index 000000000..c52071306 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-record.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getRecord({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-transfer-status.md b/examples/2.3.x/console-web/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..a0620bb40 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-transfer-status.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getTransferStatus({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get-zone.md b/examples/2.3.x/console-web/examples/domains/get-zone.md new file mode 100644 index 000000000..e1b7a8247 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get-zone.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.getZone({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/get.md b/examples/2.3.x/console-web/examples/domains/get.md new file mode 100644 index 000000000..c2170166a --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.get({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/list-prices.md b/examples/2.3.x/console-web/examples/domains/list-prices.md new file mode 100644 index 000000000..247cfebb7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/list-prices.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Domains, DomainRegistrationType } 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 domains = new Domains(client); + +const result = await domains.listPrices({ + domains: [], + periodYears: null, // optional + registrationType: DomainRegistrationType.New, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/list-records.md b/examples/2.3.x/console-web/examples/domains/list-records.md new file mode 100644 index 000000000..eb9657a31 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/list-records.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.listRecords({ + domainId: '<DOMAIN_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/list-suggestions.md b/examples/2.3.x/console-web/examples/domains/list-suggestions.md new file mode 100644 index 000000000..313c5bd27 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/list-suggestions.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains, DomainSuggestionType } 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 domains = new Domains(client); + +const result = await domains.listSuggestions({ + query: '<QUERY>', + tlds: [], // optional + limit: null, // optional + filterType: DomainSuggestionType.Premium, // optional + priceMax: null, // optional + priceMin: null, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/list.md b/examples/2.3.x/console-web/examples/domains/list.md new file mode 100644 index 000000000..c77ab41bb --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.list({ + queries: [], // optional + search: '<SEARCH>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-auto-renewal.md b/examples/2.3.x/console-web/examples/domains/update-auto-renewal.md new file mode 100644 index 000000000..e42364e20 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-auto-renewal.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateAutoRenewal({ + domainId: '<DOMAIN_ID>', + autoRenewal: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-nameservers.md b/examples/2.3.x/console-web/examples/domains/update-nameservers.md new file mode 100644 index 000000000..e8ad23b84 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-nameservers.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateNameservers({ + domainId: '<DOMAIN_ID>', + nameservers: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-purchase.md b/examples/2.3.x/console-web/examples/domains/update-purchase.md new file mode 100644 index 000000000..418bf4c2b --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-purchase.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updatePurchase({ + invoiceId: '<INVOICE_ID>', + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-a.md b/examples/2.3.x/console-web/examples/domains/update-record-a.md new file mode 100644 index 000000000..21f66217d --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-a.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordA({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-aaaa.md b/examples/2.3.x/console-web/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..2ff8cf1da --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-aaaa.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordAAAA({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-alias.md b/examples/2.3.x/console-web/examples/domains/update-record-alias.md new file mode 100644 index 000000000..691844b6b --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-alias.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordAlias({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-caa.md b/examples/2.3.x/console-web/examples/domains/update-record-caa.md new file mode 100644 index 000000000..ee7fda1e7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-caa.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordCAA({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-cname.md b/examples/2.3.x/console-web/examples/domains/update-record-cname.md new file mode 100644 index 000000000..f7911318f --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-cname.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordCNAME({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-https.md b/examples/2.3.x/console-web/examples/domains/update-record-https.md new file mode 100644 index 000000000..02dfe5c12 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-https.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordHTTPS({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-mx.md b/examples/2.3.x/console-web/examples/domains/update-record-mx.md new file mode 100644 index 000000000..a0459f6e2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-mx.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordMX({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-ns.md b/examples/2.3.x/console-web/examples/domains/update-record-ns.md new file mode 100644 index 000000000..6b45612af --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-ns.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordNS({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-srv.md b/examples/2.3.x/console-web/examples/domains/update-record-srv.md new file mode 100644 index 000000000..bdaaee239 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-srv.md @@ -0,0 +1,23 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordSRV({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-record-txt.md b/examples/2.3.x/console-web/examples/domains/update-record-txt.md new file mode 100644 index 000000000..94046032a --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-record-txt.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateRecordTXT({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-team.md b/examples/2.3.x/console-web/examples/domains/update-team.md new file mode 100644 index 000000000..f0a02da97 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-team.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateTeam({ + domainId: '<DOMAIN_ID>', + teamId: '<TEAM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-transfer-in.md b/examples/2.3.x/console-web/examples/domains/update-transfer-in.md new file mode 100644 index 000000000..bb44ada9b --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-transfer-in.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateTransferIn({ + invoiceId: '<INVOICE_ID>', + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/update-zone.md b/examples/2.3.x/console-web/examples/domains/update-zone.md new file mode 100644 index 000000000..cbe1b0499 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/update-zone.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.updateZone({ + domainId: '<DOMAIN_ID>', + content: '<CONTENT>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/domains/verify-nameservers.md b/examples/2.3.x/console-web/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..c33f57866 --- /dev/null +++ b/examples/2.3.x/console-web/examples/domains/verify-nameservers.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Domains } 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 domains = new Domains(client); + +const result = await domains.verifyNameservers({ + domainId: '<DOMAIN_ID>', +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..0b93299b5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Embeddings, EmbeddingModel } 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 embeddings = new Embeddings(client); + +const result = await embeddings.createTextEmbeddings({ + texts: [], + model: EmbeddingModel.NomicEmbedText, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/create-deployment.md b/examples/2.3.x/console-web/examples/functions/create-deployment.md new file mode 100644 index 000000000..a30cf6727 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/create-deployment.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.createDeployment({ + functionId: '<FUNCTION_ID>', + code: document.getElementById('uploader').files[0], + activate: false, + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/console-web/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..35263d98c --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.createDuplicateDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/create-execution.md b/examples/2.3.x/console-web/examples/functions/create-execution.md new file mode 100644 index 000000000..fc11f95aa --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Functions, ExecutionMethod } 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 functions = new Functions(client); + +const result = await functions.createExecution({ + functionId: '<FUNCTION_ID>', + body: '<BODY>', // optional + async: false, // optional + xpath: '<PATH>', // optional + method: ExecutionMethod.GET, // optional + headers: {}, // optional + scheduledAt: '<SCHEDULED_AT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/create-template-deployment.md b/examples/2.3.x/console-web/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..a445c48c8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/create-template-deployment.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Functions, TemplateReferenceType } 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 functions = new Functions(client); + +const result = await functions.createTemplateDeployment({ + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + type: TemplateReferenceType.Commit, + reference: '<REFERENCE>', + activate: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/create-variable.md b/examples/2.3.x/console-web/examples/functions/create-variable.md new file mode 100644 index 000000000..c70f03761 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/create-variable.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.createVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/create-vcs-deployment.md b/examples/2.3.x/console-web/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..22b9775e5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Functions, VCSReferenceType } 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 functions = new Functions(client); + +const result = await functions.createVcsDeployment({ + functionId: '<FUNCTION_ID>', + type: VCSReferenceType.Branch, + reference: '<REFERENCE>', + activate: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/create.md b/examples/2.3.x/console-web/examples/functions/create.md new file mode 100644 index 000000000..aeb31effc --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/create.md @@ -0,0 +1,41 @@ +```javascript +import { + Client, + Functions, + Runtime, + ProjectKeyScopes, +} 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 functions = new Functions(client); + +const result = await functions.create({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: Runtime.Node145, + execute: ['any'], // optional + events: [], // optional + schedule: '0 0 * * *', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [ProjectKeyScopes.ProjectRead], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/delete-deployment.md b/examples/2.3.x/console-web/examples/functions/delete-deployment.md new file mode 100644 index 000000000..b5e9905eb --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/delete-deployment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.deleteDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/delete-execution.md b/examples/2.3.x/console-web/examples/functions/delete-execution.md new file mode 100644 index 000000000..fecb6d13d --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/delete-execution.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.deleteExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/delete-variable.md b/examples/2.3.x/console-web/examples/functions/delete-variable.md new file mode 100644 index 000000000..dbe969e53 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/delete-variable.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.deleteVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/delete.md b/examples/2.3.x/console-web/examples/functions/delete.md new file mode 100644 index 000000000..a5538df9b --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.delete({ + functionId: '<FUNCTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/get-deployment-download.md b/examples/2.3.x/console-web/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..632421467 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/get-deployment-download.md @@ -0,0 +1,22 @@ +```javascript +import { + Client, + Functions, + DeploymentDownloadType, +} 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 functions = new Functions(client); + +const result = functions.getDeploymentDownload({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.Source, // optional + token: '<TOKEN>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/get-deployment.md b/examples/2.3.x/console-web/examples/functions/get-deployment.md new file mode 100644 index 000000000..2b11b0363 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/get-deployment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.getDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/get-execution.md b/examples/2.3.x/console-web/examples/functions/get-execution.md new file mode 100644 index 000000000..52b2192e4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.getExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/get-template.md b/examples/2.3.x/console-web/examples/functions/get-template.md new file mode 100644 index 000000000..7202df56d --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/get-template.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.getTemplate({ + templateId: '<TEMPLATE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/get-variable.md b/examples/2.3.x/console-web/examples/functions/get-variable.md new file mode 100644 index 000000000..9453004a5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/get-variable.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.getVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/get.md b/examples/2.3.x/console-web/examples/functions/get.md new file mode 100644 index 000000000..3ade4a7c6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.get({ + functionId: '<FUNCTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/list-deployments.md b/examples/2.3.x/console-web/examples/functions/list-deployments.md new file mode 100644 index 000000000..4dce42885 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/list-deployments.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.listDeployments({ + functionId: '<FUNCTION_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/list-executions.md b/examples/2.3.x/console-web/examples/functions/list-executions.md new file mode 100644 index 000000000..009c49f34 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/list-executions.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.listExecutions({ + functionId: '<FUNCTION_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..634305df1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/list-runtimes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.listRuntimes(); + +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 new file mode 100644 index 000000000..b67d111c1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/list-specifications.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.listSpecifications({ + type: 'runtimes', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/list-templates.md b/examples/2.3.x/console-web/examples/functions/list-templates.md new file mode 100644 index 000000000..8226ace53 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/list-templates.md @@ -0,0 +1,24 @@ +```javascript +import { + Client, + Functions, + Runtime, + FunctionTemplateUseCase, +} 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 functions = new Functions(client); + +const result = await functions.listTemplates({ + runtimes: [Runtime.Node145], // optional + useCases: [FunctionTemplateUseCase.Starter], // optional + limit: 1, // optional + offset: 0, // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/list-variables.md b/examples/2.3.x/console-web/examples/functions/list-variables.md new file mode 100644 index 000000000..a0b0e6407 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/list-variables.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.listVariables({ + functionId: '<FUNCTION_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/list.md b/examples/2.3.x/console-web/examples/functions/list.md new file mode 100644 index 000000000..c9115bdcb --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/update-deployment-status.md b/examples/2.3.x/console-web/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..176260f69 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/update-deployment-status.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.updateDeploymentStatus({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/update-function-deployment.md b/examples/2.3.x/console-web/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..24eca47ad --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/update-function-deployment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.updateFunctionDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/update-variable.md b/examples/2.3.x/console-web/examples/functions/update-variable.md new file mode 100644 index 000000000..d319ba4aa --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/update-variable.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Functions } 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 functions = new Functions(client); + +const result = await functions.updateVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/functions/update.md b/examples/2.3.x/console-web/examples/functions/update.md new file mode 100644 index 000000000..ad32ec149 --- /dev/null +++ b/examples/2.3.x/console-web/examples/functions/update.md @@ -0,0 +1,41 @@ +```javascript +import { + Client, + Functions, + Runtime, + ProjectKeyScopes, +} 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 functions = new Functions(client); + +const result = await functions.update({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: Runtime.Node145, // optional + execute: ['any'], // optional + events: [], // optional + schedule: '0 0 * * *', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [ProjectKeyScopes.ProjectRead], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // 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 new file mode 100644 index 000000000..25c0ffbdd --- /dev/null +++ b/examples/2.3.x/console-web/examples/graphql/mutation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Graphql } 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 graphql = new Graphql(client); + +const result = await graphql.mutation({ + query: {}, +}); + +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 new file mode 100644 index 000000000..73b3da233 --- /dev/null +++ b/examples/2.3.x/console-web/examples/graphql/query.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Graphql } 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 graphql = new Graphql(client); + +const result = await graphql.query({ + query: {}, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/locale/get.md b/examples/2.3.x/console-web/examples/locale/get.md new file mode 100644 index 000000000..4432c7ee4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/locale/get.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } 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 locale = new Locale(client); + +const result = await locale.get(); + +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 new file mode 100644 index 000000000..815fc01ac --- /dev/null +++ b/examples/2.3.x/console-web/examples/locale/list-codes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } 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 locale = new Locale(client); + +const result = await locale.listCodes(); + +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 new file mode 100644 index 000000000..89bfc10a8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/locale/list-continents.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } 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 locale = new Locale(client); + +const result = await locale.listContinents(); + +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 new file mode 100644 index 000000000..0223e0474 --- /dev/null +++ b/examples/2.3.x/console-web/examples/locale/list-countries-eu.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } 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 locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +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 new file mode 100644 index 000000000..e172ecf11 --- /dev/null +++ b/examples/2.3.x/console-web/examples/locale/list-countries-phones.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } 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 locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +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 new file mode 100644 index 000000000..b40c2c642 --- /dev/null +++ b/examples/2.3.x/console-web/examples/locale/list-countries.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } 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 locale = new Locale(client); + +const result = await locale.listCountries(); + +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 new file mode 100644 index 000000000..ccdceeeaf --- /dev/null +++ b/examples/2.3.x/console-web/examples/locale/list-currencies.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } 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 locale = new Locale(client); + +const result = await locale.listCurrencies(); + +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 new file mode 100644 index 000000000..26688ff74 --- /dev/null +++ b/examples/2.3.x/console-web/examples/locale/list-languages.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Locale } 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 locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/manager/create-block.md b/examples/2.3.x/console-web/examples/manager/create-block.md new file mode 100644 index 000000000..a63a5f114 --- /dev/null +++ b/examples/2.3.x/console-web/examples/manager/create-block.md @@ -0,0 +1,25 @@ +```javascript +import { + Client, + Manager, + BlockResourceType, + BlockMode, +} 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.createBlock({ + projectId: '<PROJECT_ID>', + resourceType: BlockResourceType.Projects, + resourceId: '<RESOURCE_ID>', // optional + mode: BlockMode.Full, // optional + reason: '<REASON>', // optional + expiredAt: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/manager/delete-block.md b/examples/2.3.x/console-web/examples/manager/delete-block.md new file mode 100644 index 000000000..220da098d --- /dev/null +++ b/examples/2.3.x/console-web/examples/manager/delete-block.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Manager, BlockResourceType } 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.deleteBlock({ + projectId: '<PROJECT_ID>', + resourceType: BlockResourceType.Projects, + resourceId: '<RESOURCE_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/manager/delete-cache.md b/examples/2.3.x/console-web/examples/manager/delete-cache.md new file mode 100644 index 000000000..fc821a1e9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/manager/delete-cache.md @@ -0,0 +1,27 @@ +```javascript +import { + Client, + Manager, + Region, + CacheTarget, + CacheDatabase, +} 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.deleteCache({ + region: Region.Fra, // optional + cache: CacheTarget.Cache, // optional + all: false, // optional + database: CacheDatabase.Console, // optional + projectId: '<PROJECT_ID>', // optional + collectionId: '<COLLECTION_ID>', // optional + documentId: '<DOCUMENT_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/manager/list-blocks.md b/examples/2.3.x/console-web/examples/manager/list-blocks.md new file mode 100644 index 000000000..7d93e76cf --- /dev/null +++ b/examples/2.3.x/console-web/examples/manager/list-blocks.md @@ -0,0 +1,15 @@ +```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.listBlocks({ + projectId: '<PROJECT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/manager/update-user-status.md b/examples/2.3.x/console-web/examples/manager/update-user-status.md new file mode 100644 index 000000000..6d6a0a7ec --- /dev/null +++ b/examples/2.3.x/console-web/examples/manager/update-user-status.md @@ -0,0 +1,18 @@ +```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.updateUserStatus({ + status: false, + userId: '<USER_ID>', // optional + email: '<EMAIL>', // optional + reason: '<REASON>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-apns-provider.md b/examples/2.3.x/console-web/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..5a9f66eed --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-apns-provider.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createAPNSProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false, // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/console-web/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..131e915b4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createAppwriteProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, // optional + qos: 0, // optional + expiry: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-email.md b/examples/2.3.x/console-web/examples/messaging/create-email.md new file mode 100644 index 000000000..bed1afc98 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-email.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createEmail({ + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-fcm-provider.md b/examples/2.3.x/console-web/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..74b9c95a3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-fcm-provider.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/console-web/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..0338191d0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + domain: 'example.com', // optional + isEuRegion: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/console-web/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..2f5462df4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>', // optional + enabled: false, // 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 new file mode 100644 index 000000000..7235c19d9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-push.md @@ -0,0 +1,33 @@ +```javascript +import { Client, Messaging, MessagePriority } 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 messaging = new Messaging(client); + +const result = await messaging.createPush({ + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: {}, // optional + action: '<ACTION>', // optional + image: '<ID1:ID2>', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-resend-provider.md b/examples/2.3.x/console-web/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..bac274620 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-resend-provider.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createResendProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/console-web/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..d2cbe270b --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-ses-provider.md b/examples/2.3.x/console-web/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..f039f45c0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-ses-provider.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createSesProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + accessKey: '<ACCESS_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + region: '<REGION>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-sms.md b/examples/2.3.x/console-web/examples/messaging/create-sms.md new file mode 100644 index 000000000..9dbafdd46 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-sms.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createSMS({ + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-smtp-provider.md b/examples/2.3.x/console-web/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..3911e73dd --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Messaging, SmtpEncryption } 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 messaging = new Messaging(client); + +const result = await messaging.createSMTPProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 587, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-subscriber.md b/examples/2.3.x/console-web/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..1a87cce5a --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-subscriber.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-telesign-provider.md b/examples/2.3.x/console-web/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..546b7957a --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-telesign-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/console-web/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..3501221ac --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-topic.md b/examples/2.3.x/console-web/examples/messaging/create-topic.md new file mode 100644 index 000000000..1e1247f77 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-topic.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ['any'], // optional + qos: 0, // optional + expiry: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-twilio-provider.md b/examples/2.3.x/console-web/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..f1010c9b7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-twilio-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '<FROM>', // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-vonage-provider.md b/examples/2.3.x/console-web/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..d3e46c87c --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/create-vonage-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.createVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/delete-provider.md b/examples/2.3.x/console-web/examples/messaging/delete-provider.md new file mode 100644 index 000000000..60d6a78fa --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/delete-provider.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.deleteProvider({ + providerId: '<PROVIDER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/delete-subscriber.md b/examples/2.3.x/console-web/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..1c182f9db --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/delete-topic.md b/examples/2.3.x/console-web/examples/messaging/delete-topic.md new file mode 100644 index 000000000..485e0f0b3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/delete-topic.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.deleteTopic({ + topicId: '<TOPIC_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/delete.md b/examples/2.3.x/console-web/examples/messaging/delete.md new file mode 100644 index 000000000..cf354e288 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.delete({ + messageId: '<MESSAGE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/get-message.md b/examples/2.3.x/console-web/examples/messaging/get-message.md new file mode 100644 index 000000000..2b9c46c53 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/get-message.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.getMessage({ + messageId: '<MESSAGE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/get-provider.md b/examples/2.3.x/console-web/examples/messaging/get-provider.md new file mode 100644 index 000000000..8eb52b008 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/get-provider.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.getProvider({ + providerId: '<PROVIDER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/get-subscriber.md b/examples/2.3.x/console-web/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..59b51203a --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/get-subscriber.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.getSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/get-topic.md b/examples/2.3.x/console-web/examples/messaging/get-topic.md new file mode 100644 index 000000000..92fce9490 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/get-topic.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.getTopic({ + topicId: '<TOPIC_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/list-messages.md b/examples/2.3.x/console-web/examples/messaging/list-messages.md new file mode 100644 index 000000000..444c4aba1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/list-messages.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.listMessages({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/list-providers.md b/examples/2.3.x/console-web/examples/messaging/list-providers.md new file mode 100644 index 000000000..d21b7b0b4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/list-providers.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.listProviders({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/list-subscribers.md b/examples/2.3.x/console-web/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..2b7c7fe03 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/list-subscribers.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.listSubscribers({ + topicId: '<TOPIC_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/list-targets.md b/examples/2.3.x/console-web/examples/messaging/list-targets.md new file mode 100644 index 000000000..a23399e87 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/list-targets.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.listTargets({ + messageId: '<MESSAGE_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/list-topics.md b/examples/2.3.x/console-web/examples/messaging/list-topics.md new file mode 100644 index 000000000..63a2fbca1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/list-topics.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.listTopics({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-apns-provider.md b/examples/2.3.x/console-web/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..b1eade771 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-apns-provider.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateAPNSProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/console-web/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..c87972d08 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateAppwriteProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + qos: 0, // optional + expiry: 0, // 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 new file mode 100644 index 000000000..a043d35e8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-email.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateEmail({ + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // 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-fcm-provider.md b/examples/2.3.x/console-web/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..6d961eaa2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-fcm-provider.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + serviceAccountJSON: {}, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/console-web/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..5dd796872 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + apiKey: '<API_KEY>', // optional + domain: 'example.com', // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/console-web/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..40aab69df --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>', // 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 new file mode 100644 index 000000000..f7c46bcfa --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-push.md @@ -0,0 +1,33 @@ +```javascript +import { Client, Messaging, MessagePriority } 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 messaging = new Messaging(client); + +const result = await messaging.updatePush({ + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + title: '<TITLE>', // optional + body: '<BODY>', // optional + data: {}, // optional + action: '<ACTION>', // optional + image: '<ID1:ID2>', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-resend-provider.md b/examples/2.3.x/console-web/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..c9ec7c931 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-resend-provider.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateResendProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/console-web/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..1ec4f54d9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-ses-provider.md b/examples/2.3.x/console-web/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..873c42569 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-ses-provider.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateSesProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accessKey: '<ACCESS_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + region: '<REGION>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // 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 new file mode 100644 index 000000000..a41f32269 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-sms.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateSMS({ + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + content: '<CONTENT>', // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-smtp-provider.md b/examples/2.3.x/console-web/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..fc8521f87 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Messaging, SmtpEncryption } 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 messaging = new Messaging(client); + +const result = await messaging.updateSMTPProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + host: '<HOST>', // optional + port: 1, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-telesign-provider.md b/examples/2.3.x/console-web/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..468419c3e --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-telesign-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/console-web/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..3f72f7c61 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-topic.md b/examples/2.3.x/console-web/examples/messaging/update-topic.md new file mode 100644 index 000000000..ef9c76452 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-topic.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ['any'], // optional + qos: 0, // optional + expiry: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-twilio-provider.md b/examples/2.3.x/console-web/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..e8c0b08a9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-twilio-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + from: '<FROM>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/update-vonage-provider.md b/examples/2.3.x/console-web/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..cfe3ea50f --- /dev/null +++ b/examples/2.3.x/console-web/examples/messaging/update-vonage-provider.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Messaging } 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 messaging = new Messaging(client); + +const result = await messaging.updateVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + from: '<FROM>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/create-appwrite-migration.md b/examples/2.3.x/console-web/examples/migrations/create-appwrite-migration.md new file mode 100644 index 000000000..af8341f92 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,24 @@ +```javascript +import { + Client, + Migrations, + AppwriteMigrationResource, + OnDuplicate, +} 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 migrations = new Migrations(client); + +const result = await migrations.createAppwriteMigration({ + resources: [AppwriteMigrationResource.User], + endpoint: 'https://example.com', + projectId: '<PROJECT_ID>', + apiKey: '<API_KEY>', + onDuplicate: OnDuplicate.Fail, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/create-csv-export.md b/examples/2.3.x/console-web/examples/migrations/create-csv-export.md new file mode 100644 index 000000000..e357eb174 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/create-csv-export.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Migrations } 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 migrations = new Migrations(client); + +const result = await migrations.createCSVExport({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + filename: '<FILENAME>', + columns: [], // optional + queries: [], // optional + delimiter: '<DELIMITER>', // optional + enclosure: '<ENCLOSURE>', // optional + escape: '<ESCAPE>', // optional + header: false, // optional + notify: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/create-csv-import.md b/examples/2.3.x/console-web/examples/migrations/create-csv-import.md new file mode 100644 index 000000000..12d62cf65 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/create-csv-import.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Migrations, OnDuplicate } 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 migrations = new Migrations(client); + +const result = await migrations.createCSVImport({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + internalFile: false, // optional + onDuplicate: OnDuplicate.Fail, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/create-firebase-migration.md b/examples/2.3.x/console-web/examples/migrations/create-firebase-migration.md new file mode 100644 index 000000000..521363f13 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/create-firebase-migration.md @@ -0,0 +1,20 @@ +```javascript +import { + Client, + Migrations, + FirebaseMigrationResource, +} 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 migrations = new Migrations(client); + +const result = await migrations.createFirebaseMigration({ + resources: [FirebaseMigrationResource.User], + serviceAccount: '<SERVICE_ACCOUNT>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/create-json-export.md b/examples/2.3.x/console-web/examples/migrations/create-json-export.md new file mode 100644 index 000000000..29da496e6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/create-json-export.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Migrations } 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 migrations = new Migrations(client); + +const result = await migrations.createJSONExport({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + filename: '<FILENAME>', + columns: [], // optional + queries: [], // optional + notify: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/create-json-import.md b/examples/2.3.x/console-web/examples/migrations/create-json-import.md new file mode 100644 index 000000000..f8decc0da --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/create-json-import.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Migrations, OnDuplicate } 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 migrations = new Migrations(client); + +const result = await migrations.createJSONImport({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + internalFile: false, // optional + onDuplicate: OnDuplicate.Fail, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/create-n-host-migration.md b/examples/2.3.x/console-web/examples/migrations/create-n-host-migration.md new file mode 100644 index 000000000..ef7b1ad2a --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/create-n-host-migration.md @@ -0,0 +1,26 @@ +```javascript +import { + Client, + Migrations, + NHostMigrationResource, +} 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 migrations = new Migrations(client); + +const result = await migrations.createNHostMigration({ + resources: [NHostMigrationResource.User], + subdomain: '<SUBDOMAIN>', + region: '<REGION>', + adminSecret: '<ADMIN_SECRET>', + database: '<DATABASE>', + username: '<USERNAME>', + password: 'password', + port: 5432, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/create-supabase-migration.md b/examples/2.3.x/console-web/examples/migrations/create-supabase-migration.md new file mode 100644 index 000000000..8289cd25c --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/create-supabase-migration.md @@ -0,0 +1,25 @@ +```javascript +import { + Client, + Migrations, + SupabaseMigrationResource, +} 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 migrations = new Migrations(client); + +const result = await migrations.createSupabaseMigration({ + resources: [SupabaseMigrationResource.User], + endpoint: 'https://example.com', + apiKey: '<API_KEY>', + databaseHost: '<DATABASE_HOST>', + username: '<USERNAME>', + password: 'password', + port: 5432, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/delete.md b/examples/2.3.x/console-web/examples/migrations/delete.md new file mode 100644 index 000000000..22dd6a51c --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Migrations } 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 migrations = new Migrations(client); + +const result = await migrations.delete({ + migrationId: '<MIGRATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/get-appwrite-report.md b/examples/2.3.x/console-web/examples/migrations/get-appwrite-report.md new file mode 100644 index 000000000..bc7e02283 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/get-appwrite-report.md @@ -0,0 +1,22 @@ +```javascript +import { + Client, + Migrations, + AppwriteMigrationResource, +} 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 migrations = new Migrations(client); + +const result = await migrations.getAppwriteReport({ + resources: [AppwriteMigrationResource.User], + endpoint: 'https://example.com', + projectID: '<PROJECT_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/get-firebase-report.md b/examples/2.3.x/console-web/examples/migrations/get-firebase-report.md new file mode 100644 index 000000000..dbced0f88 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/get-firebase-report.md @@ -0,0 +1,20 @@ +```javascript +import { + Client, + Migrations, + FirebaseMigrationResource, +} 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 migrations = new Migrations(client); + +const result = await migrations.getFirebaseReport({ + resources: [FirebaseMigrationResource.User], + serviceAccount: '<SERVICE_ACCOUNT>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/get-n-host-report.md b/examples/2.3.x/console-web/examples/migrations/get-n-host-report.md new file mode 100644 index 000000000..6a0e05feb --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/get-n-host-report.md @@ -0,0 +1,26 @@ +```javascript +import { + Client, + Migrations, + NHostMigrationResource, +} 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 migrations = new Migrations(client); + +const result = await migrations.getNHostReport({ + resources: [NHostMigrationResource.User], + subdomain: '<SUBDOMAIN>', + region: '<REGION>', + adminSecret: '<ADMIN_SECRET>', + database: '<DATABASE>', + username: '<USERNAME>', + password: 'password', + port: 5432, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/get-supabase-report.md b/examples/2.3.x/console-web/examples/migrations/get-supabase-report.md new file mode 100644 index 000000000..03db239d4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/get-supabase-report.md @@ -0,0 +1,25 @@ +```javascript +import { + Client, + Migrations, + SupabaseMigrationResource, +} 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 migrations = new Migrations(client); + +const result = await migrations.getSupabaseReport({ + resources: [SupabaseMigrationResource.User], + endpoint: 'https://example.com', + apiKey: '<API_KEY>', + databaseHost: '<DATABASE_HOST>', + username: '<USERNAME>', + password: 'password', + port: 5432, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/get.md b/examples/2.3.x/console-web/examples/migrations/get.md new file mode 100644 index 000000000..86e25faa5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Migrations } 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 migrations = new Migrations(client); + +const result = await migrations.get({ + migrationId: '<MIGRATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/list.md b/examples/2.3.x/console-web/examples/migrations/list.md new file mode 100644 index 000000000..66778759c --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Migrations } 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 migrations = new Migrations(client); + +const result = await migrations.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/migrations/retry.md b/examples/2.3.x/console-web/examples/migrations/retry.md new file mode 100644 index 000000000..315a19cd3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/migrations/retry.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Migrations } 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 migrations = new Migrations(client); + +const result = await migrations.retry({ + migrationId: '<MIGRATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/create-backup-policy.md b/examples/2.3.x/console-web/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..1758cdb4b --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/create-backup-policy.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.createBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/create-backup.md b/examples/2.3.x/console-web/examples/mongo/create-backup.md new file mode 100644 index 000000000..c175b1c07 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/create-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.createBackup({ + databaseId: '<DATABASE_ID>', + type: 'full', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/create-branch.md b/examples/2.3.x/console-web/examples/mongo/create-branch.md new file mode 100644 index 000000000..777ac9845 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/create-branch.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.createBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/create-failover.md b/examples/2.3.x/console-web/examples/mongo/create-failover.md new file mode 100644 index 000000000..e4dc58a15 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/create-failover.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/create-migration.md b/examples/2.3.x/console-web/examples/mongo/create-migration.md new file mode 100644 index 000000000..169546c9d --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/create-migration.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.createMigration({ + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/create-restoration.md b/examples/2.3.x/console-web/examples/mongo/create-restoration.md new file mode 100644 index 000000000..e84ed8833 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/create-restoration.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.createRestoration({ + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/create-upgrade.md b/examples/2.3.x/console-web/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..2d70ad4a8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/create-upgrade.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.createUpgrade({ + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/create.md b/examples/2.3.x/console-web/examples/mongo/create.md new file mode 100644 index 000000000..2a12fa54b --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/create.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/delete-backup-policy.md b/examples/2.3.x/console-web/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..cc336d456 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/delete-backup-policy.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.deleteBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/delete-backup.md b/examples/2.3.x/console-web/examples/mongo/delete-backup.md new file mode 100644 index 000000000..18393a459 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/delete-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.deleteBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/delete-branch.md b/examples/2.3.x/console-web/examples/mongo/delete-branch.md new file mode 100644 index 000000000..bea4b5b48 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/delete-branch.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.deleteBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/delete.md b/examples/2.3.x/console-web/examples/mongo/delete.md new file mode 100644 index 000000000..37ae4b381 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.delete({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/get-backup-policy.md b/examples/2.3.x/console-web/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..3bd2083e0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/get-backup-policy.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.getBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/get-backup.md b/examples/2.3.x/console-web/examples/mongo/get-backup.md new file mode 100644 index 000000000..bb7c95dce --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/get-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.getBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/get-pitr.md b/examples/2.3.x/console-web/examples/mongo/get-pitr.md new file mode 100644 index 000000000..35d46e2e1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/get-pitr.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.getPitr({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/get-replicas.md b/examples/2.3.x/console-web/examples/mongo/get-replicas.md new file mode 100644 index 000000000..f730f56a2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/get-replicas.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.getReplicas({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/get-restoration.md b/examples/2.3.x/console-web/examples/mongo/get-restoration.md new file mode 100644 index 000000000..0220eeedd --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/get-restoration.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.getRestoration({ + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/get-status.md b/examples/2.3.x/console-web/examples/mongo/get-status.md new file mode 100644 index 000000000..721dfe671 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/get-status.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.getStatus({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/get.md b/examples/2.3.x/console-web/examples/mongo/get.md new file mode 100644 index 000000000..d891b6c69 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.get({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/list-backup-policies.md b/examples/2.3.x/console-web/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..049af2ad8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/list-backup-policies.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.listBackupPolicies({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/list-backups.md b/examples/2.3.x/console-web/examples/mongo/list-backups.md new file mode 100644 index 000000000..d2fd432f7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/list-backups.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.listBackups({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/list-branches.md b/examples/2.3.x/console-web/examples/mongo/list-branches.md new file mode 100644 index 000000000..3187073c8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/list-branches.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.listBranches({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/list-operations.md b/examples/2.3.x/console-web/examples/mongo/list-operations.md new file mode 100644 index 000000000..9201a8907 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/list-operations.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/list-restorations.md b/examples/2.3.x/console-web/examples/mongo/list-restorations.md new file mode 100644 index 000000000..9b0588967 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/list-restorations.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.listRestorations({ + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/list-specifications.md b/examples/2.3.x/console-web/examples/mongo/list-specifications.md new file mode 100644 index 000000000..f50afa0f9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/list-specifications.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.listSpecifications(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/list.md b/examples/2.3.x/console-web/examples/mongo/list.md new file mode 100644 index 000000000..a0579d43c --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/list.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.list({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/update-backup-policy.md b/examples/2.3.x/console-web/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..a9eb1a2d4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/update-backup-policy.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.updateBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/update-backup-storage.md b/examples/2.3.x/console-web/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..e00fcad6b --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/update-backup-storage.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.updateBackupStorage({ + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/update-credentials.md b/examples/2.3.x/console-web/examples/mongo/update-credentials.md new file mode 100644 index 000000000..24962c3d2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/update-credentials.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.updateCredentials({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/update-maintenance.md b/examples/2.3.x/console-web/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..8cdc3328e --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/update-maintenance.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.updateMaintenance({ + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mongo/update.md b/examples/2.3.x/console-web/examples/mongo/update.md new file mode 100644 index 000000000..34cc95f7e --- /dev/null +++ b/examples/2.3.x/console-web/examples/mongo/update.md @@ -0,0 +1,35 @@ +```javascript +import { Client, Mongo } 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 mongo = new Mongo(client); + +const result = await mongo.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create-backup-policy.md b/examples/2.3.x/console-web/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..f04fa04bd --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create-backup-policy.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.createBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create-backup.md b/examples/2.3.x/console-web/examples/mysql/create-backup.md new file mode 100644 index 000000000..33722ff41 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.createBackup({ + databaseId: '<DATABASE_ID>', + type: 'full', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create-branch.md b/examples/2.3.x/console-web/examples/mysql/create-branch.md new file mode 100644 index 000000000..e9fc3484a --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create-branch.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.createBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create-execution.md b/examples/2.3.x/console-web/examples/mysql/create-execution.md new file mode 100644 index 000000000..dbc3d3e26 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create-execution.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.createExecution({ + databaseId: '<DATABASE_ID>', + sql: '<SQL>', + bindings: {}, // optional + timeoutSeconds: 1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create-failover.md b/examples/2.3.x/console-web/examples/mysql/create-failover.md new file mode 100644 index 000000000..6b1ca7c2e --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create-failover.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create-migration.md b/examples/2.3.x/console-web/examples/mysql/create-migration.md new file mode 100644 index 000000000..004900284 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create-migration.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.createMigration({ + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create-restoration.md b/examples/2.3.x/console-web/examples/mysql/create-restoration.md new file mode 100644 index 000000000..34bd9363f --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create-restoration.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.createRestoration({ + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create-upgrade.md b/examples/2.3.x/console-web/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..1b4825a03 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create-upgrade.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.createUpgrade({ + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/create.md b/examples/2.3.x/console-web/examples/mysql/create.md new file mode 100644 index 000000000..6c3cc98e3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/create.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/delete-backup-policy.md b/examples/2.3.x/console-web/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..ceeb65321 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/delete-backup-policy.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.deleteBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/delete-backup.md b/examples/2.3.x/console-web/examples/mysql/delete-backup.md new file mode 100644 index 000000000..1e3b86156 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/delete-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.deleteBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/delete-branch.md b/examples/2.3.x/console-web/examples/mysql/delete-branch.md new file mode 100644 index 000000000..0d77f50e6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/delete-branch.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.deleteBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/delete.md b/examples/2.3.x/console-web/examples/mysql/delete.md new file mode 100644 index 000000000..657f56b38 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.delete({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/get-backup-policy.md b/examples/2.3.x/console-web/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..e0ffdd209 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/get-backup-policy.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.getBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/get-backup.md b/examples/2.3.x/console-web/examples/mysql/get-backup.md new file mode 100644 index 000000000..52954cfd3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/get-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.getBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/get-pitr.md b/examples/2.3.x/console-web/examples/mysql/get-pitr.md new file mode 100644 index 000000000..7c852290e --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/get-pitr.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.getPitr({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/get-pooler.md b/examples/2.3.x/console-web/examples/mysql/get-pooler.md new file mode 100644 index 000000000..02cc663df --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/get-pooler.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.getPooler({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/get-replicas.md b/examples/2.3.x/console-web/examples/mysql/get-replicas.md new file mode 100644 index 000000000..cce372215 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/get-replicas.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.getReplicas({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/get-restoration.md b/examples/2.3.x/console-web/examples/mysql/get-restoration.md new file mode 100644 index 000000000..87a64ee7c --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/get-restoration.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.getRestoration({ + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/get-status.md b/examples/2.3.x/console-web/examples/mysql/get-status.md new file mode 100644 index 000000000..60d3ab1ba --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/get-status.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.getStatus({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/get.md b/examples/2.3.x/console-web/examples/mysql/get.md new file mode 100644 index 000000000..6a94ac4a8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.get({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/list-backup-policies.md b/examples/2.3.x/console-web/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..8c7ce7c36 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/list-backup-policies.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.listBackupPolicies({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/list-backups.md b/examples/2.3.x/console-web/examples/mysql/list-backups.md new file mode 100644 index 000000000..8527d0fa4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/list-backups.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.listBackups({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/list-branches.md b/examples/2.3.x/console-web/examples/mysql/list-branches.md new file mode 100644 index 000000000..b48cf1a45 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/list-branches.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.listBranches({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/list-operations.md b/examples/2.3.x/console-web/examples/mysql/list-operations.md new file mode 100644 index 000000000..c586dd9e0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/list-operations.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/list-restorations.md b/examples/2.3.x/console-web/examples/mysql/list-restorations.md new file mode 100644 index 000000000..d3c670773 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/list-restorations.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.listRestorations({ + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/list-specifications.md b/examples/2.3.x/console-web/examples/mysql/list-specifications.md new file mode 100644 index 000000000..dc7f40659 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/list-specifications.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.listSpecifications(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/list.md b/examples/2.3.x/console-web/examples/mysql/list.md new file mode 100644 index 000000000..6df74d0e8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/list.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.list({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/update-backup-policy.md b/examples/2.3.x/console-web/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..9bd36ccb3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/update-backup-policy.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.updateBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/update-backup-storage.md b/examples/2.3.x/console-web/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..6d02cfd85 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/update-backup-storage.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.updateBackupStorage({ + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/update-credentials.md b/examples/2.3.x/console-web/examples/mysql/update-credentials.md new file mode 100644 index 000000000..55d468fc1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/update-credentials.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.updateCredentials({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/update-maintenance.md b/examples/2.3.x/console-web/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..fa4b9c254 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/update-maintenance.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.updateMaintenance({ + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/update-pooler.md b/examples/2.3.x/console-web/examples/mysql/update-pooler.md new file mode 100644 index 000000000..86a3a4c20 --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/update-pooler.md @@ -0,0 +1,23 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.updatePooler({ + databaseId: '<DATABASE_ID>', + mode: 'transaction', // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: '<POOLER_CPU_REQUEST>', // optional + poolerCpuLimit: '<POOLER_CPU_LIMIT>', // optional + poolerMemoryRequest: '<POOLER_MEMORY_REQUEST>', // optional + poolerMemoryLimit: '<POOLER_MEMORY_LIMIT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/mysql/update.md b/examples/2.3.x/console-web/examples/mysql/update.md new file mode 100644 index 000000000..68fc9852b --- /dev/null +++ b/examples/2.3.x/console-web/examples/mysql/update.md @@ -0,0 +1,35 @@ +```javascript +import { Client, Mysql } 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 mysql = new Mysql(client); + +const result = await mysql.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/notifications/list.md b/examples/2.3.x/console-web/examples/notifications/list.md new file mode 100644 index 000000000..3c6575818 --- /dev/null +++ b/examples/2.3.x/console-web/examples/notifications/list.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Notifications } 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 notifications = new Notifications(client); + +const result = await notifications.list({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/notifications/update.md b/examples/2.3.x/console-web/examples/notifications/update.md new file mode 100644 index 000000000..5753d9278 --- /dev/null +++ b/examples/2.3.x/console-web/examples/notifications/update.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Notifications } 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 notifications = new Notifications(client); + +const result = await notifications.update({ + notificationId: '<NOTIFICATION_ID>', + read: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/approve.md b/examples/2.3.x/console-web/examples/oauth2/approve.md new file mode 100644 index 000000000..d11b5dd84 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/approve.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.approve({ + grantId: '<GRANT_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + scope: '<SCOPE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/authorize-post.md b/examples/2.3.x/console-web/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..acb7116d5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/authorize-post.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.authorizePost({ + clientId: '<CLIENT_ID>', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional + requestUri: '<REQUEST_URI>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/authorize.md b/examples/2.3.x/console-web/examples/oauth2/authorize.md new file mode 100644 index 000000000..0a02731b0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/authorize.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.authorize({ + clientId: '<CLIENT_ID>', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional + requestUri: '<REQUEST_URI>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/create-device-authorization.md b/examples/2.3.x/console-web/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..3203b84d9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/create-device-authorization.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.createDeviceAuthorization({ + clientId: '<CLIENT_ID>', // optional + scope: '<SCOPE>', // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/create-grant.md b/examples/2.3.x/console-web/examples/oauth2/create-grant.md new file mode 100644 index 000000000..31cbbbe36 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/create-grant.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.createGrant({ + userCode: '<USER_CODE>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/create-par.md b/examples/2.3.x/console-web/examples/oauth2/create-par.md new file mode 100644 index 000000000..3c5032872 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/create-par.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.createPAR({ + clientId: '<CLIENT_ID>', + redirectUri: 'https://example.com', + responseType: 'code', + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/create-token.md b/examples/2.3.x/console-web/examples/oauth2/create-token.md new file mode 100644 index 000000000..900352e99 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.createToken({ + grantType: '<GRANT_TYPE>', + code: '<CODE>', // 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/get-grant.md b/examples/2.3.x/console-web/examples/oauth2/get-grant.md new file mode 100644 index 000000000..aa93997e8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/get-grant.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.getGrant({ + grantId: '<GRANT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/list-organizations.md b/examples/2.3.x/console-web/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..a6e09e624 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/list-organizations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.listOrganizations({ + limit: 1, // optional + offset: 0, // optional + search: '<SEARCH>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/list-projects.md b/examples/2.3.x/console-web/examples/oauth2/list-projects.md new file mode 100644 index 000000000..71e20bbed --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/list-projects.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.listProjects({ + limit: 1, // optional + offset: 0, // optional + search: '<SEARCH>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/logout-post.md b/examples/2.3.x/console-web/examples/oauth2/logout-post.md new file mode 100644 index 000000000..5a818a11b --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/logout-post.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.logoutPost({ + idTokenHint: '<ID_TOKEN_HINT>', // optional + logoutHint: '<LOGOUT_HINT>', // optional + clientId: '<CLIENT_ID>', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '<STATE>', // optional + uiLocales: '<UI_LOCALES>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/logout.md b/examples/2.3.x/console-web/examples/oauth2/logout.md new file mode 100644 index 000000000..73a93b871 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/logout.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.logout({ + idTokenHint: '<ID_TOKEN_HINT>', // optional + logoutHint: '<LOGOUT_HINT>', // optional + clientId: '<CLIENT_ID>', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '<STATE>', // optional + uiLocales: '<UI_LOCALES>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/reject.md b/examples/2.3.x/console-web/examples/oauth2/reject.md new file mode 100644 index 000000000..f9a1e4d03 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/reject.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.reject({ + grantId: '<GRANT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/oauth2/revoke.md b/examples/2.3.x/console-web/examples/oauth2/revoke.md new file mode 100644 index 000000000..e6d1fd6d7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/oauth2/revoke.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Oauth2 } 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 oauth2 = new Oauth2(client); + +const result = await oauth2.revoke({ + token: '<TOKEN>', + tokenTypeHint: 'access_token', // optional + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // 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 new file mode 100644 index 000000000..d1cb12951 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Organization, ProjectKeyScopes } 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 organization = new Organization(client); + +const result = await organization.createEphemeralProjectKey({ + projectId: '<PROJECT_ID>', + scopes: [ProjectKeyScopes.ProjectRead], + duration: 600, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/create-installation.md b/examples/2.3.x/console-web/examples/organization/create-installation.md new file mode 100644 index 000000000..67bae3155 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const organization = new Organization(client); + +const result = await organization.createInstallation({ + appId: '<APP_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/create-key.md b/examples/2.3.x/console-web/examples/organization/create-key.md new file mode 100644 index 000000000..4c1622c2f --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/create-key.md @@ -0,0 +1,22 @@ +```javascript +import { + Client, + Organization, + OrganizationKeyScopes, +} 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 organization = new Organization(client); + +const result = await organization.createKey({ + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [OrganizationKeyScopes.ProjectsRead], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/create-membership.md b/examples/2.3.x/console-web/examples/organization/create-membership.md new file mode 100644 index 000000000..953a54097 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/create-membership.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.createMembership({ + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..2361bb94a --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/create-project-key.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Organization, ProjectKeyScopes } 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 organization = new Organization(client); + +const result = await organization.createProjectKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [ProjectKeyScopes.ProjectRead], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/create-project.md b/examples/2.3.x/console-web/examples/organization/create-project.md new file mode 100644 index 000000000..d3bb4b6fc --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/create-project.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Organization, Region } 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 organization = new Organization(client); + +const result = await organization.createProject({ + projectId: '<PROJECT_ID>', + name: '<NAME>', + region: Region.Fra, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/delete-installation.md b/examples/2.3.x/console-web/examples/organization/delete-installation.md new file mode 100644 index 000000000..fdf16b5cc --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const organization = new Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/delete-key.md b/examples/2.3.x/console-web/examples/organization/delete-key.md new file mode 100644 index 000000000..378a78b80 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/delete-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.deleteKey({ + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/delete-membership.md b/examples/2.3.x/console-web/examples/organization/delete-membership.md new file mode 100644 index 000000000..9769d387a --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/delete-membership.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.deleteMembership({ + membershipId: '<MEMBERSHIP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/delete-project-key.md b/examples/2.3.x/console-web/examples/organization/delete-project-key.md new file mode 100644 index 000000000..4c97d8f51 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/delete-project-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.deleteProjectKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/delete-project.md b/examples/2.3.x/console-web/examples/organization/delete-project.md new file mode 100644 index 000000000..da0b09d72 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/delete-project.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.deleteProject({ + projectId: '<PROJECT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/delete.md b/examples/2.3.x/console-web/examples/organization/delete.md new file mode 100644 index 000000000..e7bc22f68 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/delete.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.delete(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/get-installation.md b/examples/2.3.x/console-web/examples/organization/get-installation.md new file mode 100644 index 000000000..36acac2c8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const organization = new Organization(client); + +const result = await organization.getInstallation({ + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/get-key.md b/examples/2.3.x/console-web/examples/organization/get-key.md new file mode 100644 index 000000000..512a64e1e --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/get-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.getKey({ + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/get-membership.md b/examples/2.3.x/console-web/examples/organization/get-membership.md new file mode 100644 index 000000000..7540eb389 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/get-membership.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.getMembership({ + membershipId: '<MEMBERSHIP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/get-project-key.md b/examples/2.3.x/console-web/examples/organization/get-project-key.md new file mode 100644 index 000000000..8032e97c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/get-project-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.getProjectKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/get-project.md b/examples/2.3.x/console-web/examples/organization/get-project.md new file mode 100644 index 000000000..2f985e357 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/get-project.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.getProject({ + projectId: '<PROJECT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/get.md b/examples/2.3.x/console-web/examples/organization/get.md new file mode 100644 index 000000000..640a7f3ff --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/get.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.get(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/list-installations.md b/examples/2.3.x/console-web/examples/organization/list-installations.md new file mode 100644 index 000000000..655f8db0e --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const organization = new Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/list-keys.md b/examples/2.3.x/console-web/examples/organization/list-keys.md new file mode 100644 index 000000000..444eb1b57 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/list-keys.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.listKeys({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/list-memberships.md b/examples/2.3.x/console-web/examples/organization/list-memberships.md new file mode 100644 index 000000000..a5c374abb --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/list-memberships.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.listMemberships({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/list-project-keys.md b/examples/2.3.x/console-web/examples/organization/list-project-keys.md new file mode 100644 index 000000000..eeedbf4c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/list-project-keys.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.listProjectKeys({ + projectId: '<PROJECT_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/list-projects.md b/examples/2.3.x/console-web/examples/organization/list-projects.md new file mode 100644 index 000000000..3f7a1c78c --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/list-projects.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.listProjects({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/update-installation.md b/examples/2.3.x/console-web/examples/organization/update-installation.md new file mode 100644 index 000000000..423fb5c55 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const organization = new Organization(client); + +const result = await organization.updateInstallation({ + installationId: '<INSTALLATION_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/update-key.md b/examples/2.3.x/console-web/examples/organization/update-key.md new file mode 100644 index 000000000..7ada58b46 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/update-key.md @@ -0,0 +1,22 @@ +```javascript +import { + Client, + Organization, + OrganizationKeyScopes, +} 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 organization = new Organization(client); + +const result = await organization.updateKey({ + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [OrganizationKeyScopes.ProjectsRead], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/update-membership.md b/examples/2.3.x/console-web/examples/organization/update-membership.md new file mode 100644 index 000000000..f94ae7125 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/update-membership.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.updateMembership({ + membershipId: '<MEMBERSHIP_ID>', + roles: [], +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..550ecebd3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/update-project-key.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Organization, ProjectKeyScopes } 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 organization = new Organization(client); + +const result = await organization.updateProjectKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [ProjectKeyScopes.ProjectRead], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/update-project.md b/examples/2.3.x/console-web/examples/organization/update-project.md new file mode 100644 index 000000000..7ae1ef33f --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/update-project.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.updateProject({ + projectId: '<PROJECT_ID>', + name: '<NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organization/update.md b/examples/2.3.x/console-web/examples/organization/update.md new file mode 100644 index 000000000..39b421416 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organization/update.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } 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 organization = new Organization(client); + +const result = await organization.update({ + name: '<NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/add-credit.md b/examples/2.3.x/console-web/examples/organizations/add-credit.md new file mode 100644 index 000000000..c29574b7e --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/add-credit.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.addCredit({ + organizationId: '<ORGANIZATION_ID>', + couponId: '<COUPON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/confirm-addon-payment.md b/examples/2.3.x/console-web/examples/organizations/confirm-addon-payment.md new file mode 100644 index 000000000..b021f2109 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/confirm-addon-payment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.confirmAddonPayment({ + organizationId: '<ORGANIZATION_ID>', + addonId: '<ADDON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/create-baa-addon.md b/examples/2.3.x/console-web/examples/organizations/create-baa-addon.md new file mode 100644 index 000000000..dd3b0571b --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/create-baa-addon.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.createBaaAddon({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/create-downgrade-feedback.md b/examples/2.3.x/console-web/examples/organizations/create-downgrade-feedback.md new file mode 100644 index 000000000..126f37918 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/create-downgrade-feedback.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.createDowngradeFeedback({ + organizationId: '<ORGANIZATION_ID>', + reason: '<REASON>', + message: '<MESSAGE>', + fromPlanId: '<FROM_PLAN_ID>', + toPlanId: '<TO_PLAN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/create-invoice-payment.md b/examples/2.3.x/console-web/examples/organizations/create-invoice-payment.md new file mode 100644 index 000000000..5abe86143 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/create-invoice-payment.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.createInvoicePayment({ + organizationId: '<ORGANIZATION_ID>', + invoiceId: '<INVOICE_ID>', + paymentMethodId: '<PAYMENT_METHOD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/create-plan-estimation.md b/examples/2.3.x/console-web/examples/organizations/create-plan-estimation.md new file mode 100644 index 000000000..e029d7508 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/create-plan-estimation.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.createPlanEstimation({ + organizationId: '<ORGANIZATION_ID>', + billingPlan: 'tier-0', + invites: [], // optional + couponId: '<COUPON_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/create-premium-geo-db-addon.md b/examples/2.3.x/console-web/examples/organizations/create-premium-geo-db-addon.md new file mode 100644 index 000000000..0e4af1ae8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/create-premium-geo-db-addon.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.createPremiumGeoDBAddon({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/create.md b/examples/2.3.x/console-web/examples/organizations/create.md new file mode 100644 index 000000000..2f3d99c1e --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/create.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Organizations, Platform } 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 organizations = new Organizations(client); + +const result = await organizations.create({ + organizationId: '<ORGANIZATION_ID>', + name: '<NAME>', + billingPlan: 'tier-0', + paymentMethodId: '<PAYMENT_METHOD_ID>', // optional + billingAddressId: '<BILLING_ADDRESS_ID>', // optional + invites: [], // optional + couponId: '<COUPON_ID>', // optional + taxId: '<TAX_ID>', // optional + budget: 0, // optional + platform: Platform.Appwrite, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/delete-addon.md b/examples/2.3.x/console-web/examples/organizations/delete-addon.md new file mode 100644 index 000000000..79cbb51e0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/delete-addon.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.deleteAddon({ + organizationId: '<ORGANIZATION_ID>', + addonId: '<ADDON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/delete-backup-payment-method.md b/examples/2.3.x/console-web/examples/organizations/delete-backup-payment-method.md new file mode 100644 index 000000000..afafd1426 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/delete-backup-payment-method.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.deleteBackupPaymentMethod({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/delete-billing-address.md b/examples/2.3.x/console-web/examples/organizations/delete-billing-address.md new file mode 100644 index 000000000..ecb089c29 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/delete-billing-address.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.deleteBillingAddress({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/delete-default-payment-method.md b/examples/2.3.x/console-web/examples/organizations/delete-default-payment-method.md new file mode 100644 index 000000000..d332429ac --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/delete-default-payment-method.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.deleteDefaultPaymentMethod({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/delete.md b/examples/2.3.x/console-web/examples/organizations/delete.md new file mode 100644 index 000000000..6c7bc82ce --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.delete({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/estimation-create-organization.md b/examples/2.3.x/console-web/examples/organizations/estimation-create-organization.md new file mode 100644 index 000000000..94f7d14ea --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/estimation-create-organization.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Organizations, Platform } 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 organizations = new Organizations(client); + +const result = await organizations.estimationCreateOrganization({ + billingPlan: 'tier-0', + paymentMethodId: '<PAYMENT_METHOD_ID>', // optional + invites: [], // optional + couponId: '<COUPON_ID>', // optional + platform: Platform.Appwrite, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/estimation-delete-organization.md b/examples/2.3.x/console-web/examples/organizations/estimation-delete-organization.md new file mode 100644 index 000000000..2f3000c60 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/estimation-delete-organization.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.estimationDeleteOrganization({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/estimation-update-plan.md b/examples/2.3.x/console-web/examples/organizations/estimation-update-plan.md new file mode 100644 index 000000000..8bdf3d6fc --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/estimation-update-plan.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.estimationUpdatePlan({ + organizationId: '<ORGANIZATION_ID>', + billingPlan: 'tier-0', + invites: [], // optional + couponId: '<COUPON_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-addon-price.md b/examples/2.3.x/console-web/examples/organizations/get-addon-price.md new file mode 100644 index 000000000..12d6cb5ee --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-addon-price.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations, AddonKey } 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 organizations = new Organizations(client); + +const result = await organizations.getAddonPrice({ + organizationId: '<ORGANIZATION_ID>', + addon: AddonKey.Baa, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-addon.md b/examples/2.3.x/console-web/examples/organizations/get-addon.md new file mode 100644 index 000000000..e59522e6b --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-addon.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getAddon({ + organizationId: '<ORGANIZATION_ID>', + addonId: '<ADDON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-aggregation.md b/examples/2.3.x/console-web/examples/organizations/get-aggregation.md new file mode 100644 index 000000000..aa06495d7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-aggregation.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getAggregation({ + organizationId: '<ORGANIZATION_ID>', + aggregationId: '<AGGREGATION_ID>', + limit: 0, // optional + offset: null, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-available-credits.md b/examples/2.3.x/console-web/examples/organizations/get-available-credits.md new file mode 100644 index 000000000..75cedc354 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-available-credits.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getAvailableCredits({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-billing-address.md b/examples/2.3.x/console-web/examples/organizations/get-billing-address.md new file mode 100644 index 000000000..c8fad01a5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-billing-address.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getBillingAddress({ + organizationId: '<ORGANIZATION_ID>', + billingAddressId: '<BILLING_ADDRESS_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-credit.md b/examples/2.3.x/console-web/examples/organizations/get-credit.md new file mode 100644 index 000000000..ed8c87604 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-credit.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getCredit({ + organizationId: '<ORGANIZATION_ID>', + creditId: '<CREDIT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-invoice-download.md b/examples/2.3.x/console-web/examples/organizations/get-invoice-download.md new file mode 100644 index 000000000..0ace4a0dd --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-invoice-download.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = organizations.getInvoiceDownload({ + organizationId: '<ORGANIZATION_ID>', + invoiceId: '<INVOICE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-invoice-view.md b/examples/2.3.x/console-web/examples/organizations/get-invoice-view.md new file mode 100644 index 000000000..b499a545d --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-invoice-view.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = organizations.getInvoiceView({ + organizationId: '<ORGANIZATION_ID>', + invoiceId: '<INVOICE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-invoice.md b/examples/2.3.x/console-web/examples/organizations/get-invoice.md new file mode 100644 index 000000000..007650770 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-invoice.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getInvoice({ + organizationId: '<ORGANIZATION_ID>', + invoiceId: '<INVOICE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-payment-method.md b/examples/2.3.x/console-web/examples/organizations/get-payment-method.md new file mode 100644 index 000000000..80d2243e0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-payment-method.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getPaymentMethod({ + organizationId: '<ORGANIZATION_ID>', + paymentMethodId: '<PAYMENT_METHOD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-plan.md b/examples/2.3.x/console-web/examples/organizations/get-plan.md new file mode 100644 index 000000000..1c2adacff --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-plan.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getPlan({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-scopes.md b/examples/2.3.x/console-web/examples/organizations/get-scopes.md new file mode 100644 index 000000000..e7ed2fed2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-scopes.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getScopes({ + organizationId: '<ORGANIZATION_ID>', + projectId: '<PROJECT_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/get-usage.md b/examples/2.3.x/console-web/examples/organizations/get-usage.md new file mode 100644 index 000000000..8ab35fdf0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/get-usage.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.getUsage({ + organizationId: '<ORGANIZATION_ID>', + startDate: '2020-10-15T06:38:00.000+00:00', // optional + endDate: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/list-addons.md b/examples/2.3.x/console-web/examples/organizations/list-addons.md new file mode 100644 index 000000000..2bde1c4fc --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/list-addons.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.listAddons({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/list-aggregations.md b/examples/2.3.x/console-web/examples/organizations/list-aggregations.md new file mode 100644 index 000000000..db0a274bf --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/list-aggregations.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.listAggregations({ + organizationId: '<ORGANIZATION_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/list-credits.md b/examples/2.3.x/console-web/examples/organizations/list-credits.md new file mode 100644 index 000000000..9475df725 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/list-credits.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.listCredits({ + organizationId: '<ORGANIZATION_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/list-invoices.md b/examples/2.3.x/console-web/examples/organizations/list-invoices.md new file mode 100644 index 000000000..878795f91 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/list-invoices.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.listInvoices({ + organizationId: '<ORGANIZATION_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/list-regions.md b/examples/2.3.x/console-web/examples/organizations/list-regions.md new file mode 100644 index 000000000..4390f275b --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/list-regions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.listRegions({ + organizationId: '<ORGANIZATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/list.md b/examples/2.3.x/console-web/examples/organizations/list.md new file mode 100644 index 000000000..974dcf0b0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.list({ + queries: [], // optional + search: '<SEARCH>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/set-backup-payment-method.md b/examples/2.3.x/console-web/examples/organizations/set-backup-payment-method.md new file mode 100644 index 000000000..7a5aeda4f --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/set-backup-payment-method.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.setBackupPaymentMethod({ + organizationId: '<ORGANIZATION_ID>', + paymentMethodId: '<PAYMENT_METHOD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/set-billing-address.md b/examples/2.3.x/console-web/examples/organizations/set-billing-address.md new file mode 100644 index 000000000..472f511fb --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/set-billing-address.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.setBillingAddress({ + organizationId: '<ORGANIZATION_ID>', + billingAddressId: '<BILLING_ADDRESS_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/set-billing-email.md b/examples/2.3.x/console-web/examples/organizations/set-billing-email.md new file mode 100644 index 000000000..4159945e4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/set-billing-email.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.setBillingEmail({ + organizationId: '<ORGANIZATION_ID>', + billingEmail: 'email@example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/set-billing-tax-id.md b/examples/2.3.x/console-web/examples/organizations/set-billing-tax-id.md new file mode 100644 index 000000000..2b2b42e2d --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/set-billing-tax-id.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.setBillingTaxId({ + organizationId: '<ORGANIZATION_ID>', + taxId: '<TAX_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/set-default-payment-method.md b/examples/2.3.x/console-web/examples/organizations/set-default-payment-method.md new file mode 100644 index 000000000..0c3e128db --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/set-default-payment-method.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.setDefaultPaymentMethod({ + organizationId: '<ORGANIZATION_ID>', + paymentMethodId: '<PAYMENT_METHOD_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/update-budget.md b/examples/2.3.x/console-web/examples/organizations/update-budget.md new file mode 100644 index 000000000..020ce6d0a --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/update-budget.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.updateBudget({ + organizationId: '<ORGANIZATION_ID>', + budget: 0, + alerts: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/update-plan.md b/examples/2.3.x/console-web/examples/organizations/update-plan.md new file mode 100644 index 000000000..780422efd --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/update-plan.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.updatePlan({ + organizationId: '<ORGANIZATION_ID>', + billingPlan: 'tier-0', + paymentMethodId: '<PAYMENT_METHOD_ID>', // optional + billingAddressId: '<BILLING_ADDRESS_ID>', // optional + invites: [], // optional + couponId: '<COUPON_ID>', // optional + taxId: '<TAX_ID>', // optional + budget: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/validate-invoice.md b/examples/2.3.x/console-web/examples/organizations/validate-invoice.md new file mode 100644 index 000000000..565b0a0d9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/validate-invoice.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.validateInvoice({ + organizationId: '<ORGANIZATION_ID>', + invoiceId: '<INVOICE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/organizations/validate-payment.md b/examples/2.3.x/console-web/examples/organizations/validate-payment.md new file mode 100644 index 000000000..1fad96120 --- /dev/null +++ b/examples/2.3.x/console-web/examples/organizations/validate-payment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organizations } 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 organizations = new Organizations(client); + +const result = await organizations.validatePayment({ + organizationId: '<ORGANIZATION_ID>', + invites: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-backup-policy.md b/examples/2.3.x/console-web/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..4d3e237a8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-backup-policy.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-backup.md b/examples/2.3.x/console-web/examples/postgresql/create-backup.md new file mode 100644 index 000000000..5af116dc4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createBackup({ + databaseId: '<DATABASE_ID>', + type: 'full', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-branch.md b/examples/2.3.x/console-web/examples/postgresql/create-branch.md new file mode 100644 index 000000000..d2b51ec40 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-branch.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-execution.md b/examples/2.3.x/console-web/examples/postgresql/create-execution.md new file mode 100644 index 000000000..deb26bc26 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-execution.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createExecution({ + databaseId: '<DATABASE_ID>', + sql: '<SQL>', + bindings: {}, // optional + timeoutSeconds: 1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-extension.md b/examples/2.3.x/console-web/examples/postgresql/create-extension.md new file mode 100644 index 000000000..4bb113943 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-extension.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createExtension({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-failover.md b/examples/2.3.x/console-web/examples/postgresql/create-failover.md new file mode 100644 index 000000000..82b3ef3a0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-failover.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-migration.md b/examples/2.3.x/console-web/examples/postgresql/create-migration.md new file mode 100644 index 000000000..fceba090b --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-migration.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createMigration({ + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-restoration.md b/examples/2.3.x/console-web/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..c06951069 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-restoration.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createRestoration({ + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create-upgrade.md b/examples/2.3.x/console-web/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..f18110f3d --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create-upgrade.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.createUpgrade({ + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/create.md b/examples/2.3.x/console-web/examples/postgresql/create.md new file mode 100644 index 000000000..108b96210 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/create.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/console-web/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..15b133fed --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.deleteBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/delete-backup.md b/examples/2.3.x/console-web/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..2f6eacc6c --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/delete-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.deleteBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/delete-branch.md b/examples/2.3.x/console-web/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..244320b97 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/delete-branch.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.deleteBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/delete-extension.md b/examples/2.3.x/console-web/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..02cd78846 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/delete-extension.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.deleteExtension({ + databaseId: '<DATABASE_ID>', + extensionName: '<EXTENSION_NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/delete.md b/examples/2.3.x/console-web/examples/postgresql/delete.md new file mode 100644 index 000000000..213911d9b --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.delete({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/get-backup-policy.md b/examples/2.3.x/console-web/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..4db5bffa5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/get-backup-policy.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.getBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/get-backup.md b/examples/2.3.x/console-web/examples/postgresql/get-backup.md new file mode 100644 index 000000000..f5ab50226 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/get-backup.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.getBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/get-pitr.md b/examples/2.3.x/console-web/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..0a522e7bd --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/get-pitr.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.getPitr({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/get-pooler.md b/examples/2.3.x/console-web/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..fec0be0ba --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/get-pooler.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.getPooler({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/get-replicas.md b/examples/2.3.x/console-web/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..d15ba47da --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/get-replicas.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.getReplicas({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/get-restoration.md b/examples/2.3.x/console-web/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..566abc46f --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/get-restoration.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.getRestoration({ + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/get-status.md b/examples/2.3.x/console-web/examples/postgresql/get-status.md new file mode 100644 index 000000000..4e9a9ee91 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/get-status.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.getStatus({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/get.md b/examples/2.3.x/console-web/examples/postgresql/get.md new file mode 100644 index 000000000..c0b303cb4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.get({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/list-backup-policies.md b/examples/2.3.x/console-web/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..10558558d --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/list-backup-policies.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.listBackupPolicies({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/list-backups.md b/examples/2.3.x/console-web/examples/postgresql/list-backups.md new file mode 100644 index 000000000..9911422bc --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/list-backups.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.listBackups({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/list-branches.md b/examples/2.3.x/console-web/examples/postgresql/list-branches.md new file mode 100644 index 000000000..95bffd106 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/list-branches.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.listBranches({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/list-extensions.md b/examples/2.3.x/console-web/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..fd8334e96 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/list-extensions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.listExtensions({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/list-operations.md b/examples/2.3.x/console-web/examples/postgresql/list-operations.md new file mode 100644 index 000000000..b762cdd71 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/list-operations.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/list-restorations.md b/examples/2.3.x/console-web/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..33fc97ec6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/list-restorations.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.listRestorations({ + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/list-specifications.md b/examples/2.3.x/console-web/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..9f5730ea9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/list-specifications.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.listSpecifications(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/list.md b/examples/2.3.x/console-web/examples/postgresql/list.md new file mode 100644 index 000000000..9bcdd747d --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/list.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.list({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/update-backup-policy.md b/examples/2.3.x/console-web/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..7d7636867 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/update-backup-policy.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.updateBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/update-backup-storage.md b/examples/2.3.x/console-web/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..1a803a124 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/update-backup-storage.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.updateBackupStorage({ + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/update-credentials.md b/examples/2.3.x/console-web/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..4290d623d --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/update-credentials.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.updateCredentials({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/update-maintenance.md b/examples/2.3.x/console-web/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..6e1e5ec98 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/update-maintenance.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.updateMaintenance({ + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/update-pooler.md b/examples/2.3.x/console-web/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..7f3f5e6d8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/update-pooler.md @@ -0,0 +1,23 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.updatePooler({ + databaseId: '<DATABASE_ID>', + mode: 'transaction', // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: '<POOLER_CPU_REQUEST>', // optional + poolerCpuLimit: '<POOLER_CPU_LIMIT>', // optional + poolerMemoryRequest: '<POOLER_MEMORY_REQUEST>', // optional + poolerMemoryLimit: '<POOLER_MEMORY_LIMIT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/postgresql/update.md b/examples/2.3.x/console-web/examples/postgresql/update.md new file mode 100644 index 000000000..874e4a604 --- /dev/null +++ b/examples/2.3.x/console-web/examples/postgresql/update.md @@ -0,0 +1,35 @@ +```javascript +import { Client, Postgresql } 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 postgresql = new Postgresql(client); + +const result = await postgresql.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/presences/delete.md b/examples/2.3.x/console-web/examples/presences/delete.md new file mode 100644 index 000000000..4f5f40543 --- /dev/null +++ b/examples/2.3.x/console-web/examples/presences/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Presences } 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 presences = new Presences(client); + +const result = await presences.delete({ + presenceId: '<PRESENCE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/presences/get-usage.md b/examples/2.3.x/console-web/examples/presences/get-usage.md new file mode 100644 index 000000000..723b076b9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/presences/get-usage.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Presences, UsageRange } 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 presences = new Presences(client); + +const result = await presences.getUsage({ + range: UsageRange.TwentyFourHours, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/presences/get.md b/examples/2.3.x/console-web/examples/presences/get.md new file mode 100644 index 000000000..e1eba61dd --- /dev/null +++ b/examples/2.3.x/console-web/examples/presences/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Presences } 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 presences = new Presences(client); + +const result = await presences.get({ + presenceId: '<PRESENCE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/presences/list.md b/examples/2.3.x/console-web/examples/presences/list.md new file mode 100644 index 000000000..3ffeb14e3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/presences/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Presences } 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 presences = new Presences(client); + +const result = await presences.list({ + queries: [], // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/presences/update.md b/examples/2.3.x/console-web/examples/presences/update.md new file mode 100644 index 000000000..a75cb2e7c --- /dev/null +++ b/examples/2.3.x/console-web/examples/presences/update.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Presences, Permission, Role } 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 presences = new Presences(client); + +const result = await presences.update({ + presenceId: '<PRESENCE_ID>', + status: '<STATUS>', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional + permissions: [Permission.read(Role.any())], // optional + purge: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/presences/upsert.md b/examples/2.3.x/console-web/examples/presences/upsert.md new file mode 100644 index 000000000..ef3d2dea7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/presences/upsert.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Presences, Permission, Role } 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 presences = new Presences(client); + +const result = await presences.upsert({ + presenceId: '<PRESENCE_ID>', + status: '<STATUS>', + permissions: [Permission.read(Role.any())], // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/create-android-platform.md b/examples/2.3.x/console-web/examples/project/create-android-platform.md new file mode 100644 index 000000000..df9279327 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-android-platform.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.createAndroidPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + applicationId: '<APPLICATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/create-apple-platform.md b/examples/2.3.x/console-web/examples/project/create-apple-platform.md new file mode 100644 index 000000000..28bb07936 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-apple-platform.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.createApplePlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + bundleIdentifier: '<BUNDLE_IDENTIFIER>', +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..f5f76a425 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-ephemeral-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Project, ProjectKeyScopes } 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.createEphemeralKey({ + scopes: [ProjectKeyScopes.ProjectRead], + duration: 600, +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..5354d7329 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-key.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Project, ProjectKeyScopes } 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.createKey({ + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [ProjectKeyScopes.ProjectRead], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/create-linux-platform.md b/examples/2.3.x/console-web/examples/project/create-linux-platform.md new file mode 100644 index 000000000..cd527e370 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-linux-platform.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.createLinuxPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageName: '<PACKAGE_NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/create-mock-phone.md b/examples/2.3.x/console-web/examples/project/create-mock-phone.md new file mode 100644 index 000000000..452362d1f --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-mock-phone.md @@ -0,0 +1,16 @@ +```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.createMockPhone({ + number: '+12065550100', + otp: '<OTP>', +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..300e972c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-smtp-test.md @@ -0,0 +1,15 @@ +```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.createSMTPTest({ + emails: [], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/create-variable.md b/examples/2.3.x/console-web/examples/project/create-variable.md new file mode 100644 index 000000000..2ad86e66a --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-variable.md @@ -0,0 +1,18 @@ +```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.createVariable({ + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/create-web-platform.md b/examples/2.3.x/console-web/examples/project/create-web-platform.md new file mode 100644 index 000000000..cc27e4cd1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-web-platform.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.createWebPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/create-windows-platform.md b/examples/2.3.x/console-web/examples/project/create-windows-platform.md new file mode 100644 index 000000000..55b534170 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/create-windows-platform.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.createWindowsPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/delete-key.md b/examples/2.3.x/console-web/examples/project/delete-key.md new file mode 100644 index 000000000..05d107306 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/delete-key.md @@ -0,0 +1,15 @@ +```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.deleteKey({ + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/delete-mock-phone.md b/examples/2.3.x/console-web/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..4db6d3ce1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/delete-mock-phone.md @@ -0,0 +1,15 @@ +```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.deleteMockPhone({ + number: '+12065550100', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/delete-platform.md b/examples/2.3.x/console-web/examples/project/delete-platform.md new file mode 100644 index 000000000..2e939098b --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/delete-platform.md @@ -0,0 +1,15 @@ +```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.deletePlatform({ + platformId: '<PLATFORM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/delete-variable.md b/examples/2.3.x/console-web/examples/project/delete-variable.md new file mode 100644 index 000000000..8fcb3cd8d --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/delete-variable.md @@ -0,0 +1,15 @@ +```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.deleteVariable({ + variableId: '<VARIABLE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/delete.md b/examples/2.3.x/console-web/examples/project/delete.md new file mode 100644 index 000000000..bb9376912 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/delete.md @@ -0,0 +1,13 @@ +```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.delete(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/get-email-template.md b/examples/2.3.x/console-web/examples/project/get-email-template.md new file mode 100644 index 000000000..edcd55fc8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/get-email-template.md @@ -0,0 +1,21 @@ +```javascript +import { + Client, + Project, + ProjectEmailTemplateId, + ProjectEmailTemplateLocale, +} 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.getEmailTemplate({ + templateId: ProjectEmailTemplateId.Verification, + locale: ProjectEmailTemplateLocale.Af, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/get-key.md b/examples/2.3.x/console-web/examples/project/get-key.md new file mode 100644 index 000000000..797a1101f --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/get-key.md @@ -0,0 +1,15 @@ +```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.getKey({ + keyId: '<KEY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/get-mock-phone.md b/examples/2.3.x/console-web/examples/project/get-mock-phone.md new file mode 100644 index 000000000..c2b7c61dc --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/get-mock-phone.md @@ -0,0 +1,15 @@ +```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.getMockPhone({ + number: '+12065550100', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/console-web/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..449a282cf --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Project, ProjectOAuthProviderId } 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.getOAuth2Provider({ + providerId: ProjectOAuthProviderId.Amazon, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/get-platform.md b/examples/2.3.x/console-web/examples/project/get-platform.md new file mode 100644 index 000000000..d896e5f41 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/get-platform.md @@ -0,0 +1,15 @@ +```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.getPlatform({ + platformId: '<PLATFORM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/get-policy.md b/examples/2.3.x/console-web/examples/project/get-policy.md new file mode 100644 index 000000000..a1e4d7467 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/get-policy.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Project, ProjectPolicyId } 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.getPolicy({ + policyId: ProjectPolicyId.PasswordDictionary, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/get-variable.md b/examples/2.3.x/console-web/examples/project/get-variable.md new file mode 100644 index 000000000..2291de268 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/get-variable.md @@ -0,0 +1,15 @@ +```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.getVariable({ + variableId: '<VARIABLE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/get.md b/examples/2.3.x/console-web/examples/project/get.md new file mode 100644 index 000000000..8efa7685a --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/get.md @@ -0,0 +1,13 @@ +```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.get(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/list-email-templates.md b/examples/2.3.x/console-web/examples/project/list-email-templates.md new file mode 100644 index 000000000..4bffe6035 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/list-email-templates.md @@ -0,0 +1,16 @@ +```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.listEmailTemplates({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/list-keys.md b/examples/2.3.x/console-web/examples/project/list-keys.md new file mode 100644 index 000000000..b0d493ec0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/list-keys.md @@ -0,0 +1,16 @@ +```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.listKeys({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/list-mock-phones.md b/examples/2.3.x/console-web/examples/project/list-mock-phones.md new file mode 100644 index 000000000..a0f5f6518 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/list-mock-phones.md @@ -0,0 +1,16 @@ +```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.listMockPhones({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/console-web/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..197a26feb --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,16 @@ +```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.listOAuth2Providers({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/list-platforms.md b/examples/2.3.x/console-web/examples/project/list-platforms.md new file mode 100644 index 000000000..695e1cd6f --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/list-platforms.md @@ -0,0 +1,16 @@ +```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.listPlatforms({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/list-policies.md b/examples/2.3.x/console-web/examples/project/list-policies.md new file mode 100644 index 000000000..9c64c58e9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/list-policies.md @@ -0,0 +1,16 @@ +```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.listPolicies({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/list-variables.md b/examples/2.3.x/console-web/examples/project/list-variables.md new file mode 100644 index 000000000..a397b9041 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/list-variables.md @@ -0,0 +1,16 @@ +```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.listVariables({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-android-platform.md b/examples/2.3.x/console-web/examples/project/update-android-platform.md new file mode 100644 index 000000000..e736fb565 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-android-platform.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.updateAndroidPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + applicationId: '<APPLICATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-apple-platform.md b/examples/2.3.x/console-web/examples/project/update-apple-platform.md new file mode 100644 index 000000000..315e69037 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-apple-platform.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.updateApplePlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + bundleIdentifier: '<BUNDLE_IDENTIFIER>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-auth-method.md b/examples/2.3.x/console-web/examples/project/update-auth-method.md new file mode 100644 index 000000000..c1a846a12 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-auth-method.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Project, ProjectAuthMethodId } 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.updateAuthMethod({ + methodId: ProjectAuthMethodId.EmailPassword, + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/console-web/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..f32ddfa51 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,15 @@ +```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.updateDenyAliasedEmailPolicy({ + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/console-web/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..c2323abb0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,15 @@ +```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.updateDenyCorporateEmailPolicy({ + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/console-web/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..8146a09a5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,15 @@ +```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.updateDenyDisposableEmailPolicy({ + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/console-web/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..626fffb62 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,15 @@ +```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.updateDenyFreeEmailPolicy({ + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-email-template.md b/examples/2.3.x/console-web/examples/project/update-email-template.md new file mode 100644 index 000000000..24aa3fbae --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-email-template.md @@ -0,0 +1,27 @@ +```javascript +import { + Client, + Project, + ProjectEmailTemplateId, + ProjectEmailTemplateLocale, +} 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.updateEmailTemplate({ + templateId: ProjectEmailTemplateId.Verification, + locale: ProjectEmailTemplateLocale.Af, // optional + subject: '<SUBJECT>', // optional + message: '<MESSAGE>', // optional + senderName: '<SENDER_NAME>', // optional + senderEmail: 'email@example.com', // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional +}); + +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 new file mode 100644 index 000000000..3bba96a0c --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-key.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Project, ProjectKeyScopes } 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.updateKey({ + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [ProjectKeyScopes.ProjectRead], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..8df4ffb42 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-labels.md @@ -0,0 +1,15 @@ +```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.updateLabels({ + labels: [], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-linux-platform.md b/examples/2.3.x/console-web/examples/project/update-linux-platform.md new file mode 100644 index 000000000..5bf1ae98a --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-linux-platform.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.updateLinuxPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageName: '<PACKAGE_NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/console-web/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..1e14ffa03 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,20 @@ +```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.updateMembershipPrivacyPolicy({ + userId: false, // optional + userEmail: false, // optional + userPhone: false, // optional + userName: false, // optional + userMFA: false, // optional + userAccessedAt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/console-web/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..e2663bdef --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-mfa-factors-policy.md @@ -0,0 +1,18 @@ +```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.updateMFAFactorsPolicy({ + totp: false, // optional + email: false, // optional + phone: false, // optional + custom: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-mock-phone.md b/examples/2.3.x/console-web/examples/project/update-mock-phone.md new file mode 100644 index 000000000..bf3d40926 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-mock-phone.md @@ -0,0 +1,16 @@ +```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.updateMockPhone({ + number: '+12065550100', + otp: '<OTP>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..2f98d0919 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-amazon.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.updateOAuth2Amazon({ + 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-apple.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..0c4a52b04 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,21 @@ +```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.updateOAuth2Apple({ + serviceId: '<SERVICE_ID>', // optional + keyId: '<KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + p8File: '<P8_FILE>', // optional + nativeClientIds: [], // optional + enabled: false, // optional + nativeEnabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..669b14e3f --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-appwrite.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.updateOAuth2Appwrite({ + 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-auth-0.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..7c2898e4c --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-auth-0.md @@ -0,0 +1,18 @@ +```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.updateOAuth2Auth0({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..796368a07 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-authentik.md @@ -0,0 +1,18 @@ +```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.updateOAuth2Authentik({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..819d6fa43 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-autodesk.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.updateOAuth2Autodesk({ + 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-bitbucket.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..14e5d86c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-bitbucket.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.updateOAuth2Bitbucket({ + key: '<KEY>', // optional + secret: '<SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..66865768e --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-bitly.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.updateOAuth2Bitly({ + 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-box.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..7dd3605ad --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-box.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.updateOAuth2Box({ + 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-cloudflare.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..b961a0918 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-cloudflare.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.updateOAuth2Cloudflare({ + 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-dailymotion.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..fd63c401a --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-dailymotion.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.updateOAuth2Dailymotion({ + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..1116db06e --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-discord.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.updateOAuth2Discord({ + 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-disqus.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..fba11c6ac --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-disqus.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.updateOAuth2Disqus({ + publicKey: '<PUBLIC_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..6bb803e27 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-dropbox.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.updateOAuth2Dropbox({ + appKey: '<APP_KEY>', // optional + appSecret: '<APP_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..d05f9050b --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-etsy.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.updateOAuth2Etsy({ + keyString: '<KEY_STRING>', // optional + sharedSecret: '<SHARED_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..deae89b2b --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-facebook.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.updateOAuth2Facebook({ + appId: '<APP_ID>', // optional + appSecret: '<APP_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..7414b4c13 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-figma.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.updateOAuth2Figma({ + 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-fusion-auth.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..4881811e9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,18 @@ +```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.updateOAuth2FusionAuth({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + enabled: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..f3cc3b132 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-git-hub.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.updateOAuth2GitHub({ + 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-gitlab.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..1bfb3d7ea --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-gitlab.md @@ -0,0 +1,18 @@ +```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.updateOAuth2Gitlab({ + applicationId: '<APPLICATION_ID>', // optional + secret: '<SECRET>', // optional + endpoint: 'https://example.com', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-google.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..c0bbe651f --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-google.md @@ -0,0 +1,24 @@ +```javascript +import { + Client, + Project, + ProjectOAuth2GooglePrompt, +} 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.updateOAuth2Google({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2GooglePrompt.None], // optional + nativeClientIds: [], // optional + enabled: false, // optional + nativeEnabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..4917ae7ae --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-hugging-face.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.updateOAuth2HuggingFace({ + 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-kakao.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..b92e049df --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-kakao.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.updateOAuth2Kakao({ + 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-keycloak.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..34653307b --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,19 @@ +```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.updateOAuth2Keycloak({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + realmName: '<REALM_NAME>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..e29b1a75a --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-kick.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.updateOAuth2Kick({ + 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-linkedin.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..97f465f0f --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-linkedin.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.updateOAuth2Linkedin({ + clientId: '<CLIENT_ID>', // optional + primaryClientSecret: '<PRIMARY_CLIENT_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..18f21fe93 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-microsoft.md @@ -0,0 +1,18 @@ +```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.updateOAuth2Microsoft({ + applicationId: '<APPLICATION_ID>', // optional + applicationSecret: '<APPLICATION_SECRET>', // optional + tenant: '<TENANT>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..66060594b --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-notion.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.updateOAuth2Notion({ + oauthClientId: '<OAUTH_CLIENT_ID>', // optional + oauthClientSecret: '<OAUTH_CLIENT_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..2d979ee8f --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,23 @@ +```javascript +import { Client, Project, ProjectOAuth2OidcPrompt } 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.updateOAuth2Oidc({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + wellKnownURL: 'https://example.com', // optional + authorizationURL: 'https://example.com', // optional + tokenURL: 'https://example.com', // optional + userInfoURL: 'https://example.com', // optional + prompt: [ProjectOAuth2OidcPrompt.None], // optional + maxAge: 0, // optional + enabled: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..a94ad691e --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,19 @@ +```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.updateOAuth2Okta({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + domain: 'example.com', // optional + authorizationServerId: '<AUTHORIZATION_SERVER_ID>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..2b689e8e7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-paypal-sandbox.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.updateOAuth2PaypalSandbox({ + clientId: '<CLIENT_ID>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..3477c76e2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-paypal.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.updateOAuth2Paypal({ + clientId: '<CLIENT_ID>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..b930d4331 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-podio.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.updateOAuth2Podio({ + 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-resend.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..99fef9567 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-resend.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.updateOAuth2Resend({ + 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-salesforce.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..04c3da125 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-salesforce.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.updateOAuth2Salesforce({ + customerKey: '<CUSTOMER_KEY>', // optional + customerSecret: '<CUSTOMER_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-server.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..e765f9745 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-server.md @@ -0,0 +1,30 @@ +```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.updateOAuth2Server({ + enabled: false, + authorizationUrl: 'https://example.com', + scopes: [], // optional + authorizationDetailsTypes: [], // optional + accessTokenDuration: 60, // optional + refreshTokenDuration: 60, // optional + publicAccessTokenDuration: 60, // optional + publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional + confidentialPkce: false, // optional + verificationUrl: 'https://example.com', // optional + userCodeLength: 6, // optional + userCodeFormat: 'numeric', // optional + deviceCodeDuration: 60, // optional + defaultScopes: [], // optional + installationScopes: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..fe04c9b31 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-slack.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.updateOAuth2Slack({ + 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-spotify.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..4e88f833c --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-spotify.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.updateOAuth2Spotify({ + 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-stripe.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..311b1b1a8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-stripe.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.updateOAuth2Stripe({ + clientId: '<CLIENT_ID>', // optional + apiSecretKey: '<API_SECRET_KEY>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..c840831d7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-tik-tok.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.updateOAuth2TikTok({ + 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-tradeshift-sandbox.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..3a54d0c27 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-tradeshift-sandbox.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.updateOAuth2TradeshiftSandbox({ + oauth2ClientId: '<OAUTH2_CLIENT_ID>', // optional + oauth2ClientSecret: '<OAUTH2_CLIENT_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..601a84529 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-tradeshift.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.updateOAuth2Tradeshift({ + oauth2ClientId: '<OAUTH2_CLIENT_ID>', // optional + oauth2ClientSecret: '<OAUTH2_CLIENT_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..dec6da05e --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-twitch.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.updateOAuth2Twitch({ + 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-word-press.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..04119dca5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-word-press.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.updateOAuth2WordPress({ + 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-yahoo.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..9ce308592 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-yahoo.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.updateOAuth2Yahoo({ + 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-yandex.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..9cda2ed2b --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-yandex.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.updateOAuth2Yandex({ + 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 new file mode 100644 index 000000000..0a1ff8615 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-zoho.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.updateOAuth2Zoho({ + 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-zoom.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..a6f3f87a2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-zoom.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.updateOAuth2Zoom({ + 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-2x.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..05162dc80 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2x.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.updateOAuth2X({ + customerKey: '<CUSTOMER_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/console-web/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..b89a58853 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,15 @@ +```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.updatePasswordDictionaryPolicy({ + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-password-history-policy.md b/examples/2.3.x/console-web/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..ac019894f --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-password-history-policy.md @@ -0,0 +1,15 @@ +```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.updatePasswordHistoryPolicy({ + total: 1, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/console-web/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..ac5aad7c0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,15 @@ +```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.updatePasswordPersonalDataPolicy({ + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-password-pwned-policy.md b/examples/2.3.x/console-web/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..ee4b7ef58 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-password-pwned-policy.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.updatePasswordPwnedPolicy({ + enabled: false, // optional + sessions: false, // optional + users: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-password-strength-policy.md b/examples/2.3.x/console-web/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..38ee398dc --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-password-strength-policy.md @@ -0,0 +1,19 @@ +```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.updatePasswordStrengthPolicy({ + min: 8, // optional + uppercase: false, // optional + lowercase: false, // optional + number: false, // optional + symbols: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-protocol.md b/examples/2.3.x/console-web/examples/project/update-protocol.md new file mode 100644 index 000000000..fe1315898 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-protocol.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Project, ProjectProtocolId } 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.updateProtocol({ + protocolId: ProjectProtocolId.Rest, + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-service.md b/examples/2.3.x/console-web/examples/project/update-service.md new file mode 100644 index 000000000..a44657f79 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-service.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Project, ProjectServiceId } 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.updateService({ + serviceId: ProjectServiceId.Account, + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-session-alert-policy.md b/examples/2.3.x/console-web/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..b264005fa --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-session-alert-policy.md @@ -0,0 +1,15 @@ +```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.updateSessionAlertPolicy({ + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-session-duration-policy.md b/examples/2.3.x/console-web/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..6dcf3d3f9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-session-duration-policy.md @@ -0,0 +1,15 @@ +```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.updateSessionDurationPolicy({ + duration: 60, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/console-web/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..ea2dc38fc --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,15 @@ +```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.updateSessionInvalidationPolicy({ + enabled: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-session-limit-policy.md b/examples/2.3.x/console-web/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..6f4726c84 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-session-limit-policy.md @@ -0,0 +1,15 @@ +```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.updateSessionLimitPolicy({ + total: 1, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-smtp.md b/examples/2.3.x/console-web/examples/project/update-smtp.md new file mode 100644 index 000000000..e7bb461bf --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-smtp.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Project, ProjectSMTPSecure } 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.updateSMTP({ + host: 'example.com', // optional + port: 587, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + senderEmail: 'email@example.com', // optional + senderName: '<SENDER_NAME>', // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + secure: ProjectSMTPSecure.Tls, // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-user-limit-policy.md b/examples/2.3.x/console-web/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..1b6c31559 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-user-limit-policy.md @@ -0,0 +1,15 @@ +```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.updateUserLimitPolicy({ + total: 0, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-variable.md b/examples/2.3.x/console-web/examples/project/update-variable.md new file mode 100644 index 000000000..32668c6b9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-variable.md @@ -0,0 +1,18 @@ +```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.updateVariable({ + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-web-platform.md b/examples/2.3.x/console-web/examples/project/update-web-platform.md new file mode 100644 index 000000000..3594a739b --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-web-platform.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.updateWebPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-windows-platform.md b/examples/2.3.x/console-web/examples/project/update-windows-platform.md new file mode 100644 index 000000000..273c25071 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-windows-platform.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.updateWindowsPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/confirm-addon-payment.md b/examples/2.3.x/console-web/examples/projects/confirm-addon-payment.md new file mode 100644 index 000000000..cfef92e73 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/confirm-addon-payment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.confirmAddonPayment({ + projectId: '<PROJECT_ID>', + addonId: '<ADDON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/create-premium-geo-db-addon.md b/examples/2.3.x/console-web/examples/projects/create-premium-geo-db-addon.md new file mode 100644 index 000000000..f2bb7c703 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/create-premium-geo-db-addon.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.createPremiumGeoDBAddon({ + projectId: '<PROJECT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/create-schedule.md b/examples/2.3.x/console-web/examples/projects/create-schedule.md new file mode 100644 index 000000000..4ad15f229 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/create-schedule.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Projects, ScheduleResourceType } 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 projects = new Projects(client); + +const result = await projects.createSchedule({ + projectId: '<PROJECT_ID>', + resourceType: ScheduleResourceType.Function, + resourceId: '<RESOURCE_ID>', + schedule: '0 0 * * *', + active: false, // optional + data: {}, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/delete-addon.md b/examples/2.3.x/console-web/examples/projects/delete-addon.md new file mode 100644 index 000000000..e9597d7f5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/delete-addon.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.deleteAddon({ + projectId: '<PROJECT_ID>', + addonId: '<ADDON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/get-addon-price.md b/examples/2.3.x/console-web/examples/projects/get-addon-price.md new file mode 100644 index 000000000..f9804aa00 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/get-addon-price.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.getAddonPrice({ + projectId: '<PROJECT_ID>', + addon: 'baa', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/get-addon.md b/examples/2.3.x/console-web/examples/projects/get-addon.md new file mode 100644 index 000000000..cd8d2cd0a --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/get-addon.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.getAddon({ + projectId: '<PROJECT_ID>', + addonId: '<ADDON_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/get-schedule.md b/examples/2.3.x/console-web/examples/projects/get-schedule.md new file mode 100644 index 000000000..86812d5f7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/get-schedule.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.getSchedule({ + projectId: '<PROJECT_ID>', + scheduleId: '<SCHEDULE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/list-addons.md b/examples/2.3.x/console-web/examples/projects/list-addons.md new file mode 100644 index 000000000..6f33e9b6f --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/list-addons.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.listAddons({ + projectId: '<PROJECT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/list-schedules.md b/examples/2.3.x/console-web/examples/projects/list-schedules.md new file mode 100644 index 000000000..d28d3dcfd --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/list-schedules.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.listSchedules({ + projectId: '<PROJECT_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/list-stages.md b/examples/2.3.x/console-web/examples/projects/list-stages.md new file mode 100644 index 000000000..e01d3468f --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/list-stages.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.listStages({ + projectId: '<PROJECT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/update-console-access.md b/examples/2.3.x/console-web/examples/projects/update-console-access.md new file mode 100644 index 000000000..92c85ca5b --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/update-console-access.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.updateConsoleAccess({ + projectId: '<PROJECT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/update-stage.md b/examples/2.3.x/console-web/examples/projects/update-stage.md new file mode 100644 index 000000000..a8e532421 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/update-stage.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.updateStage({ + projectId: '<PROJECT_ID>', + stageId: '<STAGE_ID>', + skip: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/update-status.md b/examples/2.3.x/console-web/examples/projects/update-status.md new file mode 100644 index 000000000..1fe624c42 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/update-status.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Projects, Status } 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 projects = new Projects(client); + +const result = await projects.updateStatus({ + projectId: '<PROJECT_ID>', + status: Status.Active, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/projects/update-team.md b/examples/2.3.x/console-web/examples/projects/update-team.md new file mode 100644 index 000000000..4316ec581 --- /dev/null +++ b/examples/2.3.x/console-web/examples/projects/update-team.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Projects } 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 projects = new Projects(client); + +const result = await projects.updateTeam({ + projectId: '<PROJECT_ID>', + teamId: '<TEAM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/create-api-rule.md b/examples/2.3.x/console-web/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..4f0421373 --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/create-api-rule.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Proxy } 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 proxy = new Proxy(client); + +const result = await proxy.createAPIRule({ + domain: 'example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/create-function-rule.md b/examples/2.3.x/console-web/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..b1b9bb11e --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/create-function-rule.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Proxy } 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 proxy = new Proxy(client); + +const result = await proxy.createFunctionRule({ + domain: 'example.com', + functionId: '<FUNCTION_ID>', + branch: '<BRANCH>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/create-invalidation.md b/examples/2.3.x/console-web/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..f15adbfc0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/create-invalidation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Proxy, InvalidationType } 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 proxy = new Proxy(client); + +const result = await proxy.createInvalidation({ + domain: 'example.com', + type: InvalidationType.Tag, + reference: '<REFERENCE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/create-redirect-rule.md b/examples/2.3.x/console-web/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..eb1d97cea --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/create-redirect-rule.md @@ -0,0 +1,24 @@ +```javascript +import { + Client, + Proxy, + StatusCode, + ProxyResourceType, +} 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 proxy = new Proxy(client); + +const result = await proxy.createRedirectRule({ + domain: 'example.com', + url: 'https://example.com', + statusCode: StatusCode.MovedPermanently, + resourceId: '<RESOURCE_ID>', + resourceType: ProxyResourceType.Site, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/create-site-rule.md b/examples/2.3.x/console-web/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..7d0fb0db6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/create-site-rule.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Proxy } 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 proxy = new Proxy(client); + +const result = await proxy.createSiteRule({ + domain: 'example.com', + siteId: '<SITE_ID>', + branch: '<BRANCH>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/delete-rule.md b/examples/2.3.x/console-web/examples/proxy/delete-rule.md new file mode 100644 index 000000000..858dca183 --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/delete-rule.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Proxy } 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 proxy = new Proxy(client); + +const result = await proxy.deleteRule({ + ruleId: '<RULE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/get-rule.md b/examples/2.3.x/console-web/examples/proxy/get-rule.md new file mode 100644 index 000000000..8b77d3940 --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/get-rule.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Proxy } 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 proxy = new Proxy(client); + +const result = await proxy.getRule({ + ruleId: '<RULE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/list-rules.md b/examples/2.3.x/console-web/examples/proxy/list-rules.md new file mode 100644 index 000000000..40baf3d64 --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/list-rules.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Proxy } 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 proxy = new Proxy(client); + +const result = await proxy.listRules({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/proxy/update-rule-status.md b/examples/2.3.x/console-web/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..1309d915e --- /dev/null +++ b/examples/2.3.x/console-web/examples/proxy/update-rule-status.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Proxy } 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 proxy = new Proxy(client); + +const result = await proxy.updateRuleStatus({ + ruleId: '<RULE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/create-deployment.md b/examples/2.3.x/console-web/examples/sites/create-deployment.md new file mode 100644 index 000000000..e9c3a8acb --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/create-deployment.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.createDeployment({ + siteId: '<SITE_ID>', + code: document.getElementById('uploader').files[0], + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + activate: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/console-web/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..4dfa825a0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.createDuplicateDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/create-template-deployment.md b/examples/2.3.x/console-web/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..d29a5e818 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/create-template-deployment.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Sites, TemplateReferenceType } 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 sites = new Sites(client); + +const result = await sites.createTemplateDeployment({ + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + type: TemplateReferenceType.Branch, + reference: '<REFERENCE>', + activate: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/create-variable.md b/examples/2.3.x/console-web/examples/sites/create-variable.md new file mode 100644 index 000000000..05afb1ffc --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/create-variable.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.createVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/create-vcs-deployment.md b/examples/2.3.x/console-web/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..79a3bd126 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Sites, VCSReferenceType } 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 sites = new Sites(client); + +const result = await sites.createVcsDeployment({ + siteId: '<SITE_ID>', + type: VCSReferenceType.Branch, + reference: '<REFERENCE>', + activate: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/create.md b/examples/2.3.x/console-web/examples/sites/create.md new file mode 100644 index 000000000..724ea5235 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/create.md @@ -0,0 +1,45 @@ +```javascript +import { + Client, + Sites, + Framework, + BuildRuntime, + Adapter, + ProjectKeyScopes, +} 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 sites = new Sites(client); + +const result = await sites.create({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: Framework.Analog, + buildRuntime: BuildRuntime.Node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + startCommand: '<START_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + adapter: Adapter.Static, // optional + installationId: '<INSTALLATION_ID>', // optional + fallbackFile: '<FALLBACK_FILE>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // optional + scopes: [ProjectKeyScopes.ProjectRead], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/delete-deployment.md b/examples/2.3.x/console-web/examples/sites/delete-deployment.md new file mode 100644 index 000000000..cfdbd6943 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/delete-deployment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.deleteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/delete-log.md b/examples/2.3.x/console-web/examples/sites/delete-log.md new file mode 100644 index 000000000..3507f656e --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/delete-log.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.deleteLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/delete-variable.md b/examples/2.3.x/console-web/examples/sites/delete-variable.md new file mode 100644 index 000000000..4c1139ad5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/delete-variable.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.deleteVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/delete.md b/examples/2.3.x/console-web/examples/sites/delete.md new file mode 100644 index 000000000..4e3d7c78f --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.delete({ + siteId: '<SITE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/get-deployment-download.md b/examples/2.3.x/console-web/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..308707875 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/get-deployment-download.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Sites, DeploymentDownloadType } 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 sites = new Sites(client); + +const result = sites.getDeploymentDownload({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.Source, // optional + token: '<TOKEN>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/get-deployment.md b/examples/2.3.x/console-web/examples/sites/get-deployment.md new file mode 100644 index 000000000..9ed95bfcb --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/get-deployment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.getDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/get-log.md b/examples/2.3.x/console-web/examples/sites/get-log.md new file mode 100644 index 000000000..ead132bc3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/get-log.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.getLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/get-template.md b/examples/2.3.x/console-web/examples/sites/get-template.md new file mode 100644 index 000000000..88f30638d --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/get-template.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.getTemplate({ + templateId: '<TEMPLATE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/get-variable.md b/examples/2.3.x/console-web/examples/sites/get-variable.md new file mode 100644 index 000000000..17a044bcf --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/get-variable.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.getVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/get.md b/examples/2.3.x/console-web/examples/sites/get.md new file mode 100644 index 000000000..c8d26fc70 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.get({ + siteId: '<SITE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/list-deployments.md b/examples/2.3.x/console-web/examples/sites/list-deployments.md new file mode 100644 index 000000000..484bf5b12 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/list-deployments.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.listDeployments({ + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..26d0e5325 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/list-frameworks.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.listFrameworks(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/list-logs.md b/examples/2.3.x/console-web/examples/sites/list-logs.md new file mode 100644 index 000000000..8fb3d851c --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/list-logs.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.listLogs({ + siteId: '<SITE_ID>', + queries: [], // optional + 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 new file mode 100644 index 000000000..1d77721c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/list-specifications.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.listSpecifications({ + type: 'runtimes', // 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 new file mode 100644 index 000000000..4832803a9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/list-templates.md @@ -0,0 +1,23 @@ +```javascript +import { + Client, + Sites, + Framework, + SiteTemplateUseCase, +} 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 sites = new Sites(client); + +const result = await sites.listTemplates({ + frameworks: [Framework.Analog], // optional + useCases: [SiteTemplateUseCase.Portfolio], // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/list-variables.md b/examples/2.3.x/console-web/examples/sites/list-variables.md new file mode 100644 index 000000000..75075e8fa --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/list-variables.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.listVariables({ + siteId: '<SITE_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/list.md b/examples/2.3.x/console-web/examples/sites/list.md new file mode 100644 index 000000000..425011a2e --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/update-deployment-status.md b/examples/2.3.x/console-web/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..470bde6c6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/update-deployment-status.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.updateDeploymentStatus({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/update-site-deployment.md b/examples/2.3.x/console-web/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..0c857e5c2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/update-site-deployment.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.updateSiteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/update-variable.md b/examples/2.3.x/console-web/examples/sites/update-variable.md new file mode 100644 index 000000000..acf0bcf0d --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/update-variable.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Sites } 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 sites = new Sites(client); + +const result = await sites.updateVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/sites/update.md b/examples/2.3.x/console-web/examples/sites/update.md new file mode 100644 index 000000000..36e66d825 --- /dev/null +++ b/examples/2.3.x/console-web/examples/sites/update.md @@ -0,0 +1,45 @@ +```javascript +import { + Client, + Sites, + Framework, + BuildRuntime, + Adapter, + ProjectKeyScopes, +} 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 sites = new Sites(client); + +const result = await sites.update({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: Framework.Analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + startCommand: '<START_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + buildRuntime: BuildRuntime.Node145, // optional + adapter: Adapter.Static, // optional + fallbackFile: '<FALLBACK_FILE>', // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // optional + scopes: [ProjectKeyScopes.ProjectRead], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/create-bucket.md b/examples/2.3.x/console-web/examples/storage/create-bucket.md new file mode 100644 index 000000000..e55136f35 --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/create-bucket.md @@ -0,0 +1,31 @@ +```javascript +import { + Client, + Storage, + Compression, + Permission, + Role, +} 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 storage = new Storage(client); + +const result = await storage.createBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: Compression.None, // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/create-file.md b/examples/2.3.x/console-web/examples/storage/create-file.md new file mode 100644 index 000000000..71b4a5f18 --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/create-file.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Storage, Permission, Role } 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 storage = new Storage(client); + +const result = await storage.createFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: document.getElementById('uploader').files[0], + permissions: [Permission.read(Role.any())], // optional + folder: 'photos/2026', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/delete-bucket.md b/examples/2.3.x/console-web/examples/storage/delete-bucket.md new file mode 100644 index 000000000..a7147bcb5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/delete-bucket.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Storage } 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 storage = new Storage(client); + +const result = await storage.deleteBucket({ + bucketId: '<BUCKET_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/delete-file.md b/examples/2.3.x/console-web/examples/storage/delete-file.md new file mode 100644 index 000000000..1a2d9eb80 --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Storage } 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 storage = new Storage(client); + +const result = await storage.deleteFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/get-bucket.md b/examples/2.3.x/console-web/examples/storage/get-bucket.md new file mode 100644 index 000000000..eff67a035 --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/get-bucket.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Storage } 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 storage = new Storage(client); + +const result = await storage.getBucket({ + bucketId: '<BUCKET_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/get-file-download.md b/examples/2.3.x/console-web/examples/storage/get-file-download.md new file mode 100644 index 000000000..6feab6e0a --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/get-file-download.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Storage } 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 storage = new Storage(client); + +const result = storage.getFileDownload({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/get-file-preview.md b/examples/2.3.x/console-web/examples/storage/get-file-preview.md new file mode 100644 index 000000000..b5d8f2dbb --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/get-file-preview.md @@ -0,0 +1,33 @@ +```javascript +import { + Client, + Storage, + ImageGravity, + ImageFormat, +} 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 storage = new Storage(client); + +const result = storage.getFilePreview({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.Auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: 'FFFFFF', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: 'FFFFFF', // optional + output: ImageFormat.Jpg, // optional + token: '<TOKEN>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/get-file-view.md b/examples/2.3.x/console-web/examples/storage/get-file-view.md new file mode 100644 index 000000000..7dea7751a --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/get-file-view.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Storage } 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 storage = new Storage(client); + +const result = storage.getFileView({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/get-file.md b/examples/2.3.x/console-web/examples/storage/get-file.md new file mode 100644 index 000000000..317c090d7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/get-file.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Storage } 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 storage = new Storage(client); + +const result = await storage.getFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/list-buckets.md b/examples/2.3.x/console-web/examples/storage/list-buckets.md new file mode 100644 index 000000000..cb162c51e --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/list-buckets.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Storage } 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 storage = new Storage(client); + +const result = await storage.listBuckets({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/list-files.md b/examples/2.3.x/console-web/examples/storage/list-files.md new file mode 100644 index 000000000..d69ec2e0c --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/list-files.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Storage } 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 storage = new Storage(client); + +const result = await storage.listFiles({ + bucketId: '<BUCKET_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/update-bucket.md b/examples/2.3.x/console-web/examples/storage/update-bucket.md new file mode 100644 index 000000000..6816d5920 --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/update-bucket.md @@ -0,0 +1,31 @@ +```javascript +import { + Client, + Storage, + Compression, + Permission, + Role, +} 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 storage = new Storage(client); + +const result = await storage.updateBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: Compression.None, // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/storage/update-file.md b/examples/2.3.x/console-web/examples/storage/update-file.md new file mode 100644 index 000000000..881556111 --- /dev/null +++ b/examples/2.3.x/console-web/examples/storage/update-file.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Storage, Permission, Role } 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 storage = new Storage(client); + +const result = await storage.updateFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // optional + permissions: [Permission.read(Role.any())], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..ff6fa9897 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createBigIntColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 1000000, // optional + xdefault: 0, // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..bff59103d --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: false, // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-cutover.md b/examples/2.3.x/console-web/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..f004aa72d --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-cutover.md @@ -0,0 +1,16 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createCutover({ + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..cc9e87f3a --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: '2020-10-15T06:38:00.000+00:00', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-email-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..53c7430bf --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-email-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'email@example.com', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-enum-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..520a828ee --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-enum-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + elements: ['active', 'inactive'], + required: false, + xdefault: 'active', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-failover.md b/examples/2.3.x/console-web/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..1229b8aa1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-failover.md @@ -0,0 +1,16 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-float-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..3852dfbe9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-float-column.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + xdefault: 10.5, // optional + array: 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 new file mode 100644 index 000000000..1b4f0aba8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-index.md @@ -0,0 +1,26 @@ +```javascript +import { + Client, + TablesDB, + TablesDBIndexType, + OrderBy, +} 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + type: TablesDBIndexType.Key, + columns: [], + orders: [OrderBy.Asc], // optional + lengths: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-integer-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..c2c1c2431 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-integer-column.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + xdefault: 10, // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-ip-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..bc09d7373 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-ip-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: '192.0.2.0', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-line-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..f82ce1974 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-line-column.md @@ -0,0 +1,23 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createLineColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [1, 2], + [3, 4], + [5, 6], + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..5bc3c7bf7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createLongtextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..474fd9b28 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createMediumtextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-migration.md b/examples/2.3.x/console-web/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..8237d8cbe --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-migration.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createMigration({ + databaseId: '<DATABASE_ID>', + specification: 's-1vcpu-1gb', + autoCutover: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-operations.md b/examples/2.3.x/console-web/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..a63c6d59b --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createOperations({ + transactionId: '<TRANSACTION_ID>', + operations: [ + { + action: 'create', + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-point-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..1e1591399 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-point-column.md @@ -0,0 +1,19 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createPointColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [1, 2], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..ad5a21ba5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createPolygonColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [ + [1, 2], + [3, 4], + [5, 6], + [1, 2], + ], + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..92d4fcdab --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,27 @@ +```javascript +import { + Client, + TablesDB, + RelationshipType, + RelationMutate, +} 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: '<KEY>', // optional + twoWayKey: '<TWO_WAY_KEY>', // optional + onDelete: RelationMutate.Cascade, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-row.md b/examples/2.3.x/console-web/examples/tablesdb/create-row.md new file mode 100644 index 000000000..820637a28 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..2c0461357 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-rows.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-string-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..be030ae13 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-string-column.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + size: 1, + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-table.md b/examples/2.3.x/console-web/examples/tablesdb/create-table.md new file mode 100644 index 000000000..9d213ce47 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-table.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB, Permission, Role } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // optional + rowSecurity: false, // optional + enabled: false, // optional + columns: [], // optional + indexes: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-text-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..71febf911 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-text-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createTextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-transaction.md b/examples/2.3.x/console-web/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..c9c05586b --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-url-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..93b4ef887 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-url-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'https://example.com', // optional + array: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/console-web/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..039cc055a --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.createVarcharColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + size: 1, + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/create.md b/examples/2.3.x/console-web/examples/tablesdb/create.md new file mode 100644 index 000000000..5ed38dcdd --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/create.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/console-web/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..de32d8649 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.decrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '<COLUMN>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/delete-column.md b/examples/2.3.x/console-web/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..b8232ca3b --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/delete-column.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/delete-index.md b/examples/2.3.x/console-web/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..01b603ada --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/delete-index.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/delete-migration.md b/examples/2.3.x/console-web/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..53b28f5ac --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/delete-migration.md @@ -0,0 +1,16 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteMigration({ + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/delete-row.md b/examples/2.3.x/console-web/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..3022c5b27 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/delete-row.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..58df6f190 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/delete-rows.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/delete-table.md b/examples/2.3.x/console-web/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..3d20915d6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/delete-table.md @@ -0,0 +1,16 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/delete-transaction.md b/examples/2.3.x/console-web/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..a5511512f --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.deleteTransaction({ + transactionId: '<TRANSACTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/delete.md b/examples/2.3.x/console-web/examples/tablesdb/delete.md new file mode 100644 index 000000000..70fc1f456 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.delete({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get-column.md b/examples/2.3.x/console-web/examples/tablesdb/get-column.md new file mode 100644 index 000000000..2c50bd679 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get-column.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.getColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get-index.md b/examples/2.3.x/console-web/examples/tablesdb/get-index.md new file mode 100644 index 000000000..b00f73363 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get-index.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.getIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get-migration.md b/examples/2.3.x/console-web/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..9858a1f00 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get-migration.md @@ -0,0 +1,16 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.getMigration({ + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get-replicas.md b/examples/2.3.x/console-web/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..31fbfa6c8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get-replicas.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.getReplicas({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get-row.md b/examples/2.3.x/console-web/examples/tablesdb/get-row.md new file mode 100644 index 000000000..c59483e34 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get-row.md @@ -0,0 +1,19 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.getRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get-status.md b/examples/2.3.x/console-web/examples/tablesdb/get-status.md new file mode 100644 index 000000000..ac06cecdb --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get-status.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.getStatus({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get-table.md b/examples/2.3.x/console-web/examples/tablesdb/get-table.md new file mode 100644 index 000000000..6b5b5a3ac --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get-table.md @@ -0,0 +1,16 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.getTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get-transaction.md b/examples/2.3.x/console-web/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..b49fe1b7f --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.getTransaction({ + transactionId: '<TRANSACTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/get.md b/examples/2.3.x/console-web/examples/tablesdb/get.md new file mode 100644 index 000000000..78fac3258 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.get({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/increment-row-column.md b/examples/2.3.x/console-web/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..efcc2f5f0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/increment-row-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.incrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '<COLUMN>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/list-columns.md b/examples/2.3.x/console-web/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..c3e11bd76 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list-columns.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.listColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/list-indexes.md b/examples/2.3.x/console-web/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..7044d8800 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list-indexes.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.listIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/list-migrations.md b/examples/2.3.x/console-web/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..86528daea --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list-migrations.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.listMigrations({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/list-operations.md b/examples/2.3.x/console-web/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..4bbf1de2b --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list-operations.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/list-rows.md b/examples/2.3.x/console-web/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..fe4fca369 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list-rows.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.listRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/list-specifications.md b/examples/2.3.x/console-web/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..4fc1c217a --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list-specifications.md @@ -0,0 +1,13 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.listSpecifications(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/list-tables.md b/examples/2.3.x/console-web/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..adf12b922 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list-tables.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.listTables({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..2d616198b --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/list.md b/examples/2.3.x/console-web/examples/tablesdb/list.md new file mode 100644 index 000000000..e6e647b06 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..a8dcfb24d --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateBigIntColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 0, + min: 0, // optional + max: 1000000, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..3f1f2904c --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: false, + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..218744e07 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: '2020-10-15T06:38:00.000+00:00', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-email-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..c55294606 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-email-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'email@example.com', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-enum-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..c85d50024 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-enum-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + elements: ['active', 'inactive'], + required: false, + xdefault: 'active', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-float-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..ec3da21c9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-float-column.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 10.5, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-integer-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..a24c4e325 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-integer-column.md @@ -0,0 +1,22 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 10, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-ip-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..74aa61f4a --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-ip-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: '192.0.2.0', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-line-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..79385a3a4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-line-column.md @@ -0,0 +1,24 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateLineColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [1, 2], + [3, 4], + [5, 6], + ], // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..4d862abfe --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateLongtextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..040d78c2d --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateMediumtextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-point-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..636e56673 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-point-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updatePointColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [1, 2], // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..8ed64623d --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,27 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updatePolygonColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [ + [1, 2], + [3, 4], + [5, 6], + [1, 2], + ], + ], // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..77d2035d7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,19 @@ +```javascript +import { Client, TablesDB, RelationMutate } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + onDelete: RelationMutate.Cascade, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-row.md b/examples/2.3.x/console-web/examples/tablesdb/update-row.md new file mode 100644 index 000000000..116fb2221 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-rows.md b/examples/2.3.x/console-web/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..32c0156c5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-rows.md @@ -0,0 +1,25 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-string-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..817ca449d --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-string-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-table.md b/examples/2.3.x/console-web/examples/tablesdb/update-table.md new file mode 100644 index 000000000..7d382d43c --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-table.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB, Permission, Role } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', // optional + permissions: [Permission.read(Role.any())], // optional + rowSecurity: false, // optional + enabled: false, // optional + purge: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-text-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..ac46a9622 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-text-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateTextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-transaction.md b/examples/2.3.x/console-web/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..01ccbd157 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateTransaction({ + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-url-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..14fbf3df9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-url-column.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'https://example.com', + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/console-web/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..ec04fb45b --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,21 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.updateVarcharColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/update.md b/examples/2.3.x/console-web/examples/tablesdb/update.md new file mode 100644 index 000000000..55a7959ed --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/update.md @@ -0,0 +1,20 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tablesdb/upsert-row.md b/examples/2.3.x/console-web/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..2e58b52ef --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/upsert-row.md @@ -0,0 +1,26 @@ +```javascript +import { Client, TablesDB, Permission, Role } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.upsertRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..005f7b4ee --- /dev/null +++ b/examples/2.3.x/console-web/examples/tablesdb/upsert-rows.md @@ -0,0 +1,18 @@ +```javascript +import { Client, TablesDB } 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 tablesDB = new TablesDB(client); + +const result = await tablesDB.upsertRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/create-installation.md b/examples/2.3.x/console-web/examples/teams/create-installation.md new file mode 100644 index 000000000..9be460a8e --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createInstallation({ + teamId: '<TEAM_ID>', + appId: '<APP_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..35581d303 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/create-membership.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.createMembership({ + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/create.md b/examples/2.3.x/console-web/examples/teams/create.md new file mode 100644 index 000000000..996943241 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/create.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.create({ + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/delete-installation.md b/examples/2.3.x/console-web/examples/teams/delete-installation.md new file mode 100644 index 000000000..f6990ed98 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/delete-membership.md b/examples/2.3.x/console-web/examples/teams/delete-membership.md new file mode 100644 index 000000000..d8a647e48 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.deleteMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/delete.md b/examples/2.3.x/console-web/examples/teams/delete.md new file mode 100644 index 000000000..ac4f95b79 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.delete({ + teamId: '<TEAM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/get-installation.md b/examples/2.3.x/console-web/examples/teams/get-installation.md new file mode 100644 index 000000000..572baa69c --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getInstallation({ + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/get-membership.md b/examples/2.3.x/console-web/examples/teams/get-membership.md new file mode 100644 index 000000000..4dce19442 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.getMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/get-prefs.md b/examples/2.3.x/console-web/examples/teams/get-prefs.md new file mode 100644 index 000000000..63ec4faa5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/get-prefs.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.getPrefs({ + teamId: '<TEAM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/get.md b/examples/2.3.x/console-web/examples/teams/get.md new file mode 100644 index 000000000..2afd1ab53 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.get({ + teamId: '<TEAM_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/list-installations.md b/examples/2.3.x/console-web/examples/teams/list-installations.md new file mode 100644 index 000000000..8085d4661 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listInstallations({ + teamId: '<TEAM_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/list-memberships.md b/examples/2.3.x/console-web/examples/teams/list-memberships.md new file mode 100644 index 000000000..5ea918173 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/list-memberships.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.listMemberships({ + teamId: '<TEAM_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/list.md b/examples/2.3.x/console-web/examples/teams/list.md new file mode 100644 index 000000000..15db3ca68 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/update-installation.md b/examples/2.3.x/console-web/examples/teams/update-installation.md new file mode 100644 index 000000000..cd762da26 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateInstallation({ + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/update-membership-status.md b/examples/2.3.x/console-web/examples/teams/update-membership-status.md new file mode 100644 index 000000000..7ac6b1058 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/update-membership-status.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.updateMembershipStatus({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>', +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..6ed365834 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/update-membership.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.updateMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/update-name.md b/examples/2.3.x/console-web/examples/teams/update-name.md new file mode 100644 index 000000000..1b11e6e82 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/update-name.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.updateName({ + teamId: '<TEAM_ID>', + name: '<NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/teams/update-prefs.md b/examples/2.3.x/console-web/examples/teams/update-prefs.md new file mode 100644 index 000000000..e0cdfa493 --- /dev/null +++ b/examples/2.3.x/console-web/examples/teams/update-prefs.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } 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 teams = new Teams(client); + +const result = await teams.updatePrefs({ + teamId: '<TEAM_ID>', + prefs: {}, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tokens/create-file-token.md b/examples/2.3.x/console-web/examples/tokens/create-file-token.md new file mode 100644 index 000000000..cd4d162cf --- /dev/null +++ b/examples/2.3.x/console-web/examples/tokens/create-file-token.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Tokens } 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 tokens = new Tokens(client); + +const result = await tokens.createFileToken({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tokens/delete.md b/examples/2.3.x/console-web/examples/tokens/delete.md new file mode 100644 index 000000000..f16e909dd --- /dev/null +++ b/examples/2.3.x/console-web/examples/tokens/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Tokens } 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 tokens = new Tokens(client); + +const result = await tokens.delete({ + tokenId: '<TOKEN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tokens/get.md b/examples/2.3.x/console-web/examples/tokens/get.md new file mode 100644 index 000000000..e60827508 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tokens/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Tokens } 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 tokens = new Tokens(client); + +const result = await tokens.get({ + tokenId: '<TOKEN_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tokens/list.md b/examples/2.3.x/console-web/examples/tokens/list.md new file mode 100644 index 000000000..2a1b164c6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/tokens/list.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Tokens } 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 tokens = new Tokens(client); + +const result = await tokens.list({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/tokens/update.md b/examples/2.3.x/console-web/examples/tokens/update.md new file mode 100644 index 000000000..28513f2cf --- /dev/null +++ b/examples/2.3.x/console-web/examples/tokens/update.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Tokens } 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 tokens = new Tokens(client); + +const result = await tokens.update({ + tokenId: '<TOKEN_ID>', + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); + +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 new file mode 100644 index 000000000..30b8d9755 --- /dev/null +++ b/examples/2.3.x/console-web/examples/usage/list-events.md @@ -0,0 +1,32 @@ +```javascript +import { + Client, + Usage, + UsageEventMetric, + UsageInterval, + UsageEventDimension, + UsageOrderBy, + UsageOrderDirection, +} 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 usage = new Usage(client); + +const result = await usage.listEvents({ + metrics: [UsageEventMetric.NetworkRequests], + queries: [], // optional + interval: UsageInterval.OneMinute, // optional + dimensions: [UsageEventDimension.Path], // optional + startAt: '2020-10-15T06:38:00.000+00:00', // optional + endAt: '2020-10-15T06:38:00.000+00:00', // optional + orderBy: UsageOrderBy.Time, // optional + orderDir: UsageOrderDirection.Asc, // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..745ecf945 --- /dev/null +++ b/examples/2.3.x/console-web/examples/usage/list-gauges.md @@ -0,0 +1,33 @@ +```javascript +import { + Client, + Usage, + UsageGaugeMetric, + UsageInterval, + UsageGaugeDimension, + UsageOrderBy, + UsageOrderDirection, +} 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 usage = new Usage(client); + +const result = await usage.listGauges({ + metrics: [UsageGaugeMetric.Teams], + queries: [], // optional + interval: UsageInterval.OneMinute, // optional + dimensions: [UsageGaugeDimension.ResourceId], // optional + startAt: '2020-10-15T06:38:00.000+00:00', // optional + endAt: '2020-10-15T06:38:00.000+00:00', // optional + orderBy: UsageOrderBy.Time, // optional + orderDir: UsageOrderDirection.Asc, // optional + limit: 1, // optional + offset: 0, // optional + aggregate: 'last', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-argon-2-user.md b/examples/2.3.x/console-web/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..ba77aabdd --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-argon-2-user.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createArgon2User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-bcrypt-user.md b/examples/2.3.x/console-web/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..482eca33d --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-bcrypt-user.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createBcryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-jwt.md b/examples/2.3.x/console-web/examples/users/create-jwt.md new file mode 100644 index 000000000..922e2091f --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-jwt.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createJWT({ + userId: '<USER_ID>', + sessionId: 'recent()', // optional + duration: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-md-5-user.md b/examples/2.3.x/console-web/examples/users/create-md-5-user.md new file mode 100644 index 000000000..b9f6c9f76 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-md-5-user.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createMD5User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/console-web/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..a95a1f56c --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createMFARecoveryCodes({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-ph-pass-user.md b/examples/2.3.x/console-web/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..9a5ed8078 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-ph-pass-user.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createPHPassUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/console-web/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..97102a19d --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createScryptModifiedUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-scrypt-user.md b/examples/2.3.x/console-web/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..e03431891 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-scrypt-user.md @@ -0,0 +1,23 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createScryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: 8, + passwordMemory: 65536, + passwordParallel: 1, + passwordLength: 64, + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-session.md b/examples/2.3.x/console-web/examples/users/create-session.md new file mode 100644 index 000000000..8a7e864fc --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-session.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createSession({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-sha-user.md b/examples/2.3.x/console-web/examples/users/create-sha-user.md new file mode 100644 index 000000000..3a69e7710 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-sha-user.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Users, PasswordHash } 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 users = new Users(client); + +const result = await users.createSHAUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash.Sha1, // optional + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-target.md b/examples/2.3.x/console-web/examples/users/create-target.md new file mode 100644 index 000000000..f6e985f99 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-target.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Users, MessagingProviderType } 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 users = new Users(client); + +const result = await users.createTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType.Email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create-token.md b/examples/2.3.x/console-web/examples/users/create-token.md new file mode 100644 index 000000000..56e5fae74 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create-token.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.createToken({ + userId: '<USER_ID>', + length: 4, // optional + expire: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/create.md b/examples/2.3.x/console-web/examples/users/create.md new file mode 100644 index 000000000..71db07aa7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/create.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.create({ + userId: '<USER_ID>', + email: 'email@example.com', // optional + phone: '+12065550100', // optional + password: 'password', // optional + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/delete-identity.md b/examples/2.3.x/console-web/examples/users/delete-identity.md new file mode 100644 index 000000000..193e0e3a6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/delete-identity.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.deleteIdentity({ + identityId: '<IDENTITY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/console-web/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..520abf656 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users, AuthenticatorType } 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 users = new Users(client); + +const result = await users.deleteMFAAuthenticator({ + userId: '<USER_ID>', + type: AuthenticatorType.Totp, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/delete-session.md b/examples/2.3.x/console-web/examples/users/delete-session.md new file mode 100644 index 000000000..193f6717a --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/delete-session.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.deleteSession({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/delete-sessions.md b/examples/2.3.x/console-web/examples/users/delete-sessions.md new file mode 100644 index 000000000..7d5812988 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/delete-sessions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.deleteSessions({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/delete-target.md b/examples/2.3.x/console-web/examples/users/delete-target.md new file mode 100644 index 000000000..639815a5d --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/delete-target.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.deleteTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/delete.md b/examples/2.3.x/console-web/examples/users/delete.md new file mode 100644 index 000000000..4cfdc4fa9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.delete({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/get-mfa-challenge.md b/examples/2.3.x/console-web/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..e31e1cecb --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/get-mfa-challenge.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.getMFAChallenge({ + userId: '<USER_ID>', + challengeId: '<CHALLENGE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/console-web/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..800fa2edd --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.getMFARecoveryCodes({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/get-prefs.md b/examples/2.3.x/console-web/examples/users/get-prefs.md new file mode 100644 index 000000000..6ad354974 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/get-prefs.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.getPrefs({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/get-target.md b/examples/2.3.x/console-web/examples/users/get-target.md new file mode 100644 index 000000000..17cd872cd --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/get-target.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.getTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/get-usage.md b/examples/2.3.x/console-web/examples/users/get-usage.md new file mode 100644 index 000000000..04ecef8a8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/get-usage.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users, UsageRange } 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 users = new Users(client); + +const result = await users.getUsage({ + range: UsageRange.Value24h, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/get.md b/examples/2.3.x/console-web/examples/users/get.md new file mode 100644 index 000000000..3da557d49 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.get({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/list-identities.md b/examples/2.3.x/console-web/examples/users/list-identities.md new file mode 100644 index 000000000..bfd63ef43 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/list-identities.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.listIdentities({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/list-memberships.md b/examples/2.3.x/console-web/examples/users/list-memberships.md new file mode 100644 index 000000000..a3dfd8283 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/list-memberships.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.listMemberships({ + userId: '<USER_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/list-mfa-factors.md b/examples/2.3.x/console-web/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..61c2b60b7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/list-mfa-factors.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.listMFAFactors({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/list-sessions.md b/examples/2.3.x/console-web/examples/users/list-sessions.md new file mode 100644 index 000000000..934efef26 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/list-sessions.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.listSessions({ + userId: '<USER_ID>', + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/list-targets.md b/examples/2.3.x/console-web/examples/users/list-targets.md new file mode 100644 index 000000000..b3f09b9f4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/list-targets.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.listTargets({ + userId: '<USER_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/list.md b/examples/2.3.x/console-web/examples/users/list.md new file mode 100644 index 000000000..40f351e00 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/list.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-email-verification.md b/examples/2.3.x/console-web/examples/users/update-email-verification.md new file mode 100644 index 000000000..0131972f4 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-email-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateEmailVerification({ + userId: '<USER_ID>', + emailVerification: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-email.md b/examples/2.3.x/console-web/examples/users/update-email.md new file mode 100644 index 000000000..2f3fffed6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-email.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateEmail({ + userId: '<USER_ID>', + email: 'email@example.com', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-impersonator.md b/examples/2.3.x/console-web/examples/users/update-impersonator.md new file mode 100644 index 000000000..819a857ed --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-impersonator.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateImpersonator({ + userId: '<USER_ID>', + impersonator: false, +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..bf287f366 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-labels.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateLabels({ + userId: '<USER_ID>', + labels: [], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/console-web/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..ed7a57061 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateMFARecoveryCodes({ + userId: '<USER_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-mfa.md b/examples/2.3.x/console-web/examples/users/update-mfa.md new file mode 100644 index 000000000..5152ce26d --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-mfa.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateMFA({ + userId: '<USER_ID>', + mfa: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-name.md b/examples/2.3.x/console-web/examples/users/update-name.md new file mode 100644 index 000000000..1d7680e69 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-name.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateName({ + userId: '<USER_ID>', + name: '<NAME>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-password.md b/examples/2.3.x/console-web/examples/users/update-password.md new file mode 100644 index 000000000..ff58b1dad --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-password.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updatePassword({ + userId: '<USER_ID>', + password: 'password', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-phone-verification.md b/examples/2.3.x/console-web/examples/users/update-phone-verification.md new file mode 100644 index 000000000..d30161f9d --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-phone-verification.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updatePhoneVerification({ + userId: '<USER_ID>', + phoneVerification: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-phone.md b/examples/2.3.x/console-web/examples/users/update-phone.md new file mode 100644 index 000000000..a3c5868ae --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-phone.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updatePhone({ + userId: '<USER_ID>', + number: '+12065550100', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-prefs.md b/examples/2.3.x/console-web/examples/users/update-prefs.md new file mode 100644 index 000000000..b306d59a1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-prefs.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updatePrefs({ + userId: '<USER_ID>', + prefs: {}, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-status.md b/examples/2.3.x/console-web/examples/users/update-status.md new file mode 100644 index 000000000..fc95c6bba --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-status.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateStatus({ + userId: '<USER_ID>', + status: false, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/users/update-target.md b/examples/2.3.x/console-web/examples/users/update-target.md new file mode 100644 index 000000000..50c9257bb --- /dev/null +++ b/examples/2.3.x/console-web/examples/users/update-target.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Users } 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 users = new Users(client); + +const result = await users.updateTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // optional + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vcs/create-repository-detection.md b/examples/2.3.x/console-web/examples/vcs/create-repository-detection.md new file mode 100644 index 000000000..99df3235c --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/create-repository-detection.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Vcs, VCSDetectionType } 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 vcs = new Vcs(client); + +const result = await vcs.createRepositoryDetection({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + type: VCSDetectionType.Runtime, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vcs/create-repository.md b/examples/2.3.x/console-web/examples/vcs/create-repository.md new file mode 100644 index 000000000..9598870ca --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/create-repository.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.createRepository({ + installationId: '<INSTALLATION_ID>', + name: '<NAME>', + xprivate: false, + providerNamespace: '<PROVIDER_NAMESPACE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vcs/delete-installation.md b/examples/2.3.x/console-web/examples/vcs/delete-installation.md new file mode 100644 index 000000000..73d4db526 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.deleteInstallation({ + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vcs/get-installation.md b/examples/2.3.x/console-web/examples/vcs/get-installation.md new file mode 100644 index 000000000..35c17ccb7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/get-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.getInstallation({ + installationId: '<INSTALLATION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vcs/get-repository-contents.md b/examples/2.3.x/console-web/examples/vcs/get-repository-contents.md new file mode 100644 index 000000000..87caa4075 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/get-repository-contents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.getRepositoryContents({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerReference: '<PROVIDER_REFERENCE>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vcs/get-repository.md b/examples/2.3.x/console-web/examples/vcs/get-repository.md new file mode 100644 index 000000000..805fca4ff --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/get-repository.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.getRepository({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vcs/list-installations.md b/examples/2.3.x/console-web/examples/vcs/list-installations.md new file mode 100644 index 000000000..56f7fc4d9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.listInstallations({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +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 new file mode 100644 index 000000000..a66ffdd03 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/list-namespaces.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.listNamespaces({ + installationId: '<INSTALLATION_ID>', + search: '<SEARCH>', // optional + queries: [], // 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 new file mode 100644 index 000000000..1661cd8c5 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/list-repositories.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Vcs, VCSDetectionType } 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 vcs = new Vcs(client); + +const result = await vcs.listRepositories({ + installationId: '<INSTALLATION_ID>', + type: VCSDetectionType.Runtime, + search: '<SEARCH>', // optional + queries: [], // 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 new file mode 100644 index 000000000..2efd905b2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/list-repository-branches.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.listRepositoryBranches({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + search: '<SEARCH>', // optional + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vcs/update-external-deployments.md b/examples/2.3.x/console-web/examples/vcs/update-external-deployments.md new file mode 100644 index 000000000..3975bc7f3 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vcs/update-external-deployments.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Vcs } 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 vcs = new Vcs(client); + +const result = await vcs.updateExternalDeployments({ + installationId: '<INSTALLATION_ID>', + repositoryId: '<REPOSITORY_ID>', + providerPullRequestId: '<PROVIDER_PULL_REQUEST_ID>', +}); + +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 new file mode 100644 index 000000000..b69be570a --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-collection.md @@ -0,0 +1,21 @@ +```javascript +import { Client, VectorsDB, Permission, Role } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create-document.md b/examples/2.3.x/console-web/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..5995f070f --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-document.md @@ -0,0 +1,25 @@ +```javascript +import { Client, VectorsDB, Permission, Role } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + key: 'value', + }, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..6bda5bf18 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create-failover.md b/examples/2.3.x/console-web/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..42c704616 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-failover.md @@ -0,0 +1,16 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..1f8b422dc --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-index.md @@ -0,0 +1,26 @@ +```javascript +import { + Client, + VectorsDB, + VectorsDBIndexType, + OrderBy, +} 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: VectorsDBIndexType.HnswEuclidean, + attributes: [], + orders: [OrderBy.Asc], // optional + lengths: [], // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..fc90ed8bd --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createOperations({ + transactionId: '<TRANSACTION_ID>', + operations: [ + { + action: 'create', + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create-query.md b/examples/2.3.x/console-web/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..5900362b2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createQuery({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create-transaction.md b/examples/2.3.x/console-web/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..713840a8b --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create.md b/examples/2.3.x/console-web/examples/vectorsdb/create.md new file mode 100644 index 000000000..1bc26e0c0 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/create.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/delete-collection.md b/examples/2.3.x/console-web/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..9e0d2bf86 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/delete-collection.md @@ -0,0 +1,16 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/delete-document.md b/examples/2.3.x/console-web/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..b7d5b7a77 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..e699485bd --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/delete-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/delete-index.md b/examples/2.3.x/console-web/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..b88a5dc20 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/delete-index.md @@ -0,0 +1,17 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/console-web/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..8e936d1a2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteTransaction({ + transactionId: '<TRANSACTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/delete.md b/examples/2.3.x/console-web/examples/vectorsdb/delete.md new file mode 100644 index 000000000..34ce8b6da --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.delete({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/get-collection.md b/examples/2.3.x/console-web/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..3d0eb6a95 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/get-collection.md @@ -0,0 +1,16 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/get-document.md b/examples/2.3.x/console-web/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..0b16fca1f --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/get-index.md b/examples/2.3.x/console-web/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..6a1ace933 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/get-index.md @@ -0,0 +1,17 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/get-replicas.md b/examples/2.3.x/console-web/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..976d6f512 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/get-replicas.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getReplicas({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/get-status.md b/examples/2.3.x/console-web/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..0976b3ab1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/get-status.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getStatus({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/get-transaction.md b/examples/2.3.x/console-web/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..cd9e1e58c --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getTransaction({ + transactionId: '<TRANSACTION_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/get.md b/examples/2.3.x/console-web/examples/vectorsdb/get.md new file mode 100644 index 000000000..e82e8f5dc --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.get({ + databaseId: '<DATABASE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/list-collections.md b/examples/2.3.x/console-web/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..10b68b111 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/list-collections.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listCollections({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/list-documents.md b/examples/2.3.x/console-web/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..acdfdc88b --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/list-indexes.md b/examples/2.3.x/console-web/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..dfc577c05 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/list-indexes.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/list-operations.md b/examples/2.3.x/console-web/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..3fef1f3f1 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/list-operations.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/list-specifications.md b/examples/2.3.x/console-web/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..3197cf3c2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/list-specifications.md @@ -0,0 +1,13 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listSpecifications(); + +console.log(result); +``` 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 new file mode 100644 index 000000000..02da76869 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/list.md b/examples/2.3.x/console-web/examples/vectorsdb/list.md new file mode 100644 index 000000000..c51ee26ba --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.list({ + 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 new file mode 100644 index 000000000..491024410 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/update-collection.md @@ -0,0 +1,21 @@ +```javascript +import { Client, VectorsDB, Permission, Role } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, // optional + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/update-document.md b/examples/2.3.x/console-web/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..f571d8341 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB, Permission, Role } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/update-documents.md b/examples/2.3.x/console-web/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..e24463827 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/update-documents.md @@ -0,0 +1,19 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/update-transaction.md b/examples/2.3.x/console-web/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..cec0535df --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateTransaction({ + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/update.md b/examples/2.3.x/console-web/examples/vectorsdb/update.md new file mode 100644 index 000000000..ee930ec74 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/update.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/vectorsdb/upsert-document.md b/examples/2.3.x/console-web/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..9d42d0d7d --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB, Permission, Role } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.upsertDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` 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 new file mode 100644 index 000000000..af58d1d43 --- /dev/null +++ b/examples/2.3.x/console-web/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } 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 vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/create-bypass-rule.md b/examples/2.3.x/console-web/examples/waf/create-bypass-rule.md new file mode 100644 index 000000000..9c494768e --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/create-bypass-rule.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.createBypassRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', + name: '<NAME>', + resourceId: '<RESOURCE_ID>', // optional + description: '<DESCRIPTION>', // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/create-challenge-rule.md b/examples/2.3.x/console-web/examples/waf/create-challenge-rule.md new file mode 100644 index 000000000..5b1689f8b --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/create-challenge-rule.md @@ -0,0 +1,25 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.createChallengeRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', + name: '<NAME>', + resourceId: '<RESOURCE_ID>', // optional + description: '<DESCRIPTION>', // optional + challengeType: 'compute', // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional + difficulty: 1, // optional + ttl: 900, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/create-deny-rule.md b/examples/2.3.x/console-web/examples/waf/create-deny-rule.md new file mode 100644 index 000000000..87bfdbec2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/create-deny-rule.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.createDenyRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', + name: '<NAME>', + resourceId: '<RESOURCE_ID>', // optional + description: '<DESCRIPTION>', // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/create-rate-limit-rule.md b/examples/2.3.x/console-web/examples/waf/create-rate-limit-rule.md new file mode 100644 index 000000000..bb1d683fe --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/create-rate-limit-rule.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.createRateLimitRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', + name: '<NAME>', + limit: 1, + interval: 1, + resourceId: '<RESOURCE_ID>', // optional + description: '<DESCRIPTION>', // optional + key: 'ip', // optional + strategy: 'fixedWindow', // optional + maxBucketSize: 1, // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/create-redirect-rule.md b/examples/2.3.x/console-web/examples/waf/create-redirect-rule.md new file mode 100644 index 000000000..37d9ed8fa --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/create-redirect-rule.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.createRedirectRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', + name: '<NAME>', + location: '<LOCATION>', + statusCode: 300, + resourceId: '<RESOURCE_ID>', // optional + description: '<DESCRIPTION>', // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/delete-rule.md b/examples/2.3.x/console-web/examples/waf/delete-rule.md new file mode 100644 index 000000000..9b7cceecb --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/delete-rule.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.deleteRule({ + ruleId: '<RULE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/get-rule.md b/examples/2.3.x/console-web/examples/waf/get-rule.md new file mode 100644 index 000000000..e9515d071 --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/get-rule.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.getRule({ + ruleId: '<RULE_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/list-rules.md b/examples/2.3.x/console-web/examples/waf/list-rules.md new file mode 100644 index 000000000..7b90f8fad --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/list-rules.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.listRules({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/update-bypass-rule.md b/examples/2.3.x/console-web/examples/waf/update-bypass-rule.md new file mode 100644 index 000000000..d0987aa21 --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/update-bypass-rule.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.updateBypassRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', // optional + resourceId: '<RESOURCE_ID>', // optional + name: '<NAME>', // optional + description: '<DESCRIPTION>', // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/update-challenge-rule.md b/examples/2.3.x/console-web/examples/waf/update-challenge-rule.md new file mode 100644 index 000000000..210200fc9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/update-challenge-rule.md @@ -0,0 +1,25 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.updateChallengeRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', // optional + resourceId: '<RESOURCE_ID>', // optional + name: '<NAME>', // optional + description: '<DESCRIPTION>', // optional + challengeType: 'compute', // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional + difficulty: 1, // optional + ttl: 900, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/update-deny-rule.md b/examples/2.3.x/console-web/examples/waf/update-deny-rule.md new file mode 100644 index 000000000..a46d56805 --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/update-deny-rule.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.updateDenyRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', // optional + resourceId: '<RESOURCE_ID>', // optional + name: '<NAME>', // optional + description: '<DESCRIPTION>', // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/update-rate-limit-rule.md b/examples/2.3.x/console-web/examples/waf/update-rate-limit-rule.md new file mode 100644 index 000000000..24dfd9347 --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/update-rate-limit-rule.md @@ -0,0 +1,26 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.updateRateLimitRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', // optional + resourceId: '<RESOURCE_ID>', // optional + name: '<NAME>', // optional + description: '<DESCRIPTION>', // optional + limit: 1, // optional + interval: 1, // optional + key: 'ip', // optional + maxBucketSize: 1, // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/waf/update-redirect-rule.md b/examples/2.3.x/console-web/examples/waf/update-redirect-rule.md new file mode 100644 index 000000000..00e5c3efa --- /dev/null +++ b/examples/2.3.x/console-web/examples/waf/update-redirect-rule.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Waf } 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 waf = new Waf(client); + +const result = await waf.updateRedirectRule({ + ruleId: '<RULE_ID>', + resourceType: 'api', // optional + resourceId: '<RESOURCE_ID>', // optional + name: '<NAME>', // optional + description: '<DESCRIPTION>', // optional + location: '<LOCATION>', // optional + statusCode: 300, // optional + priority: -100000, // optional + enabled: false, // optional + conditions: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/webhooks/create.md b/examples/2.3.x/console-web/examples/webhooks/create.md new file mode 100644 index 000000000..f5817fbe6 --- /dev/null +++ b/examples/2.3.x/console-web/examples/webhooks/create.md @@ -0,0 +1,23 @@ +```javascript +import { Client, Webhooks } 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 webhooks = new Webhooks(client); + +const result = await webhooks.create({ + webhookId: '<WEBHOOK_ID>', + url: 'https://example.com/webhook', + name: '<NAME>', + events: [], + enabled: false, // optional + tls: false, // optional + authUsername: '<AUTH_USERNAME>', // optional + authPassword: 'password', // optional + secret: '<SECRET>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/webhooks/delete.md b/examples/2.3.x/console-web/examples/webhooks/delete.md new file mode 100644 index 000000000..e4fbd3d79 --- /dev/null +++ b/examples/2.3.x/console-web/examples/webhooks/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Webhooks } 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 webhooks = new Webhooks(client); + +const result = await webhooks.delete({ + webhookId: '<WEBHOOK_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/webhooks/get.md b/examples/2.3.x/console-web/examples/webhooks/get.md new file mode 100644 index 000000000..d7e40e528 --- /dev/null +++ b/examples/2.3.x/console-web/examples/webhooks/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Webhooks } 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 webhooks = new Webhooks(client); + +const result = await webhooks.get({ + webhookId: '<WEBHOOK_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/webhooks/list.md b/examples/2.3.x/console-web/examples/webhooks/list.md new file mode 100644 index 000000000..6d4381cd9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/webhooks/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Webhooks } 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 webhooks = new Webhooks(client); + +const result = await webhooks.list({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/webhooks/update-secret.md b/examples/2.3.x/console-web/examples/webhooks/update-secret.md new file mode 100644 index 000000000..bb7492ade --- /dev/null +++ b/examples/2.3.x/console-web/examples/webhooks/update-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Webhooks } 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 webhooks = new Webhooks(client); + +const result = await webhooks.updateSecret({ + webhookId: '<WEBHOOK_ID>', + secret: '<SECRET>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/webhooks/update.md b/examples/2.3.x/console-web/examples/webhooks/update.md new file mode 100644 index 000000000..78071ef4c --- /dev/null +++ b/examples/2.3.x/console-web/examples/webhooks/update.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Webhooks } 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 webhooks = new Webhooks(client); + +const result = await webhooks.update({ + webhookId: '<WEBHOOK_ID>', + name: '<NAME>', + url: 'https://example.com/webhook', + events: [], + enabled: false, // optional + tls: false, // optional + authUsername: '<AUTH_USERNAME>', // optional + authPassword: 'password', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-anonymous-session.md b/examples/2.3.x/server-dart/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..542c0d644 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-anonymous-session.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 + +Account account = Account(client); + +Session result = await account.createAnonymousSession(); +``` 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 new file mode 100644 index 000000000..bac35a125 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-email-password-session.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Session result = await account.createEmailPasswordSession( + email: 'email@example.com', + password: 'password', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-email-token.md b/examples/2.3.x/server-dart/examples/account/create-email-token.md new file mode 100644 index 000000000..dfcfc76c8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-email-token.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createEmailToken( + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-dart/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..a6ae8087a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-email-verification-otp.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createEmailVerificationOTP( + phrase: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-email-verification.md b/examples/2.3.x/server-dart/examples/account/create-email-verification.md new file mode 100644 index 000000000..0db846c12 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-email-verification.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createEmailVerification( + url: 'https://example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-id-token-session.md b/examples/2.3.x/server-dart/examples/account/create-id-token-session.md new file mode 100644 index 000000000..e93714451 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-id-token-session.md @@ -0,0 +1,20 @@ +```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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.createIdTokenSession( + provider: enums.IdTokenProvider.apple, + idToken: '<ID_TOKEN>', + nonce: '<NONCE>', // (optional) + accessToken: '<ACCESS_TOKEN>', // (optional) + accessTokenExpiry: 0, // (optional) + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-magic-url-token.md b/examples/2.3.x/server-dart/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..4b4f703e8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-magic-url-token.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createMagicURLToken( + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // (optional) + phrase: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-dart/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..98a10171c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +```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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaType result = await account.createMFAAuthenticator( + type: enums.AuthenticatorType.totp, +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-dart/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..36d2f8981 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-mfa-challenge.md @@ -0,0 +1,15 @@ +```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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaChallenge result = await account.createMFAChallenge( + factor: enums.AuthenticationFactor.email, +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-dart/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..1fc2ec3b1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-mfa-recovery-codes.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 + +Account account = Account(client); + +MfaRecoveryCodes result = await account.createMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-dart/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..de299d60b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-o-auth-2-token.md @@ -0,0 +1,18 @@ +```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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.createOAuth2Token( + provider: enums.OAuthProvider.amazon, + success: 'https://example.com', // (optional) + failure: 'https://example.com', // (optional) + scopes: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-phone-token.md b/examples/2.3.x/server-dart/examples/account/create-phone-token.md new file mode 100644 index 000000000..86a2ed36b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-phone-token.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Token result = await account.createPhoneToken( + userId: '<USER_ID>', + phone: '+12065550100', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-phone-verification.md b/examples/2.3.x/server-dart/examples/account/create-phone-verification.md new file mode 100644 index 000000000..400e47ec4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-phone-verification.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 + +Account account = Account(client); + +Token result = await account.createPhoneVerification(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-recovery-otp.md b/examples/2.3.x/server-dart/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..9c264300e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-recovery-otp.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Token result = await account.createRecoveryOTP( + email: 'email@example.com', + phrase: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-recovery.md b/examples/2.3.x/server-dart/examples/account/create-recovery.md new file mode 100644 index 000000000..a71d691f5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Token result = await account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-session.md b/examples/2.3.x/server-dart/examples/account/create-session.md new file mode 100644 index 000000000..5e6f733d5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-session.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Session result = await account.createSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create-verification.md b/examples/2.3.x/server-dart/examples/account/create-verification.md new file mode 100644 index 000000000..c12b0dd2d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create-verification.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createVerification( + url: 'https://example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/create.md b/examples/2.3.x/server-dart/examples/account/create.md new file mode 100644 index 000000000..59b961161 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/create.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.create( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/delete-consent-token.md b/examples/2.3.x/server-dart/examples/account/delete-consent-token.md new file mode 100644 index 000000000..9f407fcf7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/delete-consent-token.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +await account.deleteConsentToken( + consentId: '<CONSENT_ID>', + tokenId: '<TOKEN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/delete-consent.md b/examples/2.3.x/server-dart/examples/account/delete-consent.md new file mode 100644 index 000000000..ad1d2399c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/delete-consent.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteConsent( + consentId: '<CONSENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/delete-identity.md b/examples/2.3.x/server-dart/examples/account/delete-identity.md new file mode 100644 index 000000000..e05b30fa5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/delete-identity.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteIdentity( + identityId: '<IDENTITY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-dart/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..06b60ece9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +```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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteMFAAuthenticator( + type: enums.AuthenticatorType.totp, +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/delete-session.md b/examples/2.3.x/server-dart/examples/account/delete-session.md new file mode 100644 index 000000000..2961f1a48 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/delete-session.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteSession( + sessionId: '<SESSION_ID>', +); +``` 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 new file mode 100644 index 000000000..2b7f5b819 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/delete-sessions.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 + +Account account = Account(client); + +await account.deleteSessions(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/get-consent-token.md b/examples/2.3.x/server-dart/examples/account/get-consent-token.md new file mode 100644 index 000000000..d742f14e2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/get-consent-token.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Oauth2ConsentToken result = await account.getConsentToken( + consentId: '<CONSENT_ID>', + tokenId: '<TOKEN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/get-consent.md b/examples/2.3.x/server-dart/examples/account/get-consent.md new file mode 100644 index 000000000..91e7b7afe --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/get-consent.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Oauth2Consent result = await account.getConsent( + consentId: '<CONSENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-dart/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..7b6c314ae --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/get-mfa-recovery-codes.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 + +Account account = Account(client); + +MfaRecoveryCodes result = await account.getMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/get-prefs.md b/examples/2.3.x/server-dart/examples/account/get-prefs.md new file mode 100644 index 000000000..667f2c040 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/get-prefs.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 + +Account account = Account(client); + +Preferences result = await account.getPrefs(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/get-session.md b/examples/2.3.x/server-dart/examples/account/get-session.md new file mode 100644 index 000000000..36429bf74 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/get-session.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.getSession( + sessionId: '<SESSION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/get.md b/examples/2.3.x/server-dart/examples/account/get.md new file mode 100644 index 000000000..fb5633f4b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/get.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 + +Account account = Account(client); + +User result = await account.get(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/list-consent-tokens.md b/examples/2.3.x/server-dart/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..579d03a5d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/list-consent-tokens.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Oauth2ConsentTokenList result = await account.listConsentTokens( + consentId: '<CONSENT_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/list-consents.md b/examples/2.3.x/server-dart/examples/account/list-consents.md new file mode 100644 index 000000000..f2a97b9d6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/list-consents.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Oauth2ConsentList result = await account.listConsents( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/list-identities.md b/examples/2.3.x/server-dart/examples/account/list-identities.md new file mode 100644 index 000000000..9db450bbe --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/list-identities.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +IdentityList result = await account.listIdentities( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/list-mfa-factors.md b/examples/2.3.x/server-dart/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..80f366802 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/list-mfa-factors.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 + +Account account = Account(client); + +MfaFactors result = await account.listMFAFactors(); +``` 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 new file mode 100644 index 000000000..53c0d220b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/list-sessions.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 + +Account account = Account(client); + +SessionList result = await account.listSessions(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-dart/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..080225ecc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-email-verification-otp.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Token result = await account.updateEmailVerificationOTP( + userId: '<USER_ID>', + secret: '<SECRET>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-email-verification.md b/examples/2.3.x/server-dart/examples/account/update-email-verification.md new file mode 100644 index 000000000..4f41ac059 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-email-verification.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Token result = await account.updateEmailVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-email.md b/examples/2.3.x/server-dart/examples/account/update-email.md new file mode 100644 index 000000000..b6c7c5924 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-email.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +User result = await account.updateEmail( + email: 'email@example.com', + password: 'password', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-magic-url-session.md b/examples/2.3.x/server-dart/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..bed558eab --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-magic-url-session.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Session result = await account.updateMagicURLSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-dart/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..d898bc2d3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateMFAAuthenticator( + type: enums.AuthenticatorType.totp, + otp: '<OTP>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-dart/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..928a7ad8f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Session result = await account.updateMFAChallenge( + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-dart/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..b1abcd858 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-mfa-recovery-codes.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 + +Account account = Account(client); + +MfaRecoveryCodes result = await account.updateMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-mfa.md b/examples/2.3.x/server-dart/examples/account/update-mfa.md new file mode 100644 index 000000000..744a5da5d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-mfa.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateMFA( + mfa: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-name.md b/examples/2.3.x/server-dart/examples/account/update-name.md new file mode 100644 index 000000000..402210076 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-name.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateName( + name: '<NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-password.md b/examples/2.3.x/server-dart/examples/account/update-password.md new file mode 100644 index 000000000..e903f1a1b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-password.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +User result = await account.updatePassword( + password: 'password', + oldPassword: 'password', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-phone-session.md b/examples/2.3.x/server-dart/examples/account/update-phone-session.md new file mode 100644 index 000000000..d99d8b6d3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-phone-session.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Session result = await account.updatePhoneSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-phone-verification.md b/examples/2.3.x/server-dart/examples/account/update-phone-verification.md new file mode 100644 index 000000000..909b228ef --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Token result = await account.updatePhoneVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-phone.md b/examples/2.3.x/server-dart/examples/account/update-phone.md new file mode 100644 index 000000000..7bf501690 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-phone.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +User result = await account.updatePhone( + phone: '+12065550100', + password: 'password', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-prefs.md b/examples/2.3.x/server-dart/examples/account/update-prefs.md new file mode 100644 index 000000000..fe0076a27 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-prefs.md @@ -0,0 +1,18 @@ +```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 + +Account account = Account(client); + +User result = await account.updatePrefs( + prefs: { + "language": "en", + "timezone": "UTC", + "darkTheme": true + }, +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-recovery-otp.md b/examples/2.3.x/server-dart/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..33800ff25 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-recovery-otp.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updateRecoveryOTP( + userId: '<USER_ID>', + secret: '<SECRET>', + password: 'password', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-recovery.md b/examples/2.3.x/server-dart/examples/account/update-recovery.md new file mode 100644 index 000000000..fd69c45fa --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-recovery.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updateRecovery( + userId: '<USER_ID>', + secret: '<SECRET>', + password: 'password', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-session.md b/examples/2.3.x/server-dart/examples/account/update-session.md new file mode 100644 index 000000000..12ad41b51 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-session.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 + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.updateSession( + sessionId: '<SESSION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-status.md b/examples/2.3.x/server-dart/examples/account/update-status.md new file mode 100644 index 000000000..0841e5e25 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-status.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 + +Account account = Account(client); + +User result = await account.updateStatus(); +``` diff --git a/examples/2.3.x/server-dart/examples/account/update-verification.md b/examples/2.3.x/server-dart/examples/account/update-verification.md new file mode 100644 index 000000000..e45bfd3cf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/account/update-verification.md @@ -0,0 +1,15 @@ +```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 + +Account account = Account(client); + +Token result = await account.updateVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/activities/get-event.md b/examples/2.3.x/server-dart/examples/activities/get-event.md new file mode 100644 index 000000000..6d90a0371 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/activities/get-event.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 + +Activities activities = Activities(client); + +ActivityEvent result = await activities.getEvent( + eventId: '<EVENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/activities/list-events.md b/examples/2.3.x/server-dart/examples/activities/list-events.md new file mode 100644 index 000000000..43a90dbef --- /dev/null +++ b/examples/2.3.x/server-dart/examples/activities/list-events.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 + +Activities activities = Activities(client); + +ActivityEventList result = await activities.listEvents( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/advisor/delete-report.md b/examples/2.3.x/server-dart/examples/advisor/delete-report.md new file mode 100644 index 000000000..d490e8209 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/advisor/delete-report.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 + +Advisor advisor = Advisor(client); + +await advisor.deleteReport( + reportId: '<REPORT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/advisor/get-insight.md b/examples/2.3.x/server-dart/examples/advisor/get-insight.md new file mode 100644 index 000000000..1920eb8e2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/advisor/get-insight.md @@ -0,0 +1,15 @@ +```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 + +Advisor advisor = Advisor(client); + +Insight result = await advisor.getInsight( + reportId: '<REPORT_ID>', + insightId: '<INSIGHT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/advisor/get-report.md b/examples/2.3.x/server-dart/examples/advisor/get-report.md new file mode 100644 index 000000000..4266ff05c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/advisor/get-report.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 + +Advisor advisor = Advisor(client); + +Report result = await advisor.getReport( + reportId: '<REPORT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/advisor/list-insights.md b/examples/2.3.x/server-dart/examples/advisor/list-insights.md new file mode 100644 index 000000000..16d874f77 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/advisor/list-insights.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 + +Advisor advisor = Advisor(client); + +InsightList result = await advisor.listInsights( + reportId: '<REPORT_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/advisor/list-reports.md b/examples/2.3.x/server-dart/examples/advisor/list-reports.md new file mode 100644 index 000000000..292c014b1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/advisor/list-reports.md @@ -0,0 +1,15 @@ +```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 + +Advisor advisor = Advisor(client); + +ReportList result = await advisor.listReports( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/create-installation-token.md b/examples/2.3.x/server-dart/examples/apps/create-installation-token.md new file mode 100644 index 000000000..3de5f329c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/create-installation-token.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +Oauth2Token result = await apps.createInstallationToken( + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/create-key.md b/examples/2.3.x/server-dart/examples/apps/create-key.md new file mode 100644 index 000000000..ad3bb955b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/create-key.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppKey result = await apps.createKey( + appId: '<APP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/create-secret.md b/examples/2.3.x/server-dart/examples/apps/create-secret.md new file mode 100644 index 000000000..a3dae9237 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/create-secret.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppSecretPlaintext result = await apps.createSecret( + appId: '<APP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/create.md b/examples/2.3.x/server-dart/examples/apps/create.md new file mode 100644 index 000000000..6662a4f86 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/create.md @@ -0,0 +1,32 @@ +```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 + +Apps apps = Apps(client); + +App result = await apps.create( + appId: '<APP_ID>', + name: '<NAME>', + redirectUris: [], + description: '<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: '<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: '<TEAM_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/delete-installation.md b/examples/2.3.x/server-dart/examples/apps/delete-installation.md new file mode 100644 index 000000000..38cc4b6d6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/delete-installation.md @@ -0,0 +1,15 @@ +```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 + +Apps apps = Apps(client); + +await apps.deleteInstallation( + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/delete-key.md b/examples/2.3.x/server-dart/examples/apps/delete-key.md new file mode 100644 index 000000000..2e7d21931 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/delete-key.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +await apps.deleteKey( + appId: '<APP_ID>', + keyId: '<KEY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/delete-secret.md b/examples/2.3.x/server-dart/examples/apps/delete-secret.md new file mode 100644 index 000000000..e3813ebf8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/delete-secret.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +await apps.deleteSecret( + appId: '<APP_ID>', + secretId: '<SECRET_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/delete-tokens.md b/examples/2.3.x/server-dart/examples/apps/delete-tokens.md new file mode 100644 index 000000000..179abbf9d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/delete-tokens.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +await apps.deleteTokens( + appId: '<APP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/delete.md b/examples/2.3.x/server-dart/examples/apps/delete.md new file mode 100644 index 000000000..1bf573fb1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/delete.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 + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +await apps.delete( + appId: '<APP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/get-installation.md b/examples/2.3.x/server-dart/examples/apps/get-installation.md new file mode 100644 index 000000000..7f9fbd5c1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/get-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppInstallation result = await apps.getInstallation( + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/get-key.md b/examples/2.3.x/server-dart/examples/apps/get-key.md new file mode 100644 index 000000000..a5f27858d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/get-key.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppKey result = await apps.getKey( + appId: '<APP_ID>', + keyId: '<KEY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/get-secret.md b/examples/2.3.x/server-dart/examples/apps/get-secret.md new file mode 100644 index 000000000..4cd85a01f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/get-secret.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppSecret result = await apps.getSecret( + appId: '<APP_ID>', + secretId: '<SECRET_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/get.md b/examples/2.3.x/server-dart/examples/apps/get.md new file mode 100644 index 000000000..f5e79b85c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/get.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 + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +App result = await apps.get( + appId: '<APP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-dart/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..c2d17afcf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/list-installation-scopes.md @@ -0,0 +1,12 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppScopeList result = await apps.listInstallationScopes(); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/list-installations.md b/examples/2.3.x/server-dart/examples/apps/list-installations.md new file mode 100644 index 000000000..fd2cbdaaf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/list-installations.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppInstallationList result = await apps.listInstallations( + appId: '<APP_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/list-keys.md b/examples/2.3.x/server-dart/examples/apps/list-keys.md new file mode 100644 index 000000000..18fda51a5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/list-keys.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppKeyList result = await apps.listKeys( + appId: '<APP_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-dart/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..d50e8dccb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,12 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppScopeList result = await apps.listOAuth2Scopes(); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/list-secrets.md b/examples/2.3.x/server-dart/examples/apps/list-secrets.md new file mode 100644 index 000000000..47c5439c6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/list-secrets.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppSecretList result = await apps.listSecrets( + appId: '<APP_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/list.md b/examples/2.3.x/server-dart/examples/apps/list.md new file mode 100644 index 000000000..9915fa0c9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/list.md @@ -0,0 +1,15 @@ +```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 + +Apps apps = Apps(client); + +AppsList result = await apps.list( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/update-labels.md b/examples/2.3.x/server-dart/examples/apps/update-labels.md new file mode 100644 index 000000000..ad7964915 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/update-labels.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Apps apps = Apps(client); + +App result = await apps.updateLabels( + appId: '<APP_ID>', + labels: [], +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/update-team.md b/examples/2.3.x/server-dart/examples/apps/update-team.md new file mode 100644 index 000000000..a777349a4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/update-team.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +App result = await apps.updateTeam( + appId: '<APP_ID>', + teamId: '<TEAM_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/apps/update.md b/examples/2.3.x/server-dart/examples/apps/update.md new file mode 100644 index 000000000..ac04a4dd9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/apps/update.md @@ -0,0 +1,33 @@ +```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 + +Apps apps = Apps(client); + +App result = await apps.update( + appId: '<APP_ID>', + name: '<NAME>', + description: '<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: '<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/server-dart/examples/avatars/get-browser.md b/examples/2.3.x/server-dart/examples/avatars/get-browser.md new file mode 100644 index 000000000..b4626789b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +```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 + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Uint8List result = await avatars.getBrowser( + code: enums.Browser.avantBrowser, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/get-credit-card.md b/examples/2.3.x/server-dart/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..b5eb4f427 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +```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 + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Uint8List result = await avatars.getCreditCard( + code: enums.CreditCard.americanExpress, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/get-favicon.md b/examples/2.3.x/server-dart/examples/avatars/get-favicon.md new file mode 100644 index 000000000..1bfa9b721 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-favicon.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 + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Uint8List result = await avatars.getFavicon( + url: 'https://example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/get-flag.md b/examples/2.3.x/server-dart/examples/avatars/get-flag.md new file mode 100644 index 000000000..920ccc5d8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +```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 + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Uint8List result = await avatars.getFlag( + code: enums.Flag.afghanistan, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/get-image.md b/examples/2.3.x/server-dart/examples/avatars/get-image.md new file mode 100644 index 000000000..c4c347102 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-image.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 + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Uint8List result = await avatars.getImage( + url: 'https://example.com', + width: 0, // (optional) + height: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/get-initials.md b/examples/2.3.x/server-dart/examples/avatars/get-initials.md new file mode 100644 index 000000000..27323c5c9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-initials.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 + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Uint8List result = await avatars.getInitials( + name: '<NAME>', // (optional) + width: 0, // (optional) + height: 0, // (optional) + background: 'FFFFFF', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/get-photo.md b/examples/2.3.x/server-dart/examples/avatars/get-photo.md new file mode 100644 index 000000000..9914fedcf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-photo.md @@ -0,0 +1,21 @@ +```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); + +Uint8List result = await avatars.getPhoto( + width: 0, // (optional) + height: 0, // (optional) + quality: 0, // (optional) + output: 'png', // (optional) + rating: 'g', // (optional) + userId: 'current()', // (optional) + emailHash: '<EMAIL_HASH>', // (optional) + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/get-qr.md b/examples/2.3.x/server-dart/examples/avatars/get-qr.md new file mode 100644 index 000000000..9c470360e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-qr.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 + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Uint8List result = await avatars.getQR( + text: '<TEXT>', + size: 1, // (optional) + margin: 0, // (optional) + download: false, // (optional) +); +``` 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 new file mode 100644 index 000000000..b2c005e37 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/get-screenshot.md @@ -0,0 +1,37 @@ +```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 + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Uint8List result = await avatars.getScreenshot( + url: 'https://example.com', + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // (optional) + viewportWidth: 1920, // (optional) + viewportHeight: 1080, // (optional) + scale: 2, // (optional) + theme: enums.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) + locale: 'en-US', // (optional) + timezone: enums.Timezone.africaAbidjan, // (optional) + latitude: 37.7749, // (optional) + longitude: -122.4194, // (optional) + accuracy: 100, // (optional) + touch: true, // (optional) + permissions: [enums.BrowserPermission.geolocation, enums.BrowserPermission.notifications], // (optional) + sleep: 3, // (optional) + width: 800, // (optional) + height: 600, // (optional) + quality: 85, // (optional) + output: enums.ImageFormat.jpeg, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/create-archive.md b/examples/2.3.x/server-dart/examples/backups/create-archive.md new file mode 100644 index 000000000..f6856c119 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/create-archive.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Backups backups = Backups(client); + +BackupArchive result = await backups.createArchive( + services: [enums.BackupServices.databases], + resourceId: '<RESOURCE_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/create-policy.md b/examples/2.3.x/server-dart/examples/backups/create-policy.md new file mode 100644 index 000000000..0241dcf1d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/create-policy.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Backups backups = Backups(client); + +BackupPolicy result = await backups.createPolicy( + policyId: '<POLICY_ID>', + services: [enums.BackupServices.databases], + retention: 1, + schedule: '', + name: '<NAME>', // (optional) + resourceId: '<RESOURCE_ID>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/create-restoration.md b/examples/2.3.x/server-dart/examples/backups/create-restoration.md new file mode 100644 index 000000000..84bc8ae96 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/create-restoration.md @@ -0,0 +1,18 @@ +```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 + +Backups backups = Backups(client); + +BackupRestoration result = await backups.createRestoration( + archiveId: '<ARCHIVE_ID>', + services: [enums.BackupServices.databases], + newResourceId: '<NEW_RESOURCE_ID>', // (optional) + newResourceName: '<NEW_RESOURCE_NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/delete-archive.md b/examples/2.3.x/server-dart/examples/backups/delete-archive.md new file mode 100644 index 000000000..59e2bb786 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/delete-archive.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 + +Backups backups = Backups(client); + +await backups.deleteArchive( + archiveId: '<ARCHIVE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/delete-policy.md b/examples/2.3.x/server-dart/examples/backups/delete-policy.md new file mode 100644 index 000000000..a91e4c2a6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/delete-policy.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 + +Backups backups = Backups(client); + +await backups.deletePolicy( + policyId: '<POLICY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/get-archive.md b/examples/2.3.x/server-dart/examples/backups/get-archive.md new file mode 100644 index 000000000..16d714a48 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/get-archive.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 + +Backups backups = Backups(client); + +BackupArchive result = await backups.getArchive( + archiveId: '<ARCHIVE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/get-policy.md b/examples/2.3.x/server-dart/examples/backups/get-policy.md new file mode 100644 index 000000000..6a3d9606f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/get-policy.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 + +Backups backups = Backups(client); + +BackupPolicy result = await backups.getPolicy( + policyId: '<POLICY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/get-restoration.md b/examples/2.3.x/server-dart/examples/backups/get-restoration.md new file mode 100644 index 000000000..ef2a2a0b8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/get-restoration.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 + +Backups backups = Backups(client); + +BackupRestoration result = await backups.getRestoration( + restorationId: '<RESTORATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/list-archives.md b/examples/2.3.x/server-dart/examples/backups/list-archives.md new file mode 100644 index 000000000..57df2f169 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/list-archives.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 + +Backups backups = Backups(client); + +BackupArchiveList result = await backups.listArchives( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/list-policies.md b/examples/2.3.x/server-dart/examples/backups/list-policies.md new file mode 100644 index 000000000..00a04a893 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/list-policies.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 + +Backups backups = Backups(client); + +BackupPolicyList result = await backups.listPolicies( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/list-restorations.md b/examples/2.3.x/server-dart/examples/backups/list-restorations.md new file mode 100644 index 000000000..a4502a7bd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/list-restorations.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 + +Backups backups = Backups(client); + +BackupRestorationList result = await backups.listRestorations( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/backups/update-policy.md b/examples/2.3.x/server-dart/examples/backups/update-policy.md new file mode 100644 index 000000000..e46c84146 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/backups/update-policy.md @@ -0,0 +1,18 @@ +```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 + +Backups backups = Backups(client); + +BackupPolicy result = await backups.updatePolicy( + policyId: '<POLICY_ID>', + name: '<NAME>', // (optional) + retention: 1, // (optional) + schedule: '', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..2ef51ff23 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-big-int-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = Databases(client); + +AttributeBigint result = await databases.createBigIntAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + min: 0, // (optional) + max: 1000000, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..f997555db --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeBoolean result = await databases.createBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-collection.md b/examples/2.3.x/server-dart/examples/databases/create-collection.md new file mode 100644 index 000000000..f0c3aea51 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-collection.md @@ -0,0 +1,23 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) + attributes: [], // (optional) + indexes: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..88a1069b0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeDatetime result = await databases.createDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: '2020-10-15T06:38:00.000+00:00', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-document.md b/examples/2.3.x/server-dart/examples/databases/create-document.md new file mode 100644 index 000000000..f6dc0aaa6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-document.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` 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 new file mode 100644 index 000000000..dd0204676 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-documents.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 + +Databases databases = Databases(client); + +DocumentList result = await databases.createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-email-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..beac778d1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeEmail result = await databases.createEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..b690880f8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-enum-attribute.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 + +Databases databases = Databases(client); + +AttributeEnum result = await databases.createEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + xrequired: false, + xdefault: 'active', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-float-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..5cce5c6ed --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = Databases(client); + +AttributeFloat result = await databases.createFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + min: 0, // (optional) + max: 100, // (optional) + xdefault: 10.5, // (optional) + array: false, // (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 new file mode 100644 index 000000000..b1bfb5724 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-index.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Index result = await databases.createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: enums.DatabasesIndexType.key, + attributes: [], + orders: [enums.OrderBy.asc], // (optional) + lengths: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..333f82809 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = Databases(client); + +AttributeInteger result = await databases.createIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + min: 0, // (optional) + max: 100, // (optional) + xdefault: 10, // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..c9334bc39 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeIp result = await databases.createIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: '192.0.2.0', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-line-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..aca28abd3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-line-attribute.md @@ -0,0 +1,18 @@ +```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 + +Databases databases = Databases(client); + +AttributeLine result = await databases.createLineAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [[1, 2], [3, 4], [5, 6]], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..fae172d8a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-longtext-attribute.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 + +Databases databases = Databases(client); + +AttributeLongtext result = await databases.createLongtextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..a93a23c1c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-mediumtext-attribute.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 + +Databases databases = Databases(client); + +AttributeMediumtext result = await databases.createMediumtextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-operations.md b/examples/2.3.x/server-dart/examples/databases/create-operations.md new file mode 100644 index 000000000..d44b4e839 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-operations.md @@ -0,0 +1,25 @@ +```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 + +Databases databases = Databases(client); + +Transaction result = await databases.createOperations( + transactionId: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-point-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..6d320c48c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-point-attribute.md @@ -0,0 +1,18 @@ +```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 + +Databases databases = Databases(client); + +AttributePoint result = await databases.createPointAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [1, 2], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..62923f950 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-polygon-attribute.md @@ -0,0 +1,18 @@ +```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 + +Databases databases = Databases(client); + +AttributePolygon result = await databases.createPolygonAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..2cb68d98f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-relationship-attribute.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 + +Databases databases = Databases(client); + +AttributeRelationship result = await databases.createRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: enums.RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '<KEY>', // (optional) + twoWayKey: '<TWO_WAY_KEY>', // (optional) + onDelete: enums.RelationMutate.cascade, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-string-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..d6b24de09 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = Databases(client); + +AttributeString result = await databases.createStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-text-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..0a53ffb1a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-text-attribute.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 + +Databases databases = Databases(client); + +AttributeText result = await databases.createTextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-transaction.md b/examples/2.3.x/server-dart/examples/databases/create-transaction.md new file mode 100644 index 000000000..5ab1c8ae1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-transaction.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 + +Databases databases = Databases(client); + +Transaction result = await databases.createTransaction( + ttl: 60, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-url-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..cffdb5361 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeUrl result = await databases.createUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-dart/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..c0dc22595 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create-varchar-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = Databases(client); + +AttributeVarchar result = await databases.createVarcharAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create.md b/examples/2.3.x/server-dart/examples/databases/create.md new file mode 100644 index 000000000..3abe57d10 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/create.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 + +Databases databases = Databases(client); + +Database result = await databases.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-dart/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..2f99b28ad --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/decrement-document-attribute.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 + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.decrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // (optional) + min: 0, // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/delete-attribute.md b/examples/2.3.x/server-dart/examples/databases/delete-attribute.md new file mode 100644 index 000000000..ef14704a3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/delete-attribute.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 + +Databases databases = Databases(client); + +await databases.deleteAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/delete-collection.md b/examples/2.3.x/server-dart/examples/databases/delete-collection.md new file mode 100644 index 000000000..76a0289e1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +```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 + +Databases databases = Databases(client); + +await databases.deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/delete-document.md b/examples/2.3.x/server-dart/examples/databases/delete-document.md new file mode 100644 index 000000000..659e09e74 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/delete-document.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 + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +await databases.deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..6a8bd5a87 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/delete-documents.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 + +Databases databases = Databases(client); + +await databases.deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/delete-index.md b/examples/2.3.x/server-dart/examples/databases/delete-index.md new file mode 100644 index 000000000..f13e1a44c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/delete-index.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 + +Databases databases = Databases(client); + +await databases.deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/delete-transaction.md b/examples/2.3.x/server-dart/examples/databases/delete-transaction.md new file mode 100644 index 000000000..1a00f8166 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/delete-transaction.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 + +Databases databases = Databases(client); + +await databases.deleteTransaction( + transactionId: '<TRANSACTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/delete.md b/examples/2.3.x/server-dart/examples/databases/delete.md new file mode 100644 index 000000000..eabebed6f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/delete.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 + +Databases databases = Databases(client); + +await databases.delete( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/get-attribute.md b/examples/2.3.x/server-dart/examples/databases/get-attribute.md new file mode 100644 index 000000000..97ddcff19 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/get-attribute.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 + +Databases databases = Databases(client); + +dynamic result = await databases.getAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/get-collection.md b/examples/2.3.x/server-dart/examples/databases/get-collection.md new file mode 100644 index 000000000..0e19f4e04 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/get-collection.md @@ -0,0 +1,15 @@ +```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 + +Databases databases = Databases(client); + +Collection result = await databases.getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/get-document.md b/examples/2.3.x/server-dart/examples/databases/get-document.md new file mode 100644 index 000000000..75fbb943e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/get-document.md @@ -0,0 +1,18 @@ +```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 + +Databases databases = Databases(client); + +Document result = await databases.getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/get-index.md b/examples/2.3.x/server-dart/examples/databases/get-index.md new file mode 100644 index 000000000..b516dd88b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/get-index.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 + +Databases databases = Databases(client); + +Index result = await databases.getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/get-transaction.md b/examples/2.3.x/server-dart/examples/databases/get-transaction.md new file mode 100644 index 000000000..230f2ee61 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/get-transaction.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 + +Databases databases = Databases(client); + +Transaction result = await databases.getTransaction( + transactionId: '<TRANSACTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/get.md b/examples/2.3.x/server-dart/examples/databases/get.md new file mode 100644 index 000000000..e8b042b37 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/get.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 + +Databases databases = Databases(client); + +Database result = await databases.get( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-dart/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..7a7170237 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/increment-document-attribute.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 + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.incrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // (optional) + max: 100, // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/list-attributes.md b/examples/2.3.x/server-dart/examples/databases/list-attributes.md new file mode 100644 index 000000000..3d98457fe --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/list-attributes.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 + +Databases databases = Databases(client); + +AttributeList result = await databases.listAttributes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/list-collections.md b/examples/2.3.x/server-dart/examples/databases/list-collections.md new file mode 100644 index 000000000..6b983d6bb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/list-collections.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 + +Databases databases = Databases(client); + +CollectionList result = await databases.listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/list-documents.md b/examples/2.3.x/server-dart/examples/databases/list-documents.md new file mode 100644 index 000000000..5cb4a1231 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/list-documents.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +DocumentList result = await databases.listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/list-indexes.md b/examples/2.3.x/server-dart/examples/databases/list-indexes.md new file mode 100644 index 000000000..ccfa33582 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/list-indexes.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 + +Databases databases = Databases(client); + +IndexList result = await databases.listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + total: false, // (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 new file mode 100644 index 000000000..07a73e26d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/list-transactions.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 + +Databases databases = Databases(client); + +TransactionList result = await databases.listTransactions( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/list.md b/examples/2.3.x/server-dart/examples/databases/list.md new file mode 100644 index 000000000..3da131483 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/list.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 + +Databases databases = Databases(client); + +DatabaseList result = await databases.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..93a91d624 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-big-int-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = Databases(client); + +AttributeBigint result = await databases.updateBigIntAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 1000000, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..2d7ba021e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeBoolean result = await databases.updateBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: false, + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-collection.md b/examples/2.3.x/server-dart/examples/databases/update-collection.md new file mode 100644 index 000000000..b724e7b94 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-collection.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', // (optional) + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) + purge: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..3534c431f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeDatetime result = await databases.updateDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: '2020-10-15T06:38:00.000+00:00', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-document.md b/examples/2.3.x/server-dart/examples/databases/update-document.md new file mode 100644 index 000000000..ccfc6838c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-document.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-documents.md b/examples/2.3.x/server-dart/examples/databases/update-documents.md new file mode 100644 index 000000000..9ab88a699 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-documents.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = Databases(client); + +DocumentList result = await databases.updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, // (optional) + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-email-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..ba3944fd8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeEmail result = await databases.updateEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'email@example.com', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..0edf10715 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-enum-attribute.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 + +Databases databases = Databases(client); + +AttributeEnum result = await databases.updateEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + xrequired: false, + xdefault: 'active', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-float-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..f46c3f504 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = Databases(client); + +AttributeFloat result = await databases.updateFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 10.5, + min: 0, // (optional) + max: 100, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..5d5928aa8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = Databases(client); + +AttributeInteger result = await databases.updateIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 10, + min: 0, // (optional) + max: 100, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..d0f37ea5f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeIp result = await databases.updateIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: '192.0.2.0', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-line-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..2a8620930 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-line-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeLine result = await databases.updateLineAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [[1, 2], [3, 4], [5, 6]], // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..daf0707b4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-longtext-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeLongtext result = await databases.updateLongtextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..08bccb671 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeMediumtext result = await databases.updateMediumtextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-point-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..2eae40b81 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-point-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributePoint result = await databases.updatePointAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [1, 2], // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..a72ccd79f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-polygon-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributePolygon result = await databases.updatePolygonAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..e1ab8b3b9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeRelationship result = await databases.updateRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + onDelete: enums.RelationMutate.cascade, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-string-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..13530814a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-string-attribute.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 + +Databases databases = Databases(client); + +AttributeString result = await databases.updateStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + size: 1, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-text-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..bd74f458f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-text-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeText result = await databases.updateTextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-transaction.md b/examples/2.3.x/server-dart/examples/databases/update-transaction.md new file mode 100644 index 000000000..f43e7e5d7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-transaction.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 + +Databases databases = Databases(client); + +Transaction result = await databases.updateTransaction( + transactionId: '<TRANSACTION_ID>', + commit: false, // (optional) + rollback: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-url-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..d873907cf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +```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 + +Databases databases = Databases(client); + +AttributeUrl result = await databases.updateUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'https://example.com', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-dart/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..96d6775ec --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update-varchar-attribute.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 + +Databases databases = Databases(client); + +AttributeVarchar result = await databases.updateVarcharAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + size: 1, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/update.md b/examples/2.3.x/server-dart/examples/databases/update.md new file mode 100644 index 000000000..4c097968a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/update.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 + +Databases databases = Databases(client); + +Database result = await databases.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/upsert-document.md b/examples/2.3.x/server-dart/examples/databases/upsert-document.md new file mode 100644 index 000000000..46a70fda1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/upsert-document.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..95806e1ab --- /dev/null +++ b/examples/2.3.x/server-dart/examples/databases/upsert-documents.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 + +Databases databases = Databases(client); + +DocumentList result = await databases.upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/create-collection.md b/examples/2.3.x/server-dart/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..dd591620d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-collection.md @@ -0,0 +1,23 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Collection result = await documentsDB.createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) + attributes: [], // (optional) + indexes: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/create-document.md b/examples/2.3.x/server-dart/examples/documentsdb/create-document.md new file mode 100644 index 000000000..07d152ba1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-document.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + permissions: [Permission.read(Role.any())], // (optional) + 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 new file mode 100644 index 000000000..6a76e7e0b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-documents.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 + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/create-failover.md b/examples/2.3.x/server-dart/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..e6afb132f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-failover.md @@ -0,0 +1,15 @@ +```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 + +DocumentsDB documentsDB = DocumentsDB(client); + +DedicatedDatabase result = await documentsDB.createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_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 new file mode 100644 index 000000000..3cfaea320 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-index.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Index result = await documentsDB.createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: enums.DocumentsDBIndexType.key, + attributes: [], + orders: [enums.OrderBy.asc], // (optional) + lengths: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/create-operations.md b/examples/2.3.x/server-dart/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..e91cd1867 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.createOperations( + transactionId: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-dart/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..caf13b367 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.createTransaction( + ttl: 60, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/create.md b/examples/2.3.x/server-dart/examples/documentsdb/create.md new file mode 100644 index 000000000..6ef92e081 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/create.md @@ -0,0 +1,19 @@ +```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 + +DocumentsDB documentsDB = DocumentsDB(client); + +Database result = await documentsDB.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) + specification: 'serverless', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-dart/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..883644f1a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,20 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.decrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // (optional) + min: 0, // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-dart/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..ebf766acc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/delete-collection.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/delete-document.md b/examples/2.3.x/server-dart/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..f9fa3a37f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/delete-document.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..9218ccd6b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/delete-documents.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/delete-index.md b/examples/2.3.x/server-dart/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..6aa14c686 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/delete-index.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-dart/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..6639fb887 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteTransaction( + transactionId: '<TRANSACTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/delete.md b/examples/2.3.x/server-dart/examples/documentsdb/delete.md new file mode 100644 index 000000000..308c2a83d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/delete.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.delete( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/get-collection.md b/examples/2.3.x/server-dart/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..5b23bdb7e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/get-collection.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Collection result = await documentsDB.getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/get-document.md b/examples/2.3.x/server-dart/examples/documentsdb/get-document.md new file mode 100644 index 000000000..02b6a7a43 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/get-document.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/get-index.md b/examples/2.3.x/server-dart/examples/documentsdb/get-index.md new file mode 100644 index 000000000..bbb7891c6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/get-index.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Index result = await documentsDB.getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-dart/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..247f9d68c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/get-replicas.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +DedicatedDatabaseReplicas result = await documentsDB.getReplicas( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/get-status.md b/examples/2.3.x/server-dart/examples/documentsdb/get-status.md new file mode 100644 index 000000000..2058db8ef --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/get-status.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +DatabaseStatus result = await documentsDB.getStatus( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-dart/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..688128f20 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/get-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.getTransaction( + transactionId: '<TRANSACTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/get.md b/examples/2.3.x/server-dart/examples/documentsdb/get.md new file mode 100644 index 000000000..09bcb91f8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/get.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +Database result = await documentsDB.get( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-dart/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..e7b7d7ff2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,20 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.incrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // (optional) + max: 100, // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/list-collections.md b/examples/2.3.x/server-dart/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..45cef6362 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/list-collections.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +CollectionList result = await documentsDB.listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/list-documents.md b/examples/2.3.x/server-dart/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..5619c5cfd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/list-documents.md @@ -0,0 +1,19 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-dart/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..b7285af15 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/list-indexes.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +IndexList result = await documentsDB.listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/list-operations.md b/examples/2.3.x/server-dart/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..8d83bfff8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/list-operations.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 + +DocumentsDB documentsDB = DocumentsDB(client); + +DedicatedDatabaseOperationList result = await documentsDB.listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-dart/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..bb6863d1e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +DedicatedDatabaseSpecificationList result = await documentsDB.listSpecifications(); +``` 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 new file mode 100644 index 000000000..066ebfe5b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/list-transactions.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +TransactionList result = await documentsDB.listTransactions( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/list.md b/examples/2.3.x/server-dart/examples/documentsdb/list.md new file mode 100644 index 000000000..d5ef52374 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/list.md @@ -0,0 +1,15 @@ +```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 + +DocumentsDB documentsDB = DocumentsDB(client); + +DatabaseList result = await documentsDB.list( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/update-collection.md b/examples/2.3.x/server-dart/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..c90d2c4b9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/update-collection.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Collection result = await documentsDB.updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) + purge: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/update-document.md b/examples/2.3.x/server-dart/examples/documentsdb/update-document.md new file mode 100644 index 000000000..99746d741 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/update-document.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/update-documents.md b/examples/2.3.x/server-dart/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..5554e087b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/update-documents.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, // (optional) + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-dart/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..d5dcaeb58 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/update-transaction.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.updateTransaction( + transactionId: '<TRANSACTION_ID>', + commit: false, // (optional) + rollback: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/update.md b/examples/2.3.x/server-dart/examples/documentsdb/update.md new file mode 100644 index 000000000..f0ebb6715 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/update.md @@ -0,0 +1,19 @@ +```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 + +DocumentsDB documentsDB = DocumentsDB(client); + +Database result = await documentsDB.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) + specification: 'serverless', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-dart/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..71c5db06d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/upsert-document.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..bbf864900 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/documentsdb/upsert-documents.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-dart/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..230225c14 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-preset-google-workspace.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.createPresetGoogleWorkspace( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-dart/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..0cec6673c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-preset-i-cloud.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.createPresetICloud( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-dart/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..05b31f62b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-preset-mailgun.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.createPresetMailgun( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-dart/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..f43342925 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-preset-outlook.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.createPresetOutlook( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-dart/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..533c2830c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-preset-proton-mail.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.createPresetProtonMail( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-dart/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..8d675db4a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-preset-zoho.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.createPresetZoho( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-a.md b/examples/2.3.x/server-dart/examples/domains/create-record-a.md new file mode 100644 index 000000000..7aeae7dfd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-a.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordA( + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-dart/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..bf75a9431 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-aaaa.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordAAAA( + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-alias.md b/examples/2.3.x/server-dart/examples/domains/create-record-alias.md new file mode 100644 index 000000000..e011466d2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-alias.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordAlias( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-caa.md b/examples/2.3.x/server-dart/examples/domains/create-record-caa.md new file mode 100644 index 000000000..6e7bac223 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-caa.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordCAA( + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-cname.md b/examples/2.3.x/server-dart/examples/domains/create-record-cname.md new file mode 100644 index 000000000..3a91d431f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-cname.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordCNAME( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-https.md b/examples/2.3.x/server-dart/examples/domains/create-record-https.md new file mode 100644 index 000000000..76cb9b305 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-https.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordHTTPS( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-mx.md b/examples/2.3.x/server-dart/examples/domains/create-record-mx.md new file mode 100644 index 000000000..b9c9a326e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-mx.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordMX( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-ns.md b/examples/2.3.x/server-dart/examples/domains/create-record-ns.md new file mode 100644 index 000000000..8e9494884 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-ns.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordNS( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-srv.md b/examples/2.3.x/server-dart/examples/domains/create-record-srv.md new file mode 100644 index 000000000..f8614c932 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-srv.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordSRV( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create-record-txt.md b/examples/2.3.x/server-dart/examples/domains/create-record-txt.md new file mode 100644 index 000000000..a3c226a70 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create-record-txt.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.createRecordTXT( + domainId: '<DOMAIN_ID>', + name: '', + ttl: 1, + value: '<VALUE>', // (optional) + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/create.md b/examples/2.3.x/server-dart/examples/domains/create.md new file mode 100644 index 000000000..a2a796581 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/create.md @@ -0,0 +1,15 @@ +```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 + +Domains domains = Domains(client); + +Domain result = await domains.create( + teamId: '<TEAM_ID>', + domain: 'example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/delete-record.md b/examples/2.3.x/server-dart/examples/domains/delete-record.md new file mode 100644 index 000000000..42cd807e4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/delete-record.md @@ -0,0 +1,15 @@ +```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 + +Domains domains = Domains(client); + +await domains.deleteRecord( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/delete.md b/examples/2.3.x/server-dart/examples/domains/delete.md new file mode 100644 index 000000000..cb464a89f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/delete.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 + +Domains domains = Domains(client); + +await domains.delete( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-dart/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..da5fbfc65 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-preset-google-workspace.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.getPresetGoogleWorkspace( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-dart/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..cde72e721 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-preset-i-cloud.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.getPresetICloud( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-dart/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..f83f3a5cf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-preset-mailgun.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.getPresetMailgun( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-dart/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..ea8e4e8e2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-preset-outlook.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.getPresetOutlook( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-dart/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..6f3666fbf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-preset-proton-mail.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.getPresetProtonMail( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-dart/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..c099cd54e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-preset-zoho.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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.getPresetZoho( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-price.md b/examples/2.3.x/server-dart/examples/domains/get-price.md new file mode 100644 index 000000000..406117219 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-price.md @@ -0,0 +1,17 @@ +```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 + +Domains domains = Domains(client); + +DomainPrice result = await domains.getPrice( + domain: 'example.com', + periodYears: 0, // (optional) + registrationType: enums.DomainRegistrationType.new, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-record.md b/examples/2.3.x/server-dart/examples/domains/get-record.md new file mode 100644 index 000000000..b453f1745 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-record.md @@ -0,0 +1,15 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.getRecord( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-transfer-status.md b/examples/2.3.x/server-dart/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..a8d2440a6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-transfer-status.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 + +Domains domains = Domains(client); + +DomainTransferStatus result = await domains.getTransferStatus( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get-zone.md b/examples/2.3.x/server-dart/examples/domains/get-zone.md new file mode 100644 index 000000000..b40c767eb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get-zone.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 + +Domains domains = Domains(client); + + result = await domains.getZone( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/get.md b/examples/2.3.x/server-dart/examples/domains/get.md new file mode 100644 index 000000000..a2483ee89 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/get.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 + +Domains domains = Domains(client); + +Domain result = await domains.get( + domainId: '<DOMAIN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/list-prices.md b/examples/2.3.x/server-dart/examples/domains/list-prices.md new file mode 100644 index 000000000..4b996994b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/list-prices.md @@ -0,0 +1,17 @@ +```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 + +Domains domains = Domains(client); + +DomainPricesList result = await domains.listPrices( + domains: [], + periodYears: 0, // (optional) + registrationType: enums.DomainRegistrationType.new, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/list-records.md b/examples/2.3.x/server-dart/examples/domains/list-records.md new file mode 100644 index 000000000..a6afdf115 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/list-records.md @@ -0,0 +1,15 @@ +```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 + +Domains domains = Domains(client); + +DnsRecordsList result = await domains.listRecords( + domainId: '<DOMAIN_ID>', + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/list.md b/examples/2.3.x/server-dart/examples/domains/list.md new file mode 100644 index 000000000..fbdeeb8fc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/list.md @@ -0,0 +1,15 @@ +```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 + +Domains domains = Domains(client); + +DomainsList result = await domains.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-nameservers.md b/examples/2.3.x/server-dart/examples/domains/update-nameservers.md new file mode 100644 index 000000000..6b9982c43 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-nameservers.md @@ -0,0 +1,15 @@ +```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 + +Domains domains = Domains(client); + +Domain result = await domains.updateNameservers( + domainId: '<DOMAIN_ID>', + nameservers: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-a.md b/examples/2.3.x/server-dart/examples/domains/update-record-a.md new file mode 100644 index 000000000..d9472fda7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-a.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordA( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-dart/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..c700d0b1b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-aaaa.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordAAAA( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-alias.md b/examples/2.3.x/server-dart/examples/domains/update-record-alias.md new file mode 100644 index 000000000..cba8a9d6c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-alias.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordAlias( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-caa.md b/examples/2.3.x/server-dart/examples/domains/update-record-caa.md new file mode 100644 index 000000000..d89330ee2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-caa.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordCAA( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-cname.md b/examples/2.3.x/server-dart/examples/domains/update-record-cname.md new file mode 100644 index 000000000..14df1937a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-cname.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordCNAME( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-https.md b/examples/2.3.x/server-dart/examples/domains/update-record-https.md new file mode 100644 index 000000000..68277ea8f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-https.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordHTTPS( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-mx.md b/examples/2.3.x/server-dart/examples/domains/update-record-mx.md new file mode 100644 index 000000000..c3fdd3269 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-mx.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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordMX( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-ns.md b/examples/2.3.x/server-dart/examples/domains/update-record-ns.md new file mode 100644 index 000000000..841da4be6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-ns.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordNS( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-srv.md b/examples/2.3.x/server-dart/examples/domains/update-record-srv.md new file mode 100644 index 000000000..e870db5c5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-srv.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordSRV( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-record-txt.md b/examples/2.3.x/server-dart/examples/domains/update-record-txt.md new file mode 100644 index 000000000..1b2e0339f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-record-txt.md @@ -0,0 +1,19 @@ +```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 + +Domains domains = Domains(client); + +DnsRecord result = await domains.updateRecordTXT( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-team.md b/examples/2.3.x/server-dart/examples/domains/update-team.md new file mode 100644 index 000000000..c7390613d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-team.md @@ -0,0 +1,15 @@ +```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 + +Domains domains = Domains(client); + +Domain result = await domains.updateTeam( + domainId: '<DOMAIN_ID>', + teamId: '<TEAM_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/update-zone.md b/examples/2.3.x/server-dart/examples/domains/update-zone.md new file mode 100644 index 000000000..70ed5724b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/update-zone.md @@ -0,0 +1,15 @@ +```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 + +Domains domains = Domains(client); + +Domain result = await domains.updateZone( + domainId: '<DOMAIN_ID>', + content: '<CONTENT>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/domains/verify-nameservers.md b/examples/2.3.x/server-dart/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..7af3b2a55 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/domains/verify-nameservers.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 + +Domains domains = Domains(client); + +Domain result = await domains.verifyNameservers( + domainId: '<DOMAIN_ID>', +); +``` 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 new file mode 100644 index 000000000..b943468ad --- /dev/null +++ b/examples/2.3.x/server-dart/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Embeddings embeddings = Embeddings(client); + +EmbeddingList result = await embeddings.createTextEmbeddings( + texts: [], + model: enums.EmbeddingModel.nomicEmbedText, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/create-deployment.md b/examples/2.3.x/server-dart/examples/functions/create-deployment.md new file mode 100644 index 000000000..62ac7cca5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/create-deployment.md @@ -0,0 +1,19 @@ +```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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createDeployment( + functionId: '<FUNCTION_ID>', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-dart/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..14804895b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/create-duplicate-deployment.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 + +Functions functions = Functions(client); + +Deployment result = await functions.createDuplicateDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/create-execution.md b/examples/2.3.x/server-dart/examples/functions/create-execution.md new file mode 100644 index 000000000..2f6ac1c33 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +Execution result = await functions.createExecution( + functionId: '<FUNCTION_ID>', + body: '<BODY>', // (optional) + xasync: false, // (optional) + path: '<PATH>', // (optional) + method: enums.ExecutionMethod.gET, // (optional) + headers: {}, // (optional) + scheduledAt: '<SCHEDULED_AT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/create-template-deployment.md b/examples/2.3.x/server-dart/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..1b1f5d244 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/create-template-deployment.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createTemplateDeployment( + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + type: enums.TemplateReferenceType.commit, + reference: '<REFERENCE>', + activate: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/create-variable.md b/examples/2.3.x/server-dart/examples/functions/create-variable.md new file mode 100644 index 000000000..48d9ca801 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/create-variable.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = Functions(client); + +Variable result = await functions.createVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-dart/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..a241c80fe --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = Functions(client); + +Deployment result = await functions.createVcsDeployment( + functionId: '<FUNCTION_ID>', + type: enums.VCSReferenceType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/create.md b/examples/2.3.x/server-dart/examples/functions/create.md new file mode 100644 index 000000000..e4eddf0bd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/create.md @@ -0,0 +1,36 @@ +```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 + +Functions functions = Functions(client); + +Func result = await functions.create( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: enums.Runtime.node145, + execute: ["any"], // (optional) + events: [], // (optional) + schedule: '0 0 * * *', // (optional) + timeout: 1, // (optional) + enabled: false, // (optional) + logging: false, // (optional) + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) + scopes: [enums.ProjectKeyScopes.projectRead], // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + providerBranches: [], // (optional) + providerPaths: [], // (optional) + buildSpecification: 's-1vcpu-512mb', // (optional) + runtimeSpecification: 's-1vcpu-512mb', // (optional) + deploymentRetention: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/delete-deployment.md b/examples/2.3.x/server-dart/examples/functions/delete-deployment.md new file mode 100644 index 000000000..a4d629d19 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +```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 + +Functions functions = Functions(client); + +await functions.deleteDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/delete-execution.md b/examples/2.3.x/server-dart/examples/functions/delete-execution.md new file mode 100644 index 000000000..f5226dda0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +```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 + +Functions functions = Functions(client); + +await functions.deleteExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/delete-variable.md b/examples/2.3.x/server-dart/examples/functions/delete-variable.md new file mode 100644 index 000000000..ce2c26c12 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +```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 + +Functions functions = Functions(client); + +await functions.deleteVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/delete.md b/examples/2.3.x/server-dart/examples/functions/delete.md new file mode 100644 index 000000000..9d0465d0c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/delete.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 + +Functions functions = Functions(client); + +await functions.delete( + functionId: '<FUNCTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/get-deployment-download.md b/examples/2.3.x/server-dart/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..618f84b62 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/get-deployment-download.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = Functions(client); + +Uint8List result = await functions.getDeploymentDownload( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: enums.DeploymentDownloadType.source, // (optional) + token: '<TOKEN>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/get-deployment.md b/examples/2.3.x/server-dart/examples/functions/get-deployment.md new file mode 100644 index 000000000..8e3e2e28c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +```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 + +Functions functions = Functions(client); + +Deployment result = await functions.getDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/get-execution.md b/examples/2.3.x/server-dart/examples/functions/get-execution.md new file mode 100644 index 000000000..1f3654845 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +```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 + +Functions functions = Functions(client); + +Execution result = await functions.getExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/get-variable.md b/examples/2.3.x/server-dart/examples/functions/get-variable.md new file mode 100644 index 000000000..ab8179e0c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +```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 + +Functions functions = Functions(client); + +Variable result = await functions.getVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/get.md b/examples/2.3.x/server-dart/examples/functions/get.md new file mode 100644 index 000000000..caafad0ac --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/get.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 + +Functions functions = Functions(client); + +Func result = await functions.get( + functionId: '<FUNCTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/list-deployments.md b/examples/2.3.x/server-dart/examples/functions/list-deployments.md new file mode 100644 index 000000000..0cd7c71fb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/list-deployments.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 + +Functions functions = Functions(client); + +DeploymentList result = await functions.listDeployments( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/list-executions.md b/examples/2.3.x/server-dart/examples/functions/list-executions.md new file mode 100644 index 000000000..deb100be0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/list-executions.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 + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +ExecutionList result = await functions.listExecutions( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) + total: false, // (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 new file mode 100644 index 000000000..6325f4e4b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/list-runtimes.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +RuntimeList result = await functions.listRuntimes(); +``` 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 new file mode 100644 index 000000000..be35d601a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/list-specifications.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 + +Functions functions = Functions(client); + +SpecificationList result = await functions.listSpecifications( + type: 'runtimes', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/list-variables.md b/examples/2.3.x/server-dart/examples/functions/list-variables.md new file mode 100644 index 000000000..bd07b0000 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/list-variables.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 + +Functions functions = Functions(client); + +VariableList result = await functions.listVariables( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/list.md b/examples/2.3.x/server-dart/examples/functions/list.md new file mode 100644 index 000000000..5b5fb5711 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/list.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 + +Functions functions = Functions(client); + +FunctionList result = await functions.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/update-deployment-status.md b/examples/2.3.x/server-dart/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..7c8d0cb8e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +```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 + +Functions functions = Functions(client); + +Deployment result = await functions.updateDeploymentStatus( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/update-function-deployment.md b/examples/2.3.x/server-dart/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..2fd5848b8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +```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 + +Functions functions = Functions(client); + +Func result = await functions.updateFunctionDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/update-variable.md b/examples/2.3.x/server-dart/examples/functions/update-variable.md new file mode 100644 index 000000000..e933473f6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = Functions(client); + +Variable result = await functions.updateVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', // (optional) + value: '<VALUE>', // (optional) + secret: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/functions/update.md b/examples/2.3.x/server-dart/examples/functions/update.md new file mode 100644 index 000000000..90277742c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/functions/update.md @@ -0,0 +1,36 @@ +```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 + +Functions functions = Functions(client); + +Func result = await functions.update( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: enums.Runtime.node145, // (optional) + execute: ["any"], // (optional) + events: [], // (optional) + schedule: '0 0 * * *', // (optional) + timeout: 1, // (optional) + enabled: false, // (optional) + logging: false, // (optional) + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) + scopes: [enums.ProjectKeyScopes.projectRead], // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + providerBranches: [], // (optional) + providerPaths: [], // (optional) + buildSpecification: 's-1vcpu-512mb', // (optional) + runtimeSpecification: 's-1vcpu-512mb', // (optional) + deploymentRetention: 0, // (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 new file mode 100644 index 000000000..cd55d655e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/graphql/mutation.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 + +Graphql graphql = Graphql(client); + +Any result = await graphql.mutation( + query: {}, +); +``` diff --git a/examples/2.3.x/server-dart/examples/graphql/query.md b/examples/2.3.x/server-dart/examples/graphql/query.md new file mode 100644 index 000000000..7d6fa1841 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/graphql/query.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 + +Graphql graphql = Graphql(client); + +Any result = await graphql.query( + query: {}, +); +``` diff --git a/examples/2.3.x/server-dart/examples/locale/get.md b/examples/2.3.x/server-dart/examples/locale/get.md new file mode 100644 index 000000000..e8d5a6e5f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/locale/get.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 + +Locale locale = Locale(client); + +Locale result = await locale.get(); +``` 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 new file mode 100644 index 000000000..c8b2490d9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/locale/list-codes.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 + +Locale locale = Locale(client); + +LocaleCodeList result = await locale.listCodes(); +``` 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 new file mode 100644 index 000000000..5d96631bc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/locale/list-continents.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 + +Locale locale = Locale(client); + +ContinentList result = await locale.listContinents(); +``` 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 new file mode 100644 index 000000000..191be9496 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/locale/list-countries-eu.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 + +Locale locale = Locale(client); + +CountryList result = await locale.listCountriesEU(); +``` 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 new file mode 100644 index 000000000..00ec7810b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/locale/list-countries-phones.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 + +Locale locale = Locale(client); + +PhoneList result = await locale.listCountriesPhones(); +``` 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 new file mode 100644 index 000000000..62da933f8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/locale/list-countries.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 + +Locale locale = Locale(client); + +CountryList result = await locale.listCountries(); +``` 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 new file mode 100644 index 000000000..c10296305 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/locale/list-currencies.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 + +Locale locale = Locale(client); + +CurrencyList result = await locale.listCurrencies(); +``` 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 new file mode 100644 index 000000000..297128406 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/locale/list-languages.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 + +Locale locale = Locale(client); + +LanguageList result = await locale.listLanguages(); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..5ccf6f764 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createAPNSProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // (optional) + authKeyId: '<AUTH_KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + bundleId: '<BUNDLE_ID>', // (optional) + sandbox: false, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..a7036ff5a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,18 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createAppwriteProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, // (optional) + qos: 0, // (optional) + expiry: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-email.md b/examples/2.3.x/server-dart/examples/messaging/create-email.md new file mode 100644 index 000000000..d8bb495c9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-email.md @@ -0,0 +1,27 @@ +```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 + +Messaging messaging = Messaging(client); + +Message result = await messaging.createEmail( + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (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) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..93a224593 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-fcm-provider.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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createFCMProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..5661c2081 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + domain: 'example.com', // (optional) + isEuRegion: false, // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..b6b919f51 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // (optional) + senderId: '<SENDER_ID>', // (optional) + authKey: '<AUTH_KEY>', // (optional) + enabled: 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 new file mode 100644 index 000000000..0e28197ba --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-push.md @@ -0,0 +1,33 @@ +```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 + +Messaging messaging = Messaging(client); + +Message result = await messaging.createPush( + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + data: {}, // (optional) + action: '<ACTION>', // (optional) + image: '<ID1:ID2>', // (optional) + icon: '<ICON>', // (optional) + sound: '<SOUND>', // (optional) + color: '<COLOR>', // (optional) + tag: '<TAG>', // (optional) + badge: 1, // (optional) + draft: false, // (optional) + scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: enums.MessagePriority.normal, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..6ce3fb47f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-resend-provider.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createResendProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..376bf8ccb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..254166c12 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-ses-provider.md @@ -0,0 +1,23 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSesProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + accessKey: '<ACCESS_KEY>', // (optional) + secretKey: '<SECRET_KEY>', // (optional) + region: '<REGION>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-sms.md b/examples/2.3.x/server-dart/examples/messaging/create-sms.md new file mode 100644 index 000000000..01591f571 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-sms.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 + +Messaging messaging = Messaging(client); + +Message result = await messaging.createSMS( + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + draft: false, // (optional) + scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..60f6082af --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSMTPProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 587, // (optional) + username: '<USERNAME>', // (optional) + password: 'password', // (optional) + encryption: enums.SmtpEncryption.none, // (optional) + autoTLS: false, // (optional) + mailer: '<MAILER>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-subscriber.md b/examples/2.3.x/server-dart/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..cd9e9a43b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-subscriber.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 + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.createSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..0e86c2d83 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + customerId: '<CUSTOMER_ID>', // (optional) + apiKey: '<API_KEY>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..88086ee51 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + username: '<USERNAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-topic.md b/examples/2.3.x/server-dart/examples/messaging/create-topic.md new file mode 100644 index 000000000..6d8b62b36 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-topic.md @@ -0,0 +1,18 @@ +```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 + +Messaging messaging = Messaging(client); + +Topic result = await messaging.createTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"], // (optional) + qos: 0, // (optional) + expiry: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..bd046dcc2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '<FROM>', // (optional) + accountSid: '<ACCOUNT_SID>', // (optional) + authToken: '<AUTH_TOKEN>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-dart/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..cb372b787 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/delete-provider.md b/examples/2.3.x/server-dart/examples/messaging/delete-provider.md new file mode 100644 index 000000000..f59b3ddc5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/delete-provider.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 + +Messaging messaging = Messaging(client); + +await messaging.deleteProvider( + providerId: '<PROVIDER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-dart/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..870894a1c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +```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 + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Messaging messaging = Messaging(client); + +await messaging.deleteSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/delete-topic.md b/examples/2.3.x/server-dart/examples/messaging/delete-topic.md new file mode 100644 index 000000000..25afc8174 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/delete-topic.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 + +Messaging messaging = Messaging(client); + +await messaging.deleteTopic( + topicId: '<TOPIC_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/delete.md b/examples/2.3.x/server-dart/examples/messaging/delete.md new file mode 100644 index 000000000..757aa24ab --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/delete.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 + +Messaging messaging = Messaging(client); + +await messaging.delete( + messageId: '<MESSAGE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/get-message.md b/examples/2.3.x/server-dart/examples/messaging/get-message.md new file mode 100644 index 000000000..6030ab411 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/get-message.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 + +Messaging messaging = Messaging(client); + +Message result = await messaging.getMessage( + messageId: '<MESSAGE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/get-provider.md b/examples/2.3.x/server-dart/examples/messaging/get-provider.md new file mode 100644 index 000000000..b9978e124 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/get-provider.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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.getProvider( + providerId: '<PROVIDER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/get-subscriber.md b/examples/2.3.x/server-dart/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..4866ec406 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +```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 + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.getSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/get-topic.md b/examples/2.3.x/server-dart/examples/messaging/get-topic.md new file mode 100644 index 000000000..9bde98187 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/get-topic.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 + +Messaging messaging = Messaging(client); + +Topic result = await messaging.getTopic( + topicId: '<TOPIC_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/list-messages.md b/examples/2.3.x/server-dart/examples/messaging/list-messages.md new file mode 100644 index 000000000..cb43477f4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/list-messages.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 + +Messaging messaging = Messaging(client); + +MessageList result = await messaging.listMessages( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/list-providers.md b/examples/2.3.x/server-dart/examples/messaging/list-providers.md new file mode 100644 index 000000000..3fb8e6ffc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/list-providers.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 + +Messaging messaging = Messaging(client); + +ProviderList result = await messaging.listProviders( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/list-subscribers.md b/examples/2.3.x/server-dart/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..6a876a7c3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/list-subscribers.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 + +Messaging messaging = Messaging(client); + +SubscriberList result = await messaging.listSubscribers( + topicId: '<TOPIC_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/list-targets.md b/examples/2.3.x/server-dart/examples/messaging/list-targets.md new file mode 100644 index 000000000..6f0225e19 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/list-targets.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 + +Messaging messaging = Messaging(client); + +TargetList result = await messaging.listTargets( + messageId: '<MESSAGE_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/list-topics.md b/examples/2.3.x/server-dart/examples/messaging/list-topics.md new file mode 100644 index 000000000..7147c2d0d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/list-topics.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 + +Messaging messaging = Messaging(client); + +TopicList result = await messaging.listTopics( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..47e714d5c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateAPNSProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + authKey: '<AUTH_KEY>', // (optional) + authKeyId: '<AUTH_KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + bundleId: '<BUNDLE_ID>', // (optional) + sandbox: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..c9b8228f9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,18 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateAppwriteProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + qos: 0, // (optional) + expiry: 0, // (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 new file mode 100644 index 000000000..fec5affc8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-email.md @@ -0,0 +1,27 @@ +```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 + +Messaging messaging = Messaging(client); + +Message result = await messaging.updateEmail( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + subject: '<SUBJECT>', // (optional) + content: '<CONTENT>', // (optional) + draft: false, // (optional) + html: false, // (optional) + cc: [], // (optional) + bcc: [], // (optional) + replyToEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (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-fcm-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..522466176 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-fcm-provider.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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateFCMProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + serviceAccountJSON: {}, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..447f0898b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + domain: 'example.com', // (optional) + isEuRegion: false, // (optional) + enabled: false, // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..37a0a5673 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + templateId: '<TEMPLATE_ID>', // (optional) + senderId: '<SENDER_ID>', // (optional) + authKey: '<AUTH_KEY>', // (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 new file mode 100644 index 000000000..17b347e41 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-push.md @@ -0,0 +1,33 @@ +```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 + +Messaging messaging = Messaging(client); + +Message result = await messaging.updatePush( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) + data: {}, // (optional) + action: '<ACTION>', // (optional) + image: '<ID1:ID2>', // (optional) + icon: '<ICON>', // (optional) + sound: '<SOUND>', // (optional) + color: '<COLOR>', // (optional) + tag: '<TAG>', // (optional) + badge: 1, // (optional) + draft: false, // (optional) + scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: enums.MessagePriority.normal, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..6af01550d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-resend-provider.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateResendProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..3cfbe82b0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..a2e100752 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-ses-provider.md @@ -0,0 +1,23 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSesProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + accessKey: '<ACCESS_KEY>', // (optional) + secretKey: '<SECRET_KEY>', // (optional) + region: '<REGION>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (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 new file mode 100644 index 000000000..b8197294a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-sms.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 + +Messaging messaging = Messaging(client); + +Message result = await messaging.updateSMS( + messageId: '<MESSAGE_ID>', + 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/messaging/update-smtp-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..e88708cf0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSMTPProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + host: '<HOST>', // (optional) + port: 1, // (optional) + username: '<USERNAME>', // (optional) + password: 'password', // (optional) + encryption: enums.SmtpEncryption.none, // (optional) + autoTLS: false, // (optional) + mailer: '<MAILER>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..cc1759931 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + customerId: '<CUSTOMER_ID>', // (optional) + apiKey: '<API_KEY>', // (optional) + from: '<FROM>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..2eaff5353 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + username: '<USERNAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + from: '<FROM>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-topic.md b/examples/2.3.x/server-dart/examples/messaging/update-topic.md new file mode 100644 index 000000000..2c6bbc7ec --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-topic.md @@ -0,0 +1,18 @@ +```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 + +Messaging messaging = Messaging(client); + +Topic result = await messaging.updateTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', // (optional) + subscribe: ["any"], // (optional) + qos: 0, // (optional) + expiry: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..d177d8718 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + accountSid: '<ACCOUNT_SID>', // (optional) + authToken: '<AUTH_TOKEN>', // (optional) + from: '<FROM>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-dart/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..ca1228067 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +```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 + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (optional) + from: '<FROM>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-dart/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..0efcccd8c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/create-backup-policy.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 + +Mongo mongo = Mongo(client); + +BackupPolicy result = await mongo.createBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/create-backup.md b/examples/2.3.x/server-dart/examples/mongo/create-backup.md new file mode 100644 index 000000000..cb53c3b6e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/create-backup.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseBackup result = await mongo.createBackup( + databaseId: '<DATABASE_ID>', + type: 'full', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/create-branch.md b/examples/2.3.x/server-dart/examples/mongo/create-branch.md new file mode 100644 index 000000000..044e96ede --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/create-branch.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabase result = await mongo.createBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // (optional) + ttl: 300, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/create-failover.md b/examples/2.3.x/server-dart/examples/mongo/create-failover.md new file mode 100644 index 000000000..64e936e81 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/create-failover.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabase result = await mongo.createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/create-migration.md b/examples/2.3.x/server-dart/examples/mongo/create-migration.md new file mode 100644 index 000000000..ac759660f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/create-migration.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabase result = await mongo.createMigration( + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/create-restoration.md b/examples/2.3.x/server-dart/examples/mongo/create-restoration.md new file mode 100644 index 000000000..43da75566 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/create-restoration.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseRestoration result = await mongo.createRestoration( + databaseId: '<DATABASE_ID>', + type: 'backup', // (optional) + backupId: '<BACKUP_ID>', // (optional) + targetDatabaseId: '<TARGET_DATABASE_ID>', // (optional) + targetTime: '2020-10-15T06:38:00.000+00:00', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/create-upgrade.md b/examples/2.3.x/server-dart/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..8ef5f48e4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/create-upgrade.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabase result = await mongo.createUpgrade( + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/create.md b/examples/2.3.x/server-dart/examples/mongo/create.md new file mode 100644 index 000000000..621abdc59 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/create.md @@ -0,0 +1,27 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabase result = await mongo.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // (optional) + specification: '<SPECIFICATION>', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) + networkIdleTimeoutSeconds: 60, // (optional) + networkIPAllowlist: [], // (optional) + idleTimeoutMinutes: 5, // (optional) + pitr: false, // (optional) + pitrRetentionDays: 1, // (optional) + storageAutoscaling: false, // (optional) + storageAutoscalingThresholdPercent: 50, // (optional) + storageAutoscalingMaxGb: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-dart/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..138f952e3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/delete-backup-policy.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +await mongo.deleteBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/delete-backup.md b/examples/2.3.x/server-dart/examples/mongo/delete-backup.md new file mode 100644 index 000000000..0f7593533 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/delete-backup.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +await mongo.deleteBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/delete-branch.md b/examples/2.3.x/server-dart/examples/mongo/delete-branch.md new file mode 100644 index 000000000..fe99e92ac --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/delete-branch.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +await mongo.deleteBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/delete.md b/examples/2.3.x/server-dart/examples/mongo/delete.md new file mode 100644 index 000000000..39494603b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/delete.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 + +Mongo mongo = Mongo(client); + +await mongo.delete( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-dart/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..3113592ea --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/get-backup-policy.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +BackupPolicy result = await mongo.getBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/get-backup.md b/examples/2.3.x/server-dart/examples/mongo/get-backup.md new file mode 100644 index 000000000..8c201b4a5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/get-backup.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseBackup result = await mongo.getBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/get-pitr.md b/examples/2.3.x/server-dart/examples/mongo/get-pitr.md new file mode 100644 index 000000000..84ec4a3cb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/get-pitr.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabasePITRWindows result = await mongo.getPitr( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/get-replicas.md b/examples/2.3.x/server-dart/examples/mongo/get-replicas.md new file mode 100644 index 000000000..76a117303 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/get-replicas.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseReplicas result = await mongo.getReplicas( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/get-restoration.md b/examples/2.3.x/server-dart/examples/mongo/get-restoration.md new file mode 100644 index 000000000..78669fe7d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/get-restoration.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseRestoration result = await mongo.getRestoration( + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/get-status.md b/examples/2.3.x/server-dart/examples/mongo/get-status.md new file mode 100644 index 000000000..f6e40b90a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/get-status.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 + +Mongo mongo = Mongo(client); + +DatabaseStatus result = await mongo.getStatus( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/get.md b/examples/2.3.x/server-dart/examples/mongo/get.md new file mode 100644 index 000000000..fd43d08df --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/get.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabase result = await mongo.get( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-dart/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..6b44970de --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/list-backup-policies.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +BackupPolicyList result = await mongo.listBackupPolicies( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/list-backups.md b/examples/2.3.x/server-dart/examples/mongo/list-backups.md new file mode 100644 index 000000000..f8f69df84 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/list-backups.md @@ -0,0 +1,15 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseBackupList result = await mongo.listBackups( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/list-branches.md b/examples/2.3.x/server-dart/examples/mongo/list-branches.md new file mode 100644 index 000000000..3062bf23e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/list-branches.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseBranchList result = await mongo.listBranches( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/list-operations.md b/examples/2.3.x/server-dart/examples/mongo/list-operations.md new file mode 100644 index 000000000..c259e8565 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/list-operations.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseOperationList result = await mongo.listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/list-restorations.md b/examples/2.3.x/server-dart/examples/mongo/list-restorations.md new file mode 100644 index 000000000..29cac9749 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/list-restorations.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseRestorationList result = await mongo.listRestorations( + databaseId: '<DATABASE_ID>', + status: 'pending', // (optional) + type: 'backup', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/list-specifications.md b/examples/2.3.x/server-dart/examples/mongo/list-specifications.md new file mode 100644 index 000000000..dba786c2b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Mongo mongo = Mongo(client); + +DedicatedDatabaseSpecificationList result = await mongo.listSpecifications(); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/list.md b/examples/2.3.x/server-dart/examples/mongo/list.md new file mode 100644 index 000000000..17b7ccac1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/list.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseList result = await mongo.list( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-dart/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..5af9db4ee --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/update-backup-policy.md @@ -0,0 +1,19 @@ +```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 + +Mongo mongo = Mongo(client); + +BackupPolicy result = await mongo.updateBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // (optional) + schedule: '', // (optional) + retention: 1, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-dart/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..ddba9cc28 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/update-backup-storage.md @@ -0,0 +1,21 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseBackupStorage result = await mongo.updateBackupStorage( + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // (optional) + prefix: '<PREFIX>', // (optional) + endpoint: '<ENDPOINT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/update-credentials.md b/examples/2.3.x/server-dart/examples/mongo/update-credentials.md new file mode 100644 index 000000000..42ba1c519 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/update-credentials.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabaseOperation result = await mongo.updateCredentials( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/update-maintenance.md b/examples/2.3.x/server-dart/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..88b166ceb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/update-maintenance.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 + +Mongo mongo = Mongo(client); + +DedicatedDatabase result = await mongo.updateMaintenance( + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +); +``` diff --git a/examples/2.3.x/server-dart/examples/mongo/update.md b/examples/2.3.x/server-dart/examples/mongo/update.md new file mode 100644 index 000000000..5831361c0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mongo/update.md @@ -0,0 +1,34 @@ +```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 + +Mongo mongo = Mongo(client); + +DedicatedDatabase result = await mongo.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // (optional) + status: 'ready', // (optional) + specification: '<SPECIFICATION>', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) + networkIdleTimeoutSeconds: 60, // (optional) + networkIPAllowlist: [], // (optional) + idleTimeoutMinutes: 5, // (optional) + pitr: false, // (optional) + pitrRetentionDays: 1, // (optional) + storageAutoscaling: false, // (optional) + storageAutoscalingThresholdPercent: 50, // (optional) + storageAutoscalingMaxGb: 0, // (optional) + metricsTraceSampleRate: 0, // (optional) + metricsSlowQueryLogThresholdMs: 0, // (optional) + sqlApiEnabled: false, // (optional) + sqlApiAllowedStatements: [], // (optional) + sqlApiMaxRows: 1, // (optional) + sqlApiMaxBytes: 1024, // (optional) + sqlApiTimeoutSeconds: 1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-dart/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..2e2fa68c7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create-backup-policy.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 + +Mysql mysql = Mysql(client); + +BackupPolicy result = await mysql.createBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create-backup.md b/examples/2.3.x/server-dart/examples/mysql/create-backup.md new file mode 100644 index 000000000..b8b9d561d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create-backup.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseBackup result = await mysql.createBackup( + databaseId: '<DATABASE_ID>', + type: 'full', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create-branch.md b/examples/2.3.x/server-dart/examples/mysql/create-branch.md new file mode 100644 index 000000000..d97606faf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create-branch.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabase result = await mysql.createBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // (optional) + ttl: 300, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create-execution.md b/examples/2.3.x/server-dart/examples/mysql/create-execution.md new file mode 100644 index 000000000..23b628d33 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create-execution.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseExecution result = await mysql.createExecution( + databaseId: '<DATABASE_ID>', + sql: '<SQL>', + bindings: {}, // (optional) + timeoutSeconds: 1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create-failover.md b/examples/2.3.x/server-dart/examples/mysql/create-failover.md new file mode 100644 index 000000000..e2153c15a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create-failover.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabase result = await mysql.createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create-migration.md b/examples/2.3.x/server-dart/examples/mysql/create-migration.md new file mode 100644 index 000000000..8f8992067 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create-migration.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabase result = await mysql.createMigration( + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create-restoration.md b/examples/2.3.x/server-dart/examples/mysql/create-restoration.md new file mode 100644 index 000000000..4806fab28 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create-restoration.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseRestoration result = await mysql.createRestoration( + databaseId: '<DATABASE_ID>', + type: 'backup', // (optional) + backupId: '<BACKUP_ID>', // (optional) + targetDatabaseId: '<TARGET_DATABASE_ID>', // (optional) + targetTime: '2020-10-15T06:38:00.000+00:00', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create-upgrade.md b/examples/2.3.x/server-dart/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..bc99122b4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create-upgrade.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabase result = await mysql.createUpgrade( + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/create.md b/examples/2.3.x/server-dart/examples/mysql/create.md new file mode 100644 index 000000000..3ba351d47 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/create.md @@ -0,0 +1,27 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabase result = await mysql.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // (optional) + specification: '<SPECIFICATION>', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) + networkIdleTimeoutSeconds: 60, // (optional) + networkIPAllowlist: [], // (optional) + idleTimeoutMinutes: 5, // (optional) + pitr: false, // (optional) + pitrRetentionDays: 1, // (optional) + storageAutoscaling: false, // (optional) + storageAutoscalingThresholdPercent: 50, // (optional) + storageAutoscalingMaxGb: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-dart/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..530cfdc80 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/delete-backup-policy.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +await mysql.deleteBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/delete-backup.md b/examples/2.3.x/server-dart/examples/mysql/delete-backup.md new file mode 100644 index 000000000..5a9e3a62d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/delete-backup.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +await mysql.deleteBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/delete-branch.md b/examples/2.3.x/server-dart/examples/mysql/delete-branch.md new file mode 100644 index 000000000..2fb02ba82 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/delete-branch.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +await mysql.deleteBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/delete.md b/examples/2.3.x/server-dart/examples/mysql/delete.md new file mode 100644 index 000000000..612905388 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/delete.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 + +Mysql mysql = Mysql(client); + +await mysql.delete( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-dart/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..e13c417f3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/get-backup-policy.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +BackupPolicy result = await mysql.getBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/get-backup.md b/examples/2.3.x/server-dart/examples/mysql/get-backup.md new file mode 100644 index 000000000..328431b03 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/get-backup.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseBackup result = await mysql.getBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/get-pitr.md b/examples/2.3.x/server-dart/examples/mysql/get-pitr.md new file mode 100644 index 000000000..1c781fb28 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/get-pitr.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabasePITRWindows result = await mysql.getPitr( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/get-pooler.md b/examples/2.3.x/server-dart/examples/mysql/get-pooler.md new file mode 100644 index 000000000..a2d05adfd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/get-pooler.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabasePooler result = await mysql.getPooler( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/get-replicas.md b/examples/2.3.x/server-dart/examples/mysql/get-replicas.md new file mode 100644 index 000000000..6465c5f53 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/get-replicas.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseReplicas result = await mysql.getReplicas( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/get-restoration.md b/examples/2.3.x/server-dart/examples/mysql/get-restoration.md new file mode 100644 index 000000000..70b1629ef --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/get-restoration.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseRestoration result = await mysql.getRestoration( + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/get-status.md b/examples/2.3.x/server-dart/examples/mysql/get-status.md new file mode 100644 index 000000000..b8402e3ea --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/get-status.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 + +Mysql mysql = Mysql(client); + +DatabaseStatus result = await mysql.getStatus( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/get.md b/examples/2.3.x/server-dart/examples/mysql/get.md new file mode 100644 index 000000000..b7ea5824b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/get.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabase result = await mysql.get( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-dart/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..a0e2a1ad1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/list-backup-policies.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +BackupPolicyList result = await mysql.listBackupPolicies( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/list-backups.md b/examples/2.3.x/server-dart/examples/mysql/list-backups.md new file mode 100644 index 000000000..a9a07085b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/list-backups.md @@ -0,0 +1,15 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseBackupList result = await mysql.listBackups( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/list-branches.md b/examples/2.3.x/server-dart/examples/mysql/list-branches.md new file mode 100644 index 000000000..c029a8012 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/list-branches.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseBranchList result = await mysql.listBranches( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/list-operations.md b/examples/2.3.x/server-dart/examples/mysql/list-operations.md new file mode 100644 index 000000000..3464bbe8f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/list-operations.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseOperationList result = await mysql.listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/list-restorations.md b/examples/2.3.x/server-dart/examples/mysql/list-restorations.md new file mode 100644 index 000000000..4f831482f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/list-restorations.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseRestorationList result = await mysql.listRestorations( + databaseId: '<DATABASE_ID>', + status: 'pending', // (optional) + type: 'backup', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/list-specifications.md b/examples/2.3.x/server-dart/examples/mysql/list-specifications.md new file mode 100644 index 000000000..8c195cd1c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Mysql mysql = Mysql(client); + +DedicatedDatabaseSpecificationList result = await mysql.listSpecifications(); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/list.md b/examples/2.3.x/server-dart/examples/mysql/list.md new file mode 100644 index 000000000..254038e8e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/list.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseList result = await mysql.list( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-dart/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..d267616a7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/update-backup-policy.md @@ -0,0 +1,19 @@ +```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 + +Mysql mysql = Mysql(client); + +BackupPolicy result = await mysql.updateBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // (optional) + schedule: '', // (optional) + retention: 1, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-dart/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..35cbf8e37 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/update-backup-storage.md @@ -0,0 +1,21 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseBackupStorage result = await mysql.updateBackupStorage( + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // (optional) + prefix: '<PREFIX>', // (optional) + endpoint: '<ENDPOINT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/update-credentials.md b/examples/2.3.x/server-dart/examples/mysql/update-credentials.md new file mode 100644 index 000000000..f06faf8fc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/update-credentials.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabaseOperation result = await mysql.updateCredentials( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/update-maintenance.md b/examples/2.3.x/server-dart/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..d93c64157 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/update-maintenance.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 + +Mysql mysql = Mysql(client); + +DedicatedDatabase result = await mysql.updateMaintenance( + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/update-pooler.md b/examples/2.3.x/server-dart/examples/mysql/update-pooler.md new file mode 100644 index 000000000..b5b125c5e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/update-pooler.md @@ -0,0 +1,22 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabasePooler result = await mysql.updatePooler( + databaseId: '<DATABASE_ID>', + mode: 'transaction', // (optional) + maxConnections: 10, // (optional) + defaultPoolSize: 1, // (optional) + readWriteSplitting: false, // (optional) + poolerCpuRequest: '<POOLER_CPU_REQUEST>', // (optional) + poolerCpuLimit: '<POOLER_CPU_LIMIT>', // (optional) + poolerMemoryRequest: '<POOLER_MEMORY_REQUEST>', // (optional) + poolerMemoryLimit: '<POOLER_MEMORY_LIMIT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/mysql/update.md b/examples/2.3.x/server-dart/examples/mysql/update.md new file mode 100644 index 000000000..ae08d0e2e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/mysql/update.md @@ -0,0 +1,34 @@ +```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 + +Mysql mysql = Mysql(client); + +DedicatedDatabase result = await mysql.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // (optional) + status: 'ready', // (optional) + specification: '<SPECIFICATION>', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) + networkIdleTimeoutSeconds: 60, // (optional) + networkIPAllowlist: [], // (optional) + idleTimeoutMinutes: 5, // (optional) + pitr: false, // (optional) + pitrRetentionDays: 1, // (optional) + storageAutoscaling: false, // (optional) + storageAutoscalingThresholdPercent: 50, // (optional) + storageAutoscalingMaxGb: 0, // (optional) + metricsTraceSampleRate: 0, // (optional) + metricsSlowQueryLogThresholdMs: 0, // (optional) + sqlApiEnabled: false, // (optional) + sqlApiAllowedStatements: [], // (optional) + sqlApiMaxRows: 1, // (optional) + sqlApiMaxBytes: 1024, // (optional) + sqlApiTimeoutSeconds: 1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/approve.md b/examples/2.3.x/server-dart/examples/oauth2/approve.md new file mode 100644 index 000000000..786ffc5e0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/approve.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 + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Approve result = await oauth2.approve( + grantId: '<GRANT_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (optional) + scope: '<SCOPE>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/authorize-post.md b/examples/2.3.x/server-dart/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..09b7811d6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/authorize-post.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Authorize result = await oauth2.authorizePost( + clientId: '<CLIENT_ID>', // (optional) + redirectUri: 'https://example.com', // (optional) + responseType: '', // (optional) + scope: '<SCOPE>', // (optional) + state: '<STATE>', // (optional) + nonce: '<NONCE>', // (optional) + codeChallenge: '<CODE_CHALLENGE>', // (optional) + codeChallengeMethod: 's256', // (optional) + prompt: '<PROMPT>', // (optional) + maxAge: 0, // (optional) + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (optional) + resource: '', // (optional) + audience: '<AUDIENCE>', // (optional) + requestUri: '<REQUEST_URI>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/authorize.md b/examples/2.3.x/server-dart/examples/oauth2/authorize.md new file mode 100644 index 000000000..30b19bb42 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/authorize.md @@ -0,0 +1,27 @@ +```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 + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Authorize result = await oauth2.authorize( + clientId: '<CLIENT_ID>', // (optional) + redirectUri: 'https://example.com', // (optional) + responseType: '', // (optional) + scope: '<SCOPE>', // (optional) + state: '<STATE>', // (optional) + nonce: '<NONCE>', // (optional) + codeChallenge: '<CODE_CHALLENGE>', // (optional) + codeChallengeMethod: 's256', // (optional) + prompt: '<PROMPT>', // (optional) + maxAge: 0, // (optional) + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (optional) + resource: '', // (optional) + audience: '<AUDIENCE>', // (optional) + requestUri: '<REQUEST_URI>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-dart/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..17606869e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/create-device-authorization.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2DeviceAuthorization result = await oauth2.createDeviceAuthorization( + clientId: '<CLIENT_ID>', // (optional) + scope: '<SCOPE>', // (optional) + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (optional) + resource: '', // (optional) + audience: '<AUDIENCE>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/create-grant.md b/examples/2.3.x/server-dart/examples/oauth2/create-grant.md new file mode 100644 index 000000000..0382c6921 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/create-grant.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Grant result = await oauth2.createGrant( + userCode: '<USER_CODE>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/create-par.md b/examples/2.3.x/server-dart/examples/oauth2/create-par.md new file mode 100644 index 000000000..d2a58dcca --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/create-par.md @@ -0,0 +1,26 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2PAR result = await oauth2.createPAR( + clientId: '<CLIENT_ID>', + redirectUri: 'https://example.com', + responseType: 'code', + scope: '<SCOPE>', // (optional) + state: '<STATE>', // (optional) + nonce: '<NONCE>', // (optional) + codeChallenge: '<CODE_CHALLENGE>', // (optional) + codeChallengeMethod: 's256', // (optional) + prompt: '<PROMPT>', // (optional) + maxAge: 0, // (optional) + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (optional) + resource: '', // (optional) + audience: '<AUDIENCE>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/create-token.md b/examples/2.3.x/server-dart/examples/oauth2/create-token.md new file mode 100644 index 000000000..64551d367 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/create-token.md @@ -0,0 +1,23 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Token result = await oauth2.createToken( + grantType: '<GRANT_TYPE>', + code: '<CODE>', // (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-dart/examples/oauth2/get-grant.md b/examples/2.3.x/server-dart/examples/oauth2/get-grant.md new file mode 100644 index 000000000..3ded7e2ec --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/get-grant.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Grant result = await oauth2.getGrant( + grantId: '<GRANT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/list-organizations.md b/examples/2.3.x/server-dart/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..7c6cad593 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/list-organizations.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2OrganizationList result = await oauth2.listOrganizations( + limit: 1, // (optional) + offset: 0, // (optional) + search: '<SEARCH>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/list-projects.md b/examples/2.3.x/server-dart/examples/oauth2/list-projects.md new file mode 100644 index 000000000..b744ddc5a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/list-projects.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2ProjectList result = await oauth2.listProjects( + limit: 1, // (optional) + offset: 0, // (optional) + search: '<SEARCH>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/reject.md b/examples/2.3.x/server-dart/examples/oauth2/reject.md new file mode 100644 index 000000000..784f943a4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/reject.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 + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Reject result = await oauth2.reject( + grantId: '<GRANT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/oauth2/revoke.md b/examples/2.3.x/server-dart/examples/oauth2/revoke.md new file mode 100644 index 000000000..e190b0d38 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/revoke.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 + .setSession(''); // The user session to authenticate with + +Oauth2 oauth2 = Oauth2(client); + + result = await oauth2.revoke( + 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 new file mode 100644 index 000000000..1ecc7ee52 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,17 @@ +```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 + +Organization organization = Organization(client); + +EphemeralKey result = await organization.createEphemeralProjectKey( + projectId: '<PROJECT_ID>', + scopes: [enums.ProjectKeyScopes.projectRead], + duration: 600, +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/create-installation.md b/examples/2.3.x/server-dart/examples/organization/create-installation.md new file mode 100644 index 000000000..deee33644 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/create-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +AppInstallation result = await organization.createInstallation( + appId: '<APP_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/create-membership.md b/examples/2.3.x/server-dart/examples/organization/create-membership.md new file mode 100644 index 000000000..6c037bfbf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/create-membership.md @@ -0,0 +1,19 @@ +```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 + +Organization organization = Organization(client); + +Membership result = await organization.createMembership( + roles: [], + email: 'email@example.com', // (optional) + userId: '<USER_ID>', // (optional) + phone: '+12065550100', // (optional) + url: 'https://example.com', // (optional) + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/create-project.md b/examples/2.3.x/server-dart/examples/organization/create-project.md new file mode 100644 index 000000000..0a68b19ca --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/create-project.md @@ -0,0 +1,17 @@ +```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 + +Organization organization = Organization(client); + +Project result = await organization.createProject( + projectId: '<PROJECT_ID>', + name: '<NAME>', + region: enums.Region.fra, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/delete-installation.md b/examples/2.3.x/server-dart/examples/organization/delete-installation.md new file mode 100644 index 000000000..3937b1abb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/delete-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +await organization.deleteInstallation( + installationId: '<INSTALLATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/delete-membership.md b/examples/2.3.x/server-dart/examples/organization/delete-membership.md new file mode 100644 index 000000000..539cf8056 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/delete-membership.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 + +Organization organization = Organization(client); + +await organization.deleteMembership( + membershipId: '<MEMBERSHIP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/delete-project-key.md b/examples/2.3.x/server-dart/examples/organization/delete-project-key.md new file mode 100644 index 000000000..50ca64bc4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/delete-project-key.md @@ -0,0 +1,15 @@ +```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 + +Organization organization = Organization(client); + +await organization.deleteProjectKey( + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/delete-project.md b/examples/2.3.x/server-dart/examples/organization/delete-project.md new file mode 100644 index 000000000..054d22809 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/delete-project.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 + +Organization organization = Organization(client); + +await organization.deleteProject( + projectId: '<PROJECT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/delete.md b/examples/2.3.x/server-dart/examples/organization/delete.md new file mode 100644 index 000000000..97aef2b19 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/delete.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Organization organization = Organization(client); + +await organization.delete(); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/get-installation.md b/examples/2.3.x/server-dart/examples/organization/get-installation.md new file mode 100644 index 000000000..187e534af --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/get-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +AppInstallation result = await organization.getInstallation( + installationId: '<INSTALLATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/get-membership.md b/examples/2.3.x/server-dart/examples/organization/get-membership.md new file mode 100644 index 000000000..6bcaae3b4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/get-membership.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 + +Organization organization = Organization(client); + +Membership result = await organization.getMembership( + membershipId: '<MEMBERSHIP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/get-project-key.md b/examples/2.3.x/server-dart/examples/organization/get-project-key.md new file mode 100644 index 000000000..9200d0c0a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/get-project-key.md @@ -0,0 +1,15 @@ +```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 + +Organization organization = Organization(client); + +Key result = await organization.getProjectKey( + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/get-project.md b/examples/2.3.x/server-dart/examples/organization/get-project.md new file mode 100644 index 000000000..751fcc905 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/get-project.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 + +Organization organization = Organization(client); + +Project result = await organization.getProject( + projectId: '<PROJECT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/get.md b/examples/2.3.x/server-dart/examples/organization/get.md new file mode 100644 index 000000000..d6b96003f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/get.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Organization organization = Organization(client); + +Organization result = await organization.get(); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/list-installations.md b/examples/2.3.x/server-dart/examples/organization/list-installations.md new file mode 100644 index 000000000..2730102d3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/list-installations.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +AppInstallationList result = await organization.listInstallations( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/list-memberships.md b/examples/2.3.x/server-dart/examples/organization/list-memberships.md new file mode 100644 index 000000000..a3c8812e9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/list-memberships.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 + +Organization organization = Organization(client); + +MembershipList result = await organization.listMemberships( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/list-project-keys.md b/examples/2.3.x/server-dart/examples/organization/list-project-keys.md new file mode 100644 index 000000000..499c6c997 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/list-project-keys.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 + +Organization organization = Organization(client); + +KeyList result = await organization.listProjectKeys( + projectId: '<PROJECT_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/list-projects.md b/examples/2.3.x/server-dart/examples/organization/list-projects.md new file mode 100644 index 000000000..49b5b5ec2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/list-projects.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 + +Organization organization = Organization(client); + +ProjectList result = await organization.listProjects( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/update-installation.md b/examples/2.3.x/server-dart/examples/organization/update-installation.md new file mode 100644 index 000000000..63b7ce9a4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/update-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +AppInstallation result = await organization.updateInstallation( + installationId: '<INSTALLATION_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/update-membership.md b/examples/2.3.x/server-dart/examples/organization/update-membership.md new file mode 100644 index 000000000..ad9bccffe --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/update-membership.md @@ -0,0 +1,15 @@ +```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 + +Organization organization = Organization(client); + +Membership result = await organization.updateMembership( + membershipId: '<MEMBERSHIP_ID>', + roles: [], +); +``` 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 new file mode 100644 index 000000000..5ca9c8971 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/update-project-key.md @@ -0,0 +1,19 @@ +```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 + +Organization organization = Organization(client); + +Key result = await organization.updateProjectKey( + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [enums.ProjectKeyScopes.projectRead], + expire: '2020-10-15T06:38:00.000+00:00', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/update-project.md b/examples/2.3.x/server-dart/examples/organization/update-project.md new file mode 100644 index 000000000..9c94d9cd8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/update-project.md @@ -0,0 +1,15 @@ +```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 + +Organization organization = Organization(client); + +Project result = await organization.updateProject( + projectId: '<PROJECT_ID>', + name: '<NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/update.md b/examples/2.3.x/server-dart/examples/organization/update.md new file mode 100644 index 000000000..25aa1eedf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/organization/update.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 + +Organization organization = Organization(client); + +Organization result = await organization.update( + name: '<NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-dart/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..1abd350df --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-backup-policy.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 + +Postgresql postgresql = Postgresql(client); + +BackupPolicy result = await postgresql.createBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-backup.md b/examples/2.3.x/server-dart/examples/postgresql/create-backup.md new file mode 100644 index 000000000..f880015ae --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-backup.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseBackup result = await postgresql.createBackup( + databaseId: '<DATABASE_ID>', + type: 'full', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-branch.md b/examples/2.3.x/server-dart/examples/postgresql/create-branch.md new file mode 100644 index 000000000..7be8a71a6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-branch.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.createBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // (optional) + ttl: 300, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-execution.md b/examples/2.3.x/server-dart/examples/postgresql/create-execution.md new file mode 100644 index 000000000..1e2e99813 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-execution.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseExecution result = await postgresql.createExecution( + databaseId: '<DATABASE_ID>', + sql: '<SQL>', + bindings: {}, // (optional) + timeoutSeconds: 1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-extension.md b/examples/2.3.x/server-dart/examples/postgresql/create-extension.md new file mode 100644 index 000000000..5b6e4c318 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-extension.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.createExtension( + databaseId: '<DATABASE_ID>', + name: '<NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-failover.md b/examples/2.3.x/server-dart/examples/postgresql/create-failover.md new file mode 100644 index 000000000..da88f6cef --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-failover.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-migration.md b/examples/2.3.x/server-dart/examples/postgresql/create-migration.md new file mode 100644 index 000000000..7745a8cbd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-migration.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.createMigration( + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-restoration.md b/examples/2.3.x/server-dart/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..31e9323b3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-restoration.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseRestoration result = await postgresql.createRestoration( + databaseId: '<DATABASE_ID>', + type: 'backup', // (optional) + backupId: '<BACKUP_ID>', // (optional) + targetDatabaseId: '<TARGET_DATABASE_ID>', // (optional) + targetTime: '2020-10-15T06:38:00.000+00:00', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-dart/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..4fb49e60a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create-upgrade.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.createUpgrade( + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/create.md b/examples/2.3.x/server-dart/examples/postgresql/create.md new file mode 100644 index 000000000..5bc34df8d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/create.md @@ -0,0 +1,27 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // (optional) + specification: '<SPECIFICATION>', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) + networkIdleTimeoutSeconds: 60, // (optional) + networkIPAllowlist: [], // (optional) + idleTimeoutMinutes: 5, // (optional) + pitr: false, // (optional) + pitrRetentionDays: 1, // (optional) + storageAutoscaling: false, // (optional) + storageAutoscalingThresholdPercent: 50, // (optional) + storageAutoscalingMaxGb: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-dart/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..3f9c423f7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +await postgresql.deleteBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/delete-backup.md b/examples/2.3.x/server-dart/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..ffc9dd9a8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/delete-backup.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +await postgresql.deleteBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/delete-branch.md b/examples/2.3.x/server-dart/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..636a305bf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/delete-branch.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +await postgresql.deleteBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/delete-extension.md b/examples/2.3.x/server-dart/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..66e40e1a9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/delete-extension.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +await postgresql.deleteExtension( + databaseId: '<DATABASE_ID>', + extensionName: '<EXTENSION_NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/delete.md b/examples/2.3.x/server-dart/examples/postgresql/delete.md new file mode 100644 index 000000000..43fe285d7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/delete.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 + +Postgresql postgresql = Postgresql(client); + +await postgresql.delete( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-dart/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..47a1cb12e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/get-backup-policy.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +BackupPolicy result = await postgresql.getBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/get-backup.md b/examples/2.3.x/server-dart/examples/postgresql/get-backup.md new file mode 100644 index 000000000..188538be6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/get-backup.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseBackup result = await postgresql.getBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/get-pitr.md b/examples/2.3.x/server-dart/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..48e3fa17a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/get-pitr.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabasePITRWindows result = await postgresql.getPitr( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/get-pooler.md b/examples/2.3.x/server-dart/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..4f6f01f90 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/get-pooler.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabasePooler result = await postgresql.getPooler( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/get-replicas.md b/examples/2.3.x/server-dart/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..2d1b2b7c9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/get-replicas.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseReplicas result = await postgresql.getReplicas( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/get-restoration.md b/examples/2.3.x/server-dart/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..53c5a3f66 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/get-restoration.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseRestoration result = await postgresql.getRestoration( + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/get-status.md b/examples/2.3.x/server-dart/examples/postgresql/get-status.md new file mode 100644 index 000000000..3ea4154a3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/get-status.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 + +Postgresql postgresql = Postgresql(client); + +DatabaseStatus result = await postgresql.getStatus( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/get.md b/examples/2.3.x/server-dart/examples/postgresql/get.md new file mode 100644 index 000000000..b47fc5860 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/get.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.get( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-dart/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..736fe6d29 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/list-backup-policies.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +BackupPolicyList result = await postgresql.listBackupPolicies( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/list-backups.md b/examples/2.3.x/server-dart/examples/postgresql/list-backups.md new file mode 100644 index 000000000..1551ea567 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/list-backups.md @@ -0,0 +1,15 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseBackupList result = await postgresql.listBackups( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/list-branches.md b/examples/2.3.x/server-dart/examples/postgresql/list-branches.md new file mode 100644 index 000000000..73a3e7780 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/list-branches.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseBranchList result = await postgresql.listBranches( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/list-extensions.md b/examples/2.3.x/server-dart/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..0dd709e52 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/list-extensions.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseExtensions result = await postgresql.listExtensions( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/list-operations.md b/examples/2.3.x/server-dart/examples/postgresql/list-operations.md new file mode 100644 index 000000000..e0827b5f9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/list-operations.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseOperationList result = await postgresql.listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/list-restorations.md b/examples/2.3.x/server-dart/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..e78c6f996 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/list-restorations.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseRestorationList result = await postgresql.listRestorations( + databaseId: '<DATABASE_ID>', + status: 'pending', // (optional) + type: 'backup', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/list-specifications.md b/examples/2.3.x/server-dart/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..749a68231 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseSpecificationList result = await postgresql.listSpecifications(); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/list.md b/examples/2.3.x/server-dart/examples/postgresql/list.md new file mode 100644 index 000000000..d7cd796e9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/list.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseList result = await postgresql.list( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-dart/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..88584145f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/update-backup-policy.md @@ -0,0 +1,19 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +BackupPolicy result = await postgresql.updateBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // (optional) + schedule: '', // (optional) + retention: 1, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-dart/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..490289b83 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/update-backup-storage.md @@ -0,0 +1,21 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseBackupStorage result = await postgresql.updateBackupStorage( + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // (optional) + prefix: '<PREFIX>', // (optional) + endpoint: '<ENDPOINT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/update-credentials.md b/examples/2.3.x/server-dart/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..dadc612c0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/update-credentials.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabaseOperation result = await postgresql.updateCredentials( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-dart/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..3335220dc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/update-maintenance.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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.updateMaintenance( + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/update-pooler.md b/examples/2.3.x/server-dart/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..fd7898f30 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/update-pooler.md @@ -0,0 +1,22 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabasePooler result = await postgresql.updatePooler( + databaseId: '<DATABASE_ID>', + mode: 'transaction', // (optional) + maxConnections: 10, // (optional) + defaultPoolSize: 1, // (optional) + readWriteSplitting: false, // (optional) + poolerCpuRequest: '<POOLER_CPU_REQUEST>', // (optional) + poolerCpuLimit: '<POOLER_CPU_LIMIT>', // (optional) + poolerMemoryRequest: '<POOLER_MEMORY_REQUEST>', // (optional) + poolerMemoryLimit: '<POOLER_MEMORY_LIMIT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/postgresql/update.md b/examples/2.3.x/server-dart/examples/postgresql/update.md new file mode 100644 index 000000000..0494aeaae --- /dev/null +++ b/examples/2.3.x/server-dart/examples/postgresql/update.md @@ -0,0 +1,34 @@ +```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 + +Postgresql postgresql = Postgresql(client); + +DedicatedDatabase result = await postgresql.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // (optional) + status: 'ready', // (optional) + specification: '<SPECIFICATION>', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) + networkIdleTimeoutSeconds: 60, // (optional) + networkIPAllowlist: [], // (optional) + idleTimeoutMinutes: 5, // (optional) + pitr: false, // (optional) + pitrRetentionDays: 1, // (optional) + storageAutoscaling: false, // (optional) + storageAutoscalingThresholdPercent: 50, // (optional) + storageAutoscalingMaxGb: 0, // (optional) + metricsTraceSampleRate: 0, // (optional) + metricsSlowQueryLogThresholdMs: 0, // (optional) + sqlApiEnabled: false, // (optional) + sqlApiAllowedStatements: [], // (optional) + sqlApiMaxRows: 1, // (optional) + sqlApiMaxBytes: 1024, // (optional) + sqlApiTimeoutSeconds: 1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/presences/delete.md b/examples/2.3.x/server-dart/examples/presences/delete.md new file mode 100644 index 000000000..50c950a61 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/presences/delete.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 + +Presences presences = Presences(client); + +await presences.delete( + presenceId: '<PRESENCE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/presences/get.md b/examples/2.3.x/server-dart/examples/presences/get.md new file mode 100644 index 000000000..f8025297f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/presences/get.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 + +Presences presences = Presences(client); + +Presence result = await presences.get( + presenceId: '<PRESENCE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/presences/list.md b/examples/2.3.x/server-dart/examples/presences/list.md new file mode 100644 index 000000000..d0a87bb13 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/presences/list.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 + +Presences presences = Presences(client); + +PresenceList result = await presences.list( + queries: [], // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/presences/update.md b/examples/2.3.x/server-dart/examples/presences/update.md new file mode 100644 index 000000000..fcdc97b25 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/presences/update.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Presences presences = Presences(client); + +Presence result = await presences.update( + presenceId: '<PRESENCE_ID>', + userId: '<USER_ID>', + status: '<STATUS>', // (optional) + expiresAt: '2020-10-15T06:38:00.000+00:00', // (optional) + metadata: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + purge: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/presences/upsert.md b/examples/2.3.x/server-dart/examples/presences/upsert.md new file mode 100644 index 000000000..7602a2eb2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/presences/upsert.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Presences presences = Presences(client); + +Presence result = await presences.upsert( + presenceId: '<PRESENCE_ID>', + userId: '<USER_ID>', + status: '<STATUS>', + permissions: [Permission.read(Role.any())], // (optional) + expiresAt: '2020-10-15T06:38:00.000+00:00', // (optional) + metadata: {}, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/create-android-platform.md b/examples/2.3.x/server-dart/examples/project/create-android-platform.md new file mode 100644 index 000000000..47a5c14bd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-android-platform.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); + +PlatformAndroid result = await project.createAndroidPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + applicationId: '<APPLICATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/create-apple-platform.md b/examples/2.3.x/server-dart/examples/project/create-apple-platform.md new file mode 100644 index 000000000..8de12084a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-apple-platform.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); + +PlatformApple result = await project.createApplePlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + bundleIdentifier: '<BUNDLE_IDENTIFIER>', +); +``` 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 new file mode 100644 index 000000000..cdc4ab77d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-ephemeral-key.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<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); + +EphemeralKey result = await project.createEphemeralKey( + scopes: [enums.ProjectKeyScopes.projectRead], + duration: 600, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/create-linux-platform.md b/examples/2.3.x/server-dart/examples/project/create-linux-platform.md new file mode 100644 index 000000000..a7842305e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-linux-platform.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); + +PlatformLinux result = await project.createLinuxPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageName: '<PACKAGE_NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/create-mock-phone.md b/examples/2.3.x/server-dart/examples/project/create-mock-phone.md new file mode 100644 index 000000000..c73c4c2fc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-mock-phone.md @@ -0,0 +1,15 @@ +```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); + +MockNumber result = await project.createMockPhone( + number: '+12065550100', + otp: '<OTP>', +); +``` 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 new file mode 100644 index 000000000..fac73da88 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-smtp-test.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 + +Project project = Project(client); + + result = await project.createSMTPTest( + emails: [], +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/create-variable.md b/examples/2.3.x/server-dart/examples/project/create-variable.md new file mode 100644 index 000000000..838fce0b6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-variable.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 + +Project project = Project(client); + +Variable result = await project.createVariable( + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/create-web-platform.md b/examples/2.3.x/server-dart/examples/project/create-web-platform.md new file mode 100644 index 000000000..12b157ee0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-web-platform.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); + +PlatformWeb result = await project.createWebPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/create-windows-platform.md b/examples/2.3.x/server-dart/examples/project/create-windows-platform.md new file mode 100644 index 000000000..f2b47ca08 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/create-windows-platform.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); + +PlatformWindows result = await project.createWindowsPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/delete-key.md b/examples/2.3.x/server-dart/examples/project/delete-key.md new file mode 100644 index 000000000..6617fa4d6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/delete-key.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 + +Project project = Project(client); + +await project.deleteKey( + keyId: '<KEY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/delete-mock-phone.md b/examples/2.3.x/server-dart/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..f47a21902 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/delete-mock-phone.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 + +Project project = Project(client); + +await project.deleteMockPhone( + number: '+12065550100', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/delete-platform.md b/examples/2.3.x/server-dart/examples/project/delete-platform.md new file mode 100644 index 000000000..2a1a5985c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/delete-platform.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 + +Project project = Project(client); + +await project.deletePlatform( + platformId: '<PLATFORM_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/delete-variable.md b/examples/2.3.x/server-dart/examples/project/delete-variable.md new file mode 100644 index 000000000..9a177d51d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/delete-variable.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 + +Project project = Project(client); + +await project.deleteVariable( + variableId: '<VARIABLE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/delete.md b/examples/2.3.x/server-dart/examples/project/delete.md new file mode 100644 index 000000000..3199e2db8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/delete.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Project project = Project(client); + +await project.delete(); +``` diff --git a/examples/2.3.x/server-dart/examples/project/get-email-template.md b/examples/2.3.x/server-dart/examples/project/get-email-template.md new file mode 100644 index 000000000..c98e0c6b2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/get-email-template.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<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); + +EmailTemplate result = await project.getEmailTemplate( + templateId: enums.ProjectEmailTemplateId.verification, + locale: enums.ProjectEmailTemplateLocale.af, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/get-key.md b/examples/2.3.x/server-dart/examples/project/get-key.md new file mode 100644 index 000000000..77ee7bd32 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/get-key.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 + +Project project = Project(client); + +Key result = await project.getKey( + keyId: '<KEY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/get-mock-phone.md b/examples/2.3.x/server-dart/examples/project/get-mock-phone.md new file mode 100644 index 000000000..e3ef61ff9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/get-mock-phone.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 + +Project project = Project(client); + +MockNumber result = await project.getMockPhone( + number: '+12065550100', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-dart/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..e487cda2b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,15 @@ +```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 + +Project project = Project(client); + +dynamic result = await project.getOAuth2Provider( + providerId: enums.ProjectOAuthProviderId.amazon, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/get-platform.md b/examples/2.3.x/server-dart/examples/project/get-platform.md new file mode 100644 index 000000000..3874f13ae --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/get-platform.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 + +Project project = Project(client); + +dynamic result = await project.getPlatform( + platformId: '<PLATFORM_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/get-policy.md b/examples/2.3.x/server-dart/examples/project/get-policy.md new file mode 100644 index 000000000..d8c856440 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/get-policy.md @@ -0,0 +1,15 @@ +```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 + +Project project = Project(client); + +dynamic result = await project.getPolicy( + policyId: enums.ProjectPolicyId.passwordDictionary, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/get-variable.md b/examples/2.3.x/server-dart/examples/project/get-variable.md new file mode 100644 index 000000000..2b39e1048 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/get-variable.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 + +Project project = Project(client); + +Variable result = await project.getVariable( + variableId: '<VARIABLE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/get.md b/examples/2.3.x/server-dart/examples/project/get.md new file mode 100644 index 000000000..a2bfa10fc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/get.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Project project = Project(client); + +Project result = await project.get(); +``` diff --git a/examples/2.3.x/server-dart/examples/project/list-email-templates.md b/examples/2.3.x/server-dart/examples/project/list-email-templates.md new file mode 100644 index 000000000..0bd9ee7eb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/list-email-templates.md @@ -0,0 +1,15 @@ +```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); + +EmailTemplateList result = await project.listEmailTemplates( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/list-keys.md b/examples/2.3.x/server-dart/examples/project/list-keys.md new file mode 100644 index 000000000..6002f7289 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/list-keys.md @@ -0,0 +1,15 @@ +```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); + +KeyList result = await project.listKeys( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/list-mock-phones.md b/examples/2.3.x/server-dart/examples/project/list-mock-phones.md new file mode 100644 index 000000000..dac643971 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/list-mock-phones.md @@ -0,0 +1,15 @@ +```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); + +MockNumberList result = await project.listMockPhones( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-dart/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..b69c52731 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,15 @@ +```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); + +OAuth2ProviderList result = await project.listOAuth2Providers( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/list-platforms.md b/examples/2.3.x/server-dart/examples/project/list-platforms.md new file mode 100644 index 000000000..9333ae36b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/list-platforms.md @@ -0,0 +1,15 @@ +```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); + +PlatformList result = await project.listPlatforms( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/list-policies.md b/examples/2.3.x/server-dart/examples/project/list-policies.md new file mode 100644 index 000000000..5aba661cf --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/list-policies.md @@ -0,0 +1,15 @@ +```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); + +PolicyList result = await project.listPolicies( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/list-variables.md b/examples/2.3.x/server-dart/examples/project/list-variables.md new file mode 100644 index 000000000..ae5b52705 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/list-variables.md @@ -0,0 +1,15 @@ +```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); + +VariableList result = await project.listVariables( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-android-platform.md b/examples/2.3.x/server-dart/examples/project/update-android-platform.md new file mode 100644 index 000000000..ee6eccf6a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-android-platform.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); + +PlatformAndroid result = await project.updateAndroidPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + applicationId: '<APPLICATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-apple-platform.md b/examples/2.3.x/server-dart/examples/project/update-apple-platform.md new file mode 100644 index 000000000..8feb3093f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-apple-platform.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); + +PlatformApple result = await project.updateApplePlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + bundleIdentifier: '<BUNDLE_IDENTIFIER>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-auth-method.md b/examples/2.3.x/server-dart/examples/project/update-auth-method.md new file mode 100644 index 000000000..167c591a0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-auth-method.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<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); + +Project result = await project.updateAuthMethod( + methodId: enums.ProjectAuthMethodId.emailPassword, + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-dart/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..78eb7db44 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-deny-aliased-email-policy.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 + +Project project = Project(client); + +Project result = await project.updateDenyAliasedEmailPolicy( + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-dart/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..450942aef --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-deny-corporate-email-policy.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 + +Project project = Project(client); + +Project result = await project.updateDenyCorporateEmailPolicy( + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-dart/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..85fcc50d9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-deny-disposable-email-policy.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 + +Project project = Project(client); + +Project result = await project.updateDenyDisposableEmailPolicy( + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-dart/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..23f7bb156 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-deny-free-email-policy.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 + +Project project = Project(client); + +Project result = await project.updateDenyFreeEmailPolicy( + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-email-template.md b/examples/2.3.x/server-dart/examples/project/update-email-template.md new file mode 100644 index 000000000..15f0a8fa7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-email-template.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 + +Project project = Project(client); + +EmailTemplate result = await project.updateEmailTemplate( + templateId: enums.ProjectEmailTemplateId.verification, + locale: enums.ProjectEmailTemplateLocale.af, // (optional) + subject: '<SUBJECT>', // (optional) + message: '<MESSAGE>', // (optional) + senderName: '<SENDER_NAME>', // (optional) + senderEmail: 'email@example.com', // (optional) + replyToEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) +); +``` 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 new file mode 100644 index 000000000..b15aa92f4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-key.md @@ -0,0 +1,18 @@ +```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 + +Project project = Project(client); + +Key result = await project.updateKey( + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [enums.ProjectKeyScopes.projectRead], + 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 new file mode 100644 index 000000000..ec1b51ce3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-labels.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 + +Project project = Project(client); + +Project result = await project.updateLabels( + labels: [], +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-linux-platform.md b/examples/2.3.x/server-dart/examples/project/update-linux-platform.md new file mode 100644 index 000000000..c93fe7a6a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-linux-platform.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); + +PlatformLinux result = await project.updateLinuxPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageName: '<PACKAGE_NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-dart/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..d1164b7ff --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,19 @@ +```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); + +Project result = await project.updateMembershipPrivacyPolicy( + userId: false, // (optional) + userEmail: false, // (optional) + userPhone: false, // (optional) + userName: false, // (optional) + userMFA: false, // (optional) + userAccessedAt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-dart/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..97e1bd661 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-mfa-factors-policy.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 + +Project project = Project(client); + +Project result = await project.updateMFAFactorsPolicy( + totp: false, // (optional) + email: false, // (optional) + phone: false, // (optional) + custom: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-mock-phone.md b/examples/2.3.x/server-dart/examples/project/update-mock-phone.md new file mode 100644 index 000000000..3f584d210 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-mock-phone.md @@ -0,0 +1,15 @@ +```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); + +MockNumber result = await project.updateMockPhone( + number: '+12065550100', + otp: '<OTP>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..1821f5d89 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-amazon.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); + +OAuth2Amazon result = await project.updateOAuth2Amazon( + 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-apple.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..3df9bb1df --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-apple.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 + +Project project = Project(client); + +OAuth2Apple result = await project.updateOAuth2Apple( + serviceId: '<SERVICE_ID>', // (optional) + keyId: '<KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + p8File: '<P8_FILE>', // (optional) + nativeClientIds: [], // (optional) + enabled: false, // (optional) + nativeEnabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..54187ae55 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-appwrite.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); + +OAuth2Appwrite result = await project.updateOAuth2Appwrite( + 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-auth-0.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..e00a59761 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-auth-0.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 + +Project project = Project(client); + +OAuth2Auth0 result = await project.updateOAuth2Auth0( + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) + endpoint: '<ENDPOINT>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..734702733 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-authentik.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 + +Project project = Project(client); + +OAuth2Authentik result = await project.updateOAuth2Authentik( + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) + endpoint: '<ENDPOINT>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..1273e6e4c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-autodesk.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); + +OAuth2Autodesk result = await project.updateOAuth2Autodesk( + 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-bitbucket.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..2f9274a08 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-bitbucket.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); + +OAuth2Bitbucket result = await project.updateOAuth2Bitbucket( + key: '<KEY>', // (optional) + secret: '<SECRET>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..5f03c82e8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-bitly.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); + +OAuth2Bitly result = await project.updateOAuth2Bitly( + 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-box.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..b00ab7c58 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-box.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); + +OAuth2Box result = await project.updateOAuth2Box( + 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-cloudflare.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..a6a4201f9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-cloudflare.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); + +OAuth2Cloudflare result = await project.updateOAuth2Cloudflare( + 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-dailymotion.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..1117cf853 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-dailymotion.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); + +OAuth2Dailymotion result = await project.updateOAuth2Dailymotion( + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (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 new file mode 100644 index 000000000..7e06450d2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-discord.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); + +OAuth2Discord result = await project.updateOAuth2Discord( + 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-disqus.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..42d62a827 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-disqus.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); + +OAuth2Disqus result = await project.updateOAuth2Disqus( + publicKey: '<PUBLIC_KEY>', // (optional) + secretKey: '<SECRET_KEY>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..200829125 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-dropbox.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); + +OAuth2Dropbox result = await project.updateOAuth2Dropbox( + appKey: '<APP_KEY>', // (optional) + appSecret: '<APP_SECRET>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..3e6118a1c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-etsy.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); + +OAuth2Etsy result = await project.updateOAuth2Etsy( + keyString: '<KEY_STRING>', // (optional) + sharedSecret: '<SHARED_SECRET>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..48d282a98 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-facebook.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); + +OAuth2Facebook result = await project.updateOAuth2Facebook( + appId: '<APP_ID>', // (optional) + appSecret: '<APP_SECRET>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..1b80d0e56 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-figma.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); + +OAuth2Figma result = await project.updateOAuth2Figma( + 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-fusion-auth.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..73c41171d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-fusion-auth.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 + +Project project = Project(client); + +OAuth2FusionAuth result = await project.updateOAuth2FusionAuth( + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) + endpoint: '<ENDPOINT>', // (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 new file mode 100644 index 000000000..e2830382e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-git-hub.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); + +OAuth2Github result = await project.updateOAuth2GitHub( + 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-gitlab.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..1d7418d95 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-gitlab.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 + +Project project = Project(client); + +OAuth2Gitlab result = await project.updateOAuth2Gitlab( + applicationId: '<APPLICATION_ID>', // (optional) + secret: '<SECRET>', // (optional) + endpoint: 'https://example.com', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..a442d1c1d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-google.md @@ -0,0 +1,20 @@ +```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 + +Project project = Project(client); + +OAuth2Google result = await project.updateOAuth2Google( + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) + prompt: [enums.ProjectOAuth2GooglePrompt.none], // (optional) + nativeClientIds: [], // (optional) + enabled: false, // (optional) + nativeEnabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..2a5bb5167 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-hugging-face.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); + +OAuth2HuggingFace result = await project.updateOAuth2HuggingFace( + 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-kakao.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..1a47e3871 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kakao.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); + +OAuth2Kakao result = await project.updateOAuth2Kakao( + 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-keycloak.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..b7195b82c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,18 @@ +```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); + +OAuth2Keycloak result = await project.updateOAuth2Keycloak( + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) + endpoint: '<ENDPOINT>', // (optional) + realmName: '<REALM_NAME>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..5cfdf9a4a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kick.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); + +OAuth2Kick result = await project.updateOAuth2Kick( + 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-linkedin.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..d69f1eaa3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-linkedin.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); + +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-dart/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-microsoft.md new file mode 100644 index 000000000..7f1aa6ca9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-microsoft.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 + +Project project = Project(client); + +OAuth2Microsoft result = await project.updateOAuth2Microsoft( + applicationId: '<APPLICATION_ID>', // (optional) + applicationSecret: '<APPLICATION_SECRET>', // (optional) + tenant: '<TENANT>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..ba723ccc5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-notion.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); + +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-dart/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..d2dc2d9da --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,23 @@ +```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 + +Project project = Project(client); + +OAuth2Oidc result = await project.updateOAuth2Oidc( + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) + wellKnownURL: 'https://example.com', // (optional) + authorizationURL: 'https://example.com', // (optional) + tokenURL: 'https://example.com', // (optional) + userInfoURL: 'https://example.com', // (optional) + prompt: [enums.ProjectOAuth2OidcPrompt.none], // (optional) + maxAge: 0, // (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 new file mode 100644 index 000000000..cfd9f8cef --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,18 @@ +```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); + +OAuth2Okta result = await project.updateOAuth2Okta( + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) + domain: 'example.com', // (optional) + authorizationServerId: '<AUTHORIZATION_SERVER_ID>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..eda05f5e6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-paypal-sandbox.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); + +OAuth2Paypal result = await project.updateOAuth2PaypalSandbox( + clientId: '<CLIENT_ID>', // (optional) + secretKey: '<SECRET_KEY>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..120b58170 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-paypal.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); + +OAuth2Paypal result = await project.updateOAuth2Paypal( + clientId: '<CLIENT_ID>', // (optional) + secretKey: '<SECRET_KEY>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..9b5ee737b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-podio.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); + +OAuth2Podio result = await project.updateOAuth2Podio( + 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-resend.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..408f73874 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-resend.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); + +OAuth2Resend result = await project.updateOAuth2Resend( + 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-salesforce.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..6be026b45 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-salesforce.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); + +OAuth2Salesforce result = await project.updateOAuth2Salesforce( + customerKey: '<CUSTOMER_KEY>', // (optional) + customerSecret: '<CUSTOMER_SECRET>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..f4244226b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-server.md @@ -0,0 +1,29 @@ +```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); + +Project result = await project.updateOAuth2Server( + enabled: false, + authorizationUrl: 'https://example.com', + scopes: [], // (optional) + authorizationDetailsTypes: [], // (optional) + accessTokenDuration: 60, // (optional) + refreshTokenDuration: 60, // (optional) + publicAccessTokenDuration: 60, // (optional) + publicRefreshTokenDuration: 60, // (optional) + installationAccessTokenDuration: 60, // (optional) + confidentialPkce: false, // (optional) + verificationUrl: 'https://example.com', // (optional) + userCodeLength: 6, // (optional) + userCodeFormat: 'numeric', // (optional) + deviceCodeDuration: 60, // (optional) + defaultScopes: [], // (optional) + installationScopes: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..1032810c6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-slack.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); + +OAuth2Slack result = await project.updateOAuth2Slack( + 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-spotify.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..8e7f98347 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-spotify.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); + +OAuth2Spotify result = await project.updateOAuth2Spotify( + 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-stripe.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..367466733 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-stripe.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); + +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-dart/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..8190a2704 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-tik-tok.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); + +OAuth2TikTok result = await project.updateOAuth2TikTok( + 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-tradeshift-sandbox.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..653abf6eb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-tradeshift-sandbox.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); + +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-dart/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..1e780bfc0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-tradeshift.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); + +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-dart/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..93d29acdc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-twitch.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); + +OAuth2Twitch result = await project.updateOAuth2Twitch( + 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-word-press.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..32e3495a3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-word-press.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); + +OAuth2WordPress result = await project.updateOAuth2WordPress( + 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-yahoo.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..f08d50749 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-yahoo.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); + +OAuth2Yahoo result = await project.updateOAuth2Yahoo( + 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-yandex.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..4106fe67b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-yandex.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); + +OAuth2Yandex result = await project.updateOAuth2Yandex( + 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 new file mode 100644 index 000000000..69d44d8a2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-zoho.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); + +OAuth2Zoho result = await project.updateOAuth2Zoho( + 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-zoom.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..d91ddcbde --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-zoom.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); + +OAuth2Zoom result = await project.updateOAuth2Zoom( + 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-2x.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..bf7e5f622 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2x.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); + +OAuth2X result = await project.updateOAuth2X( + customerKey: '<CUSTOMER_KEY>', // (optional) + secretKey: '<SECRET_KEY>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-dart/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..9d07cff39 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-password-dictionary-policy.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 + +Project project = Project(client); + +Project result = await project.updatePasswordDictionaryPolicy( + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-password-history-policy.md b/examples/2.3.x/server-dart/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..2d5ca13e3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-password-history-policy.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 + +Project project = Project(client); + +Project result = await project.updatePasswordHistoryPolicy( + total: 1, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-dart/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..51680b7d5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-password-personal-data-policy.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 + +Project project = Project(client); + +Project result = await project.updatePasswordPersonalDataPolicy( + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-dart/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..385c8dd5a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-password-pwned-policy.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); + +Project result = await project.updatePasswordPwnedPolicy( + enabled: false, // (optional) + sessions: false, // (optional) + users: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-dart/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..eca34320a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-password-strength-policy.md @@ -0,0 +1,18 @@ +```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); + +PolicyPasswordStrength result = await project.updatePasswordStrengthPolicy( + min: 8, // (optional) + uppercase: false, // (optional) + lowercase: false, // (optional) + number: false, // (optional) + symbols: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-protocol.md b/examples/2.3.x/server-dart/examples/project/update-protocol.md new file mode 100644 index 000000000..261273d65 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-protocol.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<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); + +Project result = await project.updateProtocol( + protocolId: enums.ProjectProtocolId.rest, + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-service.md b/examples/2.3.x/server-dart/examples/project/update-service.md new file mode 100644 index 000000000..2d4f71526 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-service.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<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); + +Project result = await project.updateService( + serviceId: enums.ProjectServiceId.account, + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-dart/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..a3d892f02 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-session-alert-policy.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 + +Project project = Project(client); + +Project result = await project.updateSessionAlertPolicy( + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-dart/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..b5a0e4cf4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-session-duration-policy.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 + +Project project = Project(client); + +Project result = await project.updateSessionDurationPolicy( + duration: 60, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-dart/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..e38b5180d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-session-invalidation-policy.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 + +Project project = Project(client); + +Project result = await project.updateSessionInvalidationPolicy( + enabled: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-dart/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..8726970e7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-session-limit-policy.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 + +Project project = Project(client); + +Project result = await project.updateSessionLimitPolicy( + total: 1, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-smtp.md b/examples/2.3.x/server-dart/examples/project/update-smtp.md new file mode 100644 index 000000000..c1d414775 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-smtp.md @@ -0,0 +1,24 @@ +```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 + +Project project = Project(client); + +Project result = await project.updateSMTP( + host: 'example.com', // (optional) + port: 587, // (optional) + username: '<USERNAME>', // (optional) + password: 'password', // (optional) + senderEmail: 'email@example.com', // (optional) + senderName: '<SENDER_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + secure: enums.ProjectSMTPSecure.tls, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-dart/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..cbbdeb42f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-user-limit-policy.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 + +Project project = Project(client); + +Project result = await project.updateUserLimitPolicy( + total: 0, +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-variable.md b/examples/2.3.x/server-dart/examples/project/update-variable.md new file mode 100644 index 000000000..eef236d53 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-variable.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 + +Project project = Project(client); + +Variable result = await project.updateVariable( + variableId: '<VARIABLE_ID>', + key: '<KEY>', // (optional) + value: '<VALUE>', // (optional) + secret: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-web-platform.md b/examples/2.3.x/server-dart/examples/project/update-web-platform.md new file mode 100644 index 000000000..5de1cdc9c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-web-platform.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); + +PlatformWeb result = await project.updateWebPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-windows-platform.md b/examples/2.3.x/server-dart/examples/project/update-windows-platform.md new file mode 100644 index 000000000..306d00248 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-windows-platform.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); + +PlatformWindows result = await project.updateWindowsPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/create-api-rule.md b/examples/2.3.x/server-dart/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..a0a161505 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/create-api-rule.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 + +Proxy proxy = Proxy(client); + +ProxyRule result = await proxy.createAPIRule( + domain: 'example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/create-function-rule.md b/examples/2.3.x/server-dart/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..10bf38a2f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/create-function-rule.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 + +Proxy proxy = Proxy(client); + +ProxyRule result = await proxy.createFunctionRule( + domain: 'example.com', + functionId: '<FUNCTION_ID>', + branch: '<BRANCH>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/create-invalidation.md b/examples/2.3.x/server-dart/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..f97b22e58 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/create-invalidation.md @@ -0,0 +1,17 @@ +```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 + +Proxy proxy = Proxy(client); + +ProxyInvalidation result = await proxy.createInvalidation( + domain: 'example.com', + type: enums.InvalidationType.tag, + reference: '<REFERENCE>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-dart/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..348390630 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/create-redirect-rule.md @@ -0,0 +1,19 @@ +```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 + +Proxy proxy = Proxy(client); + +ProxyRule result = await proxy.createRedirectRule( + domain: 'example.com', + url: 'https://example.com', + statusCode: enums.StatusCode.movedPermanently, + resourceId: '<RESOURCE_ID>', + resourceType: enums.ProxyResourceType.site, +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/create-site-rule.md b/examples/2.3.x/server-dart/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..872ba3578 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/create-site-rule.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 + +Proxy proxy = Proxy(client); + +ProxyRule result = await proxy.createSiteRule( + domain: 'example.com', + siteId: '<SITE_ID>', + branch: '<BRANCH>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/delete-rule.md b/examples/2.3.x/server-dart/examples/proxy/delete-rule.md new file mode 100644 index 000000000..6829f2a1f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/delete-rule.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 + +Proxy proxy = Proxy(client); + +await proxy.deleteRule( + ruleId: '<RULE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/get-rule.md b/examples/2.3.x/server-dart/examples/proxy/get-rule.md new file mode 100644 index 000000000..6ade16472 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/get-rule.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 + +Proxy proxy = Proxy(client); + +ProxyRule result = await proxy.getRule( + ruleId: '<RULE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/list-rules.md b/examples/2.3.x/server-dart/examples/proxy/list-rules.md new file mode 100644 index 000000000..29931d1d3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/list-rules.md @@ -0,0 +1,15 @@ +```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 + +Proxy proxy = Proxy(client); + +ProxyRuleList result = await proxy.listRules( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/proxy/update-rule-status.md b/examples/2.3.x/server-dart/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..00c62dffa --- /dev/null +++ b/examples/2.3.x/server-dart/examples/proxy/update-rule-status.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 + +Proxy proxy = Proxy(client); + +ProxyRule result = await proxy.updateRuleStatus( + ruleId: '<RULE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/create-deployment.md b/examples/2.3.x/server-dart/examples/sites/create-deployment.md new file mode 100644 index 000000000..261c04fe9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/create-deployment.md @@ -0,0 +1,20 @@ +```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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createDeployment( + siteId: '<SITE_ID>', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + activate: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-dart/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..6844d143c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +Deployment result = await sites.createDuplicateDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/create-template-deployment.md b/examples/2.3.x/server-dart/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..a0d9004e2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/create-template-deployment.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createTemplateDeployment( + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + type: enums.TemplateReferenceType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/create-variable.md b/examples/2.3.x/server-dart/examples/sites/create-variable.md new file mode 100644 index 000000000..0144bec00 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/create-variable.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = Sites(client); + +Variable result = await sites.createVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-dart/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..a4fe7f8db --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = Sites(client); + +Deployment result = await sites.createVcsDeployment( + siteId: '<SITE_ID>', + type: enums.VCSReferenceType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/create.md b/examples/2.3.x/server-dart/examples/sites/create.md new file mode 100644 index 000000000..a1c617a38 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/create.md @@ -0,0 +1,38 @@ +```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 + +Sites sites = Sites(client); + +Site result = await sites.create( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: enums.Framework.analog, + buildRuntime: enums.BuildRuntime.node145, + enabled: false, // (optional) + logging: false, // (optional) + timeout: 1, // (optional) + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + startCommand: '<START_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + adapter: enums.Adapter.static, // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + fallbackFile: '<FALLBACK_FILE>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + providerBranches: [], // (optional) + providerPaths: [], // (optional) + buildSpecification: 's-1vcpu-512mb', // (optional) + runtimeSpecification: 's-1vcpu-512mb', // (optional) + deploymentRetention: 0, // (optional) + scopes: [enums.ProjectKeyScopes.projectRead], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/delete-deployment.md b/examples/2.3.x/server-dart/examples/sites/delete-deployment.md new file mode 100644 index 000000000..0a847f0a0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +await sites.deleteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/delete-log.md b/examples/2.3.x/server-dart/examples/sites/delete-log.md new file mode 100644 index 000000000..93b7d29a1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +await sites.deleteLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/delete-variable.md b/examples/2.3.x/server-dart/examples/sites/delete-variable.md new file mode 100644 index 000000000..46caceb2d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +await sites.deleteVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/delete.md b/examples/2.3.x/server-dart/examples/sites/delete.md new file mode 100644 index 000000000..059e1dbd6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/delete.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 + +Sites sites = Sites(client); + +await sites.delete( + siteId: '<SITE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/get-deployment-download.md b/examples/2.3.x/server-dart/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..412817491 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/get-deployment-download.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = Sites(client); + +Uint8List result = await sites.getDeploymentDownload( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: enums.DeploymentDownloadType.source, // (optional) + token: '<TOKEN>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/get-deployment.md b/examples/2.3.x/server-dart/examples/sites/get-deployment.md new file mode 100644 index 000000000..baaae7e75 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/get-deployment.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +Deployment result = await sites.getDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/get-log.md b/examples/2.3.x/server-dart/examples/sites/get-log.md new file mode 100644 index 000000000..b7e12b992 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/get-log.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +Execution result = await sites.getLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/get-variable.md b/examples/2.3.x/server-dart/examples/sites/get-variable.md new file mode 100644 index 000000000..6da082bef --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +Variable result = await sites.getVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/get.md b/examples/2.3.x/server-dart/examples/sites/get.md new file mode 100644 index 000000000..148689b73 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/get.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 + +Sites sites = Sites(client); + +Site result = await sites.get( + siteId: '<SITE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/list-deployments.md b/examples/2.3.x/server-dart/examples/sites/list-deployments.md new file mode 100644 index 000000000..eef8e7d64 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/list-deployments.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 + +Sites sites = Sites(client); + +DeploymentList result = await sites.listDeployments( + siteId: '<SITE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: 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 new file mode 100644 index 000000000..b3e9bd8b0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/list-frameworks.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +FrameworkList result = await sites.listFrameworks(); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/list-logs.md b/examples/2.3.x/server-dart/examples/sites/list-logs.md new file mode 100644 index 000000000..a95b29ac6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/list-logs.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 + +Sites sites = Sites(client); + +ExecutionList result = await sites.listLogs( + siteId: '<SITE_ID>', + queries: [], // (optional) + 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 new file mode 100644 index 000000000..7c80f2aad --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/list-specifications.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 + +Sites sites = Sites(client); + +SpecificationList result = await sites.listSpecifications( + type: 'runtimes', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/list-variables.md b/examples/2.3.x/server-dart/examples/sites/list-variables.md new file mode 100644 index 000000000..2f226ed6f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/list-variables.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 + +Sites sites = Sites(client); + +VariableList result = await sites.listVariables( + siteId: '<SITE_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/list.md b/examples/2.3.x/server-dart/examples/sites/list.md new file mode 100644 index 000000000..a9860af6d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/list.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 + +Sites sites = Sites(client); + +SiteList result = await sites.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/update-deployment-status.md b/examples/2.3.x/server-dart/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..01a22596e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +Deployment result = await sites.updateDeploymentStatus( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/update-site-deployment.md b/examples/2.3.x/server-dart/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..6139981e8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +```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 + +Sites sites = Sites(client); + +Site result = await sites.updateSiteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/update-variable.md b/examples/2.3.x/server-dart/examples/sites/update-variable.md new file mode 100644 index 000000000..24a135ead --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = Sites(client); + +Variable result = await sites.updateVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', // (optional) + value: '<VALUE>', // (optional) + secret: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/sites/update.md b/examples/2.3.x/server-dart/examples/sites/update.md new file mode 100644 index 000000000..44a1b3abd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/sites/update.md @@ -0,0 +1,38 @@ +```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 + +Sites sites = Sites(client); + +Site result = await sites.update( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: enums.Framework.analog, + enabled: false, // (optional) + logging: false, // (optional) + timeout: 1, // (optional) + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + startCommand: '<START_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + buildRuntime: enums.BuildRuntime.node145, // (optional) + adapter: enums.Adapter.static, // (optional) + fallbackFile: '<FALLBACK_FILE>', // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + providerBranches: [], // (optional) + providerPaths: [], // (optional) + buildSpecification: 's-1vcpu-512mb', // (optional) + runtimeSpecification: 's-1vcpu-512mb', // (optional) + deploymentRetention: 0, // (optional) + scopes: [enums.ProjectKeyScopes.projectRead], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/create-bucket.md b/examples/2.3.x/server-dart/examples/storage/create-bucket.md new file mode 100644 index 000000000..6f634a984 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/create-bucket.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.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 + +Storage storage = Storage(client); + +Bucket result = await storage.createBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // (optional) + fileSecurity: false, // (optional) + enabled: false, // (optional) + maximumFileSize: 1, // (optional) + allowedFileExtensions: [], // (optional) + compression: enums.Compression.none, // (optional) + encryption: false, // (optional) + antivirus: false, // (optional) + transformations: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/create-file.md b/examples/2.3.x/server-dart/examples/storage/create-file.md new file mode 100644 index 000000000..d0fae4cb8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/create-file.md @@ -0,0 +1,21 @@ +```dart +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.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 + +Storage storage = Storage(client); + +File result = await storage.createFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + permissions: [Permission.read(Role.any())], // (optional) + folder: 'photos/2026', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/delete-bucket.md b/examples/2.3.x/server-dart/examples/storage/delete-bucket.md new file mode 100644 index 000000000..041612f86 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/delete-bucket.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 + +Storage storage = Storage(client); + +await storage.deleteBucket( + bucketId: '<BUCKET_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/delete-file.md b/examples/2.3.x/server-dart/examples/storage/delete-file.md new file mode 100644 index 000000000..b52b5f918 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +```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 + +Storage storage = Storage(client); + +await storage.deleteFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/get-bucket.md b/examples/2.3.x/server-dart/examples/storage/get-bucket.md new file mode 100644 index 000000000..e5e2ed721 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/get-bucket.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 + +Storage storage = Storage(client); + +Bucket result = await storage.getBucket( + bucketId: '<BUCKET_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/get-file-download.md b/examples/2.3.x/server-dart/examples/storage/get-file-download.md new file mode 100644 index 000000000..3eefb650e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/get-file-download.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 + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +Uint8List result = await storage.getFileDownload( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/get-file-preview.md b/examples/2.3.x/server-dart/examples/storage/get-file-preview.md new file mode 100644 index 000000000..3b5f44172 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/get-file-preview.md @@ -0,0 +1,28 @@ +```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 + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +Uint8List result = await storage.getFilePreview( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // (optional) + height: 0, // (optional) + gravity: enums.ImageGravity.auto, // (optional) + quality: -1, // (optional) + borderWidth: 0, // (optional) + borderColor: 'FFFFFF', // (optional) + borderRadius: 0, // (optional) + opacity: 0, // (optional) + rotation: -360, // (optional) + background: 'FFFFFF', // (optional) + output: enums.ImageFormat.jpg, // (optional) + token: '<TOKEN>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/get-file-view.md b/examples/2.3.x/server-dart/examples/storage/get-file-view.md new file mode 100644 index 000000000..63cd86995 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/get-file-view.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 + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +Uint8List result = await storage.getFileView( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/get-file.md b/examples/2.3.x/server-dart/examples/storage/get-file.md new file mode 100644 index 000000000..bc5272c54 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/get-file.md @@ -0,0 +1,15 @@ +```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 + +Storage storage = Storage(client); + +File result = await storage.getFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/list-buckets.md b/examples/2.3.x/server-dart/examples/storage/list-buckets.md new file mode 100644 index 000000000..0b76ac287 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/list-buckets.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 + +Storage storage = Storage(client); + +BucketList result = await storage.listBuckets( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/list-files.md b/examples/2.3.x/server-dart/examples/storage/list-files.md new file mode 100644 index 000000000..ad417224e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/list-files.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 + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +FileList result = await storage.listFiles( + bucketId: '<BUCKET_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/update-bucket.md b/examples/2.3.x/server-dart/examples/storage/update-bucket.md new file mode 100644 index 000000000..c796c34c0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/update-bucket.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.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 + +Storage storage = Storage(client); + +Bucket result = await storage.updateBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // (optional) + fileSecurity: false, // (optional) + enabled: false, // (optional) + maximumFileSize: 1, // (optional) + allowedFileExtensions: [], // (optional) + compression: enums.Compression.none, // (optional) + encryption: false, // (optional) + antivirus: false, // (optional) + transformations: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/storage/update-file.md b/examples/2.3.x/server-dart/examples/storage/update-file.md new file mode 100644 index 000000000..4b3c3ac86 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/storage/update-file.md @@ -0,0 +1,19 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.updateFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // (optional) + permissions: [Permission.read(Role.any())], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..ff23c3a73 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnBigint result = await tablesDB.createBigIntColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + min: 0, // (optional) + max: 1000000, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..d1ed05b80 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnBoolean result = await tablesDB.createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-dart/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..58bd63599 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-cutover.md @@ -0,0 +1,15 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +DatabaseMigration result = await tablesDB.createCutover( + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..99107f148 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnDatetime result = await tablesDB.createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: '2020-10-15T06:38:00.000+00:00', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..00e6d3f00 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-email-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnEmail result = await tablesDB.createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..079a774d4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-enum-column.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnEnum result = await tablesDB.createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + xrequired: false, + xdefault: 'active', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-failover.md b/examples/2.3.x/server-dart/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..29919921f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-failover.md @@ -0,0 +1,15 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +DedicatedDatabase result = await tablesDB.createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..a6432000b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-float-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnFloat result = await tablesDB.createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + min: 0, // (optional) + max: 100, // (optional) + xdefault: 10.5, // (optional) + array: 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 new file mode 100644 index 000000000..97f2e23a4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-index.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDB tablesDB = TablesDB(client); + +ColumnIndex result = await tablesDB.createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + type: enums.TablesDBIndexType.key, + columns: [], + orders: [enums.OrderBy.asc], // (optional) + lengths: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..8f1e2cdd4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-integer-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnInteger result = await tablesDB.createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + min: 0, // (optional) + max: 100, // (optional) + xdefault: 10, // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..16d38c7bb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-ip-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnIp result = await tablesDB.createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: '192.0.2.0', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..3c38760b9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-line-column.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnLine result = await tablesDB.createLineColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [[1, 2], [3, 4], [5, 6]], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..36b7b2aa9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-longtext-column.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnLongtext result = await tablesDB.createLongtextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..3c26f6e82 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-mediumtext-column.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnMediumtext result = await tablesDB.createMediumtextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-migration.md b/examples/2.3.x/server-dart/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..65ea694a4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-migration.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 + +TablesDB tablesDB = TablesDB(client); + +DatabaseMigration result = await tablesDB.createMigration( + databaseId: '<DATABASE_ID>', + specification: 's-1vcpu-1gb', + autoCutover: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-operations.md b/examples/2.3.x/server-dart/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..359982dad --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-operations.md @@ -0,0 +1,25 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +Transaction result = await tablesDB.createOperations( + transactionId: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..6615ef21b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-point-column.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnPoint result = await tablesDB.createPointColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [1, 2], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..9036a1950 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnPolygon result = await tablesDB.createPolygonColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..4a7a0754a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-relationship-column.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnRelationship result = await tablesDB.createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: enums.RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '<KEY>', // (optional) + twoWayKey: '<TWO_WAY_KEY>', // (optional) + onDelete: enums.RelationMutate.cascade, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-row.md b/examples/2.3.x/server-dart/examples/tablesdb/create-row.md new file mode 100644 index 000000000..589d98ff1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-row.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..afa7629da --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-rows.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 + +TablesDB tablesDB = TablesDB(client); + +RowList result = await tablesDB.createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..d410af1ec --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-string-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnString result = await tablesDB.createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + size: 1, + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-table.md b/examples/2.3.x/server-dart/examples/tablesdb/create-table.md new file mode 100644 index 000000000..e4563135c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-table.md @@ -0,0 +1,23 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDB tablesDB = TablesDB(client); + +Table result = await tablesDB.createTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) + columns: [], // (optional) + indexes: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..d26dc60e1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-text-column.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnText result = await tablesDB.createTextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-dart/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..bb779b8c2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-transaction.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 + +TablesDB tablesDB = TablesDB(client); + +Transaction result = await tablesDB.createTransaction( + ttl: 60, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..d7de58691 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-url-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnUrl result = await tablesDB.createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-dart/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..57a5037ec --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnVarchar result = await tablesDB.createVarcharColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + size: 1, + xrequired: false, + xdefault: 'Hello World', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create.md b/examples/2.3.x/server-dart/examples/tablesdb/create.md new file mode 100644 index 000000000..86f968fce --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/create.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +Database result = await tablesDB.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) + specification: 'serverless', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-dart/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..74657b6f4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/decrement-row-column.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 + .setSession(''); // The user session to authenticate with + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '<COLUMN>', + value: 1, // (optional) + min: 0, // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/delete-column.md b/examples/2.3.x/server-dart/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..ffa574ba1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete-column.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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/delete-index.md b/examples/2.3.x/server-dart/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..96587d18a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete-index.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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-dart/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..a6531653e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete-migration.md @@ -0,0 +1,15 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteMigration( + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/delete-row.md b/examples/2.3.x/server-dart/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..1cf058fd5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete-row.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 + .setSession(''); // The user session to authenticate with + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + 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 new file mode 100644 index 000000000..443aee01f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete-rows.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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/delete-table.md b/examples/2.3.x/server-dart/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..046c8c941 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete-table.md @@ -0,0 +1,15 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-dart/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..18bdc902b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete-transaction.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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.deleteTransaction( + transactionId: '<TRANSACTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/delete.md b/examples/2.3.x/server-dart/examples/tablesdb/delete.md new file mode 100644 index 000000000..7001ddaa8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete.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 + +TablesDB tablesDB = TablesDB(client); + +await tablesDB.delete( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get-column.md b/examples/2.3.x/server-dart/examples/tablesdb/get-column.md new file mode 100644 index 000000000..0fa363285 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get-column.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 + +TablesDB tablesDB = TablesDB(client); + +dynamic result = await tablesDB.getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get-index.md b/examples/2.3.x/server-dart/examples/tablesdb/get-index.md new file mode 100644 index 000000000..517559d49 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get-index.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnIndex result = await tablesDB.getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get-migration.md b/examples/2.3.x/server-dart/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..f3f28a867 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get-migration.md @@ -0,0 +1,15 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +DatabaseMigration result = await tablesDB.getMigration( + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-dart/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..e3dbc4b6c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get-replicas.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 + +TablesDB tablesDB = TablesDB(client); + +DedicatedDatabaseReplicas result = await tablesDB.getReplicas( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get-row.md b/examples/2.3.x/server-dart/examples/tablesdb/get-row.md new file mode 100644 index 000000000..11a7d67b8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get-row.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get-status.md b/examples/2.3.x/server-dart/examples/tablesdb/get-status.md new file mode 100644 index 000000000..faa67bf53 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get-status.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 + +TablesDB tablesDB = TablesDB(client); + +DatabaseStatus result = await tablesDB.getStatus( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get-table.md b/examples/2.3.x/server-dart/examples/tablesdb/get-table.md new file mode 100644 index 000000000..81eed7f1b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get-table.md @@ -0,0 +1,15 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +Table result = await tablesDB.getTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-dart/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..ffe133298 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get-transaction.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 + +TablesDB tablesDB = TablesDB(client); + +Transaction result = await tablesDB.getTransaction( + transactionId: '<TRANSACTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/get.md b/examples/2.3.x/server-dart/examples/tablesdb/get.md new file mode 100644 index 000000000..24412ad11 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/get.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 + +TablesDB tablesDB = TablesDB(client); + +Database result = await tablesDB.get( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-dart/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..0a17c6060 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/increment-row-column.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 + .setSession(''); // The user session to authenticate with + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '<COLUMN>', + value: 1, // (optional) + max: 100, // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list-columns.md b/examples/2.3.x/server-dart/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..7c2200768 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-columns.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnList result = await tablesDB.listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-dart/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..669bbb3a2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-indexes.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnIndexList result = await tablesDB.listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-dart/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..bca0231d7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-migrations.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 + +TablesDB tablesDB = TablesDB(client); + +DatabaseMigrationList result = await tablesDB.listMigrations( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list-operations.md b/examples/2.3.x/server-dart/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..b30df343d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-operations.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 + +TablesDB tablesDB = TablesDB(client); + +DedicatedDatabaseOperationList result = await tablesDB.listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list-rows.md b/examples/2.3.x/server-dart/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..863e461ee --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-rows.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +RowList result = await tablesDB.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-dart/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..55b70e8cc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDB tablesDB = TablesDB(client); + +DedicatedDatabaseSpecificationList result = await tablesDB.listSpecifications(); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list-tables.md b/examples/2.3.x/server-dart/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..b640527ba --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-tables.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 + +TablesDB tablesDB = TablesDB(client); + +TableList result = await tablesDB.listTables( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (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 new file mode 100644 index 000000000..fa4782b5b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-transactions.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 + +TablesDB tablesDB = TablesDB(client); + +TransactionList result = await tablesDB.listTransactions( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list.md b/examples/2.3.x/server-dart/examples/tablesdb/list.md new file mode 100644 index 000000000..ef6722782 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/list.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 + +TablesDB tablesDB = TablesDB(client); + +DatabaseList result = await tablesDB.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..3638e5b5e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnBigint result = await tablesDB.updateBigIntColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 1000000, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..f282f134d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnBoolean result = await tablesDB.updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: false, + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..5f40545fd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnDatetime result = await tablesDB.updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: '2020-10-15T06:38:00.000+00:00', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..8f9bc613b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-email-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnEmail result = await tablesDB.updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'email@example.com', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..8e2ed4e42 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-enum-column.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnEnum result = await tablesDB.updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + xrequired: false, + xdefault: 'active', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..9cdc6670d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-float-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnFloat result = await tablesDB.updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 10.5, + min: 0, // (optional) + max: 100, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..9264c25b8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-integer-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnInteger result = await tablesDB.updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 10, + min: 0, // (optional) + max: 100, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..df4368e9b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-ip-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnIp result = await tablesDB.updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: '192.0.2.0', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..beadc457b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-line-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnLine result = await tablesDB.updateLineColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [[1, 2], [3, 4], [5, 6]], // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..3cce90f78 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnLongtext result = await tablesDB.updateLongtextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..833043c19 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnMediumtext result = await tablesDB.updateMediumtextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..0d970da99 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-point-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnPoint result = await tablesDB.updatePointColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [1, 2], // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..c19b82729 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnPolygon result = await tablesDB.updatePolygonColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..60008cb79 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnRelationship result = await tablesDB.updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + onDelete: enums.RelationMutate.cascade, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-row.md b/examples/2.3.x/server-dart/examples/tablesdb/update-row.md new file mode 100644 index 000000000..514f740b5 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-row.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-rows.md b/examples/2.3.x/server-dart/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..3d3730bce --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-rows.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +RowList result = await tablesDB.updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, // (optional) + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..80c0a6be3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-string-column.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnString result = await tablesDB.updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + size: 1, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-table.md b/examples/2.3.x/server-dart/examples/tablesdb/update-table.md new file mode 100644 index 000000000..217da3f41 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-table.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDB tablesDB = TablesDB(client); + +Table result = await tablesDB.updateTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', // (optional) + permissions: [Permission.read(Role.any())], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) + purge: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..6cb0f7ce8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-text-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnText result = await tablesDB.updateTextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-dart/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..fbcafc8ab --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-transaction.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 + +TablesDB tablesDB = TablesDB(client); + +Transaction result = await tablesDB.updateTransaction( + transactionId: '<TRANSACTION_ID>', + commit: false, // (optional) + rollback: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..98b4be9fa --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-url-column.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +ColumnUrl result = await tablesDB.updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'https://example.com', + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-dart/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..b9b7cce4e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update-varchar-column.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 + +TablesDB tablesDB = TablesDB(client); + +ColumnVarchar result = await tablesDB.updateVarcharColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + xrequired: false, + xdefault: 'Hello World', + size: 1, // (optional) + newKey: '<NEW_KEY>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/update.md b/examples/2.3.x/server-dart/examples/tablesdb/update.md new file mode 100644 index 000000000..6574bde3f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/update.md @@ -0,0 +1,19 @@ +```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 + +TablesDB tablesDB = TablesDB(client); + +Database result = await tablesDB.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + specification: 'serverless', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-dart/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..21f2734b2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/upsert-row.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDB tablesDB = TablesDB(client); + +Row result = await tablesDB.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..a457f5e88 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tablesdb/upsert-rows.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 + +TablesDB tablesDB = TablesDB(client); + +RowList result = await tablesDB.upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/create-installation.md b/examples/2.3.x/server-dart/examples/teams/create-installation.md new file mode 100644 index 000000000..e41c00f1c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/create-installation.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +AppInstallation result = await teams.createInstallation( + teamId: '<TEAM_ID>', + appId: '<APP_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (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 new file mode 100644 index 000000000..8f95362a7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/create-membership.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.createMembership( + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // (optional) + userId: '<USER_ID>', // (optional) + phone: '+12065550100', // (optional) + url: 'https://example.com', // (optional) + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/create.md b/examples/2.3.x/server-dart/examples/teams/create.md new file mode 100644 index 000000000..61bb5daa3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/create.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.create( + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/delete-installation.md b/examples/2.3.x/server-dart/examples/teams/delete-installation.md new file mode 100644 index 000000000..88595482f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/delete-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.deleteInstallation( + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/delete-membership.md b/examples/2.3.x/server-dart/examples/teams/delete-membership.md new file mode 100644 index 000000000..5c63224f6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +```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 + +Teams teams = Teams(client); + +await teams.deleteMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/delete.md b/examples/2.3.x/server-dart/examples/teams/delete.md new file mode 100644 index 000000000..8cb4181a0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/delete.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.delete( + teamId: '<TEAM_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/get-installation.md b/examples/2.3.x/server-dart/examples/teams/get-installation.md new file mode 100644 index 000000000..81c030f86 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/get-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +AppInstallation result = await teams.getInstallation( + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/get-membership.md b/examples/2.3.x/server-dart/examples/teams/get-membership.md new file mode 100644 index 000000000..b7a8200a8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +```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 + +Teams teams = Teams(client); + +Membership result = await teams.getMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/get-prefs.md b/examples/2.3.x/server-dart/examples/teams/get-prefs.md new file mode 100644 index 000000000..482390cf6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/get-prefs.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Preferences result = await teams.getPrefs( + teamId: '<TEAM_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/get.md b/examples/2.3.x/server-dart/examples/teams/get.md new file mode 100644 index 000000000..cd426afcb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/get.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.get( + teamId: '<TEAM_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/list-installations.md b/examples/2.3.x/server-dart/examples/teams/list-installations.md new file mode 100644 index 000000000..18f973e48 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/list-installations.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +AppInstallationList result = await teams.listInstallations( + teamId: '<TEAM_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/list-memberships.md b/examples/2.3.x/server-dart/examples/teams/list-memberships.md new file mode 100644 index 000000000..2f6400d9a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/list-memberships.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +MembershipList result = await teams.listMemberships( + teamId: '<TEAM_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/list.md b/examples/2.3.x/server-dart/examples/teams/list.md new file mode 100644 index 000000000..b056968ec --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/list.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +TeamList result = await teams.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/update-installation.md b/examples/2.3.x/server-dart/examples/teams/update-installation.md new file mode 100644 index 000000000..a9a02cb0b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/update-installation.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +AppInstallation result = await teams.updateInstallation( + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/update-membership-status.md b/examples/2.3.x/server-dart/examples/teams/update-membership-status.md new file mode 100644 index 000000000..a5ec5e1c0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/update-membership-status.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.updateMembershipStatus( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>', +); +``` 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 new file mode 100644 index 000000000..961def983 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/update-membership.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 + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.updateMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [], +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/update-name.md b/examples/2.3.x/server-dart/examples/teams/update-name.md new file mode 100644 index 000000000..84069773e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/update-name.md @@ -0,0 +1,15 @@ +```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 + +Teams teams = Teams(client); + +Team result = await teams.updateName( + teamId: '<TEAM_ID>', + name: '<NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/teams/update-prefs.md b/examples/2.3.x/server-dart/examples/teams/update-prefs.md new file mode 100644 index 000000000..e51b2da05 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +```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 + +Teams teams = Teams(client); + +Preferences result = await teams.updatePrefs( + teamId: '<TEAM_ID>', + prefs: {}, +); +``` diff --git a/examples/2.3.x/server-dart/examples/tokens/create-file-token.md b/examples/2.3.x/server-dart/examples/tokens/create-file-token.md new file mode 100644 index 000000000..5348736a2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tokens/create-file-token.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 + +Tokens tokens = Tokens(client); + +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-dart/examples/tokens/delete.md b/examples/2.3.x/server-dart/examples/tokens/delete.md new file mode 100644 index 000000000..b5541b0e3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tokens/delete.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 + +Tokens tokens = Tokens(client); + +await tokens.delete( + tokenId: '<TOKEN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tokens/get.md b/examples/2.3.x/server-dart/examples/tokens/get.md new file mode 100644 index 000000000..53bbd181e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tokens/get.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 + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.get( + tokenId: '<TOKEN_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/tokens/list.md b/examples/2.3.x/server-dart/examples/tokens/list.md new file mode 100644 index 000000000..17fb2ff80 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tokens/list.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 + +Tokens tokens = Tokens(client); + +ResourceTokenList result = await tokens.list( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/tokens/update.md b/examples/2.3.x/server-dart/examples/tokens/update.md new file mode 100644 index 000000000..6c0eb572a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/tokens/update.md @@ -0,0 +1,15 @@ +```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 + +Tokens tokens = Tokens(client); + +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-dart/examples/users/create-argon-2-user.md b/examples/2.3.x/server-dart/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..2cddf2fa6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-argon-2-user.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 + +Users users = Users(client); + +User result = await users.createArgon2User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-dart/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..ca5bdf564 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-bcrypt-user.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 + +Users users = Users(client); + +User result = await users.createBcryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-jwt.md b/examples/2.3.x/server-dart/examples/users/create-jwt.md new file mode 100644 index 000000000..42b174b77 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-jwt.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 + +Users users = Users(client); + +Jwt result = await users.createJWT( + userId: '<USER_ID>', + sessionId: 'recent()', // (optional) + duration: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-md-5-user.md b/examples/2.3.x/server-dart/examples/users/create-md-5-user.md new file mode 100644 index 000000000..490b26a6e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-md-5-user.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 + +Users users = Users(client); + +User result = await users.createMD5User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-dart/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..9251cb504 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-mfa-recovery-codes.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 + +Users users = Users(client); + +MfaRecoveryCodes result = await users.createMFARecoveryCodes( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-dart/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..74105bcf3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-ph-pass-user.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 + +Users users = Users(client); + +User result = await users.createPHPassUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-dart/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..5c6301854 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-scrypt-modified-user.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 + +Users users = Users(client); + +User result = await users.createScryptModifiedUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-scrypt-user.md b/examples/2.3.x/server-dart/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..66d495218 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +```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 + +Users users = Users(client); + +User result = await users.createScryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: 8, + passwordMemory: 65536, + passwordParallel: 1, + passwordLength: 64, + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-session.md b/examples/2.3.x/server-dart/examples/users/create-session.md new file mode 100644 index 000000000..f782dbefe --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-session.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 + +Users users = Users(client); + +Session result = await users.createSession( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-sha-user.md b/examples/2.3.x/server-dart/examples/users/create-sha-user.md new file mode 100644 index 000000000..65adca609 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-sha-user.md @@ -0,0 +1,19 @@ +```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 + +Users users = Users(client); + +User result = await users.createSHAUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: enums.PasswordHash.sha1, // (optional) + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-target.md b/examples/2.3.x/server-dart/examples/users/create-target.md new file mode 100644 index 000000000..ea9c4014a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-target.md @@ -0,0 +1,20 @@ +```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 + +Users users = Users(client); + +Target result = await users.createTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: enums.MessagingProviderType.email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // (optional) + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create-token.md b/examples/2.3.x/server-dart/examples/users/create-token.md new file mode 100644 index 000000000..c79c21cc6 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create-token.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 + +Users users = Users(client); + +Token result = await users.createToken( + userId: '<USER_ID>', + length: 4, // (optional) + expire: 60, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/create.md b/examples/2.3.x/server-dart/examples/users/create.md new file mode 100644 index 000000000..1bbccb8ce --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/create.md @@ -0,0 +1,18 @@ +```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 + +Users users = Users(client); + +User result = await users.create( + userId: '<USER_ID>', + email: 'email@example.com', // (optional) + phone: '+12065550100', // (optional) + password: 'password', // (optional) + name: '<NAME>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/delete-identity.md b/examples/2.3.x/server-dart/examples/users/delete-identity.md new file mode 100644 index 000000000..6ec6cfa81 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/delete-identity.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 + +Users users = Users(client); + +await users.deleteIdentity( + identityId: '<IDENTITY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-dart/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..d33dd5f7d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteMFAAuthenticator( + userId: '<USER_ID>', + type: enums.AuthenticatorType.totp, +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/delete-session.md b/examples/2.3.x/server-dart/examples/users/delete-session.md new file mode 100644 index 000000000..d5555502f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/delete-session.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +await users.deleteSession( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/delete-sessions.md b/examples/2.3.x/server-dart/examples/users/delete-sessions.md new file mode 100644 index 000000000..cb84cac70 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/delete-sessions.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 + +Users users = Users(client); + +await users.deleteSessions( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/delete-target.md b/examples/2.3.x/server-dart/examples/users/delete-target.md new file mode 100644 index 000000000..86ade933f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/delete-target.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +await users.deleteTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/delete.md b/examples/2.3.x/server-dart/examples/users/delete.md new file mode 100644 index 000000000..a10942744 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/delete.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 + +Users users = Users(client); + +await users.delete( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-dart/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..0738433dc --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/get-mfa-challenge.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +MfaChallengeSecret result = await users.getMFAChallenge( + userId: '<USER_ID>', + challengeId: '<CHALLENGE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-dart/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..72fb5b9eb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/get-mfa-recovery-codes.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 + +Users users = Users(client); + +MfaRecoveryCodes result = await users.getMFARecoveryCodes( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/get-prefs.md b/examples/2.3.x/server-dart/examples/users/get-prefs.md new file mode 100644 index 000000000..c8f314c6f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/get-prefs.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 + +Users users = Users(client); + +Preferences result = await users.getPrefs( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/get-target.md b/examples/2.3.x/server-dart/examples/users/get-target.md new file mode 100644 index 000000000..f765ada56 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/get-target.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +Target result = await users.getTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/get.md b/examples/2.3.x/server-dart/examples/users/get.md new file mode 100644 index 000000000..1ce98396b --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/get.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 + +Users users = Users(client); + +User result = await users.get( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/list-identities.md b/examples/2.3.x/server-dart/examples/users/list-identities.md new file mode 100644 index 000000000..a6d570f1e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/list-identities.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 + +Users users = Users(client); + +IdentityList result = await users.listIdentities( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/list-memberships.md b/examples/2.3.x/server-dart/examples/users/list-memberships.md new file mode 100644 index 000000000..b6b7f7cac --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/list-memberships.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 + +Users users = Users(client); + +MembershipList result = await users.listMemberships( + userId: '<USER_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/list-mfa-factors.md b/examples/2.3.x/server-dart/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..f8b1db82c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/list-mfa-factors.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 + +Users users = Users(client); + +MfaFactors result = await users.listMFAFactors( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/list-sessions.md b/examples/2.3.x/server-dart/examples/users/list-sessions.md new file mode 100644 index 000000000..abbf7932c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/list-sessions.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +SessionList result = await users.listSessions( + userId: '<USER_ID>', + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/list-targets.md b/examples/2.3.x/server-dart/examples/users/list-targets.md new file mode 100644 index 000000000..3014b8de1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/list-targets.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 + +Users users = Users(client); + +TargetList result = await users.listTargets( + userId: '<USER_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/list.md b/examples/2.3.x/server-dart/examples/users/list.md new file mode 100644 index 000000000..bb00e0cfe --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/list.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 + +Users users = Users(client); + +UserList result = await users.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-email-verification.md b/examples/2.3.x/server-dart/examples/users/update-email-verification.md new file mode 100644 index 000000000..636afc107 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-email-verification.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updateEmailVerification( + userId: '<USER_ID>', + emailVerification: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-email.md b/examples/2.3.x/server-dart/examples/users/update-email.md new file mode 100644 index 000000000..0bd3d61e1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-email.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updateEmail( + userId: '<USER_ID>', + email: 'email@example.com', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-impersonator.md b/examples/2.3.x/server-dart/examples/users/update-impersonator.md new file mode 100644 index 000000000..6d1d96452 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-impersonator.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updateImpersonator( + userId: '<USER_ID>', + impersonator: false, +); +``` 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 new file mode 100644 index 000000000..efbf657d3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-labels.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updateLabels( + userId: '<USER_ID>', + labels: [], +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-dart/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..a08fc361d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-mfa-recovery-codes.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 + +Users users = Users(client); + +MfaRecoveryCodes result = await users.updateMFARecoveryCodes( + userId: '<USER_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-mfa.md b/examples/2.3.x/server-dart/examples/users/update-mfa.md new file mode 100644 index 000000000..cd67922e9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-mfa.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updateMFA( + userId: '<USER_ID>', + mfa: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-name.md b/examples/2.3.x/server-dart/examples/users/update-name.md new file mode 100644 index 000000000..4a67672d4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-name.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updateName( + userId: '<USER_ID>', + name: '<NAME>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-password.md b/examples/2.3.x/server-dart/examples/users/update-password.md new file mode 100644 index 000000000..4968bae42 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-password.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updatePassword( + userId: '<USER_ID>', + password: 'password', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-phone-verification.md b/examples/2.3.x/server-dart/examples/users/update-phone-verification.md new file mode 100644 index 000000000..14f91aeb3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-phone-verification.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updatePhoneVerification( + userId: '<USER_ID>', + phoneVerification: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-phone.md b/examples/2.3.x/server-dart/examples/users/update-phone.md new file mode 100644 index 000000000..3eb43b1e1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-phone.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updatePhone( + userId: '<USER_ID>', + number: '+12065550100', +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-prefs.md b/examples/2.3.x/server-dart/examples/users/update-prefs.md new file mode 100644 index 000000000..e8b7e7e82 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +Preferences result = await users.updatePrefs( + userId: '<USER_ID>', + prefs: {}, +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-status.md b/examples/2.3.x/server-dart/examples/users/update-status.md new file mode 100644 index 000000000..3d4741872 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-status.md @@ -0,0 +1,15 @@ +```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 + +Users users = Users(client); + +User result = await users.updateStatus( + userId: '<USER_ID>', + status: false, +); +``` diff --git a/examples/2.3.x/server-dart/examples/users/update-target.md b/examples/2.3.x/server-dart/examples/users/update-target.md new file mode 100644 index 000000000..f15e170fb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/users/update-target.md @@ -0,0 +1,18 @@ +```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 + +Users users = Users(client); + +Target result = await users.updateTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // (optional) + providerId: '<PROVIDER_ID>', // (optional) + name: '<NAME>', // (optional) +); +``` 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 new file mode 100644 index 000000000..373e42edd --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-collection.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create-document.md b/examples/2.3.x/server-dart/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..5a69c5387 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-document.md @@ -0,0 +1,31 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..61d28281a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-documents.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 + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-dart/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..1a5ae080f --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-failover.md @@ -0,0 +1,15 @@ +```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 + +VectorsDB vectorsDB = VectorsDB(client); + +DedicatedDatabase result = await vectorsDB.createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_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 new file mode 100644 index 000000000..497e69da4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-index.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Index result = await vectorsDB.createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: enums.VectorsDBIndexType.hnswEuclidean, + attributes: [], + 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 new file mode 100644 index 000000000..2736f79e3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.createOperations( + transactionId: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create-query.md b/examples/2.3.x/server-dart/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..f94dd3236 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-query.md @@ -0,0 +1,19 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.createQuery( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-dart/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..a049d5e72 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.createTransaction( + ttl: 60, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create.md b/examples/2.3.x/server-dart/examples/vectorsdb/create.md new file mode 100644 index 000000000..94be24e5d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create.md @@ -0,0 +1,19 @@ +```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 + +VectorsDB vectorsDB = VectorsDB(client); + +Database result = await vectorsDB.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) + specification: 'serverless', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-dart/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..ff7b73c44 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/delete-collection.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-dart/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..b0ecb3758 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/delete-document.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..a2d7b1f9d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/delete-documents.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-dart/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..a658a0790 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/delete-index.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-dart/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..c8d2d9734 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteTransaction( + transactionId: '<TRANSACTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/delete.md b/examples/2.3.x/server-dart/examples/vectorsdb/delete.md new file mode 100644 index 000000000..889f599ac --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/delete.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 + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.delete( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-dart/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..8fe629229 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/get-collection.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/get-document.md b/examples/2.3.x/server-dart/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..f6e88e0be --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/get-document.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/get-index.md b/examples/2.3.x/server-dart/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..ebfa90328 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/get-index.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Index result = await vectorsDB.getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-dart/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..cf402372c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/get-replicas.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 + +VectorsDB vectorsDB = VectorsDB(client); + +DedicatedDatabaseReplicas result = await vectorsDB.getReplicas( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/get-status.md b/examples/2.3.x/server-dart/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..e5364a3b3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/get-status.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 + +VectorsDB vectorsDB = VectorsDB(client); + +DatabaseStatus result = await vectorsDB.getStatus( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-dart/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..513d4997e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/get-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.getTransaction( + transactionId: '<TRANSACTION_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/get.md b/examples/2.3.x/server-dart/examples/vectorsdb/get.md new file mode 100644 index 000000000..6498956a7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/get.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 + +VectorsDB vectorsDB = VectorsDB(client); + +Database result = await vectorsDB.get( + databaseId: '<DATABASE_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-dart/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..ae03da41e --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/list-collections.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +VectorsdbCollectionList result = await vectorsDB.listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-dart/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..596a4c0c4 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/list-documents.md @@ -0,0 +1,19 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-dart/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..756abd4a9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/list-indexes.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +IndexList result = await vectorsDB.listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-dart/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..9c55984b7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/list-operations.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 + +VectorsDB vectorsDB = VectorsDB(client); + +DedicatedDatabaseOperationList result = await vectorsDB.listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // (optional) + limit: 1, // (optional) + offset: 0, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-dart/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..d285ea9d0 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +DedicatedDatabaseSpecificationList result = await vectorsDB.listSpecifications(); +``` 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 new file mode 100644 index 000000000..eb5058755 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/list-transactions.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +TransactionList result = await vectorsDB.listTransactions( + queries: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/list.md b/examples/2.3.x/server-dart/examples/vectorsdb/list.md new file mode 100644 index 000000000..581fa7403 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/list.md @@ -0,0 +1,15 @@ +```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 + +VectorsDB vectorsDB = VectorsDB(client); + +DatabaseList result = await vectorsDB.list( + 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 new file mode 100644 index 000000000..e7e90abe7 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/update-collection.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/update-document.md b/examples/2.3.x/server-dart/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..eac35a967 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/update-document.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-dart/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..221a5bc91 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/update-documents.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, // (optional) + queries: [], // (optional) + transactionId: '<TRANSACTION_ID>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-dart/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..dd08d5cdb --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/update-transaction.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.updateTransaction( + transactionId: '<TRANSACTION_ID>', + commit: false, // (optional) + rollback: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/update.md b/examples/2.3.x/server-dart/examples/vectorsdb/update.md new file mode 100644 index 000000000..4c876312d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/update.md @@ -0,0 +1,19 @@ +```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 + +VectorsDB vectorsDB = VectorsDB(client); + +Database result = await vectorsDB.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) + specification: 'serverless', // (optional) + replicas: 0, // (optional) + syncMode: 'async', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-dart/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..65f7f2bd8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/upsert-document.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '<TRANSACTION_ID>', // (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 new file mode 100644 index 000000000..d6bd3309a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + 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 new file mode 100644 index 000000000..fe07d9d6d --- /dev/null +++ b/examples/2.3.x/server-dart/examples/webhooks/create.md @@ -0,0 +1,22 @@ +```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 + +Webhooks webhooks = Webhooks(client); + +Webhook result = await webhooks.create( + webhookId: '<WEBHOOK_ID>', + url: 'https://example.com/webhook', + name: '<NAME>', + events: [], + enabled: false, // (optional) + tls: false, // (optional) + authUsername: '<AUTH_USERNAME>', // (optional) + authPassword: 'password', // (optional) + secret: '<SECRET>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/webhooks/delete.md b/examples/2.3.x/server-dart/examples/webhooks/delete.md new file mode 100644 index 000000000..5df49aa2c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/webhooks/delete.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 + +Webhooks webhooks = Webhooks(client); + +await webhooks.delete( + webhookId: '<WEBHOOK_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/webhooks/get.md b/examples/2.3.x/server-dart/examples/webhooks/get.md new file mode 100644 index 000000000..60defa832 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/webhooks/get.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 + +Webhooks webhooks = Webhooks(client); + +Webhook result = await webhooks.get( + webhookId: '<WEBHOOK_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/webhooks/list.md b/examples/2.3.x/server-dart/examples/webhooks/list.md new file mode 100644 index 000000000..ea2d91e9c --- /dev/null +++ b/examples/2.3.x/server-dart/examples/webhooks/list.md @@ -0,0 +1,15 @@ +```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 + +Webhooks webhooks = Webhooks(client); + +WebhookList result = await webhooks.list( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/webhooks/update-secret.md b/examples/2.3.x/server-dart/examples/webhooks/update-secret.md new file mode 100644 index 000000000..9aab19bf3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/webhooks/update-secret.md @@ -0,0 +1,15 @@ +```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 + +Webhooks webhooks = Webhooks(client); + +Webhook result = await webhooks.updateSecret( + webhookId: '<WEBHOOK_ID>', + secret: '<SECRET>', // (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 new file mode 100644 index 000000000..99bc21df8 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/webhooks/update.md @@ -0,0 +1,21 @@ +```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 + +Webhooks webhooks = Webhooks(client); + +Webhook result = await webhooks.update( + webhookId: '<WEBHOOK_ID>', + name: '<NAME>', + url: 'https://example.com/webhook', + events: [], + enabled: false, // (optional) + tls: false, // (optional) + authUsername: '<AUTH_USERNAME>', // (optional) + authPassword: 'password', // (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 new file mode 100644 index 000000000..35b3aab46 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-anonymous-session.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..f24e35ca3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-email-password-session.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +Session result = await account.CreateEmailPasswordSession( + email: "email@example.com", + password: "password" +); + +``` 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 new file mode 100644 index 000000000..be003ffe1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-email-token.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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..537193b26 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-email-verification-otp.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..b5c4aad48 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-email-verification.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..121d06845 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-id-token-session.md @@ -0,0 +1,23 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.CreateIdTokenSession( + provider: IdTokenProvider.Apple, + idToken: "<ID_TOKEN>", + nonce: "<NONCE>", // optional + accessToken: "<ACCESS_TOKEN>", // optional + accessTokenExpiry: 0, // optional + name: "<NAME>" // 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 new file mode 100644 index 000000000..85e771646 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-magic-url-token.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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreateMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // 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 new file mode 100644 index 000000000..74e3d1053 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-mfa-authenticator.md @@ -0,0 +1,18 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..8f7a9208b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-mfa-challenge.md @@ -0,0 +1,18 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..6869828db --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-mfa-recovery-codes.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 + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.CreateMFARecoveryCodes(); + + +``` diff --git a/examples/2.3.x/server-dotnet/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-dotnet/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..f47f7e5ea --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-o-auth-2-token.md @@ -0,0 +1,21 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.CreateOAuth2Token( + provider: OAuthProvider.Amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: new List<string>() // optional +); + +``` 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 new file mode 100644 index 000000000..e296f8ed7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-phone-token.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..e5f1144da --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-phone-verification.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..db9dc0ce7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-recovery-otp.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..7951fcb60 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-recovery.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..9cd8558a9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-session.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..a25aa0de2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create-verification.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..b068e0c36 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/create.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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.Create( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/account/delete-consent-token.md b/examples/2.3.x/server-dotnet/examples/account/delete-consent-token.md new file mode 100644 index 000000000..0080afa90 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/delete-consent-token.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +await account.DeleteConsentToken( + consentId: "<CONSENT_ID>", + tokenId: "<TOKEN_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/account/delete-consent.md b/examples/2.3.x/server-dotnet/examples/account/delete-consent.md new file mode 100644 index 000000000..34adec2bc --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/delete-consent.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 + +Account account = new Account(client); + +await account.DeleteConsent( + consentId: "<CONSENT_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/account/delete-identity.md b/examples/2.3.x/server-dotnet/examples/account/delete-identity.md new file mode 100644 index 000000000..bc4938d68 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/delete-identity.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 + +Account account = new Account(client); + +await account.DeleteIdentity( + identityId: "<IDENTITY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-dotnet/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..58aa3af1a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,18 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteMFAAuthenticator( + type: AuthenticatorType.Totp +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/account/delete-session.md b/examples/2.3.x/server-dotnet/examples/account/delete-session.md new file mode 100644 index 000000000..9c8e9c1f8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/delete-session.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 + +Account account = new Account(client); + +await account.DeleteSession( + sessionId: "<SESSION_ID>" +); + +``` 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 new file mode 100644 index 000000000..31bd03a12 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/delete-sessions.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 + +Account account = new Account(client); + +await account.DeleteSessions(); + + +``` 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 new file mode 100644 index 000000000..d348e155e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/get-consent-token.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..816f6d5e4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/get-consent.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..54ffda453 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/get-mfa-recovery-codes.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..fb891b6e2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/get-prefs.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..dee7ad1b1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/get-session.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..ba7c848bf --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/get.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..5f1f36d49 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/list-consent-tokens.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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..ca7eb65a2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/list-consents.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..f64b03b0a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/list-identities.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..5fa29c29e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/list-mfa-factors.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..81402bccf --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/list-sessions.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 + +Account account = new Account(client); + +SessionList result = await account.ListSessions(); + + +``` 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 new file mode 100644 index 000000000..384fdeeb9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-email-verification-otp.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..3b4214e6c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-email-verification.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..9135dc1c1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-email.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..06f707ee5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-magic-url-session.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..a9cdba19d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-mfa-authenticator.md @@ -0,0 +1,19 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..d74d8d58c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-mfa-challenge.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..eefede0f5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-mfa-recovery-codes.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..449edcb39 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-mfa.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..bf88c6626 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-name.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..323934abc --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-password.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..dd7ab0487 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-phone-session.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..c2b7eebb5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-phone-verification.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..d2b7276b4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-phone.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..105e69888 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-prefs.md @@ -0,0 +1,21 @@ +```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 + +Account account = new Account(client); + +User result = await account.UpdatePrefs( + prefs: new { + language = "en", + timezone = "UTC", + darkTheme = true + } +); + +``` 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 new file mode 100644 index 000000000..9232fb371 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-recovery-otp.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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..5875c5b09 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-recovery.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 + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..d49e556f0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-session.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..95ac938dd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-status.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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..16fbc2ce5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/account/update-verification.md @@ -0,0 +1,18 @@ +```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 + +Account account = new Account(client); + +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 new file mode 100644 index 000000000..82e50a0b1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/activities/get-event.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 + +Activities activities = new Activities(client); + +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 new file mode 100644 index 000000000..c3d2ba2fd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/activities/list-events.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 + +Activities activities = new Activities(client); + +ActivityEventList result = await activities.ListEvents( + queries: new List<string>() // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/advisor/delete-report.md b/examples/2.3.x/server-dotnet/examples/advisor/delete-report.md new file mode 100644 index 000000000..4e8f41236 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/advisor/delete-report.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 + +Advisor advisor = new Advisor(client); + +await advisor.DeleteReport( + reportId: "<REPORT_ID>" +); + +``` 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 new file mode 100644 index 000000000..29543bdc8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/advisor/get-insight.md @@ -0,0 +1,18 @@ +```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 + +Advisor advisor = new Advisor(client); + +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 new file mode 100644 index 000000000..2143cbc0a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/advisor/get-report.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 + +Advisor advisor = new Advisor(client); + +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 new file mode 100644 index 000000000..00322495d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/advisor/list-insights.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 + +Advisor advisor = new Advisor(client); + +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 new file mode 100644 index 000000000..e610e521d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/advisor/list-reports.md @@ -0,0 +1,18 @@ +```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 + +Advisor advisor = new Advisor(client); + +ReportList result = await advisor.ListReports( + queries: new List<string>(), // optional + total: false // 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 new file mode 100644 index 000000000..0aabf4b1d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/create-installation-token.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..a4e53d1e4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/create-key.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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..12553ab66 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/create-secret.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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..18adab455 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/create.md @@ -0,0 +1,35 @@ +```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 + +Apps apps = new Apps(client); + +App result = await apps.Create( + appId: "<APP_ID>", + name: "<NAME>", + redirectUris: new List<string>(), + description: "<DESCRIPTION>", // optional + clientUri: "https://example.com", // optional + logoUri: "https://example.com", // optional + privacyPolicyUrl: "https://example.com", // optional + termsUrl: "https://example.com", // optional + contacts: new List<string>(), // optional + tagline: "<TAGLINE>", // optional + tags: new List<string>(), // optional + images: new List<string>(), // optional + supportUrl: "https://example.com", // optional + dataDeletionUrl: "https://example.com", // optional + postLogoutRedirectUris: new List<string>(), // optional + enabled: false, // optional + type: "public", // optional + deviceFlow: false, // optional + teamId: "<TEAM_ID>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/apps/delete-installation.md b/examples/2.3.x/server-dotnet/examples/apps/delete-installation.md new file mode 100644 index 000000000..b55d8b31b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/delete-installation.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +await apps.DeleteInstallation( + appId: "<APP_ID>", + installationId: "<INSTALLATION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/apps/delete-key.md b/examples/2.3.x/server-dotnet/examples/apps/delete-key.md new file mode 100644 index 000000000..d816e0614 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/delete-key.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +await apps.DeleteKey( + appId: "<APP_ID>", + keyId: "<KEY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/apps/delete-secret.md b/examples/2.3.x/server-dotnet/examples/apps/delete-secret.md new file mode 100644 index 000000000..762390a20 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/delete-secret.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +await apps.DeleteSecret( + appId: "<APP_ID>", + secretId: "<SECRET_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/apps/delete-tokens.md b/examples/2.3.x/server-dotnet/examples/apps/delete-tokens.md new file mode 100644 index 000000000..4be6c1130 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/delete-tokens.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 + +Apps apps = new Apps(client); + +await apps.DeleteTokens( + appId: "<APP_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/apps/delete.md b/examples/2.3.x/server-dotnet/examples/apps/delete.md new file mode 100644 index 000000000..973b9f431 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/delete.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 + +Apps apps = new Apps(client); + +await apps.Delete( + appId: "<APP_ID>" +); + +``` 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 new file mode 100644 index 000000000..16221bdce --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/get-installation.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..4bfe168c2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/get-key.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..e1f6e4fc1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/get-secret.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..df6aefd07 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/get.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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..2ba341f0d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/list-installation-scopes.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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..1a1bdf8d9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/list-installations.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 + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..e6e8522f6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/list-keys.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 + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..6efd85034 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/list-o-auth-2-scopes.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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..ab831c0a5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/list-secrets.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 + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..724cfd910 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/list.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..3a311d252 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/update-labels.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..ac6fc92d7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/update-team.md @@ -0,0 +1,18 @@ +```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 + +Apps apps = new Apps(client); + +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 new file mode 100644 index 000000000..20de7ef0b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/apps/update.md @@ -0,0 +1,36 @@ +```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 + +Apps apps = new Apps(client); + +App result = await apps.Update( + appId: "<APP_ID>", + name: "<NAME>", + description: "<DESCRIPTION>", // optional + clientUri: "https://example.com", // optional + logoUri: "https://example.com", // optional + privacyPolicyUrl: "https://example.com", // optional + termsUrl: "https://example.com", // optional + contacts: new List<string>(), // optional + tagline: "<TAGLINE>", // optional + tags: new List<string>(), // optional + images: new List<string>(), // optional + supportUrl: "https://example.com", // optional + dataDeletionUrl: "https://example.com", // optional + enabled: false, // optional + redirectUris: new List<string>(), // optional + postLogoutRedirectUris: new List<string>(), // optional + type: "public", // optional + deviceFlow: false, // optional + installationScopes: new List<string>(), // optional + installationRedirectUrl: "https://example.com" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-browser.md b/examples/2.3.x/server-dotnet/examples/avatars/get-browser.md new file mode 100644 index 000000000..4b53a3e43 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-browser.md @@ -0,0 +1,21 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetBrowser( + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-credit-card.md b/examples/2.3.x/server-dotnet/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..924d4b6c0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-credit-card.md @@ -0,0 +1,21 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetCreditCard( + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-favicon.md b/examples/2.3.x/server-dotnet/examples/avatars/get-favicon.md new file mode 100644 index 000000000..d71797488 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-favicon.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); + +byte[] result = await avatars.GetFavicon( + url: "https://example.com" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-flag.md b/examples/2.3.x/server-dotnet/examples/avatars/get-flag.md new file mode 100644 index 000000000..8480c6fb8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-flag.md @@ -0,0 +1,21 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetFlag( + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-image.md b/examples/2.3.x/server-dotnet/examples/avatars/get-image.md new file mode 100644 index 000000000..86ef67f7a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-image.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 + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-initials.md b/examples/2.3.x/server-dotnet/examples/avatars/get-initials.md new file mode 100644 index 000000000..3c6d7dd16 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-initials.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 + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetInitials( + name: "<NAME>", // optional + width: 0, // optional + height: 0, // optional + background: "FFFFFF" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-photo.md b/examples/2.3.x/server-dotnet/examples/avatars/get-photo.md new file mode 100644 index 000000000..0f65e5396 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-photo.md @@ -0,0 +1,24 @@ +```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); + +byte[] result = await avatars.GetPhoto( + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: "png", // optional + rating: "g", // optional + userId: "current()", // optional + emailHash: "<EMAIL_HASH>", // optional + name: "<NAME>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-qr.md b/examples/2.3.x/server-dotnet/examples/avatars/get-qr.md new file mode 100644 index 000000000..0be679e65 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-qr.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 + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetQR( + text: "<TEXT>", + size: 1, // optional + margin: 0, // optional + download: false // optional +); + +``` 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 new file mode 100644 index 000000000..92828bf71 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-screenshot.md @@ -0,0 +1,40 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetScreenshot( + url: "https://example.com", + headers: new { + Authorization = "Bearer token123", + X-Custom-Header = "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // 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 + locale: "en-US", // optional + timezone: Timezone.AfricaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: new List<BrowserPermission> { BrowserPermission.Geolocation, BrowserPermission.Notifications }, // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: ImageFormat.Jpeg // optional +); + +``` 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 new file mode 100644 index 000000000..6cb210455 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/create-archive.md @@ -0,0 +1,19 @@ +```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 + +Backups backups = new Backups(client); + +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 new file mode 100644 index 000000000..cee682ed9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/create-policy.md @@ -0,0 +1,24 @@ +```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 + +Backups backups = new Backups(client); + +BackupPolicy result = await backups.CreatePolicy( + policyId: "<POLICY_ID>", + services: new List<BackupServices> { BackupServices.Databases }, + retention: 1, + schedule: "", + name: "<NAME>", // optional + resourceId: "<RESOURCE_ID>", // optional + enabled: false // optional +); + +``` 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 new file mode 100644 index 000000000..f3649c174 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/create-restoration.md @@ -0,0 +1,21 @@ +```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 + +Backups backups = new Backups(client); + +BackupRestoration result = await backups.CreateRestoration( + archiveId: "<ARCHIVE_ID>", + services: new List<BackupServices> { BackupServices.Databases }, + newResourceId: "<NEW_RESOURCE_ID>", // optional + newResourceName: "<NEW_RESOURCE_NAME>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/backups/delete-archive.md b/examples/2.3.x/server-dotnet/examples/backups/delete-archive.md new file mode 100644 index 000000000..650e2a011 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/delete-archive.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 + +Backups backups = new Backups(client); + +await backups.DeleteArchive( + archiveId: "<ARCHIVE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/backups/delete-policy.md b/examples/2.3.x/server-dotnet/examples/backups/delete-policy.md new file mode 100644 index 000000000..cacac41fd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/delete-policy.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 + +Backups backups = new Backups(client); + +await backups.DeletePolicy( + policyId: "<POLICY_ID>" +); + +``` 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 new file mode 100644 index 000000000..15c9b83db --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/get-archive.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 + +Backups backups = new Backups(client); + +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 new file mode 100644 index 000000000..0fe94d970 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/get-policy.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 + +Backups backups = new Backups(client); + +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 new file mode 100644 index 000000000..e48d04ee1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/get-restoration.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 + +Backups backups = new Backups(client); + +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 new file mode 100644 index 000000000..15f69c287 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/list-archives.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 + +Backups backups = new Backups(client); + +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 new file mode 100644 index 000000000..f16955198 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/list-policies.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 + +Backups backups = new Backups(client); + +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 new file mode 100644 index 000000000..ee286a753 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/list-restorations.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 + +Backups backups = new Backups(client); + +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 new file mode 100644 index 000000000..93d1233b0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/backups/update-policy.md @@ -0,0 +1,21 @@ +```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 + +Backups backups = new Backups(client); + +BackupPolicy result = await backups.UpdatePolicy( + policyId: "<POLICY_ID>", + name: "<NAME>", // optional + retention: 1, // optional + schedule: "", // optional + enabled: false // 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 new file mode 100644 index 000000000..db06ba5d1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-big-int-attribute.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +AttributeBigint result = await databases.CreateBigIntAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 1000000, // optional + default: 0, // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..ba2df46c6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-boolean-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeBoolean result = await databases.CreateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: false, // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..8fbf9538e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-collection.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +Collection result = await databases.CreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: new List<object>(), // optional + indexes: new List<object>() // optional +); + +``` 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 new file mode 100644 index 000000000..f9248808b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-datetime-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeDatetime result = await databases.CreateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..54730c8d0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-document.md @@ -0,0 +1,28 @@ +```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 + +Databases databases = new Databases(client); + +Document result = await databases.CreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 30, + isAdmin = false + }, + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..e490a0b89 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-documents.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 + +Databases databases = new Databases(client); + +DocumentList result = await databases.CreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: new List<object>(), + 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 new file mode 100644 index 000000000..94757f049 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-email-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeEmail result = await databases.CreateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..d66cb3ac8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-enum-attribute.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 + +Databases databases = new Databases(client); + +AttributeEnum result = await databases.CreateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + elements: ["active", "inactive"], + required: false, + default: "active", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..26fb95a76 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-float-attribute.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +AttributeFloat result = await databases.CreateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 100, // optional + default: 10.5, // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..748394d95 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-index.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +Index result = await databases.CreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: DatabasesIndexType.Key, + attributes: new List<string>(), + 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 new file mode 100644 index 000000000..04678b940 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-integer-attribute.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +AttributeInteger result = await databases.CreateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 100, // optional + default: 10, // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..b5de19bed --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-ip-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeIp result = await databases.CreateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..53f1ada4b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-line-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = new Databases(client); + +AttributeLine result = await databases.CreateLineAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [[1, 2], [3, 4], [5, 6]] // optional +); + +``` 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 new file mode 100644 index 000000000..3bf127aa4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-longtext-attribute.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 + +Databases databases = new Databases(client); + +AttributeLongtext result = await databases.CreateLongtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` 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 new file mode 100644 index 000000000..2e758f7bd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-mediumtext-attribute.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 + +Databases databases = new Databases(client); + +AttributeMediumtext result = await databases.CreateMediumtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` 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 new file mode 100644 index 000000000..7b1501942 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-operations.md @@ -0,0 +1,28 @@ +```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 + +Databases databases = new Databases(client); + +Transaction result = await databases.CreateOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +); + +``` 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 new file mode 100644 index 000000000..a08e2b9a6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-point-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = new Databases(client); + +AttributePoint result = await databases.CreatePointAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [1, 2] // optional +); + +``` 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 new file mode 100644 index 000000000..917a45c98 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-polygon-attribute.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = new Databases(client); + +AttributePolygon result = await databases.CreatePolygonAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional +); + +``` 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 new file mode 100644 index 000000000..6f8ac6211 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-relationship-attribute.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 + +Databases databases = new Databases(client); + +AttributeRelationship result = await databases.CreateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "<KEY>", // optional + twoWayKey: "<TWO_WAY_KEY>", // optional + onDelete: RelationMutate.Cascade // optional +); + +``` 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 new file mode 100644 index 000000000..ea547aaa6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-string-attribute.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +AttributeString result = await databases.CreateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` 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 new file mode 100644 index 000000000..dd6fe3cb1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-text-attribute.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 + +Databases databases = new Databases(client); + +AttributeText result = await databases.CreateTextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` 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 new file mode 100644 index 000000000..29b18cd4b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-transaction.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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..dd0e356b9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-url-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeUrl result = await databases.CreateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..4c3f3a1e5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create-varchar-attribute.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +AttributeVarchar result = await databases.CreateVarcharAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/create.md b/examples/2.3.x/server-dotnet/examples/databases/create.md new file mode 100644 index 000000000..6d0a504c8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/create.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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..46dd163d6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/decrement-document-attribute.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 + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.DecrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, // optional + min: 0, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/delete-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/delete-attribute.md new file mode 100644 index 000000000..05fb3e784 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/delete-attribute.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 + +Databases databases = new Databases(client); + +await databases.DeleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/delete-collection.md b/examples/2.3.x/server-dotnet/examples/databases/delete-collection.md new file mode 100644 index 000000000..ecebab3a1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/delete-collection.md @@ -0,0 +1,18 @@ +```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 + +Databases databases = new Databases(client); + +await databases.DeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/delete-document.md b/examples/2.3.x/server-dotnet/examples/databases/delete-document.md new file mode 100644 index 000000000..02adf9992 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/delete-document.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 + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +await databases.DeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..4b14b138a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/delete-documents.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 + +Databases databases = new Databases(client); + +await databases.DeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/delete-index.md b/examples/2.3.x/server-dotnet/examples/databases/delete-index.md new file mode 100644 index 000000000..60303458a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/delete-index.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 + +Databases databases = new Databases(client); + +await databases.DeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/delete-transaction.md b/examples/2.3.x/server-dotnet/examples/databases/delete-transaction.md new file mode 100644 index 000000000..2c3b947fa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/delete-transaction.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 + +Databases databases = new Databases(client); + +await databases.DeleteTransaction( + transactionId: "<TRANSACTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/delete.md b/examples/2.3.x/server-dotnet/examples/databases/delete.md new file mode 100644 index 000000000..519bcab33 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/delete.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 + +Databases databases = new Databases(client); + +await databases.Delete( + databaseId: "<DATABASE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/get-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/get-attribute.md new file mode 100644 index 000000000..d131b8141 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/get-attribute.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 + +Databases databases = new Databases(client); + +object result = await databases.GetAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +); + +``` 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 new file mode 100644 index 000000000..0798f68e5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/get-collection.md @@ -0,0 +1,18 @@ +```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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..102cbb5b4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/get-document.md @@ -0,0 +1,21 @@ +```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 + +Databases databases = new Databases(client); + +Document result = await databases.GetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..ad06f1fb3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/get-index.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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..fe449961f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/get-transaction.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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..91d9a0ec1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/get.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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..230784d7f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/increment-document-attribute.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 + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.IncrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, // optional + max: 100, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..ff57878ce --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/list-attributes.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 + +Databases databases = new Databases(client); + +AttributeList result = await databases.ListAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + total: false // 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 new file mode 100644 index 000000000..ed856f6eb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/list-collections.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 + +Databases databases = new Databases(client); + +CollectionList result = await databases.ListCollections( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..d8cdff0ab --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/list-documents.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +DocumentList result = await databases.ListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // 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 new file mode 100644 index 000000000..80f4bcf2a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/list-indexes.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 + +Databases databases = new Databases(client); + +IndexList result = await databases.ListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + total: false // 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 new file mode 100644 index 000000000..fc1416744 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/list-transactions.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 + +Databases databases = new Databases(client); + +TransactionList result = await databases.ListTransactions( + queries: new List<string>() // 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 new file mode 100644 index 000000000..57095184a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/list.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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..7fea78b58 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-big-int-attribute.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +AttributeBigint result = await databases.UpdateBigIntAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 0, + min: 0, // optional + max: 1000000, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..52b0a767e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-boolean-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeBoolean result = await databases.UpdateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: false, + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..7e3378faa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-collection.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 + +Databases databases = new Databases(client); + +Collection result = await databases.UpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // 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 new file mode 100644 index 000000000..2a1df23fb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-datetime-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeDatetime result = await databases.UpdateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..e18a6ef9e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-document.md @@ -0,0 +1,28 @@ +```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 + +Databases databases = new Databases(client); + +Document result = await databases.UpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 33, + isAdmin = false + }, // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..db3133dfe --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-documents.md @@ -0,0 +1,27 @@ +```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 + +Databases databases = new Databases(client); + +DocumentList result = await databases.UpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 33, + isAdmin = false + }, // optional + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..b1f0e37fa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-email-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeEmail result = await databases.UpdateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..d009b5c79 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-enum-attribute.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 + +Databases databases = new Databases(client); + +AttributeEnum result = await databases.UpdateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + elements: ["active", "inactive"], + required: false, + default: "active", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..fd8dc4271 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-float-attribute.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +AttributeFloat result = await databases.UpdateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 10.5, + min: 0, // optional + max: 100, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..17a0cc8bd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-integer-attribute.md @@ -0,0 +1,24 @@ +```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 + +Databases databases = new Databases(client); + +AttributeInteger result = await databases.UpdateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 10, + min: 0, // optional + max: 100, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..432bb4d43 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-ip-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeIp result = await databases.UpdateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..11dc38400 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-line-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeLine result = await databases.UpdateLineAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [[1, 2], [3, 4], [5, 6]], // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..2dba9171f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-longtext-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeLongtext result = await databases.UpdateLongtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..ba356254e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeMediumtext result = await databases.UpdateMediumtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..7bbf9fb6b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-point-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributePoint result = await databases.UpdatePointAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [1, 2], // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..f35fdcff3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-polygon-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributePolygon result = await databases.UpdatePolygonAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..aa7fd0308 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-relationship-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeRelationship result = await databases.UpdateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + onDelete: RelationMutate.Cascade, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..00bf4aed6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-string-attribute.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 + +Databases databases = new Databases(client); + +AttributeString result = await databases.UpdateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..e041f96e0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-text-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeText result = await databases.UpdateTextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..b30589352 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-transaction.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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..4beafd13a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-url-attribute.md @@ -0,0 +1,22 @@ +```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 + +Databases databases = new Databases(client); + +AttributeUrl result = await databases.UpdateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..2d7215129 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update-varchar-attribute.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 + +Databases databases = new Databases(client); + +AttributeVarchar result = await databases.UpdateVarcharAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, // optional + newKey: "<NEW_KEY>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/update.md b/examples/2.3.x/server-dotnet/examples/databases/update.md new file mode 100644 index 000000000..1439c1cea --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/update.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 + +Databases databases = new Databases(client); + +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 new file mode 100644 index 000000000..3eff270e4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/upsert-document.md @@ -0,0 +1,28 @@ +```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 + +Databases databases = new Databases(client); + +Document result = await databases.UpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 30, + isAdmin = false + }, // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..d22184b8f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/databases/upsert-documents.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 + +Databases databases = new Databases(client); + +DocumentList result = await databases.UpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: new List<object>(), + 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 new file mode 100644 index 000000000..5c42dc563 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-collection.md @@ -0,0 +1,24 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Collection result = await documentsDB.CreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: new List<object>(), // optional + indexes: new List<object>() // optional +); + +``` 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 new file mode 100644 index 000000000..ccc8bc36b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-document.md @@ -0,0 +1,28 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.CreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 30, + isAdmin = false + }, + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..6b98311b0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-documents.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 + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +DocumentList result = await documentsDB.CreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: new List<object>(), + 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 new file mode 100644 index 000000000..5a22d1c77 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-failover.md @@ -0,0 +1,18 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..31a062921 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-index.md @@ -0,0 +1,24 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Index result = await documentsDB.CreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: DocumentsDBIndexType.Key, + attributes: new List<string>(), + 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 new file mode 100644 index 000000000..abe507f31 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-operations.md @@ -0,0 +1,28 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Transaction result = await documentsDB.CreateOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +); + +``` 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 new file mode 100644 index 000000000..a948934b1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-transaction.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..8c1fa6b51 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create.md @@ -0,0 +1,22 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Database result = await documentsDB.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // 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 new file mode 100644 index 000000000..5ab49cdd7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/decrement-document-attribute.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 + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.DecrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, // optional + min: 0, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..ce55d7953 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-collection.md @@ -0,0 +1,18 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/delete-document.md b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..eeca145b2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-document.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 + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..c1c885aa9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-documents.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/delete-index.md b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..fed0c3cc7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-index.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..5ad20ffdd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-transaction.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteTransaction( + transactionId: "<TRANSACTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/delete.md b/examples/2.3.x/server-dotnet/examples/documentsdb/delete.md new file mode 100644 index 000000000..12696db2c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/delete.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.Delete( + databaseId: "<DATABASE_ID>" +); + +``` 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 new file mode 100644 index 000000000..f50e03a1b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-collection.md @@ -0,0 +1,18 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..1e3bfa5c2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-document.md @@ -0,0 +1,21 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.GetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..e8c99e38c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-index.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..abe669993 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-replicas.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..418a76133 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-status.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..800897c22 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-transaction.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..f8d06919c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..fc9d0795c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/increment-document-attribute.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 + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.IncrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, // optional + max: 100, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..1227361b2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-collections.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +CollectionList result = await documentsDB.ListCollections( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..0838c9c1a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-documents.md @@ -0,0 +1,22 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +DocumentList result = await documentsDB.ListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // 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 new file mode 100644 index 000000000..aa8435ca5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-indexes.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +IndexList result = await documentsDB.ListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + total: false // 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 new file mode 100644 index 000000000..5e274792f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-operations.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +DedicatedDatabaseOperationList result = await documentsDB.ListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..33e4c32a2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-specifications.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..84539069c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-transactions.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +TransactionList result = await documentsDB.ListTransactions( + queries: new List<string>() // 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 new file mode 100644 index 000000000..79bfce24d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list.md @@ -0,0 +1,18 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..093d9db90 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update-collection.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Collection result = await documentsDB.UpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +); + +``` 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 new file mode 100644 index 000000000..87172a6e5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update-document.md @@ -0,0 +1,22 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.UpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..f325b2eac --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update-documents.md @@ -0,0 +1,21 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +DocumentList result = await documentsDB.UpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [object], // optional + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..b4a306872 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update-transaction.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +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 new file mode 100644 index 000000000..e9fd54c5e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update.md @@ -0,0 +1,22 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Database result = await documentsDB.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // 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 new file mode 100644 index 000000000..a5de788f0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-document.md @@ -0,0 +1,22 @@ +```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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.UpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..66f738cf0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-documents.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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +DocumentList result = await documentsDB.UpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: new List<object>(), + 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 new file mode 100644 index 000000000..cec5f5d09 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-google-workspace.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..d797ed424 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-i-cloud.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..256ceb709 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-mailgun.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..4723c66a4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-outlook.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..11906f93c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-proton-mail.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..feaa2d453 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-zoho.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..481c3b18c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-a.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..fafe52a3a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-aaaa.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordAAAA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..938806372 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-alias.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordAlias( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..46d868130 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-caa.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordCAA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..229b19e7f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-cname.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordCNAME( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..6421a4e8e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-https.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordHTTPS( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..b7f1c0ffa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-mx.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordMX( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..05cf13218 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-ns.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordNS( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..001d9faa2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-srv.md @@ -0,0 +1,24 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordSRV( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..269241728 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-txt.md @@ -0,0 +1,21 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.CreateRecordTXT( + domainId: "<DOMAIN_ID>", + name: "", + ttl: 1, + value: "<VALUE>", // optional + comment: "<COMMENT>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/domains/create.md b/examples/2.3.x/server-dotnet/examples/domains/create.md new file mode 100644 index 000000000..9c5acec0d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/create.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = new Domains(client); + +XDomain result = await domains.Create( + teamId: "<TEAM_ID>", + domain: "example.com" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/domains/delete-record.md b/examples/2.3.x/server-dotnet/examples/domains/delete-record.md new file mode 100644 index 000000000..edb656a24 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/delete-record.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = new Domains(client); + +await domains.DeleteRecord( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/domains/delete.md b/examples/2.3.x/server-dotnet/examples/domains/delete.md new file mode 100644 index 000000000..a4cb0a77a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/delete.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 + +Domains domains = new Domains(client); + +await domains.Delete( + domainId: "<DOMAIN_ID>" +); + +``` 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 new file mode 100644 index 000000000..92ead1166 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-google-workspace.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..126597c93 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-i-cloud.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..4d8ff21aa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-mailgun.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..38c47e16b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-outlook.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..de17c9f98 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-proton-mail.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..a2a352485 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-zoho.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..fec9cadc7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-price.md @@ -0,0 +1,20 @@ +```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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..92d7faa6f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-record.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..3ba0f2452 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-transfer-status.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..89bd6a2a0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get-zone.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 + +Domains domains = new Domains(client); + + 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 new file mode 100644 index 000000000..871986ef3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/get.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..55140596c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/list-prices.md @@ -0,0 +1,20 @@ +```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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..9c2985eb2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/list-records.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..3760f30a3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/list.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..f860d1486 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-nameservers.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..d4fde3d71 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-a.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..bd75bb2b4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-aaaa.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordAAAA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..af86dad22 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-alias.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordAlias( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..f5f4d0274 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-caa.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordCAA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..0ade67379 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-cname.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordCNAME( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..d7285b6b3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-https.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordHTTPS( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..e8c545c59 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-mx.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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordMX( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..193fe5551 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-ns.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordNS( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..8c865f73e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-srv.md @@ -0,0 +1,25 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordSRV( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..a9fd5090c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-txt.md @@ -0,0 +1,22 @@ +```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 + +Domains domains = new Domains(client); + +DnsRecord result = await domains.UpdateRecordTXT( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +); + +``` 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 new file mode 100644 index 000000000..49d81eac2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-team.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..908bc2339 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/update-zone.md @@ -0,0 +1,18 @@ +```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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..67273c482 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/domains/verify-nameservers.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 + +Domains domains = new Domains(client); + +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 new file mode 100644 index 000000000..95b97cc0d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,19 @@ +```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 + +Embeddings embeddings = new Embeddings(client); + +EmbeddingList result = await embeddings.CreateTextEmbeddings( + texts: new List<string>(), + 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 new file mode 100644 index 000000000..a445e35f8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/create-deployment.md @@ -0,0 +1,21 @@ +```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 + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateDeployment( + functionId: "<FUNCTION_ID>", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false, + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>" // optional +); + +``` 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 new file mode 100644 index 000000000..20ba6fabe --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/create-duplicate-deployment.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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..38e0b69b3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/create-execution.md @@ -0,0 +1,24 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +Execution result = await functions.CreateExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", // optional + async: false, // optional + path: "<PATH>", // optional + method: ExecutionMethod.GET, // optional + headers: [object], // optional + scheduledAt: "<SCHEDULED_AT>" // 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 new file mode 100644 index 000000000..47edfa96e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/create-template-deployment.md @@ -0,0 +1,24 @@ +```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 + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + type: TemplateReferenceType.Commit, + reference: "<REFERENCE>", + activate: false // optional +); + +``` 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 new file mode 100644 index 000000000..7e3d32f6f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/create-variable.md @@ -0,0 +1,21 @@ +```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 + +Functions functions = new Functions(client); + +Variable result = await functions.CreateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); + +``` 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 new file mode 100644 index 000000000..bfc068889 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/create-vcs-deployment.md @@ -0,0 +1,21 @@ +```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 + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateVcsDeployment( + functionId: "<FUNCTION_ID>", + type: VCSReferenceType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/functions/create.md b/examples/2.3.x/server-dotnet/examples/functions/create.md new file mode 100644 index 000000000..741a659a7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/create.md @@ -0,0 +1,39 @@ +```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 + +Functions functions = new Functions(client); + +Function result = await functions.Create( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: Runtime.Node145, + execute: ["any"], // optional + events: new List<string>(), // optional + schedule: "0 0 * * *", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches: new List<string>(), // optional + providerPaths: new List<string>(), // optional + buildSpecification: "s-1vcpu-512mb", // optional + runtimeSpecification: "s-1vcpu-512mb", // optional + deploymentRetention: 0 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/functions/delete-deployment.md b/examples/2.3.x/server-dotnet/examples/functions/delete-deployment.md new file mode 100644 index 000000000..673fc1c86 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/delete-deployment.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = new Functions(client); + +await functions.DeleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/functions/delete-execution.md b/examples/2.3.x/server-dotnet/examples/functions/delete-execution.md new file mode 100644 index 000000000..288828159 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/delete-execution.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = new Functions(client); + +await functions.DeleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/functions/delete-variable.md b/examples/2.3.x/server-dotnet/examples/functions/delete-variable.md new file mode 100644 index 000000000..7dcb9a9ac --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/delete-variable.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = new Functions(client); + +await functions.DeleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/functions/delete.md b/examples/2.3.x/server-dotnet/examples/functions/delete.md new file mode 100644 index 000000000..c814f3219 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/delete.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 + +Functions functions = new Functions(client); + +await functions.Delete( + functionId: "<FUNCTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/functions/get-deployment-download.md b/examples/2.3.x/server-dotnet/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..0756473ad --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/get-deployment-download.md @@ -0,0 +1,21 @@ +```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 + +Functions functions = new Functions(client); + +byte[] result = await functions.GetDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: DeploymentDownloadType.Source, // optional + token: "<TOKEN>" // optional +); + +``` 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 new file mode 100644 index 000000000..fb0905f58 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/get-deployment.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..6f2871b4d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/get-execution.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..7b383b0b7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/get-variable.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..86ffaa29e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/get.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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..8e368f9fa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/list-deployments.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 + +Functions functions = new Functions(client); + +DeploymentList result = await functions.ListDeployments( + functionId: "<FUNCTION_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..85cc2ab48 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/list-executions.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 + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..b0b686256 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/list-runtimes.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +RuntimeList result = await functions.ListRuntimes(); + + +``` 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 new file mode 100644 index 000000000..b97f4cf42 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/list-specifications.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 + +Functions functions = new Functions(client); + +SpecificationList result = await functions.ListSpecifications( + type: "runtimes" // 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 new file mode 100644 index 000000000..df8029e3f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/list-variables.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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..b09d8ee62 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/list.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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..ee782aed6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/update-deployment-status.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..563d5a216 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/update-function-deployment.md @@ -0,0 +1,18 @@ +```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 + +Functions functions = new Functions(client); + +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 new file mode 100644 index 000000000..a1fd20ee2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/update-variable.md @@ -0,0 +1,21 @@ +```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 + +Functions functions = new Functions(client); + +Variable result = await functions.UpdateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", // optional + value: "<VALUE>", // optional + secret: false // 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 new file mode 100644 index 000000000..10d4a96bb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/functions/update.md @@ -0,0 +1,39 @@ +```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 + +Functions functions = new Functions(client); + +Function result = await functions.Update( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: Runtime.Node145, // optional + execute: ["any"], // optional + events: new List<string>(), // optional + schedule: "0 0 * * *", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches: new List<string>(), // optional + providerPaths: new List<string>(), // optional + buildSpecification: "s-1vcpu-512mb", // optional + runtimeSpecification: "s-1vcpu-512mb", // optional + deploymentRetention: 0 // 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 new file mode 100644 index 000000000..0145c03c7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/graphql/mutation.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 + +Graphql graphql = new Graphql(client); + +Any result = await graphql.Mutation( + query: [object] +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/graphql/query.md b/examples/2.3.x/server-dotnet/examples/graphql/query.md new file mode 100644 index 000000000..88c82162b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/graphql/query.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 + +Graphql graphql = new Graphql(client); + +Any result = await graphql.Query( + query: [object] +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/get.md b/examples/2.3.x/server-dotnet/examples/locale/get.md new file mode 100644 index 000000000..a1dcbcc94 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/locale/get.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 + +Locale locale = new Locale(client); + +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 new file mode 100644 index 000000000..a3bfeff55 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/locale/list-codes.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 + +Locale locale = new Locale(client); + +LocaleCodeList result = await locale.ListCodes(); + + +``` 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 new file mode 100644 index 000000000..02b861166 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/locale/list-continents.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 + +Locale locale = new Locale(client); + +ContinentList result = await locale.ListContinents(); + + +``` 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 new file mode 100644 index 000000000..9452cd0e4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/locale/list-countries-eu.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 + +Locale locale = new Locale(client); + +CountryList result = await locale.ListCountriesEU(); + + +``` 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 new file mode 100644 index 000000000..e3b5346e1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/locale/list-countries-phones.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 + +Locale locale = new Locale(client); + +PhoneList result = await locale.ListCountriesPhones(); + + +``` 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 new file mode 100644 index 000000000..c9c1fb946 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/locale/list-countries.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 + +Locale locale = new Locale(client); + +CountryList result = await locale.ListCountries(); + + +``` 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 new file mode 100644 index 000000000..18d04a69f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/locale/list-currencies.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 + +Locale locale = new Locale(client); + +CurrencyList result = await locale.ListCurrencies(); + + +``` 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 new file mode 100644 index 000000000..83ed0241c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/locale/list-languages.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 + +Locale locale = new Locale(client); + +LanguageList result = await locale.ListLanguages(); + + +``` 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 new file mode 100644 index 000000000..55be57aab --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-apns-provider.md @@ -0,0 +1,24 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateAPNSProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false, // optional + enabled: false // 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 new file mode 100644 index 000000000..47d5596df --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateAppwriteProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, // optional + qos: 0, // optional + expiry: 0 // 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 new file mode 100644 index 000000000..c9475204a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-email.md @@ -0,0 +1,30 @@ +```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 + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreateEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // 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 + 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/create-fcm-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..4ef0b591f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-fcm-provider.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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateFCMProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: [object], // optional + enabled: false // 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 new file mode 100644 index 000000000..ba278efe1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,26 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + domain: "example.com", // optional + isEuRegion: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // 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 new file mode 100644 index 000000000..e7638b6ec --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>", // optional + enabled: false // 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 new file mode 100644 index 000000000..3ee6e4230 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-push.md @@ -0,0 +1,36 @@ +```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 + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreatePush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + data: [object], // optional + action: "<ACTION>", // optional + image: "<ID1:ID2>", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // 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 new file mode 100644 index 000000000..e2400c9f9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-resend-provider.md @@ -0,0 +1,24 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateResendProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // 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 new file mode 100644 index 000000000..f18e9a05c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,24 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // 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 new file mode 100644 index 000000000..ef5697694 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-ses-provider.md @@ -0,0 +1,26 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSesProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + accessKey: "<ACCESS_KEY>", // optional + secretKey: "<SECRET_KEY>", // optional + region: "<REGION>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // 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 new file mode 100644 index 000000000..2756f28c9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-sms.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 + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreateSMS( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // 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/create-smtp-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..bbe343568 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-smtp-provider.md @@ -0,0 +1,31 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSMTPProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 587, // optional + username: "<USERNAME>", // optional + password: "password", // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); + +``` 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 new file mode 100644 index 000000000..619abf20e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-subscriber.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 + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..68c37c332 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-telesign-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // 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 new file mode 100644 index 000000000..d549516ce --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // 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 new file mode 100644 index 000000000..1f322933f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-topic.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.CreateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"], // optional + qos: 0, // optional + expiry: 0 // 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 new file mode 100644 index 000000000..167d83e34 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-twilio-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "<FROM>", // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + enabled: false // 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 new file mode 100644 index 000000000..8fc8335b2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-vonage-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + enabled: false // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/messaging/delete-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/delete-provider.md new file mode 100644 index 000000000..fb8bca399 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/delete-provider.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 + +Messaging messaging = new Messaging(client); + +await messaging.DeleteProvider( + providerId: "<PROVIDER_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-dotnet/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..81f1d1ce9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/delete-subscriber.md @@ -0,0 +1,18 @@ +```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 + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +await messaging.DeleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/messaging/delete-topic.md b/examples/2.3.x/server-dotnet/examples/messaging/delete-topic.md new file mode 100644 index 000000000..579cce5b1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/delete-topic.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 + +Messaging messaging = new Messaging(client); + +await messaging.DeleteTopic( + topicId: "<TOPIC_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/messaging/delete.md b/examples/2.3.x/server-dotnet/examples/messaging/delete.md new file mode 100644 index 000000000..a04d0334e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/delete.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 + +Messaging messaging = new Messaging(client); + +await messaging.Delete( + messageId: "<MESSAGE_ID>" +); + +``` 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 new file mode 100644 index 000000000..535971270 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/get-message.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 + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..fb9c334e8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/get-provider.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 + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..79e6bb079 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/get-subscriber.md @@ -0,0 +1,18 @@ +```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 + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..6fc890d05 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/get-topic.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 + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..6bc43ea9d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-messages.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 + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..5d2867448 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-providers.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 + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..15773d007 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-subscribers.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 + +Messaging messaging = new Messaging(client); + +SubscriberList result = await messaging.ListSubscribers( + topicId: "<TOPIC_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..e5b2cd943 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-targets.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 + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..4fa6f4df1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-topics.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 + +Messaging messaging = new Messaging(client); + +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 new file mode 100644 index 000000000..d8a04a49d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-apns-provider.md @@ -0,0 +1,24 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateAPNSProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: 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 new file mode 100644 index 000000000..4db615a0e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateAppwriteProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + qos: 0, // optional + expiry: 0 // 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 new file mode 100644 index 000000000..44accfc2a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-email.md @@ -0,0 +1,30 @@ +```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 + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdateEmail( + messageId: "<MESSAGE_ID>", + 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 + 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 +); + +``` 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 new file mode 100644 index 000000000..c7381ed28 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-fcm-provider.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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateFCMProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + serviceAccountJSON: [object] // 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 new file mode 100644 index 000000000..95b8466d2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,26 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + apiKey: "<API_KEY>", // optional + domain: "example.com", // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // 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 new file mode 100644 index 000000000..3652c6a0a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>" // 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 new file mode 100644 index 000000000..6a151cca7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-push.md @@ -0,0 +1,36 @@ +```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 + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdatePush( + messageId: "<MESSAGE_ID>", + 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 + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // 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 new file mode 100644 index 000000000..9bef411a5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-resend-provider.md @@ -0,0 +1,24 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateResendProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // 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 new file mode 100644 index 000000000..b98feaa13 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,24 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // 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 new file mode 100644 index 000000000..982cd5493 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-ses-provider.md @@ -0,0 +1,26 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSesProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accessKey: "<ACCESS_KEY>", // optional + secretKey: "<SECRET_KEY>", // optional + region: "<REGION>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // 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 new file mode 100644 index 000000000..3d38d9fb6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-sms.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 + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdateSMS( + messageId: "<MESSAGE_ID>", + 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 new file mode 100644 index 000000000..2d9da6ca5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-smtp-provider.md @@ -0,0 +1,31 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSMTPProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + host: "<HOST>", // optional + port: 1, // optional + username: "<USERNAME>", // optional + password: "password", // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>", // optional + enabled: false // 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 new file mode 100644 index 000000000..5a7048b1e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-telesign-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // 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 new file mode 100644 index 000000000..4f0a7a0dc --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // 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 new file mode 100644 index 000000000..a63f52e9c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-topic.md @@ -0,0 +1,21 @@ +```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 + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.UpdateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", // optional + subscribe: ["any"], // optional + qos: 0, // optional + expiry: 0 // 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 new file mode 100644 index 000000000..a1d51e9e2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-twilio-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + from: "<FROM>" // 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 new file mode 100644 index 000000000..d26a17dd8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-vonage-provider.md @@ -0,0 +1,22 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + from: "<FROM>" // 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 new file mode 100644 index 000000000..41e2ed4b2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-backup-policy.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 + +Mongo mongo = new Mongo(client); + +BackupPolicy result = await mongo.CreateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", // optional + enabled: false // optional +); + +``` 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 new file mode 100644 index 000000000..e25efa993 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-backup.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..8c01df43b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-branch.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..d4a6686e8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-failover.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..b7fbcc7a5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-migration.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..8e9358eb1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-restoration.md @@ -0,0 +1,21 @@ +```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 + +Mongo mongo = new Mongo(client); + +DedicatedDatabaseRestoration result = await mongo.CreateRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", // optional + backupId: "<BACKUP_ID>", // optional + targetDatabaseId: "<TARGET_DATABASE_ID>", // optional + targetTime: "2020-10-15T06:38:00.000+00:00" // 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 new file mode 100644 index 000000000..c18e2d627 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-upgrade.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..c6ef970c5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/create.md @@ -0,0 +1,30 @@ +```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 + +Mongo mongo = new Mongo(client); + +DedicatedDatabase result = await mongo.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: new List<string>(), // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-dotnet/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..923bea417 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/delete-backup-policy.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +await mongo.DeleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/mongo/delete-backup.md b/examples/2.3.x/server-dotnet/examples/mongo/delete-backup.md new file mode 100644 index 000000000..48529d97f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/delete-backup.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +await mongo.DeleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/mongo/delete-branch.md b/examples/2.3.x/server-dotnet/examples/mongo/delete-branch.md new file mode 100644 index 000000000..a17780fd4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/delete-branch.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +await mongo.DeleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/mongo/delete.md b/examples/2.3.x/server-dotnet/examples/mongo/delete.md new file mode 100644 index 000000000..e014f3789 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/delete.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 + +Mongo mongo = new Mongo(client); + +await mongo.Delete( + databaseId: "<DATABASE_ID>" +); + +``` 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 new file mode 100644 index 000000000..d05d979d2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-backup-policy.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..ced57a21f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-backup.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..55a1e64e8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-pitr.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..7c52eceed --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-replicas.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..32e830080 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-restoration.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..883f3b97c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-status.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..86e0b80c8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/get.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..9b56913a9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-backup-policies.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..6da449f88 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-backups.md @@ -0,0 +1,18 @@ +```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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..f68102dca --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-branches.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..c2dc679f1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-operations.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 + +Mongo mongo = new Mongo(client); + +DedicatedDatabaseOperationList result = await mongo.ListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..b5655c374 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-restorations.md @@ -0,0 +1,21 @@ +```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 + +Mongo mongo = new Mongo(client); + +DedicatedDatabaseRestorationList result = await mongo.ListRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", // optional + type: "backup", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..474e61230 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-specifications.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..bd222419e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/list.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..7bec7bf3c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/update-backup-policy.md @@ -0,0 +1,22 @@ +```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 + +Mongo mongo = new Mongo(client); + +BackupPolicy result = await mongo.UpdateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", // optional + schedule: "", // optional + retention: 1, // optional + enabled: false // 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 new file mode 100644 index 000000000..27f365d41 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/update-backup-storage.md @@ -0,0 +1,24 @@ +```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 + +Mongo mongo = new Mongo(client); + +DedicatedDatabaseBackupStorage result = await mongo.UpdateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", // optional + prefix: "<PREFIX>", // optional + endpoint: "<ENDPOINT>" // optional +); + +``` 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 new file mode 100644 index 000000000..9dafd042d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/update-credentials.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..e64faec63 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/update-maintenance.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 + +Mongo mongo = new Mongo(client); + +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 new file mode 100644 index 000000000..6c9b8d0a3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mongo/update.md @@ -0,0 +1,37 @@ +```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 + +Mongo mongo = new Mongo(client); + +DedicatedDatabase result = await mongo.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + status: "ready", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: new List<string>(), // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: 0, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: new List<string>(), // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // 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 new file mode 100644 index 000000000..ca410dc06 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-backup-policy.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 + +Mysql mysql = new Mysql(client); + +BackupPolicy result = await mysql.CreateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", // optional + enabled: false // optional +); + +``` 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 new file mode 100644 index 000000000..f5e271dfb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-backup.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..a4d9283f1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-branch.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..364fd3029 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-execution.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 + +Mysql mysql = new Mysql(client); + +DedicatedDatabaseExecution result = await mysql.CreateExecution( + databaseId: "<DATABASE_ID>", + sql: "<SQL>", + bindings: [object], // optional + timeoutSeconds: 1 // 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 new file mode 100644 index 000000000..e30720bad --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-failover.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..c0b943c8f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-migration.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..d6f1fa35c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-restoration.md @@ -0,0 +1,21 @@ +```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 + +Mysql mysql = new Mysql(client); + +DedicatedDatabaseRestoration result = await mysql.CreateRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", // optional + backupId: "<BACKUP_ID>", // optional + targetDatabaseId: "<TARGET_DATABASE_ID>", // optional + targetTime: "2020-10-15T06:38:00.000+00:00" // 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 new file mode 100644 index 000000000..4b408cee5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-upgrade.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..23bcc79e7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/create.md @@ -0,0 +1,30 @@ +```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 + +Mysql mysql = new Mysql(client); + +DedicatedDatabase result = await mysql.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: new List<string>(), // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-dotnet/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..b9edb4ce5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/delete-backup-policy.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +await mysql.DeleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/mysql/delete-backup.md b/examples/2.3.x/server-dotnet/examples/mysql/delete-backup.md new file mode 100644 index 000000000..dca510cab --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/delete-backup.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +await mysql.DeleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/mysql/delete-branch.md b/examples/2.3.x/server-dotnet/examples/mysql/delete-branch.md new file mode 100644 index 000000000..1fc078f7d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/delete-branch.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +await mysql.DeleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/mysql/delete.md b/examples/2.3.x/server-dotnet/examples/mysql/delete.md new file mode 100644 index 000000000..4da3ff7f5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/delete.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 + +Mysql mysql = new Mysql(client); + +await mysql.Delete( + databaseId: "<DATABASE_ID>" +); + +``` 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 new file mode 100644 index 000000000..524bd066d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-backup-policy.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..1c81ffc41 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-backup.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..3f1d3fcc4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-pitr.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..c88ec9c84 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-pooler.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..4033dc586 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-replicas.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..11f18fc1b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-restoration.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..a6adb9a2d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-status.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..0ae1db334 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/get.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..546c276a4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-backup-policies.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..11fda3e8d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-backups.md @@ -0,0 +1,18 @@ +```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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..471fececd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-branches.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..5b3f342a9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-operations.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 + +Mysql mysql = new Mysql(client); + +DedicatedDatabaseOperationList result = await mysql.ListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..0238c2ce5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-restorations.md @@ -0,0 +1,21 @@ +```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 + +Mysql mysql = new Mysql(client); + +DedicatedDatabaseRestorationList result = await mysql.ListRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", // optional + type: "backup", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..a469ff043 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-specifications.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..f49707d1c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/list.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..c812e9eae --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-backup-policy.md @@ -0,0 +1,22 @@ +```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 + +Mysql mysql = new Mysql(client); + +BackupPolicy result = await mysql.UpdateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", // optional + schedule: "", // optional + retention: 1, // optional + enabled: false // 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 new file mode 100644 index 000000000..6efbdc499 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-backup-storage.md @@ -0,0 +1,24 @@ +```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 + +Mysql mysql = new Mysql(client); + +DedicatedDatabaseBackupStorage result = await mysql.UpdateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", // optional + prefix: "<PREFIX>", // optional + endpoint: "<ENDPOINT>" // optional +); + +``` 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 new file mode 100644 index 000000000..7bf74cb37 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-credentials.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..4a28819ac --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-maintenance.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 + +Mysql mysql = new Mysql(client); + +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 new file mode 100644 index 000000000..455b6d2b2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-pooler.md @@ -0,0 +1,25 @@ +```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 + +Mysql mysql = new Mysql(client); + +DedicatedDatabasePooler result = await mysql.UpdatePooler( + databaseId: "<DATABASE_ID>", + mode: "transaction", // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: "<POOLER_CPU_REQUEST>", // optional + poolerCpuLimit: "<POOLER_CPU_LIMIT>", // optional + poolerMemoryRequest: "<POOLER_MEMORY_REQUEST>", // optional + poolerMemoryLimit: "<POOLER_MEMORY_LIMIT>" // 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 new file mode 100644 index 000000000..4e9e8adb6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/mysql/update.md @@ -0,0 +1,37 @@ +```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 + +Mysql mysql = new Mysql(client); + +DedicatedDatabase result = await mysql.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + status: "ready", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: new List<string>(), // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: 0, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: new List<string>(), // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // 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 new file mode 100644 index 000000000..0c832ff61 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/approve.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 + .SetSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +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 new file mode 100644 index 000000000..d067b8346 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/authorize-post.md @@ -0,0 +1,30 @@ +```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 + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Authorize result = await oauth2.AuthorizePost( + client_id: "<CLIENT_ID>", // optional + redirect_uri: "https://example.com", // optional + response_type: "", // optional + scope: "<SCOPE>", // optional + state: "<STATE>", // optional + nonce: "<NONCE>", // optional + code_challenge: "<CODE_CHALLENGE>", // optional + code_challenge_method: "s256", // optional + prompt: "<PROMPT>", // optional + max_age: 0, // optional + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + resource: "", // optional + audience: "<AUDIENCE>", // optional + request_uri: "<REQUEST_URI>" // 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 new file mode 100644 index 000000000..77a0f3bc2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/authorize.md @@ -0,0 +1,30 @@ +```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 + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Authorize result = await oauth2.Authorize( + client_id: "<CLIENT_ID>", // optional + redirect_uri: "https://example.com", // optional + response_type: "", // optional + scope: "<SCOPE>", // optional + state: "<STATE>", // optional + nonce: "<NONCE>", // optional + code_challenge: "<CODE_CHALLENGE>", // optional + code_challenge_method: "s256", // optional + prompt: "<PROMPT>", // optional + max_age: 0, // optional + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + resource: "", // optional + audience: "<AUDIENCE>", // optional + request_uri: "<REQUEST_URI>" // 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 new file mode 100644 index 000000000..a257690aa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/create-device-authorization.md @@ -0,0 +1,21 @@ +```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 + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2DeviceAuthorization result = await oauth2.CreateDeviceAuthorization( + client_id: "<CLIENT_ID>", // optional + scope: "<SCOPE>", // optional + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + resource: "", // optional + audience: "<AUDIENCE>" // 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 new file mode 100644 index 000000000..cf1ad6969 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/create-grant.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 + +Oauth2 oauth2 = new Oauth2(client); + +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 new file mode 100644 index 000000000..214f85753 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/create-par.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 + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2PAR result = await oauth2.CreatePAR( + client_id: "<CLIENT_ID>", + redirect_uri: "https://example.com", + response_type: "code", + scope: "<SCOPE>", // optional + state: "<STATE>", // optional + nonce: "<NONCE>", // optional + code_challenge: "<CODE_CHALLENGE>", // optional + code_challenge_method: "s256", // optional + prompt: "<PROMPT>", // optional + max_age: 0, // optional + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + resource: "", // optional + audience: "<AUDIENCE>" // optional +); + +``` 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 new file mode 100644 index 000000000..27639a8e6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/create-token.md @@ -0,0 +1,26 @@ +```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 + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Token result = await oauth2.CreateToken( + grant_type: "<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 + resource: "", // optional + audience: "<AUDIENCE>" // 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 new file mode 100644 index 000000000..e289b80de --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/get-grant.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 + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Grant result = await oauth2.GetGrant( + grant_id: "<GRANT_ID>" +); + +``` 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 new file mode 100644 index 000000000..dd5f160cf --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/list-organizations.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 + .SetSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +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 new file mode 100644 index 000000000..71472878e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/list-projects.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 + .SetSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +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 new file mode 100644 index 000000000..3bdc64573 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/reject.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 + +Oauth2 oauth2 = new Oauth2(client); + +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 new file mode 100644 index 000000000..5f94763d3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/revoke.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 + .SetSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + + result = await oauth2.Revoke( + 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/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-dotnet/examples/organization/create-ephemeral-project-key.md new file mode 100644 index 000000000..16a1950ef --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,20 @@ +```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 + +Organization organization = new Organization(client); + +EphemeralKey result = await organization.CreateEphemeralProjectKey( + projectId: "<PROJECT_ID>", + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, + 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 new file mode 100644 index 000000000..78aa2c38c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/create-installation.md @@ -0,0 +1,18 @@ +```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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..bbeb4a1f0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/create-membership.md @@ -0,0 +1,22 @@ +```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 + +Organization organization = new Organization(client); + +Membership result = await organization.CreateMembership( + roles: new List<string>(), + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // 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 new file mode 100644 index 000000000..c4f2e6274 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/create-project.md @@ -0,0 +1,20 @@ +```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 + +Organization organization = new Organization(client); + +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/delete-installation.md b/examples/2.3.x/server-dotnet/examples/organization/delete-installation.md new file mode 100644 index 000000000..2bfb9f04c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/delete-installation.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 + +Organization organization = new Organization(client); + +await organization.DeleteInstallation( + installationId: "<INSTALLATION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/organization/delete-membership.md b/examples/2.3.x/server-dotnet/examples/organization/delete-membership.md new file mode 100644 index 000000000..efcf35ccd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/delete-membership.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 + +Organization organization = new Organization(client); + +await organization.DeleteMembership( + membershipId: "<MEMBERSHIP_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/organization/delete-project-key.md b/examples/2.3.x/server-dotnet/examples/organization/delete-project-key.md new file mode 100644 index 000000000..ff48b13f9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/delete-project-key.md @@ -0,0 +1,18 @@ +```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 + +Organization organization = new Organization(client); + +await organization.DeleteProjectKey( + projectId: "<PROJECT_ID>", + keyId: "<KEY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/organization/delete-project.md b/examples/2.3.x/server-dotnet/examples/organization/delete-project.md new file mode 100644 index 000000000..df9eb153c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/delete-project.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 + +Organization organization = new Organization(client); + +await organization.DeleteProject( + projectId: "<PROJECT_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/organization/delete.md b/examples/2.3.x/server-dotnet/examples/organization/delete.md new file mode 100644 index 000000000..5b034aa82 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/delete.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +await organization.Delete(); + + +``` 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 new file mode 100644 index 000000000..c324528b8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/get-installation.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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..44d6363e1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/get-membership.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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..d85c9acd3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/get-project-key.md @@ -0,0 +1,18 @@ +```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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..3d64fe0c7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/get-project.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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..4c3c2b76a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/get.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..2890e3367 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/list-installations.md @@ -0,0 +1,18 @@ +```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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..69c357b78 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/list-memberships.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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..ab0f06d10 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/list-project-keys.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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..c61a3341a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/list-projects.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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..c79ee8b52 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/update-installation.md @@ -0,0 +1,18 @@ +```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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..d1faf7f00 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/update-membership.md @@ -0,0 +1,18 @@ +```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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..265002909 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/update-project-key.md @@ -0,0 +1,22 @@ +```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 + +Organization organization = new Organization(client); + +Key result = await organization.UpdateProjectKey( + projectId: "<PROJECT_ID>", + keyId: "<KEY_ID>", + name: "<NAME>", + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, + 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 new file mode 100644 index 000000000..ae8e2664d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/update-project.md @@ -0,0 +1,18 @@ +```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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..8b559ce18 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/organization/update.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 + +Organization organization = new Organization(client); + +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 new file mode 100644 index 000000000..ba827ae71 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-backup-policy.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 + +Postgresql postgresql = new Postgresql(client); + +BackupPolicy result = await postgresql.CreateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", // optional + enabled: false // optional +); + +``` 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 new file mode 100644 index 000000000..de70d5c5a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-backup.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..f4e8d5663 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-branch.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..14804cc08 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-execution.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 + +Postgresql postgresql = new Postgresql(client); + +DedicatedDatabaseExecution result = await postgresql.CreateExecution( + databaseId: "<DATABASE_ID>", + sql: "<SQL>", + bindings: [object], // optional + timeoutSeconds: 1 // 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 new file mode 100644 index 000000000..d7a6e6fdf --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-extension.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..b798844f1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-failover.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..1868ba84c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-migration.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..fdd094844 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-restoration.md @@ -0,0 +1,21 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +DedicatedDatabaseRestoration result = await postgresql.CreateRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", // optional + backupId: "<BACKUP_ID>", // optional + targetDatabaseId: "<TARGET_DATABASE_ID>", // optional + targetTime: "2020-10-15T06:38:00.000+00:00" // 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 new file mode 100644 index 000000000..c81ca922b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-upgrade.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..b4c3a49bb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create.md @@ -0,0 +1,30 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +DedicatedDatabase result = await postgresql.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: new List<string>(), // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-dotnet/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..0610c1a1a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +await postgresql.DeleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/delete-backup.md b/examples/2.3.x/server-dotnet/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..45d013667 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/delete-backup.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +await postgresql.DeleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/delete-branch.md b/examples/2.3.x/server-dotnet/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..31419ede6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/delete-branch.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +await postgresql.DeleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/delete-extension.md b/examples/2.3.x/server-dotnet/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..b625a0394 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/delete-extension.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +await postgresql.DeleteExtension( + databaseId: "<DATABASE_ID>", + extensionName: "<EXTENSION_NAME>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/delete.md b/examples/2.3.x/server-dotnet/examples/postgresql/delete.md new file mode 100644 index 000000000..e6e7201e8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/delete.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 + +Postgresql postgresql = new Postgresql(client); + +await postgresql.Delete( + databaseId: "<DATABASE_ID>" +); + +``` 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 new file mode 100644 index 000000000..e58d4e215 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-backup-policy.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..4091ac393 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-backup.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..aaabade0a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-pitr.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..b42fd7804 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-pooler.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..62475f36f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-replicas.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..40a23f038 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-restoration.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..0101abcb5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-status.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..67bd780f3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..7fe5d3f71 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-backup-policies.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..f3b66895e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-backups.md @@ -0,0 +1,18 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..1c092d456 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-branches.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..a7ca3908d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-extensions.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..cb745eaa4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-operations.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 + +Postgresql postgresql = new Postgresql(client); + +DedicatedDatabaseOperationList result = await postgresql.ListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..2663a1f83 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-restorations.md @@ -0,0 +1,21 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +DedicatedDatabaseRestorationList result = await postgresql.ListRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", // optional + type: "backup", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..da1539be7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-specifications.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..eb2e0e06f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..c1faaa09c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-policy.md @@ -0,0 +1,22 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +BackupPolicy result = await postgresql.UpdateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", // optional + schedule: "", // optional + retention: 1, // optional + enabled: false // 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 new file mode 100644 index 000000000..88d946e13 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-storage.md @@ -0,0 +1,24 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +DedicatedDatabaseBackupStorage result = await postgresql.UpdateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", // optional + prefix: "<PREFIX>", // optional + endpoint: "<ENDPOINT>" // optional +); + +``` 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 new file mode 100644 index 000000000..75f8f3383 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-credentials.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..ed6fa91a4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-maintenance.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 + +Postgresql postgresql = new Postgresql(client); + +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 new file mode 100644 index 000000000..bc77771f0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-pooler.md @@ -0,0 +1,25 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +DedicatedDatabasePooler result = await postgresql.UpdatePooler( + databaseId: "<DATABASE_ID>", + mode: "transaction", // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: "<POOLER_CPU_REQUEST>", // optional + poolerCpuLimit: "<POOLER_CPU_LIMIT>", // optional + poolerMemoryRequest: "<POOLER_MEMORY_REQUEST>", // optional + poolerMemoryLimit: "<POOLER_MEMORY_LIMIT>" // 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 new file mode 100644 index 000000000..c6e5d48a6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update.md @@ -0,0 +1,37 @@ +```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 + +Postgresql postgresql = new Postgresql(client); + +DedicatedDatabase result = await postgresql.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + status: "ready", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: new List<string>(), // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: 0, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: new List<string>(), // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/presences/delete.md b/examples/2.3.x/server-dotnet/examples/presences/delete.md new file mode 100644 index 000000000..e3540674d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/presences/delete.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 + +Presences presences = new Presences(client); + +await presences.Delete( + presenceId: "<PRESENCE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/presences/get.md b/examples/2.3.x/server-dotnet/examples/presences/get.md new file mode 100644 index 000000000..85e7287ea --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/presences/get.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 + +Presences presences = new Presences(client); + +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 new file mode 100644 index 000000000..8285644ef --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/presences/list.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 + +Presences presences = new Presences(client); + +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 new file mode 100644 index 000000000..ed55483b9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/presences/update.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 + +Presences presences = new Presences(client); + +Presence result = await presences.Update( + presenceId: "<PRESENCE_ID>", + userId: "<USER_ID>", + status: "<STATUS>", // optional + expiresAt: "2020-10-15T06:38:00.000+00:00", // optional + metadata: [object], // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + purge: false // 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 new file mode 100644 index 000000000..b7868248a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/presences/upsert.md @@ -0,0 +1,22 @@ +```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 + +Presences presences = new Presences(client); + +Presence result = await presences.Upsert( + presenceId: "<PRESENCE_ID>", + userId: "<USER_ID>", + status: "<STATUS>", + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + expiresAt: "2020-10-15T06:38:00.000+00:00", // optional + metadata: [object] // optional +); + +``` 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 new file mode 100644 index 000000000..df8dd6e0f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-android-platform.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); + +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 new file mode 100644 index 000000000..10dc58da1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-apple-platform.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); + +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 new file mode 100644 index 000000000..5b6226bb8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-ephemeral-key.md @@ -0,0 +1,19 @@ +```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 + +Project project = new Project(client); + +EphemeralKey result = await project.CreateEphemeralKey( + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, + 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 new file mode 100644 index 000000000..7037a09c8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-linux-platform.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); + +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 new file mode 100644 index 000000000..f8bb1bf57 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-mock-phone.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..d461c0cde --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-smtp-test.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 + +Project project = new Project(client); + + result = await project.CreateSMTPTest( + emails: new List<string>() +); + +``` 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 new file mode 100644 index 000000000..1e361c54b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-variable.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 + +Project project = new Project(client); + +Variable result = await project.CreateVariable( + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); + +``` 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 new file mode 100644 index 000000000..83f148a03 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-web-platform.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); + +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 new file mode 100644 index 000000000..01eb5b90f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/create-windows-platform.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); + +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/delete-key.md b/examples/2.3.x/server-dotnet/examples/project/delete-key.md new file mode 100644 index 000000000..258def649 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/delete-key.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 + +Project project = new Project(client); + +await project.DeleteKey( + keyId: "<KEY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/project/delete-mock-phone.md b/examples/2.3.x/server-dotnet/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..c716be594 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/delete-mock-phone.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 + +Project project = new Project(client); + +await project.DeleteMockPhone( + number: "+12065550100" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/project/delete-platform.md b/examples/2.3.x/server-dotnet/examples/project/delete-platform.md new file mode 100644 index 000000000..77ddecdab --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/delete-platform.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 + +Project project = new Project(client); + +await project.DeletePlatform( + platformId: "<PLATFORM_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/project/delete-variable.md b/examples/2.3.x/server-dotnet/examples/project/delete-variable.md new file mode 100644 index 000000000..5ef1405e3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/delete-variable.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 + +Project project = new Project(client); + +await project.DeleteVariable( + variableId: "<VARIABLE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/project/delete.md b/examples/2.3.x/server-dotnet/examples/project/delete.md new file mode 100644 index 000000000..17f70c47f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/delete.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Project project = new Project(client); + +await project.Delete(); + + +``` 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 new file mode 100644 index 000000000..11a331a21 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/get-email-template.md @@ -0,0 +1,19 @@ +```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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..a84c4602f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/get-key.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..43fea545d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/get-mock-phone.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 + +Project project = new Project(client); + +MockNumber result = await project.GetMockPhone( + number: "+12065550100" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-dotnet/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..ea55cb1eb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,18 @@ +```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 + +Project project = new Project(client); + +object result = await project.GetOAuth2Provider( + providerId: ProjectOAuthProviderId.Amazon +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/project/get-platform.md b/examples/2.3.x/server-dotnet/examples/project/get-platform.md new file mode 100644 index 000000000..236eeb777 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/get-platform.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 + +Project project = new Project(client); + +object result = await project.GetPlatform( + platformId: "<PLATFORM_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/project/get-policy.md b/examples/2.3.x/server-dotnet/examples/project/get-policy.md new file mode 100644 index 000000000..ed4e8a5f8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/get-policy.md @@ -0,0 +1,18 @@ +```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 + +Project project = new Project(client); + +object result = await project.GetPolicy( + policyId: ProjectPolicyId.PasswordDictionary +); + +``` 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 new file mode 100644 index 000000000..bda49739d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/get-variable.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..8dbf5a582 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/get.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..0cd3cad12 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/list-email-templates.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..f006dd194 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/list-keys.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..3fa07bdcb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/list-mock-phones.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..9d0e7eae9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..2a507c274 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/list-platforms.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..bbd49b4c6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/list-policies.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..e8107ab6c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/list-variables.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..77b78b571 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-android-platform.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); + +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 new file mode 100644 index 000000000..fa9ec4623 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-apple-platform.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); + +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 new file mode 100644 index 000000000..0b180be24 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-auth-method.md @@ -0,0 +1,19 @@ +```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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..50d622ea7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-deny-aliased-email-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..13e204eb2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-deny-corporate-email-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..7e22b31a3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-deny-disposable-email-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..49ba67670 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-deny-free-email-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..2c4c747d2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-email-template.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 + +Project project = new Project(client); + +EmailTemplate result = await project.UpdateEmailTemplate( + templateId: ProjectEmailTemplateId.Verification, + locale: ProjectEmailTemplateLocale.Af, // optional + subject: "<SUBJECT>", // optional + message: "<MESSAGE>", // optional + senderName: "<SENDER_NAME>", // optional + senderEmail: "email@example.com", // optional + replyToEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>" // 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 new file mode 100644 index 000000000..619fca4b9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-key.md @@ -0,0 +1,21 @@ +```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 + +Project project = new Project(client); + +Key result = await project.UpdateKey( + keyId: "<KEY_ID>", + name: "<NAME>", + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, + 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 new file mode 100644 index 000000000..2dfe3ea86 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-labels.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 + +Project project = new Project(client); + +Project result = await project.UpdateLabels( + labels: new List<string>() +); + +``` 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 new file mode 100644 index 000000000..0e0be47d5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-linux-platform.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); + +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 new file mode 100644 index 000000000..3e6102f6d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,22 @@ +```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); + +Project result = await project.UpdateMembershipPrivacyPolicy( + userId: false, // optional + userEmail: false, // optional + userPhone: false, // optional + userName: false, // optional + userMFA: false, // optional + userAccessedAt: 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 new file mode 100644 index 000000000..aa9ed2a54 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-mfa-factors-policy.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 + +Project project = new Project(client); + +Project result = await project.UpdateMFAFactorsPolicy( + totp: false, // optional + email: false, // optional + phone: false, // optional + custom: 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 new file mode 100644 index 000000000..e2c699e2b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-mock-phone.md @@ -0,0 +1,18 @@ +```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); + +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 new file mode 100644 index 000000000..b104edf02 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-amazon.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); + +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 new file mode 100644 index 000000000..aa455efa7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-apple.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 + +Project project = new Project(client); + +OAuth2Apple result = await project.UpdateOAuth2Apple( + serviceId: "<SERVICE_ID>", // optional + keyId: "<KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + p8File: "<P8_FILE>", // optional + nativeClientIds: new List<string>(), // optional + enabled: false, // optional + nativeEnabled: false // 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 new file mode 100644 index 000000000..cb38c52d7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-appwrite.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); + +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 new file mode 100644 index 000000000..081f83231 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-auth-0.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 + +Project project = new Project(client); + +OAuth2Auth0 result = await project.UpdateOAuth2Auth0( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + endpoint: "<ENDPOINT>", // 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 new file mode 100644 index 000000000..75107594c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-authentik.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 + +Project project = new Project(client); + +OAuth2Authentik result = await project.UpdateOAuth2Authentik( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + endpoint: "<ENDPOINT>", // optional + enabled: false // 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 new file mode 100644 index 000000000..836fcc553 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-autodesk.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); + +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 new file mode 100644 index 000000000..6a72900dd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitbucket.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); + +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 new file mode 100644 index 000000000..f46dd35a6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitly.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); + +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 new file mode 100644 index 000000000..1f331e2cb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-box.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); + +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 new file mode 100644 index 000000000..2c7fd8099 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-cloudflare.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); + +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 new file mode 100644 index 000000000..87c2c4785 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dailymotion.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); + +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 new file mode 100644 index 000000000..b6a92dbef --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-discord.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); + +OAuth2Discord result = await project.UpdateOAuth2Discord( + 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-disqus.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..a7235621b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-disqus.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); + +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 new file mode 100644 index 000000000..16dd0f995 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dropbox.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); + +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 new file mode 100644 index 000000000..7ffcb53fa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-etsy.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); + +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 new file mode 100644 index 000000000..a1549973a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-facebook.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); + +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 new file mode 100644 index 000000000..4c2e8bcd2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-figma.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); + +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 new file mode 100644 index 000000000..d8515eeab --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-fusion-auth.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 + +Project project = new Project(client); + +OAuth2FusionAuth result = await project.UpdateOAuth2FusionAuth( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + endpoint: "<ENDPOINT>", // optional + enabled: false // 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 new file mode 100644 index 000000000..f57712e35 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-git-hub.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); + +OAuth2Github result = await project.UpdateOAuth2GitHub( + 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-gitlab.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..169b2ec84 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-gitlab.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 + +Project project = new Project(client); + +OAuth2Gitlab result = await project.UpdateOAuth2Gitlab( + applicationId: "<APPLICATION_ID>", // optional + secret: "<SECRET>", // optional + endpoint: "https://example.com", // optional + enabled: false // 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 new file mode 100644 index 000000000..f72b8a6db --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-google.md @@ -0,0 +1,23 @@ +```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 + +Project project = new Project(client); + +OAuth2Google result = await project.UpdateOAuth2Google( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + prompt: new List<ProjectOAuth2GooglePrompt> { ProjectOAuth2GooglePrompt.None }, // optional + nativeClientIds: new List<string>(), // optional + enabled: false, // optional + nativeEnabled: false // 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 new file mode 100644 index 000000000..350640d47 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-hugging-face.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); + +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 new file mode 100644 index 000000000..546e5ac66 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kakao.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); + +OAuth2Kakao result = await project.UpdateOAuth2Kakao( + 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-keycloak.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..67b036972 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,21 @@ +```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); + +OAuth2Keycloak result = await project.UpdateOAuth2Keycloak( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + endpoint: "<ENDPOINT>", // optional + realmName: "<REALM_NAME>", // optional + enabled: false // 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 new file mode 100644 index 000000000..56cbef852 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kick.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); + +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 new file mode 100644 index 000000000..72c138421 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-linkedin.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); + +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 new file mode 100644 index 000000000..8e5afa31b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-microsoft.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 + +Project project = new Project(client); + +OAuth2Microsoft result = await project.UpdateOAuth2Microsoft( + applicationId: "<APPLICATION_ID>", // optional + applicationSecret: "<APPLICATION_SECRET>", // optional + tenant: "<TENANT>", // 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 new file mode 100644 index 000000000..a3cb77633 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-notion.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); + +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 new file mode 100644 index 000000000..5abb49326 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,26 @@ +```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 + +Project project = new Project(client); + +OAuth2Oidc result = await project.UpdateOAuth2Oidc( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + wellKnownURL: "https://example.com", // optional + authorizationURL: "https://example.com", // optional + tokenURL: "https://example.com", // optional + userInfoURL: "https://example.com", // optional + prompt: new List<ProjectOAuth2OidcPrompt> { ProjectOAuth2OidcPrompt.None }, // optional + maxAge: 0, // optional + enabled: false // 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 new file mode 100644 index 000000000..fa2a11515 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,21 @@ +```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); + +OAuth2Okta result = await project.UpdateOAuth2Okta( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + domain: "example.com", // optional + authorizationServerId: "<AUTHORIZATION_SERVER_ID>", // 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 new file mode 100644 index 000000000..1cbc8c572 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal-sandbox.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); + +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 new file mode 100644 index 000000000..03fc66593 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal.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); + +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 new file mode 100644 index 000000000..9e8b31f6c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-podio.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); + +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 new file mode 100644 index 000000000..3fd799220 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-resend.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); + +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 new file mode 100644 index 000000000..e4b6629c1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-salesforce.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); + +OAuth2Salesforce result = await project.UpdateOAuth2Salesforce( + customerKey: "<CUSTOMER_KEY>", // optional + customerSecret: "<CUSTOMER_SECRET>", // 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 new file mode 100644 index 000000000..c43efa264 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-server.md @@ -0,0 +1,32 @@ +```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); + +Project result = await project.UpdateOAuth2Server( + enabled: false, + authorizationUrl: "https://example.com", + scopes: new List<string>(), // optional + authorizationDetailsTypes: new List<string>(), // optional + accessTokenDuration: 60, // optional + refreshTokenDuration: 60, // optional + publicAccessTokenDuration: 60, // optional + publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional + confidentialPkce: false, // optional + verificationUrl: "https://example.com", // optional + userCodeLength: 6, // optional + userCodeFormat: "numeric", // optional + deviceCodeDuration: 60, // optional + defaultScopes: new List<string>(), // optional + installationScopes: 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 new file mode 100644 index 000000000..1d7cc149d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-slack.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); + +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 new file mode 100644 index 000000000..481634e40 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-spotify.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); + +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 new file mode 100644 index 000000000..97ce54a17 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-stripe.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); + +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 new file mode 100644 index 000000000..560c4f54e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tik-tok.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); + +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 new file mode 100644 index 000000000..72ab7c5a5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift-sandbox.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); + +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 new file mode 100644 index 000000000..01edc689f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift.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); + +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 new file mode 100644 index 000000000..405b7dc70 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-twitch.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); + +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-word-press.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..60bbdfcf9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-word-press.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); + +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 new file mode 100644 index 000000000..127f97867 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yahoo.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); + +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 new file mode 100644 index 000000000..0fcc0dc76 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yandex.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); + +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 new file mode 100644 index 000000000..6347cb2bb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoho.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); + +OAuth2Zoho result = await project.UpdateOAuth2Zoho( + 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-zoom.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..2b9d60dd6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoom.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); + +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 new file mode 100644 index 000000000..01bab1404 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2x.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); + +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 new file mode 100644 index 000000000..bfcf1c3d4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-dictionary-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..838761546 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-history-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..e79919f28 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-personal-data-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..6a23dd029 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-pwned-policy.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); + +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 new file mode 100644 index 000000000..7edf30509 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-strength-policy.md @@ -0,0 +1,21 @@ +```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); + +PolicyPasswordStrength result = await project.UpdatePasswordStrengthPolicy( + min: 8, // optional + uppercase: false, // optional + lowercase: false, // optional + number: false, // optional + symbols: 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 new file mode 100644 index 000000000..9a53240a8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-protocol.md @@ -0,0 +1,19 @@ +```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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..8463028b4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-service.md @@ -0,0 +1,19 @@ +```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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..247fe3ced --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-session-alert-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..1c66cc204 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-session-duration-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..e354b471f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-session-invalidation-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..11434253c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-session-limit-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..4af1ceeed --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-smtp.md @@ -0,0 +1,27 @@ +```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 + +Project project = new Project(client); + +Project result = await project.UpdateSMTP( + host: "example.com", // optional + port: 587, // optional + username: "<USERNAME>", // optional + password: "password", // optional + senderEmail: "email@example.com", // optional + senderName: "<SENDER_NAME>", // optional + replyToEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + secure: ProjectSMTPSecure.Tls, // optional + enabled: false // 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 new file mode 100644 index 000000000..d24957e0c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-user-limit-policy.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 + +Project project = new Project(client); + +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 new file mode 100644 index 000000000..b612ed863 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-variable.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 + +Project project = new Project(client); + +Variable result = await project.UpdateVariable( + variableId: "<VARIABLE_ID>", + key: "<KEY>", // optional + value: "<VALUE>", // optional + secret: false // 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 new file mode 100644 index 000000000..3d03f26d2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-web-platform.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); + +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 new file mode 100644 index 000000000..64e219981 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-windows-platform.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); + +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 new file mode 100644 index 000000000..a5511bd39 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-api-rule.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 + +Proxy proxy = new Proxy(client); + +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 new file mode 100644 index 000000000..fe1fd9067 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-function-rule.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 + +Proxy proxy = new Proxy(client); + +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 new file mode 100644 index 000000000..0b51ed48f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-invalidation.md @@ -0,0 +1,20 @@ +```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 + +Proxy proxy = new Proxy(client); + +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 new file mode 100644 index 000000000..71ffbefed --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-redirect-rule.md @@ -0,0 +1,22 @@ +```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 + +Proxy proxy = new Proxy(client); + +ProxyRule result = await proxy.CreateRedirectRule( + domain: "example.com", + url: "https://example.com", + statusCode: StatusCode.MovedPermanently, + resourceId: "<RESOURCE_ID>", + resourceType: ProxyResourceType.Site +); + +``` 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 new file mode 100644 index 000000000..52b6b60e7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-site-rule.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 + +Proxy proxy = new Proxy(client); + +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/delete-rule.md b/examples/2.3.x/server-dotnet/examples/proxy/delete-rule.md new file mode 100644 index 000000000..d9e9b1605 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/delete-rule.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 + +Proxy proxy = new Proxy(client); + +await proxy.DeleteRule( + ruleId: "<RULE_ID>" +); + +``` 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 new file mode 100644 index 000000000..6834db740 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/get-rule.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 + +Proxy proxy = new Proxy(client); + +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 new file mode 100644 index 000000000..4a962d304 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/list-rules.md @@ -0,0 +1,18 @@ +```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 + +Proxy proxy = new Proxy(client); + +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 new file mode 100644 index 000000000..da3efe372 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/proxy/update-rule-status.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 + +Proxy proxy = new Proxy(client); + +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 new file mode 100644 index 000000000..61b562686 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/create-deployment.md @@ -0,0 +1,22 @@ +```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 + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateDeployment( + siteId: "<SITE_ID>", + code: InputFile.FromPath("./path-to-files/image.jpg"), + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + activate: false // 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 new file mode 100644 index 000000000..22c70c1d6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..769fcc1c1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/create-template-deployment.md @@ -0,0 +1,24 @@ +```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 + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + type: TemplateReferenceType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); + +``` 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 new file mode 100644 index 000000000..9e9d1ef73 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/create-variable.md @@ -0,0 +1,21 @@ +```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 + +Sites sites = new Sites(client); + +Variable result = await sites.CreateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); + +``` 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 new file mode 100644 index 000000000..42ec3756c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/create-vcs-deployment.md @@ -0,0 +1,21 @@ +```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 + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateVcsDeployment( + siteId: "<SITE_ID>", + type: VCSReferenceType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/sites/create.md b/examples/2.3.x/server-dotnet/examples/sites/create.md new file mode 100644 index 000000000..9b2d5b52e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/create.md @@ -0,0 +1,41 @@ +```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 + +Sites sites = new Sites(client); + +Site result = await sites.Create( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: Framework.Analog, + buildRuntime: BuildRuntime.Node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + startCommand: "<START_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + adapter: Adapter.Static, // optional + installationId: "<INSTALLATION_ID>", // optional + fallbackFile: "<FALLBACK_FILE>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches: new List<string>(), // optional + providerPaths: new List<string>(), // optional + buildSpecification: "s-1vcpu-512mb", // optional + runtimeSpecification: "s-1vcpu-512mb", // optional + deploymentRetention: 0, // optional + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead } // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/sites/delete-deployment.md b/examples/2.3.x/server-dotnet/examples/sites/delete-deployment.md new file mode 100644 index 000000000..be1440888 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/delete-deployment.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +await sites.DeleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/sites/delete-log.md b/examples/2.3.x/server-dotnet/examples/sites/delete-log.md new file mode 100644 index 000000000..576be3fb4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/delete-log.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +await sites.DeleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/sites/delete-variable.md b/examples/2.3.x/server-dotnet/examples/sites/delete-variable.md new file mode 100644 index 000000000..0d7d68bed --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/delete-variable.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +await sites.DeleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/sites/delete.md b/examples/2.3.x/server-dotnet/examples/sites/delete.md new file mode 100644 index 000000000..80510f15f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/delete.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 + +Sites sites = new Sites(client); + +await sites.Delete( + siteId: "<SITE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/sites/get-deployment-download.md b/examples/2.3.x/server-dotnet/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..e4f0985b6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/get-deployment-download.md @@ -0,0 +1,21 @@ +```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 + +Sites sites = new Sites(client); + +byte[] result = await sites.GetDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: DeploymentDownloadType.Source, // optional + token: "<TOKEN>" // optional +); + +``` 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 new file mode 100644 index 000000000..dfd86dfc0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/get-deployment.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..caa38be7a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/get-log.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..9a68b6615 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/get-variable.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..7c1885cb2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/get.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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..b25172e26 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/list-deployments.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 + +Sites sites = new Sites(client); + +DeploymentList result = await sites.ListDeployments( + siteId: "<SITE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..7a3165f9f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/list-frameworks.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +FrameworkList result = await sites.ListFrameworks(); + + +``` 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 new file mode 100644 index 000000000..baee6c918 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/list-logs.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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..12d184080 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/list-specifications.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 + +Sites sites = new Sites(client); + +SpecificationList result = await sites.ListSpecifications( + type: "runtimes" // 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 new file mode 100644 index 000000000..8f546817c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/list-variables.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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..27c4f6594 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/list.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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..0a6bf240c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/update-deployment-status.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..8633ab7ea --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/update-site-deployment.md @@ -0,0 +1,18 @@ +```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 + +Sites sites = new Sites(client); + +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 new file mode 100644 index 000000000..e7236cef6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/update-variable.md @@ -0,0 +1,21 @@ +```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 + +Sites sites = new Sites(client); + +Variable result = await sites.UpdateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", // optional + value: "<VALUE>", // optional + secret: false // 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 new file mode 100644 index 000000000..8c8128411 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/sites/update.md @@ -0,0 +1,41 @@ +```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 + +Sites sites = new Sites(client); + +Site result = await sites.Update( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: Framework.Analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + startCommand: "<START_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + buildRuntime: BuildRuntime.Node145, // optional + adapter: Adapter.Static, // optional + fallbackFile: "<FALLBACK_FILE>", // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches: new List<string>(), // optional + providerPaths: new List<string>(), // optional + buildSpecification: "s-1vcpu-512mb", // optional + runtimeSpecification: "s-1vcpu-512mb", // optional + deploymentRetention: 0, // optional + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead } // optional +); + +``` 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 new file mode 100644 index 000000000..bdbd46a9e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/create-bucket.md @@ -0,0 +1,28 @@ +```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 + +Storage storage = new Storage(client); + +Bucket result = await storage.CreateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: new List<string>(), // optional + compression: Compression.None, // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false // 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 new file mode 100644 index 000000000..32cbd1d35 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/create-file.md @@ -0,0 +1,21 @@ +```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 + +Storage storage = new Storage(client); + +File result = await storage.CreateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + file: InputFile.FromPath("./path-to-files/image.jpg"), + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + folder: "photos/2026" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/storage/delete-bucket.md b/examples/2.3.x/server-dotnet/examples/storage/delete-bucket.md new file mode 100644 index 000000000..7203b3fbf --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/delete-bucket.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 + +Storage storage = new Storage(client); + +await storage.DeleteBucket( + bucketId: "<BUCKET_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/storage/delete-file.md b/examples/2.3.x/server-dotnet/examples/storage/delete-file.md new file mode 100644 index 000000000..cc540d6db --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/delete-file.md @@ -0,0 +1,18 @@ +```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 + +Storage storage = new Storage(client); + +await storage.DeleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); + +``` 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 new file mode 100644 index 000000000..8c1edda21 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/get-bucket.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 + +Storage storage = new Storage(client); + +Bucket result = await storage.GetBucket( + bucketId: "<BUCKET_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/storage/get-file-download.md b/examples/2.3.x/server-dotnet/examples/storage/get-file-download.md new file mode 100644 index 000000000..0cb454752 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/get-file-download.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 + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/storage/get-file-preview.md b/examples/2.3.x/server-dotnet/examples/storage/get-file-preview.md new file mode 100644 index 000000000..cf2667192 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/get-file-preview.md @@ -0,0 +1,31 @@ +```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 + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.Auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "FFFFFF", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "FFFFFF", // optional + output: ImageFormat.Jpg, // optional + token: "<TOKEN>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/storage/get-file-view.md b/examples/2.3.x/server-dotnet/examples/storage/get-file-view.md new file mode 100644 index 000000000..5639caef2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/get-file-view.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 + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +); + +``` 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 new file mode 100644 index 000000000..925a7b5d4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/get-file.md @@ -0,0 +1,18 @@ +```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 + +Storage storage = new Storage(client); + +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 new file mode 100644 index 000000000..df2145676 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/list-buckets.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 + +Storage storage = new Storage(client); + +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 new file mode 100644 index 000000000..756aeb9f9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/list-files.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 + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +FileList result = await storage.ListFiles( + bucketId: "<BUCKET_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..6e31cb359 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/update-bucket.md @@ -0,0 +1,28 @@ +```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 + +Storage storage = new Storage(client); + +Bucket result = await storage.UpdateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: new List<string>(), // optional + compression: Compression.None, // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false // 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 new file mode 100644 index 000000000..a2b7013c3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/storage/update-file.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 + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.UpdateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", // optional + permissions: new List<string> { Permission.Read(Role.Any()) } // 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 new file mode 100644 index 000000000..9849dc441 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnBigint result = await tablesDB.CreateBigIntColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 1000000, // optional + default: 0, // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..d4d177674 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnBoolean result = await tablesDB.CreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: false, // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..522ed9482 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-cutover.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..0739c6cfa --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnDatetime result = await tablesDB.CreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..b5879ca47 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-email-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnEmail result = await tablesDB.CreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..7a855e5dd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-enum-column.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnEnum result = await tablesDB.CreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + elements: ["active", "inactive"], + required: false, + default: "active", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..8eee23f4d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-failover.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..8d7293a50 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-float-column.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnFloat result = await tablesDB.CreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 100, // optional + default: 10.5, // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..df5d61e3e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-index.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnIndex result = await tablesDB.CreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + type: TablesDBIndexType.Key, + columns: new List<string>(), + 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 new file mode 100644 index 000000000..60ecc4c1a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-integer-column.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnInteger result = await tablesDB.CreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 100, // optional + default: 10, // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..dea6f8a0f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-ip-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnIp result = await tablesDB.CreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..3f7ae3387 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-line-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnLine result = await tablesDB.CreateLineColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [[1, 2], [3, 4], [5, 6]] // optional +); + +``` 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 new file mode 100644 index 000000000..7f63f462e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-longtext-column.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnLongtext result = await tablesDB.CreateLongtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` 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 new file mode 100644 index 000000000..f834cf246 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-mediumtext-column.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnMediumtext result = await tablesDB.CreateMediumtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` 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 new file mode 100644 index 000000000..863f223c5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-migration.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..e7e92df13 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-operations.md @@ -0,0 +1,28 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +Transaction result = await tablesDB.CreateOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +); + +``` 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 new file mode 100644 index 000000000..aa787a482 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-point-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnPoint result = await tablesDB.CreatePointColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [1, 2] // optional +); + +``` 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 new file mode 100644 index 000000000..c667492ff --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnPolygon result = await tablesDB.CreatePolygonColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional +); + +``` 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 new file mode 100644 index 000000000..2ad3e3659 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-relationship-column.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnRelationship result = await tablesDB.CreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "<KEY>", // optional + twoWayKey: "<TWO_WAY_KEY>", // optional + onDelete: RelationMutate.Cascade // optional +); + +``` 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 new file mode 100644 index 000000000..05cbe3ce5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-row.md @@ -0,0 +1,28 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +Row result = await tablesDB.CreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 30, + isAdmin = false + }, + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..868c515a7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-rows.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 + +TablesDB tablesDB = new TablesDB(client); + +RowList result = await tablesDB.CreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>(), + 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 new file mode 100644 index 000000000..70d552835 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-string-column.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnString result = await tablesDB.CreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` 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 new file mode 100644 index 000000000..f7781fc7b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-table.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +Table result = await tablesDB.CreateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + rowSecurity: false, // optional + enabled: false, // optional + columns: new List<object>(), // optional + indexes: new List<object>() // optional +); + +``` 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 new file mode 100644 index 000000000..ae046a6ae --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-text-column.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnText result = await tablesDB.CreateTextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` 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 new file mode 100644 index 000000000..cc3845f05 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-transaction.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..de79303f9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-url-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnUrl result = await tablesDB.CreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", // optional + array: false // optional +); + +``` 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 new file mode 100644 index 000000000..507c8dd4f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnVarchar result = await tablesDB.CreateVarcharColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create.md new file mode 100644 index 000000000..8175c0eb0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +Database result = await tablesDB.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // 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 new file mode 100644 index 000000000..c7a970202 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/decrement-row-column.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 + .SetSession(""); // The user session to authenticate with + +TablesDB tablesDB = new TablesDB(client); + +Row result = await tablesDB.DecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "<COLUMN>", + value: 1, // optional + min: 0, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/delete-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..fbb622536 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-column.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 + +TablesDB tablesDB = new TablesDB(client); + +await tablesDB.DeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/delete-index.md b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..ccf44a5ff --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-index.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 + +TablesDB tablesDB = new TablesDB(client); + +await tablesDB.DeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..84541e141 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-migration.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +await tablesDB.DeleteMigration( + databaseId: "<DATABASE_ID>", + migrationId: "<MIGRATION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/delete-row.md b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..51c0168e9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-row.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 + .SetSession(""); // The user session to authenticate with + +TablesDB tablesDB = new TablesDB(client); + +await tablesDB.DeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..1cfdfe72b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-rows.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 + +TablesDB tablesDB = new TablesDB(client); + +await tablesDB.DeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/delete-table.md b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..486d1cfde --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-table.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +await tablesDB.DeleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..1fc1ced43 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-transaction.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 + +TablesDB tablesDB = new TablesDB(client); + +await tablesDB.DeleteTransaction( + transactionId: "<TRANSACTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/delete.md b/examples/2.3.x/server-dotnet/examples/tablesdb/delete.md new file mode 100644 index 000000000..8af9ed67a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete.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 + +TablesDB tablesDB = new TablesDB(client); + +await tablesDB.Delete( + databaseId: "<DATABASE_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get-column.md new file mode 100644 index 000000000..c0d9c0423 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-column.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 + +TablesDB tablesDB = new TablesDB(client); + +object result = await tablesDB.GetColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" +); + +``` 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 new file mode 100644 index 000000000..45cb48260 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-index.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..de4d85e3b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-migration.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..1053522f8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-replicas.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..83c1f61e9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-row.md @@ -0,0 +1,21 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +Row result = await tablesDB.GetRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..5cc588fb3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-status.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..e5f5c4e45 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-table.md @@ -0,0 +1,18 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..9bfeeb636 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-transaction.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..daa759aba --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..16d13fbc7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/increment-row-column.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 + .SetSession(""); // The user session to authenticate with + +TablesDB tablesDB = new TablesDB(client); + +Row result = await tablesDB.IncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "<COLUMN>", + value: 1, // optional + max: 100, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..fdb00a25b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-columns.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnList result = await tablesDB.ListColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>(), // optional + total: false // 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 new file mode 100644 index 000000000..f2b039a4a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-indexes.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnIndexList result = await tablesDB.ListIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>(), // optional + total: false // 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 new file mode 100644 index 000000000..a7b88cb91 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-migrations.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..daaa28684 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-operations.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 + +TablesDB tablesDB = new TablesDB(client); + +DedicatedDatabaseOperationList result = await tablesDB.ListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..66e085fd9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-rows.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +RowList result = await tablesDB.ListRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // 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 new file mode 100644 index 000000000..262b9fd3f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-specifications.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..89c2e7b52 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-tables.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 + +TablesDB tablesDB = new TablesDB(client); + +TableList result = await tablesDB.ListTables( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..6d7db9ab0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-transactions.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 + +TablesDB tablesDB = new TablesDB(client); + +TransactionList result = await tablesDB.ListTransactions( + queries: new List<string>() // 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 new file mode 100644 index 000000000..6f0829307 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..381d02b26 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnBigint result = await tablesDB.UpdateBigIntColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 0, + min: 0, // optional + max: 1000000, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..5f7685ec2 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnBoolean result = await tablesDB.UpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: false, + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..f659279c1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnDatetime result = await tablesDB.UpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..c8f5d9127 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-email-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnEmail result = await tablesDB.UpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..404fc413d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-enum-column.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnEnum result = await tablesDB.UpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + elements: ["active", "inactive"], + required: false, + default: "active", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..7983743ea --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-float-column.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnFloat result = await tablesDB.UpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 10.5, + min: 0, // optional + max: 100, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..22b8ab205 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-integer-column.md @@ -0,0 +1,24 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnInteger result = await tablesDB.UpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 10, + min: 0, // optional + max: 100, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..30a9c595b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-ip-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnIp result = await tablesDB.UpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..91291e3f6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-line-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnLine result = await tablesDB.UpdateLineColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [[1, 2], [3, 4], [5, 6]], // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..c240a4965 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnLongtext result = await tablesDB.UpdateLongtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..592d8afac --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnMediumtext result = await tablesDB.UpdateMediumtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..4e2dcc07a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-point-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnPoint result = await tablesDB.UpdatePointColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [1, 2], // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..5ecd1b806 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnPolygon result = await tablesDB.UpdatePolygonColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..8d75dd0a0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnRelationship result = await tablesDB.UpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + onDelete: RelationMutate.Cascade, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..03f71f613 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-row.md @@ -0,0 +1,28 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +Row result = await tablesDB.UpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 33, + isAdmin = false + }, // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..9e4c497bd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-rows.md @@ -0,0 +1,27 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +RowList result = await tablesDB.UpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 33, + isAdmin = false + }, // optional + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..bf0849e2f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-string-column.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnString result = await tablesDB.UpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, // optional + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..e7a228214 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-table.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 + +TablesDB tablesDB = new TablesDB(client); + +Table result = await tablesDB.UpdateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + rowSecurity: false, // optional + enabled: false, // optional + purge: false // 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 new file mode 100644 index 000000000..0ee26e042 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-text-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnText result = await tablesDB.UpdateTextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..2010f673b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-transaction.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 + +TablesDB tablesDB = new TablesDB(client); + +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 new file mode 100644 index 000000000..f32ce01a6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-url-column.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnUrl result = await tablesDB.UpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", + newKey: "<NEW_KEY>" // optional +); + +``` 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 new file mode 100644 index 000000000..3cd1f9c09 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-varchar-column.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 + +TablesDB tablesDB = new TablesDB(client); + +ColumnVarchar result = await tablesDB.UpdateVarcharColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, // optional + newKey: "<NEW_KEY>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update.md new file mode 100644 index 000000000..8b28a996e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update.md @@ -0,0 +1,22 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +Database result = await tablesDB.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // 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 new file mode 100644 index 000000000..ef38e305a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-row.md @@ -0,0 +1,28 @@ +```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 + +TablesDB tablesDB = new TablesDB(client); + +Row result = await tablesDB.UpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 33, + isAdmin = false + }, // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..41d3bcd8c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-rows.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 + +TablesDB tablesDB = new TablesDB(client); + +RowList result = await tablesDB.UpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>(), + 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 new file mode 100644 index 000000000..217d0a239 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/create-installation.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..1092050b5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/create-membership.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.CreateMembership( + teamId: "<TEAM_ID>", + roles: new List<string>(), + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // 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 new file mode 100644 index 000000000..fdc1e09cb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/create.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +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/delete-installation.md b/examples/2.3.x/server-dotnet/examples/teams/delete-installation.md new file mode 100644 index 000000000..d9d4263ab --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/delete-installation.md @@ -0,0 +1,18 @@ +```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 + +Teams teams = new Teams(client); + +await teams.DeleteInstallation( + teamId: "<TEAM_ID>", + installationId: "<INSTALLATION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/teams/delete-membership.md b/examples/2.3.x/server-dotnet/examples/teams/delete-membership.md new file mode 100644 index 000000000..e7b8bb31d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/delete-membership.md @@ -0,0 +1,18 @@ +```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 + +Teams teams = new Teams(client); + +await teams.DeleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/teams/delete.md b/examples/2.3.x/server-dotnet/examples/teams/delete.md new file mode 100644 index 000000000..b10544185 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/delete.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 + +Teams teams = new Teams(client); + +await teams.Delete( + teamId: "<TEAM_ID>" +); + +``` 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 new file mode 100644 index 000000000..e23c47819 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/get-installation.md @@ -0,0 +1,18 @@ +```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 + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..f359df1a6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/get-membership.md @@ -0,0 +1,18 @@ +```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 + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..95a8c2880 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/get-prefs.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 + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..900d932d5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/get.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 + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..133f4278b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/list-installations.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..64c25747f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/list-memberships.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +MembershipList result = await teams.ListMemberships( + teamId: "<TEAM_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..571c86634 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/list.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..7fa98101e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/update-installation.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..1f172dab3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/update-membership-status.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.UpdateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" +); + +``` 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 new file mode 100644 index 000000000..ff4ad455e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/update-membership.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 + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.UpdateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: new List<string>() +); + +``` 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 new file mode 100644 index 000000000..6f42ce5cb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/update-name.md @@ -0,0 +1,18 @@ +```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 + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..b2dbac7ac --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/teams/update-prefs.md @@ -0,0 +1,18 @@ +```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 + +Teams teams = new Teams(client); + +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 new file mode 100644 index 000000000..baf4c376e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tokens/create-file-token.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 + +Tokens tokens = new Tokens(client); + +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/delete.md b/examples/2.3.x/server-dotnet/examples/tokens/delete.md new file mode 100644 index 000000000..9b1863587 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tokens/delete.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 + +Tokens tokens = new Tokens(client); + +await tokens.Delete( + tokenId: "<TOKEN_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/tokens/get.md b/examples/2.3.x/server-dotnet/examples/tokens/get.md new file mode 100644 index 000000000..5466ae879 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tokens/get.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 + +Tokens tokens = new Tokens(client); + +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 new file mode 100644 index 000000000..45e027d49 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tokens/list.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 + +Tokens tokens = new Tokens(client); + +ResourceTokenList result = await tokens.List( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: new List<string>(), // optional + total: false // 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 new file mode 100644 index 000000000..041dce974 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/tokens/update.md @@ -0,0 +1,18 @@ +```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 + +Tokens tokens = new Tokens(client); + +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 new file mode 100644 index 000000000..6c4ba6355 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-argon-2-user.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 + +Users users = new Users(client); + +User result = await users.CreateArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); + +``` 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 new file mode 100644 index 000000000..d4a70e5bd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-bcrypt-user.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 + +Users users = new Users(client); + +User result = await users.CreateBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); + +``` 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 new file mode 100644 index 000000000..0841f4eaf --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-jwt.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..268257113 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-md-5-user.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 + +Users users = new Users(client); + +User result = await users.CreateMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); + +``` 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 new file mode 100644 index 000000000..02a34ab97 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-mfa-recovery-codes.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..efcc9f273 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-ph-pass-user.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 + +Users users = new Users(client); + +User result = await users.CreatePHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); + +``` 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 new file mode 100644 index 000000000..687282b20 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-scrypt-modified-user.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 + +Users users = new Users(client); + +User result = await users.CreateScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" // optional +); + +``` 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 new file mode 100644 index 000000000..ee7e61a12 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-scrypt-user.md @@ -0,0 +1,25 @@ +```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 + +Users users = new Users(client); + +User result = await users.CreateScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 8, + passwordMemory: 65536, + passwordParallel: 1, + passwordLength: 64, + name: "<NAME>" // optional +); + +``` 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 new file mode 100644 index 000000000..5ca7121fb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-session.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..8dd3a160c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-sha-user.md @@ -0,0 +1,22 @@ +```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 + +Users users = new Users(client); + +User result = await users.CreateSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: PasswordHash.Sha1, // optional + name: "<NAME>" // optional +); + +``` 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 new file mode 100644 index 000000000..281996df0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-target.md @@ -0,0 +1,23 @@ +```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 + +Users users = new Users(client); + +Target result = await users.CreateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: MessagingProviderType.Email, + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +); + +``` 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 new file mode 100644 index 000000000..3d9293469 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create-token.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..fb2a8095a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/create.md @@ -0,0 +1,21 @@ +```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 + +Users users = new Users(client); + +User result = await users.Create( + userId: "<USER_ID>", + email: "email@example.com", // optional + phone: "+12065550100", // optional + password: "password", // optional + name: "<NAME>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/users/delete-identity.md b/examples/2.3.x/server-dotnet/examples/users/delete-identity.md new file mode 100644 index 000000000..bc55fed85 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/delete-identity.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 + +Users users = new Users(client); + +await users.DeleteIdentity( + identityId: "<IDENTITY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-dotnet/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..82ddb00f1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,19 @@ +```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 + +Users users = new Users(client); + +await users.DeleteMFAAuthenticator( + userId: "<USER_ID>", + type: AuthenticatorType.Totp +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/users/delete-session.md b/examples/2.3.x/server-dotnet/examples/users/delete-session.md new file mode 100644 index 000000000..c0cbbf02e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/delete-session.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +await users.DeleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/users/delete-sessions.md b/examples/2.3.x/server-dotnet/examples/users/delete-sessions.md new file mode 100644 index 000000000..6fcb9d0cf --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/delete-sessions.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 + +Users users = new Users(client); + +await users.DeleteSessions( + userId: "<USER_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/users/delete-target.md b/examples/2.3.x/server-dotnet/examples/users/delete-target.md new file mode 100644 index 000000000..b496d6452 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/delete-target.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +await users.DeleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/users/delete.md b/examples/2.3.x/server-dotnet/examples/users/delete.md new file mode 100644 index 000000000..426c3007f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/delete.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 + +Users users = new Users(client); + +await users.Delete( + userId: "<USER_ID>" +); + +``` 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 new file mode 100644 index 000000000..98f2131b3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/get-mfa-challenge.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..b2c1e98a1 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/get-mfa-recovery-codes.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..70f55411f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/get-prefs.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..3011e5699 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/get-target.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..047ed83cb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/get.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..08ee96bdb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/list-identities.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..ad3e77a29 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/list-memberships.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 + +Users users = new Users(client); + +MembershipList result = await users.ListMemberships( + userId: "<USER_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..c1f7365e8 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/list-mfa-factors.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..495939567 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/list-sessions.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..d867b06f0 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/list-targets.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..8f0ad9d5e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/list.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..0f6233c38 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-email-verification.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..be7bc521e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-email.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..91d94e783 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-impersonator.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..f6c0b5547 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-labels.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +User result = await users.UpdateLabels( + userId: "<USER_ID>", + labels: new List<string>() +); + +``` 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 new file mode 100644 index 000000000..78018690d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-mfa-recovery-codes.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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..4e51f9f1d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-mfa.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..4a58aa860 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-name.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..4306cd73b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-password.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..81fedf8a7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-phone-verification.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..de2a0723b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-phone.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..db20bfc80 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-prefs.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..bd9f4839c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-status.md @@ -0,0 +1,18 @@ +```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 + +Users users = new Users(client); + +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 new file mode 100644 index 000000000..a2c184191 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/users/update-target.md @@ -0,0 +1,21 @@ +```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 + +Users users = new Users(client); + +Target result = await users.UpdateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", // optional + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // 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 new file mode 100644 index 000000000..b0cebcd40 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-collection.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.CreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + dimension: 1, + 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 new file mode 100644 index 000000000..54260d78d --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-document.md @@ -0,0 +1,25 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +Document result = await vectorsDB.CreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: new { + embeddings = new[] { 0.12, -0.55, 0.88, 1.02 }, + metadata = { key = "value" } + }, + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..af00ea000 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-documents.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.CreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: new List<object>(), + 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 new file mode 100644 index 000000000..dd50d8dc7 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-failover.md @@ -0,0 +1,18 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..5adac04cf --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-index.md @@ -0,0 +1,24 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +Index result = await vectorsDB.CreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: VectorsDBIndexType.HnswEuclidean, + attributes: new List<string>(), + 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 new file mode 100644 index 000000000..346c7d247 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-operations.md @@ -0,0 +1,28 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +Transaction result = await vectorsDB.CreateOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] // 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 new file mode 100644 index 000000000..bcc28eda4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-query.md @@ -0,0 +1,22 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.CreateQuery( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // 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 new file mode 100644 index 000000000..133e6bbdd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-transaction.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..5ef6db08e --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create.md @@ -0,0 +1,22 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +Database result = await vectorsDB.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..563f025d3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-collection.md @@ -0,0 +1,18 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..78ccb33c4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-document.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 + .SetSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..e7d21a4ba --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-documents.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..7764d3ce9 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-index.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..2d706dd26 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-transaction.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteTransaction( + transactionId: "<TRANSACTION_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/delete.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete.md new file mode 100644 index 000000000..0f43900d5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.Delete( + databaseId: "<DATABASE_ID>" +); + +``` 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 new file mode 100644 index 000000000..9111b7403 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-collection.md @@ -0,0 +1,18 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..98762a930 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-document.md @@ -0,0 +1,21 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +Document result = await vectorsDB.GetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..6c2d1dfb4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-index.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..b1a849f37 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-replicas.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..e019656db --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-status.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..4cd0b3fdd --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-transaction.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..5b605e57c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..5e9f2737c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-collections.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +VectorsdbCollectionList result = await vectorsDB.ListCollections( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..934116732 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-documents.md @@ -0,0 +1,22 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.ListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // 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 new file mode 100644 index 000000000..acf0af7a4 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-indexes.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +IndexList result = await vectorsDB.ListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>(), // optional + total: false // 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 new file mode 100644 index 000000000..90a4327fc --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-operations.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +DedicatedDatabaseOperationList result = await vectorsDB.ListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // 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 new file mode 100644 index 000000000..652d23243 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-specifications.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 + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..54ada0e63 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-transactions.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +TransactionList result = await vectorsDB.ListTransactions( + queries: new List<string>() // 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 new file mode 100644 index 000000000..f2c0e930b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list.md @@ -0,0 +1,18 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..bcadbda24 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-collection.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.UpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + dimension: 1, // 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 new file mode 100644 index 000000000..d1d0d0788 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-document.md @@ -0,0 +1,22 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +Document result = await vectorsDB.UpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..5833aac17 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-documents.md @@ -0,0 +1,21 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.UpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [object], // optional + queries: new List<string>(), // optional + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..65320cc2f --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-transaction.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +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 new file mode 100644 index 000000000..c8184ece5 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update.md @@ -0,0 +1,22 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +Database result = await vectorsDB.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // 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 new file mode 100644 index 000000000..edb18673b --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-document.md @@ -0,0 +1,22 @@ +```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 + +VectorsDB vectorsDB = new VectorsDB(client); + +Document result = await vectorsDB.UpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], // optional + permissions: new List<string> { Permission.Read(Role.Any()) }, // optional + transactionId: "<TRANSACTION_ID>" // optional +); + +``` 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 new file mode 100644 index 000000000..d9209fd9a --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-documents.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 + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.UpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: new List<object>(), + 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 new file mode 100644 index 000000000..28a5222fe --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/webhooks/create.md @@ -0,0 +1,25 @@ +```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 + +Webhooks webhooks = new Webhooks(client); + +Webhook result = await webhooks.Create( + webhookId: "<WEBHOOK_ID>", + url: "https://example.com/webhook", + name: "<NAME>", + events: new List<string>(), + enabled: false, // optional + tls: false, // optional + authUsername: "<AUTH_USERNAME>", // optional + authPassword: "password", // optional + secret: "<SECRET>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/webhooks/delete.md b/examples/2.3.x/server-dotnet/examples/webhooks/delete.md new file mode 100644 index 000000000..8cb5a4015 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/webhooks/delete.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 + +Webhooks webhooks = new Webhooks(client); + +await webhooks.Delete( + webhookId: "<WEBHOOK_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/webhooks/get.md b/examples/2.3.x/server-dotnet/examples/webhooks/get.md new file mode 100644 index 000000000..2b6ce7dd3 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/webhooks/get.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 + +Webhooks webhooks = new Webhooks(client); + +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 new file mode 100644 index 000000000..c8c4b065c --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/webhooks/list.md @@ -0,0 +1,18 @@ +```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 + +Webhooks webhooks = new Webhooks(client); + +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 new file mode 100644 index 000000000..c6d945511 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/webhooks/update-secret.md @@ -0,0 +1,18 @@ +```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 + +Webhooks webhooks = new Webhooks(client); + +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 new file mode 100644 index 000000000..795cfafe6 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/webhooks/update.md @@ -0,0 +1,24 @@ +```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 + +Webhooks webhooks = new Webhooks(client); + +Webhook result = await webhooks.Update( + webhookId: "<WEBHOOK_ID>", + name: "<NAME>", + url: "https://example.com/webhook", + events: new List<string>(), + enabled: false, // optional + tls: false, // optional + authUsername: "<AUTH_USERNAME>", // optional + authPassword: "password" // optional +); + +``` diff --git a/examples/2.3.x/server-go/examples/account/create-anonymous-session.md b/examples/2.3.x/server-go/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..74c557051 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-anonymous-session.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateAnonymousSession() + fmt.Println(response, err) +} +``` 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 new file mode 100644 index 000000000..0fc7cb4b3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-email-password-session.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateEmailPasswordSession( + "email@example.com", + "password", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-email-token.md b/examples/2.3.x/server-go/examples/account/create-email-token.md new file mode 100644 index 000000000..4d58fc93d --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-email-token.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateEmailToken( + "<USER_ID>", + "email@example.com", + service.WithCreateEmailTokenPhrase(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-go/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..95adbb7d4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-email-verification-otp.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateEmailVerificationOTP( + service.WithCreateEmailVerificationOTPPhrase(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-email-verification.md b/examples/2.3.x/server-go/examples/account/create-email-verification.md new file mode 100644 index 000000000..684a3cc14 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-email-verification.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateEmailVerification( + "https://example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-id-token-session.md b/examples/2.3.x/server-go/examples/account/create-id-token-session.md new file mode 100644 index 000000000..c83e0d986 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-id-token-session.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateIdTokenSession( + "apple", + "<ID_TOKEN>", + service.WithCreateIdTokenSessionNonce("<NONCE>"), + service.WithCreateIdTokenSessionAccessToken("<ACCESS_TOKEN>"), + service.WithCreateIdTokenSessionAccessTokenExpiry(0), + service.WithCreateIdTokenSessionName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-magic-url-token.md b/examples/2.3.x/server-go/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..408fd2d87 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-magic-url-token.md @@ -0,0 +1,28 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateMagicURLToken( + "<USER_ID>", + "email@example.com", + service.WithCreateMagicURLTokenUrl("https://example.com"), + service.WithCreateMagicURLTokenPhrase(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-go/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..7d723afcb --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-mfa-authenticator.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateMFAAuthenticator( + "totp", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-go/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..1c1a71a57 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-mfa-challenge.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateMFAChallenge( + "email", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-go/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..587f696c2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateMFARecoveryCodes() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-go/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..b49b52788 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-o-auth-2-token.md @@ -0,0 +1,28 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateOAuth2Token( + "amazon", + service.WithCreateOAuth2TokenSuccess("https://example.com"), + service.WithCreateOAuth2TokenFailure("https://example.com"), + service.WithCreateOAuth2TokenScopes([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-phone-token.md b/examples/2.3.x/server-go/examples/account/create-phone-token.md new file mode 100644 index 000000000..9566e7194 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-phone-token.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreatePhoneToken( + "<USER_ID>", + "+12065550100", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-phone-verification.md b/examples/2.3.x/server-go/examples/account/create-phone-verification.md new file mode 100644 index 000000000..15857b051 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-phone-verification.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreatePhoneVerification() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-recovery-otp.md b/examples/2.3.x/server-go/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..26dedf95d --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-recovery-otp.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateRecoveryOTP( + "email@example.com", + service.WithCreateRecoveryOTPPhrase(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-recovery.md b/examples/2.3.x/server-go/examples/account/create-recovery.md new file mode 100644 index 000000000..c82a1f694 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-recovery.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateRecovery( + "email@example.com", + "https://example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-session.md b/examples/2.3.x/server-go/examples/account/create-session.md new file mode 100644 index 000000000..a01605ef1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-session.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateSession( + "<USER_ID>", + "<SECRET>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create-verification.md b/examples/2.3.x/server-go/examples/account/create-verification.md new file mode 100644 index 000000000..d5d8f8ca3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create-verification.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.CreateVerification( + "https://example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/create.md b/examples/2.3.x/server-go/examples/account/create.md new file mode 100644 index 000000000..2ecbcaef9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/create.md @@ -0,0 +1,28 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.Create( + "<USER_ID>", + "email@example.com", + "password", + service.WithCreateName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/delete-consent-token.md b/examples/2.3.x/server-go/examples/account/delete-consent-token.md new file mode 100644 index 000000000..97e0e7605 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/delete-consent-token.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.DeleteConsentToken( + "<CONSENT_ID>", + "<TOKEN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/delete-consent.md b/examples/2.3.x/server-go/examples/account/delete-consent.md new file mode 100644 index 000000000..d6742faf8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/delete-consent.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.DeleteConsent( + "<CONSENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/delete-identity.md b/examples/2.3.x/server-go/examples/account/delete-identity.md new file mode 100644 index 000000000..fdb026dc2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/delete-identity.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.DeleteIdentity( + "<IDENTITY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-go/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..9e3f11812 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.DeleteMFAAuthenticator( + "totp", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/delete-session.md b/examples/2.3.x/server-go/examples/account/delete-session.md new file mode 100644 index 000000000..4303cc5a9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/delete-session.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.DeleteSession( + "<SESSION_ID>", + ) + 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 new file mode 100644 index 000000000..2cae6cb06 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/delete-sessions.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.DeleteSessions() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/get-consent-token.md b/examples/2.3.x/server-go/examples/account/get-consent-token.md new file mode 100644 index 000000000..cf6a9495f --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/get-consent-token.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.GetConsentToken( + "<CONSENT_ID>", + "<TOKEN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/get-consent.md b/examples/2.3.x/server-go/examples/account/get-consent.md new file mode 100644 index 000000000..e2b8591e4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/get-consent.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.GetConsent( + "<CONSENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-go/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..4357a8457 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.GetMFARecoveryCodes() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/get-prefs.md b/examples/2.3.x/server-go/examples/account/get-prefs.md new file mode 100644 index 000000000..59e4a8d60 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/get-prefs.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.GetPrefs() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/get-session.md b/examples/2.3.x/server-go/examples/account/get-session.md new file mode 100644 index 000000000..8b5b4a4b0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/get-session.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.GetSession( + "<SESSION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/get.md b/examples/2.3.x/server-go/examples/account/get.md new file mode 100644 index 000000000..3d15031d8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/get.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.Get() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/list-consent-tokens.md b/examples/2.3.x/server-go/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..cfba254f1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/list-consent-tokens.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.ListConsentTokens( + "<CONSENT_ID>", + service.WithListConsentTokensQueries([]string{"example"}), + service.WithListConsentTokensTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/list-consents.md b/examples/2.3.x/server-go/examples/account/list-consents.md new file mode 100644 index 000000000..0f4589905 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/list-consents.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.ListConsents( + service.WithListConsentsQueries([]string{"example"}), + service.WithListConsentsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/list-identities.md b/examples/2.3.x/server-go/examples/account/list-identities.md new file mode 100644 index 000000000..3ef7c296e --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/list-identities.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.ListIdentities( + service.WithListIdentitiesQueries([]string{"example"}), + service.WithListIdentitiesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/list-mfa-factors.md b/examples/2.3.x/server-go/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..5371fe788 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/list-mfa-factors.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.ListMFAFactors() + 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 new file mode 100644 index 000000000..6d4315e1b --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/list-sessions.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.ListSessions() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-go/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..9c932d2a1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-email-verification-otp.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateEmailVerificationOTP( + "<USER_ID>", + "<SECRET>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-email-verification.md b/examples/2.3.x/server-go/examples/account/update-email-verification.md new file mode 100644 index 000000000..9816ebf8b --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-email-verification.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateEmailVerification( + "<USER_ID>", + "<SECRET>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-email.md b/examples/2.3.x/server-go/examples/account/update-email.md new file mode 100644 index 000000000..453486db0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-email.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateEmail( + "email@example.com", + "password", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-magic-url-session.md b/examples/2.3.x/server-go/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..7845a3b3c --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-magic-url-session.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateMagicURLSession( + "<USER_ID>", + "<SECRET>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-go/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..679606c9f --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-mfa-authenticator.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateMFAAuthenticator( + "totp", + "<OTP>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-go/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..2f39f1f7c --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-mfa-challenge.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateMFAChallenge( + "<CHALLENGE_ID>", + "<OTP>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-go/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..c07cee045 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateMFARecoveryCodes() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-mfa.md b/examples/2.3.x/server-go/examples/account/update-mfa.md new file mode 100644 index 000000000..f70ad64e1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-mfa.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateMFA( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-name.md b/examples/2.3.x/server-go/examples/account/update-name.md new file mode 100644 index 000000000..d58eeef39 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-name.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateName( + "<NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-password.md b/examples/2.3.x/server-go/examples/account/update-password.md new file mode 100644 index 000000000..a156c0fa3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-password.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdatePassword( + "password", + service.WithUpdatePasswordOldPassword("password"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-phone-session.md b/examples/2.3.x/server-go/examples/account/update-phone-session.md new file mode 100644 index 000000000..464ca1f21 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-phone-session.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdatePhoneSession( + "<USER_ID>", + "<SECRET>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-phone-verification.md b/examples/2.3.x/server-go/examples/account/update-phone-verification.md new file mode 100644 index 000000000..94d993054 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-phone-verification.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdatePhoneVerification( + "<USER_ID>", + "<SECRET>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-phone.md b/examples/2.3.x/server-go/examples/account/update-phone.md new file mode 100644 index 000000000..68128edaf --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-phone.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdatePhone( + "+12065550100", + "password", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-prefs.md b/examples/2.3.x/server-go/examples/account/update-prefs.md new file mode 100644 index 000000000..e000b67ae --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-prefs.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdatePrefs( + map[string]interface{}{"language": "en", "timezone": "UTC", "darkTheme": true}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-recovery-otp.md b/examples/2.3.x/server-go/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..285fcbf89 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-recovery-otp.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateRecoveryOTP( + "<USER_ID>", + "<SECRET>", + "password", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-recovery.md b/examples/2.3.x/server-go/examples/account/update-recovery.md new file mode 100644 index 000000000..06c5ad7a8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-recovery.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateRecovery( + "<USER_ID>", + "<SECRET>", + "password", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-session.md b/examples/2.3.x/server-go/examples/account/update-session.md new file mode 100644 index 000000000..c5950c873 --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-session.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateSession( + "<SESSION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-status.md b/examples/2.3.x/server-go/examples/account/update-status.md new file mode 100644 index 000000000..37949f2ab --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-status.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateStatus() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/account/update-verification.md b/examples/2.3.x/server-go/examples/account/update-verification.md new file mode 100644 index 000000000..03205f4ae --- /dev/null +++ b/examples/2.3.x/server-go/examples/account/update-verification.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/account" + "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 := account.New(client) + + response, err := service.UpdateVerification( + "<USER_ID>", + "<SECRET>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/activities/get-event.md b/examples/2.3.x/server-go/examples/activities/get-event.md new file mode 100644 index 000000000..a80edf5d7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/activities/get-event.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/activities" + "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 := activities.New(client) + + response, err := service.GetEvent( + "<EVENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/activities/list-events.md b/examples/2.3.x/server-go/examples/activities/list-events.md new file mode 100644 index 000000000..26ce9ca0f --- /dev/null +++ b/examples/2.3.x/server-go/examples/activities/list-events.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/activities" + "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 := activities.New(client) + + response, err := service.ListEvents( + service.WithListEventsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/advisor/delete-report.md b/examples/2.3.x/server-go/examples/advisor/delete-report.md new file mode 100644 index 000000000..625e81a44 --- /dev/null +++ b/examples/2.3.x/server-go/examples/advisor/delete-report.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/advisor" + "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 := advisor.New(client) + + response, err := service.DeleteReport( + "<REPORT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/advisor/get-insight.md b/examples/2.3.x/server-go/examples/advisor/get-insight.md new file mode 100644 index 000000000..0d86d725f --- /dev/null +++ b/examples/2.3.x/server-go/examples/advisor/get-insight.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/advisor" + "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 := advisor.New(client) + + response, err := service.GetInsight( + "<REPORT_ID>", + "<INSIGHT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/advisor/get-report.md b/examples/2.3.x/server-go/examples/advisor/get-report.md new file mode 100644 index 000000000..3087c5f1f --- /dev/null +++ b/examples/2.3.x/server-go/examples/advisor/get-report.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/advisor" + "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 := advisor.New(client) + + response, err := service.GetReport( + "<REPORT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/advisor/list-insights.md b/examples/2.3.x/server-go/examples/advisor/list-insights.md new file mode 100644 index 000000000..dfea141e6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/advisor/list-insights.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/advisor" + "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 := advisor.New(client) + + response, err := service.ListInsights( + "<REPORT_ID>", + service.WithListInsightsQueries([]string{"example"}), + service.WithListInsightsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/advisor/list-reports.md b/examples/2.3.x/server-go/examples/advisor/list-reports.md new file mode 100644 index 000000000..959498ff6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/advisor/list-reports.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/advisor" + "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 := advisor.New(client) + + response, err := service.ListReports( + service.WithListReportsQueries([]string{"example"}), + service.WithListReportsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/create-installation-token.md b/examples/2.3.x/server-go/examples/apps/create-installation-token.md new file mode 100644 index 000000000..0146031bd --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/create-installation-token.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.CreateInstallationToken( + "<APP_ID>", + "<INSTALLATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/create-key.md b/examples/2.3.x/server-go/examples/apps/create-key.md new file mode 100644 index 000000000..0c8d2c75f --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/create-key.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.CreateKey( + "<APP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/create-secret.md b/examples/2.3.x/server-go/examples/apps/create-secret.md new file mode 100644 index 000000000..c8801eff4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/create-secret.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.CreateSecret( + "<APP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/create.md b/examples/2.3.x/server-go/examples/apps/create.md new file mode 100644 index 000000000..216a79175 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/create.md @@ -0,0 +1,43 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.Create( + "<APP_ID>", + "<NAME>", + []string{"example"}, + service.WithCreateDescription("<DESCRIPTION>"), + service.WithCreateClientUri("https://example.com"), + service.WithCreateLogoUri("https://example.com"), + service.WithCreatePrivacyPolicyUrl("https://example.com"), + service.WithCreateTermsUrl("https://example.com"), + service.WithCreateContacts([]string{"example"}), + service.WithCreateTagline("<TAGLINE>"), + service.WithCreateTags([]string{"example"}), + service.WithCreateImages([]string{"example"}), + service.WithCreateSupportUrl("https://example.com"), + service.WithCreateDataDeletionUrl("https://example.com"), + service.WithCreatePostLogoutRedirectUris([]string{"example"}), + service.WithCreateEnabled(false), + service.WithCreateType("public"), + service.WithCreateDeviceFlow(false), + service.WithCreateTeamId("<TEAM_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/delete-installation.md b/examples/2.3.x/server-go/examples/apps/delete-installation.md new file mode 100644 index 000000000..bec38fd50 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/delete-installation.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.DeleteInstallation( + "<APP_ID>", + "<INSTALLATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/delete-key.md b/examples/2.3.x/server-go/examples/apps/delete-key.md new file mode 100644 index 000000000..984895e31 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/delete-key.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.DeleteKey( + "<APP_ID>", + "<KEY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/delete-secret.md b/examples/2.3.x/server-go/examples/apps/delete-secret.md new file mode 100644 index 000000000..346865fa6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/delete-secret.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.DeleteSecret( + "<APP_ID>", + "<SECRET_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/delete-tokens.md b/examples/2.3.x/server-go/examples/apps/delete-tokens.md new file mode 100644 index 000000000..a54c1d02d --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/delete-tokens.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.DeleteTokens( + "<APP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/delete.md b/examples/2.3.x/server-go/examples/apps/delete.md new file mode 100644 index 000000000..09aa9be11 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.Delete( + "<APP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/get-installation.md b/examples/2.3.x/server-go/examples/apps/get-installation.md new file mode 100644 index 000000000..020a71e61 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/get-installation.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.GetInstallation( + "<APP_ID>", + "<INSTALLATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/get-key.md b/examples/2.3.x/server-go/examples/apps/get-key.md new file mode 100644 index 000000000..715ae2f26 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/get-key.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.GetKey( + "<APP_ID>", + "<KEY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/get-secret.md b/examples/2.3.x/server-go/examples/apps/get-secret.md new file mode 100644 index 000000000..107dd1a26 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/get-secret.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.GetSecret( + "<APP_ID>", + "<SECRET_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/get.md b/examples/2.3.x/server-go/examples/apps/get.md new file mode 100644 index 000000000..00a81abc7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.Get( + "<APP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-go/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..a7f7690d5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/list-installation-scopes.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.ListInstallationScopes() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/list-installations.md b/examples/2.3.x/server-go/examples/apps/list-installations.md new file mode 100644 index 000000000..838c1d435 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/list-installations.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.ListInstallations( + "<APP_ID>", + service.WithListInstallationsQueries([]string{"example"}), + service.WithListInstallationsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/list-keys.md b/examples/2.3.x/server-go/examples/apps/list-keys.md new file mode 100644 index 000000000..8118cb315 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/list-keys.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.ListKeys( + "<APP_ID>", + service.WithListKeysQueries([]string{"example"}), + service.WithListKeysTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-go/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..7a7ede0be --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.ListOAuth2Scopes() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/list-secrets.md b/examples/2.3.x/server-go/examples/apps/list-secrets.md new file mode 100644 index 000000000..c18970889 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/list-secrets.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.ListSecrets( + "<APP_ID>", + service.WithListSecretsQueries([]string{"example"}), + service.WithListSecretsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/list.md b/examples/2.3.x/server-go/examples/apps/list.md new file mode 100644 index 000000000..f5d0372c6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/list.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/update-labels.md b/examples/2.3.x/server-go/examples/apps/update-labels.md new file mode 100644 index 000000000..ef46e780a --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/update-labels.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.UpdateLabels( + "<APP_ID>", + []string{"example"}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/update-team.md b/examples/2.3.x/server-go/examples/apps/update-team.md new file mode 100644 index 000000000..2ed4118af --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/update-team.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.UpdateTeam( + "<APP_ID>", + "<TEAM_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/apps/update.md b/examples/2.3.x/server-go/examples/apps/update.md new file mode 100644 index 000000000..279a3a290 --- /dev/null +++ b/examples/2.3.x/server-go/examples/apps/update.md @@ -0,0 +1,44 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/apps" + "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 := apps.New(client) + + response, err := service.Update( + "<APP_ID>", + "<NAME>", + service.WithUpdateDescription("<DESCRIPTION>"), + service.WithUpdateClientUri("https://example.com"), + service.WithUpdateLogoUri("https://example.com"), + service.WithUpdatePrivacyPolicyUrl("https://example.com"), + service.WithUpdateTermsUrl("https://example.com"), + service.WithUpdateContacts([]string{"example"}), + service.WithUpdateTagline("<TAGLINE>"), + service.WithUpdateTags([]string{"example"}), + service.WithUpdateImages([]string{"example"}), + service.WithUpdateSupportUrl("https://example.com"), + service.WithUpdateDataDeletionUrl("https://example.com"), + service.WithUpdateEnabled(false), + service.WithUpdateRedirectUris([]string{"example"}), + service.WithUpdatePostLogoutRedirectUris([]string{"example"}), + service.WithUpdateType("public"), + service.WithUpdateDeviceFlow(false), + service.WithUpdateInstallationScopes([]string{"example"}), + service.WithUpdateInstallationRedirectUrl("https://example.com"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-browser.md b/examples/2.3.x/server-go/examples/avatars/get-browser.md new file mode 100644 index 000000000..099a1ea04 --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-browser.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/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.GetBrowser( + "aa", + service.WithGetBrowserWidth(0), + service.WithGetBrowserHeight(0), + service.WithGetBrowserQuality(-1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-credit-card.md b/examples/2.3.x/server-go/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..7562f9e0c --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-credit-card.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/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.GetCreditCard( + "amex", + service.WithGetCreditCardWidth(0), + service.WithGetCreditCardHeight(0), + service.WithGetCreditCardQuality(-1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-favicon.md b/examples/2.3.x/server-go/examples/avatars/get-favicon.md new file mode 100644 index 000000000..f84b24ffa --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-favicon.md @@ -0,0 +1,25 @@ +```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.GetFavicon( + "https://example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-flag.md b/examples/2.3.x/server-go/examples/avatars/get-flag.md new file mode 100644 index 000000000..79ec7a4cb --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-flag.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/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.GetFlag( + "af", + service.WithGetFlagWidth(0), + service.WithGetFlagHeight(0), + service.WithGetFlagQuality(-1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-image.md b/examples/2.3.x/server-go/examples/avatars/get-image.md new file mode 100644 index 000000000..bc535acaf --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-image.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/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.GetImage( + "https://example.com", + service.WithGetImageWidth(0), + service.WithGetImageHeight(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-initials.md b/examples/2.3.x/server-go/examples/avatars/get-initials.md new file mode 100644 index 000000000..939eab8e4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-initials.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/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.GetInitials( + service.WithGetInitialsName("<NAME>"), + service.WithGetInitialsWidth(0), + service.WithGetInitialsHeight(0), + service.WithGetInitialsBackground("FFFFFF"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-photo.md b/examples/2.3.x/server-go/examples/avatars/get-photo.md new file mode 100644 index 000000000..b7199c40c --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-photo.md @@ -0,0 +1,32 @@ +```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.GetPhoto( + service.WithGetPhotoWidth(0), + service.WithGetPhotoHeight(0), + service.WithGetPhotoQuality(0), + service.WithGetPhotoOutput("png"), + service.WithGetPhotoRating("g"), + service.WithGetPhotoUserId("current()"), + service.WithGetPhotoEmailHash("<EMAIL_HASH>"), + service.WithGetPhotoName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-qr.md b/examples/2.3.x/server-go/examples/avatars/get-qr.md new file mode 100644 index 000000000..ad790409a --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-qr.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/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.GetQR( + "<TEXT>", + service.WithGetQRSize(1), + service.WithGetQRMargin(0), + service.WithGetQRDownload(false), + ) + 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 new file mode 100644 index 000000000..2fa9098f9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/get-screenshot.md @@ -0,0 +1,44 @@ +```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.GetScreenshot( + "https://example.com", + service.WithGetScreenshotHeaders(map[string]interface{}{"Authorization": "Bearer token123", "X-Custom-Header": "value"}), + service.WithGetScreenshotViewportWidth(1920), + service.WithGetScreenshotViewportHeight(1080), + service.WithGetScreenshotScale(2), + service.WithGetScreenshotTheme("dark"), + service.WithGetScreenshotUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15"), + service.WithGetScreenshotFullpage(true), + service.WithGetScreenshotLocale("en-US"), + service.WithGetScreenshotTimezone("America/New_York"), + service.WithGetScreenshotLatitude(37.7749), + service.WithGetScreenshotLongitude(-122.4194), + service.WithGetScreenshotAccuracy(100), + service.WithGetScreenshotTouch(true), + service.WithGetScreenshotPermissions([]string{"geolocation", "notifications"}), + service.WithGetScreenshotSleep(3), + service.WithGetScreenshotWidth(800), + service.WithGetScreenshotHeight(600), + service.WithGetScreenshotQuality(85), + service.WithGetScreenshotOutput("jpeg"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/create-archive.md b/examples/2.3.x/server-go/examples/backups/create-archive.md new file mode 100644 index 000000000..4fa038c7f --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/create-archive.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/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.CreateArchive( + []string{"example"}, + service.WithCreateArchiveResourceId("<RESOURCE_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/create-policy.md b/examples/2.3.x/server-go/examples/backups/create-policy.md new file mode 100644 index 000000000..912da7e31 --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/create-policy.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.CreatePolicy( + "<POLICY_ID>", + []string{"example"}, + 1, + "", + service.WithCreatePolicyName("<NAME>"), + service.WithCreatePolicyResourceId("<RESOURCE_ID>"), + service.WithCreatePolicyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/create-restoration.md b/examples/2.3.x/server-go/examples/backups/create-restoration.md new file mode 100644 index 000000000..b00f8016c --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/create-restoration.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/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.CreateRestoration( + "<ARCHIVE_ID>", + []string{"example"}, + service.WithCreateRestorationNewResourceId("<NEW_RESOURCE_ID>"), + service.WithCreateRestorationNewResourceName("<NEW_RESOURCE_NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/delete-archive.md b/examples/2.3.x/server-go/examples/backups/delete-archive.md new file mode 100644 index 000000000..641395ceb --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/delete-archive.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.DeleteArchive( + "<ARCHIVE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/delete-policy.md b/examples/2.3.x/server-go/examples/backups/delete-policy.md new file mode 100644 index 000000000..df1ecbcc5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/delete-policy.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.DeletePolicy( + "<POLICY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/get-archive.md b/examples/2.3.x/server-go/examples/backups/get-archive.md new file mode 100644 index 000000000..2ab9ade2e --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/get-archive.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.GetArchive( + "<ARCHIVE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/get-policy.md b/examples/2.3.x/server-go/examples/backups/get-policy.md new file mode 100644 index 000000000..7add60674 --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/get-policy.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.GetPolicy( + "<POLICY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/get-restoration.md b/examples/2.3.x/server-go/examples/backups/get-restoration.md new file mode 100644 index 000000000..dd1a671d2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/get-restoration.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.GetRestoration( + "<RESTORATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/list-archives.md b/examples/2.3.x/server-go/examples/backups/list-archives.md new file mode 100644 index 000000000..84dfcf15a --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/list-archives.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.ListArchives( + service.WithListArchivesQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/list-policies.md b/examples/2.3.x/server-go/examples/backups/list-policies.md new file mode 100644 index 000000000..55293392d --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/list-policies.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.ListPolicies( + service.WithListPoliciesQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/list-restorations.md b/examples/2.3.x/server-go/examples/backups/list-restorations.md new file mode 100644 index 000000000..5094cd909 --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/list-restorations.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.ListRestorations( + service.WithListRestorationsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/backups/update-policy.md b/examples/2.3.x/server-go/examples/backups/update-policy.md new file mode 100644 index 000000000..be2b92629 --- /dev/null +++ b/examples/2.3.x/server-go/examples/backups/update-policy.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/backups" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := backups.New(client) + + response, err := service.UpdatePolicy( + "<POLICY_ID>", + service.WithUpdatePolicyName("<NAME>"), + service.WithUpdatePolicyRetention(1), + service.WithUpdatePolicySchedule(""), + service.WithUpdatePolicyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-go/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..00123f11d --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-big-int-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateBigIntAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateBigIntAttributeMin(0), + service.WithCreateBigIntAttributeMax(1000000), + service.WithCreateBigIntAttributeDefault(0), + service.WithCreateBigIntAttributeArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-go/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..e8713f8fa --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-boolean-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateBooleanAttributeDefault(false), + service.WithCreateBooleanAttributeArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-collection.md b/examples/2.3.x/server-go/examples/databases/create-collection.md new file mode 100644 index 000000000..8f4a2148c --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-collection.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + service.WithCreateCollectionPermissions([]string{"read(\"any\")"}), + service.WithCreateCollectionDocumentSecurity(false), + service.WithCreateCollectionEnabled(false), + service.WithCreateCollectionAttributes([]interface{}{}), + service.WithCreateCollectionIndexes([]interface{}{}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-go/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..00056a3d7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-datetime-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateDatetimeAttributeDefault("2020-10-15T06:38:00.000+00:00"), + service.WithCreateDatetimeAttributeArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-document.md b/examples/2.3.x/server-go/examples/databases/create-document.md new file mode 100644 index 000000000..2fe3b661c --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := databases.New(client) + + response, err := service.CreateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}, + service.WithCreateDocumentPermissions([]string{"read(\"any\")"}), + service.WithCreateDocumentTransactionId("<TRANSACTION_ID>"), + ) + 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 new file mode 100644 index 000000000..de2d3247a --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-documents.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, + service.WithCreateDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-email-attribute.md b/examples/2.3.x/server-go/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..4719c73de --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-email-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateEmailAttributeDefault("email@example.com"), + service.WithCreateEmailAttributeArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-go/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..d051f1368 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-enum-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + []string{"active", "inactive"}, + false, + service.WithCreateEnumAttributeDefault("active"), + service.WithCreateEnumAttributeArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-float-attribute.md b/examples/2.3.x/server-go/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..86524cbff --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-float-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateFloatAttributeMin(0), + service.WithCreateFloatAttributeMax(100), + service.WithCreateFloatAttributeDefault(10.5), + service.WithCreateFloatAttributeArray(false), + ) + 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 new file mode 100644 index 000000000..570b81b80 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-index.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + "key", + []string{"example"}, + service.WithCreateIndexOrders([]string{"example"}), + service.WithCreateIndexLengths([]int{0}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-go/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..e9dfc9dcf --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-integer-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateIntegerAttributeMin(0), + service.WithCreateIntegerAttributeMax(100), + service.WithCreateIntegerAttributeDefault(10), + service.WithCreateIntegerAttributeArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-go/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..6932c3475 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-ip-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateIpAttributeDefault("192.0.2.0"), + service.WithCreateIpAttributeArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-line-attribute.md b/examples/2.3.x/server-go/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..af5e6df2e --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-line-attribute.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateLineAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateLineAttributeDefault([][]interface{}{[]interface{}{1, 2}, []interface{}{3, 4}, []interface{}{5, 6}}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-go/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..ab16a5fd3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-longtext-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateLongtextAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateLongtextAttributeDefault("Hello World"), + service.WithCreateLongtextAttributeArray(false), + service.WithCreateLongtextAttributeEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-go/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..755927836 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateMediumtextAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateMediumtextAttributeDefault("Hello World"), + service.WithCreateMediumtextAttributeArray(false), + service.WithCreateMediumtextAttributeEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-operations.md b/examples/2.3.x/server-go/examples/databases/create-operations.md new file mode 100644 index 000000000..0633b31b0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-operations.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + 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"}}}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-point-attribute.md b/examples/2.3.x/server-go/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..8f39a9fb1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-point-attribute.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreatePointAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreatePointAttributeDefault([]float64{1, 2}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-go/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..04ccd0320 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-polygon-attribute.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreatePolygonAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreatePolygonAttributeDefault([][]interface{}{[]interface{}{[]interface{}{1, 2}, []interface{}{3, 4}, []interface{}{5, 6}, []interface{}{1, 2}}}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-go/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..72fcf8846 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-relationship-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<RELATED_COLLECTION_ID>", + "oneToOne", + service.WithCreateRelationshipAttributeTwoWay(false), + service.WithCreateRelationshipAttributeKey("<KEY>"), + service.WithCreateRelationshipAttributeTwoWayKey("<TWO_WAY_KEY>"), + service.WithCreateRelationshipAttributeOnDelete("cascade"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-string-attribute.md b/examples/2.3.x/server-go/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..ea22eaea6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-string-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + 1, + false, + service.WithCreateStringAttributeDefault("Hello World"), + service.WithCreateStringAttributeArray(false), + service.WithCreateStringAttributeEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-text-attribute.md b/examples/2.3.x/server-go/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..dffdbae09 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-text-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateTextAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateTextAttributeDefault("Hello World"), + service.WithCreateTextAttributeArray(false), + service.WithCreateTextAttributeEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-transaction.md b/examples/2.3.x/server-go/examples/databases/create-transaction.md new file mode 100644 index 000000000..7b821ba83 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateTransaction( + service.WithCreateTransactionTtl(60), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-url-attribute.md b/examples/2.3.x/server-go/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..6661e53b3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-url-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithCreateUrlAttributeDefault("https://example.com"), + service.WithCreateUrlAttributeArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-go/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..a5f3c6ecf --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create-varchar-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.CreateVarcharAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + 1, + false, + service.WithCreateVarcharAttributeDefault("Hello World"), + service.WithCreateVarcharAttributeArray(false), + service.WithCreateVarcharAttributeEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create.md b/examples/2.3.x/server-go/examples/databases/create.md new file mode 100644 index 000000000..545c5c2d5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/create.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.Create( + "<DATABASE_ID>", + "<NAME>", + service.WithCreateEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-go/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..e7dcd5de5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/decrement-document-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := databases.New(client) + + response, err := service.DecrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "<ATTRIBUTE>", + service.WithDecrementDocumentAttributeValue(1), + service.WithDecrementDocumentAttributeMin(0), + service.WithDecrementDocumentAttributeTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/delete-attribute.md b/examples/2.3.x/server-go/examples/databases/delete-attribute.md new file mode 100644 index 000000000..fc59acd06 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/delete-attribute.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.DeleteAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/delete-collection.md b/examples/2.3.x/server-go/examples/databases/delete-collection.md new file mode 100644 index 000000000..13bcb6e16 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/delete-collection.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.DeleteCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/delete-document.md b/examples/2.3.x/server-go/examples/databases/delete-document.md new file mode 100644 index 000000000..5c07e2cfe --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/delete-document.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := databases.New(client) + + response, err := service.DeleteDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithDeleteDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` 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 new file mode 100644 index 000000000..f153ba510 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/delete-documents.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.DeleteDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithDeleteDocumentsQueries([]string{"example"}), + service.WithDeleteDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/delete-index.md b/examples/2.3.x/server-go/examples/databases/delete-index.md new file mode 100644 index 000000000..c845ddcbf --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/delete-index.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.DeleteIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/delete-transaction.md b/examples/2.3.x/server-go/examples/databases/delete-transaction.md new file mode 100644 index 000000000..4f1a3206f --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/delete-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.DeleteTransaction( + "<TRANSACTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/delete.md b/examples/2.3.x/server-go/examples/databases/delete.md new file mode 100644 index 000000000..cd3ffa5de --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.Delete( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/get-attribute.md b/examples/2.3.x/server-go/examples/databases/get-attribute.md new file mode 100644 index 000000000..91e701b85 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/get-attribute.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.GetAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/get-collection.md b/examples/2.3.x/server-go/examples/databases/get-collection.md new file mode 100644 index 000000000..f42b293a8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/get-collection.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.GetCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/get-document.md b/examples/2.3.x/server-go/examples/databases/get-document.md new file mode 100644 index 000000000..b6acab8fb --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/get-document.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := databases.New(client) + + response, err := service.GetDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithGetDocumentQueries([]string{"example"}), + service.WithGetDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/get-index.md b/examples/2.3.x/server-go/examples/databases/get-index.md new file mode 100644 index 000000000..5d2929c0d --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/get-index.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.GetIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/get-transaction.md b/examples/2.3.x/server-go/examples/databases/get-transaction.md new file mode 100644 index 000000000..73834e303 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/get-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.GetTransaction( + "<TRANSACTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/get.md b/examples/2.3.x/server-go/examples/databases/get.md new file mode 100644 index 000000000..23dc94839 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.Get( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-go/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..f0d57a0f3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/increment-document-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := databases.New(client) + + response, err := service.IncrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "<ATTRIBUTE>", + service.WithIncrementDocumentAttributeValue(1), + service.WithIncrementDocumentAttributeMax(100), + service.WithIncrementDocumentAttributeTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/list-attributes.md b/examples/2.3.x/server-go/examples/databases/list-attributes.md new file mode 100644 index 000000000..999d0546c --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/list-attributes.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.ListAttributes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithListAttributesQueries([]string{"example"}), + service.WithListAttributesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/list-collections.md b/examples/2.3.x/server-go/examples/databases/list-collections.md new file mode 100644 index 000000000..45d5f427d --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/list-collections.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.ListCollections( + "<DATABASE_ID>", + service.WithListCollectionsQueries([]string{"example"}), + service.WithListCollectionsSearch("<SEARCH>"), + service.WithListCollectionsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/list-documents.md b/examples/2.3.x/server-go/examples/databases/list-documents.md new file mode 100644 index 000000000..e38766e69 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/list-documents.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := databases.New(client) + + response, err := service.ListDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithListDocumentsQueries([]string{"example"}), + service.WithListDocumentsTransactionId("<TRANSACTION_ID>"), + service.WithListDocumentsTotal(false), + service.WithListDocumentsTtl(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/list-indexes.md b/examples/2.3.x/server-go/examples/databases/list-indexes.md new file mode 100644 index 000000000..793062b54 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/list-indexes.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.ListIndexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithListIndexesQueries([]string{"example"}), + service.WithListIndexesTotal(false), + ) + 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 new file mode 100644 index 000000000..1c991e744 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/list-transactions.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.ListTransactions( + service.WithListTransactionsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/list.md b/examples/2.3.x/server-go/examples/databases/list.md new file mode 100644 index 000000000..e331f3abb --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/list.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListSearch("<SEARCH>"), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-go/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..f933a894d --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-big-int-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateBigIntAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + 0, + service.WithUpdateBigIntAttributeMin(0), + service.WithUpdateBigIntAttributeMax(1000000), + service.WithUpdateBigIntAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-go/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..d7ae9fd6d --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-boolean-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + false, + service.WithUpdateBooleanAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-collection.md b/examples/2.3.x/server-go/examples/databases/update-collection.md new file mode 100644 index 000000000..511f893d6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-collection.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithUpdateCollectionName("<NAME>"), + service.WithUpdateCollectionPermissions([]string{"read(\"any\")"}), + service.WithUpdateCollectionDocumentSecurity(false), + service.WithUpdateCollectionEnabled(false), + service.WithUpdateCollectionPurge(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-go/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..f3c2f3518 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-datetime-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "2020-10-15T06:38:00.000+00:00", + service.WithUpdateDatetimeAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-document.md b/examples/2.3.x/server-go/examples/databases/update-document.md new file mode 100644 index 000000000..f1d610860 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := databases.New(client) + + response, err := service.UpdateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithUpdateDocumentData(map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 33, "isAdmin": false}), + service.WithUpdateDocumentPermissions([]string{"read(\"any\")"}), + service.WithUpdateDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-documents.md b/examples/2.3.x/server-go/examples/databases/update-documents.md new file mode 100644 index 000000000..010bed054 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-documents.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithUpdateDocumentsData(map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 33, "isAdmin": false}), + service.WithUpdateDocumentsQueries([]string{"example"}), + service.WithUpdateDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-email-attribute.md b/examples/2.3.x/server-go/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..9726840b1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-email-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "email@example.com", + service.WithUpdateEmailAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-go/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..81605f217 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-enum-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + []string{"active", "inactive"}, + false, + "active", + service.WithUpdateEnumAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-float-attribute.md b/examples/2.3.x/server-go/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..e8e9b14e7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-float-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + 10.5, + service.WithUpdateFloatAttributeMin(0), + service.WithUpdateFloatAttributeMax(100), + service.WithUpdateFloatAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-go/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..2a6ca6aa2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-integer-attribute.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + 10, + service.WithUpdateIntegerAttributeMin(0), + service.WithUpdateIntegerAttributeMax(100), + service.WithUpdateIntegerAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-go/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..5f3d0aa4e --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-ip-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "192.0.2.0", + service.WithUpdateIpAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-line-attribute.md b/examples/2.3.x/server-go/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..60d5c4624 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-line-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateLineAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithUpdateLineAttributeDefault([][]interface{}{[]interface{}{1, 2}, []interface{}{3, 4}, []interface{}{5, 6}}), + service.WithUpdateLineAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-go/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..b7e5d4c7b --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-longtext-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateLongtextAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateLongtextAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-go/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..faa5c87fb --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateMediumtextAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateMediumtextAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-point-attribute.md b/examples/2.3.x/server-go/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..5d6416f9b --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-point-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdatePointAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithUpdatePointAttributeDefault([]float64{1, 2}), + service.WithUpdatePointAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-go/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..7d5c4564a --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-polygon-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdatePolygonAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + service.WithUpdatePolygonAttributeDefault([][]interface{}{[]interface{}{[]interface{}{1, 2}, []interface{}{3, 4}, []interface{}{5, 6}, []interface{}{1, 2}}}), + service.WithUpdatePolygonAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-go/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..b635885a5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-relationship-attribute.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + service.WithUpdateRelationshipAttributeOnDelete("cascade"), + service.WithUpdateRelationshipAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-string-attribute.md b/examples/2.3.x/server-go/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..7dd83cb9a --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-string-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateStringAttributeSize(1), + service.WithUpdateStringAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-text-attribute.md b/examples/2.3.x/server-go/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..4ba3aa9ec --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-text-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateTextAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateTextAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-transaction.md b/examples/2.3.x/server-go/examples/databases/update-transaction.md new file mode 100644 index 000000000..d17c458f6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-transaction.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateTransaction( + "<TRANSACTION_ID>", + service.WithUpdateTransactionCommit(false), + service.WithUpdateTransactionRollback(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-url-attribute.md b/examples/2.3.x/server-go/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..93ea8abf8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-url-attribute.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "https://example.com", + service.WithUpdateUrlAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-go/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..00d166afb --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update-varchar-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpdateVarcharAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateVarcharAttributeSize(1), + service.WithUpdateVarcharAttributeNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/update.md b/examples/2.3.x/server-go/examples/databases/update.md new file mode 100644 index 000000000..ee5f21a22 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/update.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.Update( + "<DATABASE_ID>", + service.WithUpdateName("<NAME>"), + service.WithUpdateEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/upsert-document.md b/examples/2.3.x/server-go/examples/databases/upsert-document.md new file mode 100644 index 000000000..9dcc11445 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/upsert-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := databases.New(client) + + response, err := service.UpsertDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithUpsertDocumentData(map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}), + service.WithUpsertDocumentPermissions([]string{"read(\"any\")"}), + service.WithUpsertDocumentTransactionId("<TRANSACTION_ID>"), + ) + 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 new file mode 100644 index 000000000..d68270f02 --- /dev/null +++ b/examples/2.3.x/server-go/examples/databases/upsert-documents.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/databases" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := databases.New(client) + + response, err := service.UpsertDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, + service.WithUpsertDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/create-collection.md b/examples/2.3.x/server-go/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..4504abfda --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/create-collection.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.CreateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + service.WithCreateCollectionPermissions([]string{"read(\"any\")"}), + service.WithCreateCollectionDocumentSecurity(false), + service.WithCreateCollectionEnabled(false), + service.WithCreateCollectionAttributes([]interface{}{}), + service.WithCreateCollectionIndexes([]interface{}{}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/create-document.md b/examples/2.3.x/server-go/examples/documentsdb/create-document.md new file mode 100644 index 000000000..0c6c61582 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/create-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.CreateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}, + service.WithCreateDocumentPermissions([]string{"read(\"any\")"}), + service.WithCreateDocumentTransactionId("<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 new file mode 100644 index 000000000..818cfe82c --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/create-documents.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.CreateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, + service.WithCreateDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/create-failover.md b/examples/2.3.x/server-go/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..ecf85898b --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/create-failover.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.CreateFailover( + "<DATABASE_ID>", + service.WithCreateFailoverTargetReplicaId("<TARGET_REPLICA_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 new file mode 100644 index 000000000..93fbf2f0b --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/create-index.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.CreateIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + "key", + []string{"example"}, + service.WithCreateIndexOrders([]string{"example"}), + service.WithCreateIndexLengths([]int{0}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/create-operations.md b/examples/2.3.x/server-go/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..d5c2bb349 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/create-operations.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + 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"}}}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-go/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..82e8716fc --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/create-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.CreateTransaction( + service.WithCreateTransactionTtl(60), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/create.md b/examples/2.3.x/server-go/examples/documentsdb/create.md new file mode 100644 index 000000000..bb19d5eb4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/create.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.Create( + "<DATABASE_ID>", + "<NAME>", + service.WithCreateEnabled(false), + service.WithCreateSpecification("serverless"), + service.WithCreateReplicas(0), + service.WithCreateSyncMode("async"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-go/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..98a45d70a --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.DecrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "<ATTRIBUTE>", + service.WithDecrementDocumentAttributeValue(1), + service.WithDecrementDocumentAttributeMin(0), + service.WithDecrementDocumentAttributeTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-go/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..f0920a74e --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/delete-collection.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.DeleteCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/delete-document.md b/examples/2.3.x/server-go/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..9ebd8b26f --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/delete-document.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.DeleteDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithDeleteDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` 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 new file mode 100644 index 000000000..b976aab9a --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/delete-documents.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.DeleteDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithDeleteDocumentsQueries([]string{"example"}), + service.WithDeleteDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/delete-index.md b/examples/2.3.x/server-go/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..9845002eb --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/delete-index.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.DeleteIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-go/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..85edf8877 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/delete-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.DeleteTransaction( + "<TRANSACTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/delete.md b/examples/2.3.x/server-go/examples/documentsdb/delete.md new file mode 100644 index 000000000..c220e237c --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.Delete( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/get-collection.md b/examples/2.3.x/server-go/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..8be71149c --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/get-collection.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.GetCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/get-document.md b/examples/2.3.x/server-go/examples/documentsdb/get-document.md new file mode 100644 index 000000000..9a30c9c10 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/get-document.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.GetDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithGetDocumentQueries([]string{"example"}), + service.WithGetDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/get-index.md b/examples/2.3.x/server-go/examples/documentsdb/get-index.md new file mode 100644 index 000000000..82f4032a4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/get-index.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.GetIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-go/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..35c820524 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/get-replicas.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.GetReplicas( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/get-status.md b/examples/2.3.x/server-go/examples/documentsdb/get-status.md new file mode 100644 index 000000000..ae1916617 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/get-status.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.GetStatus( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-go/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..f923ae1b6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/get-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.GetTransaction( + "<TRANSACTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/get.md b/examples/2.3.x/server-go/examples/documentsdb/get.md new file mode 100644 index 000000000..cd77812a5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.Get( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-go/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..278c4cfb3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.IncrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "<ATTRIBUTE>", + service.WithIncrementDocumentAttributeValue(1), + service.WithIncrementDocumentAttributeMax(100), + service.WithIncrementDocumentAttributeTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/list-collections.md b/examples/2.3.x/server-go/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..56150cbe4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/list-collections.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.ListCollections( + "<DATABASE_ID>", + service.WithListCollectionsQueries([]string{"example"}), + service.WithListCollectionsSearch("<SEARCH>"), + service.WithListCollectionsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/list-documents.md b/examples/2.3.x/server-go/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..6c28aa75d --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/list-documents.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.ListDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithListDocumentsQueries([]string{"example"}), + service.WithListDocumentsTransactionId("<TRANSACTION_ID>"), + service.WithListDocumentsTotal(false), + service.WithListDocumentsTtl(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-go/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..21d232124 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/list-indexes.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.ListIndexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithListIndexesQueries([]string{"example"}), + service.WithListIndexesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/list-operations.md b/examples/2.3.x/server-go/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..4d4a86fbe --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/list-operations.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.ListOperations( + "<DATABASE_ID>", + service.WithListOperationsStatus("queued"), + service.WithListOperationsLimit(1), + service.WithListOperationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-go/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..1aeac1327 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/list-specifications.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.ListSpecifications() + 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 new file mode 100644 index 000000000..e2d8553f7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/list-transactions.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.ListTransactions( + service.WithListTransactionsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/list.md b/examples/2.3.x/server-go/examples/documentsdb/list.md new file mode 100644 index 000000000..737487f3c --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/list.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/update-collection.md b/examples/2.3.x/server-go/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..018243852 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/update-collection.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.UpdateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + service.WithUpdateCollectionPermissions([]string{"read(\"any\")"}), + service.WithUpdateCollectionDocumentSecurity(false), + service.WithUpdateCollectionEnabled(false), + service.WithUpdateCollectionPurge(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/update-document.md b/examples/2.3.x/server-go/examples/documentsdb/update-document.md new file mode 100644 index 000000000..d57db58cd --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/update-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.UpdateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithUpdateDocumentData([]interface{}{}), + service.WithUpdateDocumentPermissions([]string{"read(\"any\")"}), + service.WithUpdateDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/update-documents.md b/examples/2.3.x/server-go/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..b25940e53 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/update-documents.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.UpdateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithUpdateDocumentsData([]interface{}{}), + service.WithUpdateDocumentsQueries([]string{"example"}), + service.WithUpdateDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-go/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..1422fd4a4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/update-transaction.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.UpdateTransaction( + "<TRANSACTION_ID>", + service.WithUpdateTransactionCommit(false), + service.WithUpdateTransactionRollback(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/update.md b/examples/2.3.x/server-go/examples/documentsdb/update.md new file mode 100644 index 000000000..8ca257f96 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/update.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.Update( + "<DATABASE_ID>", + "<NAME>", + service.WithUpdateEnabled(false), + service.WithUpdateSpecification("serverless"), + service.WithUpdateReplicas(0), + service.WithUpdateSyncMode("async"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-go/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..6bd696319 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/upsert-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := documentsdb.New(client) + + response, err := service.UpsertDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithUpsertDocumentData([]interface{}{}), + service.WithUpsertDocumentPermissions([]string{"read(\"any\")"}), + service.WithUpsertDocumentTransactionId("<TRANSACTION_ID>"), + ) + 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 new file mode 100644 index 000000000..7a5bec386 --- /dev/null +++ b/examples/2.3.x/server-go/examples/documentsdb/upsert-documents.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/documentsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := documentsdb.New(client) + + response, err := service.UpsertDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, + service.WithUpsertDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-go/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..f8d58cc08 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreatePresetGoogleWorkspace( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-go/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..982488ca2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreatePresetICloud( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-go/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..d3937a879 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-preset-mailgun.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreatePresetMailgun( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-go/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..c0acc84cd --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-preset-outlook.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreatePresetOutlook( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-go/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..78781b1f8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreatePresetProtonMail( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-go/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..0da75cd3a --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-preset-zoho.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreatePresetZoho( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-a.md b/examples/2.3.x/server-go/examples/domains/create-record-a.md new file mode 100644 index 000000000..29c7134b8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-a.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordA( + "<DOMAIN_ID>", + "", + "", + 1, + service.WithCreateRecordAComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-go/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..b86491f18 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-aaaa.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordAAAA( + "<DOMAIN_ID>", + "", + "", + 1, + service.WithCreateRecordAAAAComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-alias.md b/examples/2.3.x/server-go/examples/domains/create-record-alias.md new file mode 100644 index 000000000..5c4c46260 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-alias.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordAlias( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + service.WithCreateRecordAliasComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-caa.md b/examples/2.3.x/server-go/examples/domains/create-record-caa.md new file mode 100644 index 000000000..f32a0a528 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-caa.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordCAA( + "<DOMAIN_ID>", + "", + "", + 1, + service.WithCreateRecordCAAComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-cname.md b/examples/2.3.x/server-go/examples/domains/create-record-cname.md new file mode 100644 index 000000000..14b4cb6d0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-cname.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordCNAME( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + service.WithCreateRecordCNAMEComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-https.md b/examples/2.3.x/server-go/examples/domains/create-record-https.md new file mode 100644 index 000000000..3699a78da --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-https.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordHTTPS( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + service.WithCreateRecordHTTPSComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-mx.md b/examples/2.3.x/server-go/examples/domains/create-record-mx.md new file mode 100644 index 000000000..0fce64525 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-mx.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordMX( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + 0, + service.WithCreateRecordMXComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-ns.md b/examples/2.3.x/server-go/examples/domains/create-record-ns.md new file mode 100644 index 000000000..a812cf338 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-ns.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordNS( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + service.WithCreateRecordNSComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-srv.md b/examples/2.3.x/server-go/examples/domains/create-record-srv.md new file mode 100644 index 000000000..631fe53a9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-srv.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordSRV( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + 0, + 0, + 0, + service.WithCreateRecordSRVComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create-record-txt.md b/examples/2.3.x/server-go/examples/domains/create-record-txt.md new file mode 100644 index 000000000..aca465c27 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create-record-txt.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.CreateRecordTXT( + "<DOMAIN_ID>", + "", + 1, + service.WithCreateRecordTXTValue("<VALUE>"), + service.WithCreateRecordTXTComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/create.md b/examples/2.3.x/server-go/examples/domains/create.md new file mode 100644 index 000000000..8f64d0017 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/create.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.Create( + "<TEAM_ID>", + "example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/delete-record.md b/examples/2.3.x/server-go/examples/domains/delete-record.md new file mode 100644 index 000000000..476d85a02 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/delete-record.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.DeleteRecord( + "<DOMAIN_ID>", + "<RECORD_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/delete.md b/examples/2.3.x/server-go/examples/domains/delete.md new file mode 100644 index 000000000..e4aa3f7dc --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.Delete( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-go/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..893a48a61 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetPresetGoogleWorkspace( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-go/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..baae5df96 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetPresetICloud( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-go/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..561a083ac --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-preset-mailgun.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetPresetMailgun( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-go/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..5b3a32d4d --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-preset-outlook.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetPresetOutlook( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-go/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..1717fc3cd --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetPresetProtonMail( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-go/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..b24efb69a --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-preset-zoho.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetPresetZoho( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-price.md b/examples/2.3.x/server-go/examples/domains/get-price.md new file mode 100644 index 000000000..f8beff06b --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-price.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetPrice( + "example.com", + service.WithGetPricePeriodYears(0), + service.WithGetPriceRegistrationType("new"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-record.md b/examples/2.3.x/server-go/examples/domains/get-record.md new file mode 100644 index 000000000..193bbd820 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-record.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetRecord( + "<DOMAIN_ID>", + "<RECORD_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-transfer-status.md b/examples/2.3.x/server-go/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..7764acb53 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-transfer-status.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetTransferStatus( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get-zone.md b/examples/2.3.x/server-go/examples/domains/get-zone.md new file mode 100644 index 000000000..9d0ea9428 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get-zone.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.GetZone( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/get.md b/examples/2.3.x/server-go/examples/domains/get.md new file mode 100644 index 000000000..0075881e2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.Get( + "<DOMAIN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/list-prices.md b/examples/2.3.x/server-go/examples/domains/list-prices.md new file mode 100644 index 000000000..2f06a0c3e --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/list-prices.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.ListPrices( + []string{"example"}, + service.WithListPricesPeriodYears(0), + service.WithListPricesRegistrationType("new"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/list-records.md b/examples/2.3.x/server-go/examples/domains/list-records.md new file mode 100644 index 000000000..4e63ed4a4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/list-records.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.ListRecords( + "<DOMAIN_ID>", + service.WithListRecordsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/list.md b/examples/2.3.x/server-go/examples/domains/list.md new file mode 100644 index 000000000..346becf54 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/list.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListSearch("<SEARCH>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-nameservers.md b/examples/2.3.x/server-go/examples/domains/update-nameservers.md new file mode 100644 index 000000000..eb97997fb --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-nameservers.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateNameservers( + "<DOMAIN_ID>", + service.WithUpdateNameserversNameservers([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-a.md b/examples/2.3.x/server-go/examples/domains/update-record-a.md new file mode 100644 index 000000000..4ad301789 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-a.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordA( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "", + 1, + service.WithUpdateRecordAComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-go/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..04c98a2b6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-aaaa.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordAAAA( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "", + 1, + service.WithUpdateRecordAAAAComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-alias.md b/examples/2.3.x/server-go/examples/domains/update-record-alias.md new file mode 100644 index 000000000..05f3b2683 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-alias.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordAlias( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + service.WithUpdateRecordAliasComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-caa.md b/examples/2.3.x/server-go/examples/domains/update-record-caa.md new file mode 100644 index 000000000..21c5d7050 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-caa.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordCAA( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "", + 1, + service.WithUpdateRecordCAAComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-cname.md b/examples/2.3.x/server-go/examples/domains/update-record-cname.md new file mode 100644 index 000000000..739bb8f71 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-cname.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordCNAME( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + service.WithUpdateRecordCNAMEComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-https.md b/examples/2.3.x/server-go/examples/domains/update-record-https.md new file mode 100644 index 000000000..db5b386ce --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-https.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordHTTPS( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + service.WithUpdateRecordHTTPSComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-mx.md b/examples/2.3.x/server-go/examples/domains/update-record-mx.md new file mode 100644 index 000000000..5e9ccff29 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-mx.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordMX( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + 0, + service.WithUpdateRecordMXComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-ns.md b/examples/2.3.x/server-go/examples/domains/update-record-ns.md new file mode 100644 index 000000000..af3478b54 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-ns.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordNS( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + service.WithUpdateRecordNSComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-srv.md b/examples/2.3.x/server-go/examples/domains/update-record-srv.md new file mode 100644 index 000000000..9929ddf4c --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-srv.md @@ -0,0 +1,33 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordSRV( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + 0, + 0, + 0, + service.WithUpdateRecordSRVComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-record-txt.md b/examples/2.3.x/server-go/examples/domains/update-record-txt.md new file mode 100644 index 000000000..97aa52e30 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-record-txt.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateRecordTXT( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + service.WithUpdateRecordTXTComment("<COMMENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-team.md b/examples/2.3.x/server-go/examples/domains/update-team.md new file mode 100644 index 000000000..73ca53f6a --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-team.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateTeam( + "<DOMAIN_ID>", + "<TEAM_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/update-zone.md b/examples/2.3.x/server-go/examples/domains/update-zone.md new file mode 100644 index 000000000..0ea0d4863 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/update-zone.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/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.UpdateZone( + "<DOMAIN_ID>", + "<CONTENT>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/domains/verify-nameservers.md b/examples/2.3.x/server-go/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..910c93eb0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/domains/verify-nameservers.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/domains" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := domains.New(client) + + response, err := service.VerifyNameservers( + "<DOMAIN_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 new file mode 100644 index 000000000..b3013d861 --- /dev/null +++ b/examples/2.3.x/server-go/examples/embeddings/create-text-embeddings.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/embeddings" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := embeddings.New(client) + + response, err := service.CreateTextEmbeddings( + []string{"example"}, + service.WithCreateTextEmbeddingsModel("nomic-embed-text"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/create-deployment.md b/examples/2.3.x/server-go/examples/functions/create-deployment.md new file mode 100644 index 000000000..7675185e3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/create-deployment.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/file" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.CreateDeployment( + "<FUNCTION_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + service.WithCreateDeploymentEntrypoint("<ENTRYPOINT>"), + service.WithCreateDeploymentCommands("<COMMANDS>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-go/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..be215fc31 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/create-duplicate-deployment.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.CreateDuplicateDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + service.WithCreateDuplicateDeploymentBuildId("<BUILD_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/create-execution.md b/examples/2.3.x/server-go/examples/functions/create-execution.md new file mode 100644 index 000000000..d37e7d914 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/create-execution.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := functions.New(client) + + response, err := service.CreateExecution( + "<FUNCTION_ID>", + service.WithCreateExecutionBody("<BODY>"), + service.WithCreateExecutionAsync(false), + service.WithCreateExecutionPath("<PATH>"), + service.WithCreateExecutionMethod("GET"), + service.WithCreateExecutionHeaders([]interface{}{}), + service.WithCreateExecutionScheduledAt("<SCHEDULED_AT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/create-template-deployment.md b/examples/2.3.x/server-go/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..1f4272c33 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/create-template-deployment.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.CreateTemplateDeployment( + "<FUNCTION_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "commit", + "<REFERENCE>", + service.WithCreateTemplateDeploymentActivate(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/create-variable.md b/examples/2.3.x/server-go/examples/functions/create-variable.md new file mode 100644 index 000000000..cb8d74615 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/create-variable.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.CreateVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + "<KEY>", + "<VALUE>", + service.WithCreateVariableSecret(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-go/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..38322824f --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/create-vcs-deployment.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.CreateVcsDeployment( + "<FUNCTION_ID>", + "branch", + "<REFERENCE>", + service.WithCreateVcsDeploymentActivate(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/create.md b/examples/2.3.x/server-go/examples/functions/create.md new file mode 100644 index 000000000..8a8b44cf5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/create.md @@ -0,0 +1,46 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.Create( + "<FUNCTION_ID>", + "<NAME>", + "node-14.5", + service.WithCreateExecute([]string{"any"}), + service.WithCreateEvents([]string{"example"}), + service.WithCreateSchedule("0 0 * * *"), + service.WithCreateTimeout(1), + service.WithCreateEnabled(false), + service.WithCreateLogging(false), + service.WithCreateEntrypoint("<ENTRYPOINT>"), + service.WithCreateCommands("<COMMANDS>"), + service.WithCreateScopes([]string{"example"}), + service.WithCreateInstallationId("<INSTALLATION_ID>"), + service.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + service.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + service.WithCreateProviderSilentMode(false), + service.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + service.WithCreateProviderBranches([]string{"example"}), + service.WithCreateProviderPaths([]string{"example"}), + service.WithCreateBuildSpecification("s-1vcpu-512mb"), + service.WithCreateRuntimeSpecification("s-1vcpu-512mb"), + service.WithCreateDeploymentRetention(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/delete-deployment.md b/examples/2.3.x/server-go/examples/functions/delete-deployment.md new file mode 100644 index 000000000..88f1f5570 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/delete-deployment.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.DeleteDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/delete-execution.md b/examples/2.3.x/server-go/examples/functions/delete-execution.md new file mode 100644 index 000000000..07b0fb923 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/delete-execution.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.DeleteExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/delete-variable.md b/examples/2.3.x/server-go/examples/functions/delete-variable.md new file mode 100644 index 000000000..769f74080 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/delete-variable.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.DeleteVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/delete.md b/examples/2.3.x/server-go/examples/functions/delete.md new file mode 100644 index 000000000..9e8051eef --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.Delete( + "<FUNCTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/get-deployment-download.md b/examples/2.3.x/server-go/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..78a6b53ee --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/get-deployment-download.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.GetDeploymentDownload( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + service.WithGetDeploymentDownloadType("source"), + service.WithGetDeploymentDownloadToken("<TOKEN>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/get-deployment.md b/examples/2.3.x/server-go/examples/functions/get-deployment.md new file mode 100644 index 000000000..5ec0e2b79 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/get-deployment.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.GetDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/get-execution.md b/examples/2.3.x/server-go/examples/functions/get-execution.md new file mode 100644 index 000000000..b59d67b97 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/get-execution.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := functions.New(client) + + response, err := service.GetExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/get-variable.md b/examples/2.3.x/server-go/examples/functions/get-variable.md new file mode 100644 index 000000000..22daf0729 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/get-variable.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.GetVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/get.md b/examples/2.3.x/server-go/examples/functions/get.md new file mode 100644 index 000000000..f4b77866e --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.Get( + "<FUNCTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/list-deployments.md b/examples/2.3.x/server-go/examples/functions/list-deployments.md new file mode 100644 index 000000000..758c095cc --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/list-deployments.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.ListDeployments( + "<FUNCTION_ID>", + service.WithListDeploymentsQueries([]string{"example"}), + service.WithListDeploymentsSearch("<SEARCH>"), + service.WithListDeploymentsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/list-executions.md b/examples/2.3.x/server-go/examples/functions/list-executions.md new file mode 100644 index 000000000..d63273bf4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/list-executions.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := functions.New(client) + + response, err := service.ListExecutions( + "<FUNCTION_ID>", + service.WithListExecutionsQueries([]string{"example"}), + service.WithListExecutionsTotal(false), + ) + 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 new file mode 100644 index 000000000..86c2ecfe1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/list-runtimes.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.ListRuntimes() + 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 new file mode 100644 index 000000000..e96ac131d --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/list-specifications.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.ListSpecifications( + service.WithListSpecificationsType("runtimes"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/list-variables.md b/examples/2.3.x/server-go/examples/functions/list-variables.md new file mode 100644 index 000000000..825095c9f --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/list-variables.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.ListVariables( + "<FUNCTION_ID>", + service.WithListVariablesQueries([]string{"example"}), + service.WithListVariablesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/list.md b/examples/2.3.x/server-go/examples/functions/list.md new file mode 100644 index 000000000..70ab9f27d --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/list.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListSearch("<SEARCH>"), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/update-deployment-status.md b/examples/2.3.x/server-go/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..a5dc6a435 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/update-deployment-status.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.UpdateDeploymentStatus( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/update-function-deployment.md b/examples/2.3.x/server-go/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..38f297c24 --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/update-function-deployment.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/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.UpdateFunctionDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/update-variable.md b/examples/2.3.x/server-go/examples/functions/update-variable.md new file mode 100644 index 000000000..8cb1de40f --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/update-variable.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.UpdateVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + service.WithUpdateVariableKey("<KEY>"), + service.WithUpdateVariableValue("<VALUE>"), + service.WithUpdateVariableSecret(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/functions/update.md b/examples/2.3.x/server-go/examples/functions/update.md new file mode 100644 index 000000000..ff3e2a36e --- /dev/null +++ b/examples/2.3.x/server-go/examples/functions/update.md @@ -0,0 +1,46 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/functions" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := functions.New(client) + + response, err := service.Update( + "<FUNCTION_ID>", + "<NAME>", + service.WithUpdateRuntime("node-14.5"), + service.WithUpdateExecute([]string{"any"}), + service.WithUpdateEvents([]string{"example"}), + service.WithUpdateSchedule("0 0 * * *"), + service.WithUpdateTimeout(1), + service.WithUpdateEnabled(false), + service.WithUpdateLogging(false), + service.WithUpdateEntrypoint("<ENTRYPOINT>"), + service.WithUpdateCommands("<COMMANDS>"), + service.WithUpdateScopes([]string{"example"}), + service.WithUpdateInstallationId("<INSTALLATION_ID>"), + service.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + service.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + service.WithUpdateProviderSilentMode(false), + service.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + service.WithUpdateProviderBranches([]string{"example"}), + service.WithUpdateProviderPaths([]string{"example"}), + service.WithUpdateBuildSpecification("s-1vcpu-512mb"), + service.WithUpdateRuntimeSpecification("s-1vcpu-512mb"), + service.WithUpdateDeploymentRetention(0), + ) + 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 new file mode 100644 index 000000000..24dadaedb --- /dev/null +++ b/examples/2.3.x/server-go/examples/graphql/mutation.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/graphql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := graphql.New(client) + + response, err := service.Mutation( + []interface{}{}, + ) + 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 new file mode 100644 index 000000000..40cb3b8d7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/graphql/query.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/graphql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := graphql.New(client) + + response, err := service.Query( + []interface{}{}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/locale/get.md b/examples/2.3.x/server-go/examples/locale/get.md new file mode 100644 index 000000000..b2138c083 --- /dev/null +++ b/examples/2.3.x/server-go/examples/locale/get.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/locale" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := locale.New(client) + + response, err := service.Get() + 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 new file mode 100644 index 000000000..392e9ad78 --- /dev/null +++ b/examples/2.3.x/server-go/examples/locale/list-codes.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/locale" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := locale.New(client) + + response, err := service.ListCodes() + 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 new file mode 100644 index 000000000..137084c5d --- /dev/null +++ b/examples/2.3.x/server-go/examples/locale/list-continents.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/locale" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := locale.New(client) + + response, err := service.ListContinents() + 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 new file mode 100644 index 000000000..bfa6d66f1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/locale/list-countries-eu.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/locale" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := locale.New(client) + + response, err := service.ListCountriesEU() + 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 new file mode 100644 index 000000000..f4732a1c1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/locale/list-countries-phones.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/locale" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := locale.New(client) + + response, err := service.ListCountriesPhones() + 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 new file mode 100644 index 000000000..85e9f3e8e --- /dev/null +++ b/examples/2.3.x/server-go/examples/locale/list-countries.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/locale" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := locale.New(client) + + response, err := service.ListCountries() + 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 new file mode 100644 index 000000000..6ab6d25d6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/locale/list-currencies.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/locale" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := locale.New(client) + + response, err := service.ListCurrencies() + 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 new file mode 100644 index 000000000..3806001bb --- /dev/null +++ b/examples/2.3.x/server-go/examples/locale/list-languages.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/locale" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := locale.New(client) + + response, err := service.ListLanguages() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-go/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..ff35e5edc --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-apns-provider.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateAPNSProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateAPNSProviderAuthKey("<AUTH_KEY>"), + service.WithCreateAPNSProviderAuthKeyId("<AUTH_KEY_ID>"), + service.WithCreateAPNSProviderTeamId("<TEAM_ID>"), + service.WithCreateAPNSProviderBundleId("<BUNDLE_ID>"), + service.WithCreateAPNSProviderSandbox(false), + service.WithCreateAPNSProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-go/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..788dbaa85 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateAppwriteProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateAppwriteProviderEnabled(false), + service.WithCreateAppwriteProviderQos(0), + service.WithCreateAppwriteProviderExpiry(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-email.md b/examples/2.3.x/server-go/examples/messaging/create-email.md new file mode 100644 index 000000000..296b28de9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-email.md @@ -0,0 +1,38 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateEmail( + "<MESSAGE_ID>", + "<SUBJECT>", + "<CONTENT>", + service.WithCreateEmailTopics([]string{"example"}), + service.WithCreateEmailUsers([]string{"example"}), + service.WithCreateEmailTargets([]string{"example"}), + service.WithCreateEmailCc([]string{"example"}), + service.WithCreateEmailBcc([]string{"example"}), + service.WithCreateEmailAttachments([]string{"example"}), + service.WithCreateEmailReplyToEmail("email@example.com"), + service.WithCreateEmailReplyToName("<REPLY_TO_NAME>"), + service.WithCreateEmailDraft(false), + service.WithCreateEmailHtml(false), + service.WithCreateEmailScheduledAt("2020-10-15T06:38:00.000+00:00"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-go/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..568c1d6c6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-fcm-provider.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateFCMProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateFCMProviderServiceAccountJSON([]interface{}{}), + service.WithCreateFCMProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-go/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..10002ec58 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,34 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateMailgunProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateMailgunProviderApiKey("<API_KEY>"), + service.WithCreateMailgunProviderDomain("example.com"), + service.WithCreateMailgunProviderIsEuRegion(false), + service.WithCreateMailgunProviderFromName("<FROM_NAME>"), + service.WithCreateMailgunProviderFromEmail("email@example.com"), + service.WithCreateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + service.WithCreateMailgunProviderReplyToEmail("email@example.com"), + service.WithCreateMailgunProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-go/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..6e89a6428 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateMsg91Provider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + service.WithCreateMsg91ProviderSenderId("<SENDER_ID>"), + service.WithCreateMsg91ProviderAuthKey("<AUTH_KEY>"), + service.WithCreateMsg91ProviderEnabled(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 new file mode 100644 index 000000000..70659949c --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-push.md @@ -0,0 +1,43 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreatePush( + "<MESSAGE_ID>", + service.WithCreatePushTitle("<TITLE>"), + service.WithCreatePushBody("<BODY>"), + service.WithCreatePushTopics([]string{"example"}), + service.WithCreatePushUsers([]string{"example"}), + service.WithCreatePushTargets([]string{"example"}), + service.WithCreatePushData([]interface{}{}), + service.WithCreatePushAction("<ACTION>"), + service.WithCreatePushImage("<ID1:ID2>"), + service.WithCreatePushIcon("<ICON>"), + service.WithCreatePushSound("<SOUND>"), + service.WithCreatePushColor("<COLOR>"), + service.WithCreatePushTag("<TAG>"), + service.WithCreatePushBadge(1), + service.WithCreatePushDraft(false), + service.WithCreatePushScheduledAt("2020-10-15T06:38:00.000+00:00"), + service.WithCreatePushContentAvailable(false), + service.WithCreatePushCritical(false), + service.WithCreatePushPriority("normal"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-go/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..9c5fad872 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-resend-provider.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateResendProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateResendProviderApiKey("<API_KEY>"), + service.WithCreateResendProviderFromName("<FROM_NAME>"), + service.WithCreateResendProviderFromEmail("email@example.com"), + service.WithCreateResendProviderReplyToName("<REPLY_TO_NAME>"), + service.WithCreateResendProviderReplyToEmail("email@example.com"), + service.WithCreateResendProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-go/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..d795addcd --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateSendgridProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateSendgridProviderApiKey("<API_KEY>"), + service.WithCreateSendgridProviderFromName("<FROM_NAME>"), + service.WithCreateSendgridProviderFromEmail("email@example.com"), + service.WithCreateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + service.WithCreateSendgridProviderReplyToEmail("email@example.com"), + service.WithCreateSendgridProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-go/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..adbf79348 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-ses-provider.md @@ -0,0 +1,34 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateSesProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateSesProviderAccessKey("<ACCESS_KEY>"), + service.WithCreateSesProviderSecretKey("<SECRET_KEY>"), + service.WithCreateSesProviderRegion("<REGION>"), + service.WithCreateSesProviderFromName("<FROM_NAME>"), + service.WithCreateSesProviderFromEmail("email@example.com"), + service.WithCreateSesProviderReplyToName("<REPLY_TO_NAME>"), + service.WithCreateSesProviderReplyToEmail("email@example.com"), + service.WithCreateSesProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-sms.md b/examples/2.3.x/server-go/examples/messaging/create-sms.md new file mode 100644 index 000000000..8fc05fff6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-sms.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateSMS( + "<MESSAGE_ID>", + "<CONTENT>", + service.WithCreateSMSTopics([]string{"example"}), + service.WithCreateSMSUsers([]string{"example"}), + service.WithCreateSMSTargets([]string{"example"}), + service.WithCreateSMSDraft(false), + service.WithCreateSMSScheduledAt("2020-10-15T06:38:00.000+00:00"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-go/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..e1ed768e4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-smtp-provider.md @@ -0,0 +1,38 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateSMTPProvider( + "<PROVIDER_ID>", + "<NAME>", + "<HOST>", + service.WithCreateSMTPProviderPort(587), + service.WithCreateSMTPProviderUsername("<USERNAME>"), + service.WithCreateSMTPProviderPassword("password"), + service.WithCreateSMTPProviderEncryption("none"), + service.WithCreateSMTPProviderAutoTLS(false), + service.WithCreateSMTPProviderMailer("<MAILER>"), + service.WithCreateSMTPProviderFromName("<FROM_NAME>"), + service.WithCreateSMTPProviderFromEmail("email@example.com"), + service.WithCreateSMTPProviderReplyToName("<REPLY_TO_NAME>"), + service.WithCreateSMTPProviderReplyToEmail("email@example.com"), + service.WithCreateSMTPProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-subscriber.md b/examples/2.3.x/server-go/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..8d894b83e --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-subscriber.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithJWT("<YOUR_JWT>"), + ) + + service := messaging.New(client) + + response, err := service.CreateSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + "<TARGET_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-go/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..1421a1e99 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-telesign-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateTelesignProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateTelesignProviderFrom("+12065550100"), + service.WithCreateTelesignProviderCustomerId("<CUSTOMER_ID>"), + service.WithCreateTelesignProviderApiKey("<API_KEY>"), + service.WithCreateTelesignProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-go/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..55197b521 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateTextmagicProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateTextmagicProviderFrom("+12065550100"), + service.WithCreateTextmagicProviderUsername("<USERNAME>"), + service.WithCreateTextmagicProviderApiKey("<API_KEY>"), + service.WithCreateTextmagicProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-topic.md b/examples/2.3.x/server-go/examples/messaging/create-topic.md new file mode 100644 index 000000000..e6605f55d --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-topic.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateTopic( + "<TOPIC_ID>", + "<NAME>", + service.WithCreateTopicSubscribe([]string{"any"}), + service.WithCreateTopicQos(0), + service.WithCreateTopicExpiry(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-go/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..e26945f22 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-twilio-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateTwilioProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateTwilioProviderFrom("<FROM>"), + service.WithCreateTwilioProviderAccountSid("<ACCOUNT_SID>"), + service.WithCreateTwilioProviderAuthToken("<AUTH_TOKEN>"), + service.WithCreateTwilioProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-go/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..bbc4731d5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/create-vonage-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.CreateVonageProvider( + "<PROVIDER_ID>", + "<NAME>", + service.WithCreateVonageProviderFrom("+12065550100"), + service.WithCreateVonageProviderApiKey("<API_KEY>"), + service.WithCreateVonageProviderApiSecret("<API_SECRET>"), + service.WithCreateVonageProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/delete-provider.md b/examples/2.3.x/server-go/examples/messaging/delete-provider.md new file mode 100644 index 000000000..334300460 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/delete-provider.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.DeleteProvider( + "<PROVIDER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-go/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..904f7b800 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/delete-subscriber.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithJWT("<YOUR_JWT>"), + ) + + service := messaging.New(client) + + response, err := service.DeleteSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/delete-topic.md b/examples/2.3.x/server-go/examples/messaging/delete-topic.md new file mode 100644 index 000000000..33224485a --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/delete-topic.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.DeleteTopic( + "<TOPIC_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/delete.md b/examples/2.3.x/server-go/examples/messaging/delete.md new file mode 100644 index 000000000..37cecf4a2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.Delete( + "<MESSAGE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/get-message.md b/examples/2.3.x/server-go/examples/messaging/get-message.md new file mode 100644 index 000000000..4cbdac800 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/get-message.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.GetMessage( + "<MESSAGE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/get-provider.md b/examples/2.3.x/server-go/examples/messaging/get-provider.md new file mode 100644 index 000000000..293938083 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/get-provider.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.GetProvider( + "<PROVIDER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/get-subscriber.md b/examples/2.3.x/server-go/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..c4c573f0b --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/get-subscriber.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.GetSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/get-topic.md b/examples/2.3.x/server-go/examples/messaging/get-topic.md new file mode 100644 index 000000000..1ec25c4e8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/get-topic.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.GetTopic( + "<TOPIC_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/list-messages.md b/examples/2.3.x/server-go/examples/messaging/list-messages.md new file mode 100644 index 000000000..52b16e7ab --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/list-messages.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.ListMessages( + service.WithListMessagesQueries([]string{"example"}), + service.WithListMessagesSearch("<SEARCH>"), + service.WithListMessagesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/list-providers.md b/examples/2.3.x/server-go/examples/messaging/list-providers.md new file mode 100644 index 000000000..8266ac3c6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/list-providers.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.ListProviders( + service.WithListProvidersQueries([]string{"example"}), + service.WithListProvidersSearch("<SEARCH>"), + service.WithListProvidersTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/list-subscribers.md b/examples/2.3.x/server-go/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..753a67d2b --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/list-subscribers.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.ListSubscribers( + "<TOPIC_ID>", + service.WithListSubscribersQueries([]string{"example"}), + service.WithListSubscribersSearch("<SEARCH>"), + service.WithListSubscribersTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/list-targets.md b/examples/2.3.x/server-go/examples/messaging/list-targets.md new file mode 100644 index 000000000..6cb46a5bb --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/list-targets.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.ListTargets( + "<MESSAGE_ID>", + service.WithListTargetsQueries([]string{"example"}), + service.WithListTargetsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/list-topics.md b/examples/2.3.x/server-go/examples/messaging/list-topics.md new file mode 100644 index 000000000..bd562a860 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/list-topics.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.ListTopics( + service.WithListTopicsQueries([]string{"example"}), + service.WithListTopicsSearch("<SEARCH>"), + service.WithListTopicsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-go/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..d6eb052cb --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-apns-provider.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateAPNSProvider( + "<PROVIDER_ID>", + service.WithUpdateAPNSProviderName("<NAME>"), + service.WithUpdateAPNSProviderEnabled(false), + service.WithUpdateAPNSProviderAuthKey("<AUTH_KEY>"), + service.WithUpdateAPNSProviderAuthKeyId("<AUTH_KEY_ID>"), + service.WithUpdateAPNSProviderTeamId("<TEAM_ID>"), + service.WithUpdateAPNSProviderBundleId("<BUNDLE_ID>"), + service.WithUpdateAPNSProviderSandbox(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-go/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..e99d364ed --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateAppwriteProvider( + "<PROVIDER_ID>", + service.WithUpdateAppwriteProviderName("<NAME>"), + service.WithUpdateAppwriteProviderEnabled(false), + service.WithUpdateAppwriteProviderQos(0), + service.WithUpdateAppwriteProviderExpiry(0), + ) + 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 new file mode 100644 index 000000000..05ff62a71 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-email.md @@ -0,0 +1,38 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateEmail( + "<MESSAGE_ID>", + 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.WithUpdateEmailReplyToEmail("email@example.com"), + service.WithUpdateEmailReplyToName("<REPLY_TO_NAME>"), + 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-fcm-provider.md b/examples/2.3.x/server-go/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..7c5d50119 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-fcm-provider.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/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateFCMProvider( + "<PROVIDER_ID>", + service.WithUpdateFCMProviderName("<NAME>"), + service.WithUpdateFCMProviderEnabled(false), + service.WithUpdateFCMProviderServiceAccountJSON([]interface{}{}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-go/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..755106873 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,34 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateMailgunProvider( + "<PROVIDER_ID>", + service.WithUpdateMailgunProviderName("<NAME>"), + service.WithUpdateMailgunProviderApiKey("<API_KEY>"), + service.WithUpdateMailgunProviderDomain("example.com"), + service.WithUpdateMailgunProviderIsEuRegion(false), + service.WithUpdateMailgunProviderEnabled(false), + service.WithUpdateMailgunProviderFromName("<FROM_NAME>"), + service.WithUpdateMailgunProviderFromEmail("email@example.com"), + service.WithUpdateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + service.WithUpdateMailgunProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-go/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..043dd3ba6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateMsg91Provider( + "<PROVIDER_ID>", + service.WithUpdateMsg91ProviderName("<NAME>"), + service.WithUpdateMsg91ProviderEnabled(false), + service.WithUpdateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + service.WithUpdateMsg91ProviderSenderId("<SENDER_ID>"), + service.WithUpdateMsg91ProviderAuthKey("<AUTH_KEY>"), + ) + 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 new file mode 100644 index 000000000..8d3b933a6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-push.md @@ -0,0 +1,43 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdatePush( + "<MESSAGE_ID>", + 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>"), + service.WithUpdatePushIcon("<ICON>"), + service.WithUpdatePushSound("<SOUND>"), + service.WithUpdatePushColor("<COLOR>"), + service.WithUpdatePushTag("<TAG>"), + service.WithUpdatePushBadge(1), + service.WithUpdatePushDraft(false), + service.WithUpdatePushScheduledAt("2020-10-15T06:38:00.000+00:00"), + service.WithUpdatePushContentAvailable(false), + service.WithUpdatePushCritical(false), + service.WithUpdatePushPriority("normal"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-go/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..f9773604d --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-resend-provider.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateResendProvider( + "<PROVIDER_ID>", + service.WithUpdateResendProviderName("<NAME>"), + service.WithUpdateResendProviderEnabled(false), + service.WithUpdateResendProviderApiKey("<API_KEY>"), + service.WithUpdateResendProviderFromName("<FROM_NAME>"), + service.WithUpdateResendProviderFromEmail("email@example.com"), + service.WithUpdateResendProviderReplyToName("<REPLY_TO_NAME>"), + service.WithUpdateResendProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-go/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..3ea36e4c5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateSendgridProvider( + "<PROVIDER_ID>", + service.WithUpdateSendgridProviderName("<NAME>"), + service.WithUpdateSendgridProviderEnabled(false), + service.WithUpdateSendgridProviderApiKey("<API_KEY>"), + service.WithUpdateSendgridProviderFromName("<FROM_NAME>"), + service.WithUpdateSendgridProviderFromEmail("email@example.com"), + service.WithUpdateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + service.WithUpdateSendgridProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-go/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..43f4d3177 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-ses-provider.md @@ -0,0 +1,34 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateSesProvider( + "<PROVIDER_ID>", + service.WithUpdateSesProviderName("<NAME>"), + service.WithUpdateSesProviderEnabled(false), + service.WithUpdateSesProviderAccessKey("<ACCESS_KEY>"), + service.WithUpdateSesProviderSecretKey("<SECRET_KEY>"), + service.WithUpdateSesProviderRegion("<REGION>"), + service.WithUpdateSesProviderFromName("<FROM_NAME>"), + service.WithUpdateSesProviderFromEmail("email@example.com"), + service.WithUpdateSesProviderReplyToName("<REPLY_TO_NAME>"), + service.WithUpdateSesProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + 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 new file mode 100644 index 000000000..22f60b3d0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-sms.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateSMS( + "<MESSAGE_ID>", + 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"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-smtp-provider.md b/examples/2.3.x/server-go/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..3a472ff79 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-smtp-provider.md @@ -0,0 +1,38 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateSMTPProvider( + "<PROVIDER_ID>", + service.WithUpdateSMTPProviderName("<NAME>"), + service.WithUpdateSMTPProviderHost("<HOST>"), + service.WithUpdateSMTPProviderPort(1), + service.WithUpdateSMTPProviderUsername("<USERNAME>"), + service.WithUpdateSMTPProviderPassword("password"), + service.WithUpdateSMTPProviderEncryption("none"), + service.WithUpdateSMTPProviderAutoTLS(false), + service.WithUpdateSMTPProviderMailer("<MAILER>"), + service.WithUpdateSMTPProviderFromName("<FROM_NAME>"), + service.WithUpdateSMTPProviderFromEmail("email@example.com"), + service.WithUpdateSMTPProviderReplyToName("<REPLY_TO_NAME>"), + service.WithUpdateSMTPProviderReplyToEmail("<REPLY_TO_EMAIL>"), + service.WithUpdateSMTPProviderEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-go/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..70c5357eb --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-telesign-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateTelesignProvider( + "<PROVIDER_ID>", + service.WithUpdateTelesignProviderName("<NAME>"), + service.WithUpdateTelesignProviderEnabled(false), + service.WithUpdateTelesignProviderCustomerId("<CUSTOMER_ID>"), + service.WithUpdateTelesignProviderApiKey("<API_KEY>"), + service.WithUpdateTelesignProviderFrom("<FROM>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-go/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..e8d781ee9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateTextmagicProvider( + "<PROVIDER_ID>", + service.WithUpdateTextmagicProviderName("<NAME>"), + service.WithUpdateTextmagicProviderEnabled(false), + service.WithUpdateTextmagicProviderUsername("<USERNAME>"), + service.WithUpdateTextmagicProviderApiKey("<API_KEY>"), + service.WithUpdateTextmagicProviderFrom("<FROM>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-topic.md b/examples/2.3.x/server-go/examples/messaging/update-topic.md new file mode 100644 index 000000000..7706ccfd3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-topic.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateTopic( + "<TOPIC_ID>", + service.WithUpdateTopicName("<NAME>"), + service.WithUpdateTopicSubscribe([]string{"any"}), + service.WithUpdateTopicQos(0), + service.WithUpdateTopicExpiry(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-go/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..92fbe139f --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-twilio-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateTwilioProvider( + "<PROVIDER_ID>", + service.WithUpdateTwilioProviderName("<NAME>"), + service.WithUpdateTwilioProviderEnabled(false), + service.WithUpdateTwilioProviderAccountSid("<ACCOUNT_SID>"), + service.WithUpdateTwilioProviderAuthToken("<AUTH_TOKEN>"), + service.WithUpdateTwilioProviderFrom("<FROM>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-go/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..c0ff85d37 --- /dev/null +++ b/examples/2.3.x/server-go/examples/messaging/update-vonage-provider.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/messaging" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := messaging.New(client) + + response, err := service.UpdateVonageProvider( + "<PROVIDER_ID>", + service.WithUpdateVonageProviderName("<NAME>"), + service.WithUpdateVonageProviderEnabled(false), + service.WithUpdateVonageProviderApiKey("<API_KEY>"), + service.WithUpdateVonageProviderApiSecret("<API_SECRET>"), + service.WithUpdateVonageProviderFrom("<FROM>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-go/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..1e09a2a7e --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/create-backup-policy.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.CreateBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + "<NAME>", + "", + 1, + service.WithCreateBackupPolicyType("full"), + service.WithCreateBackupPolicyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/create-backup.md b/examples/2.3.x/server-go/examples/mongo/create-backup.md new file mode 100644 index 000000000..ea4d40202 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/create-backup.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.CreateBackup( + "<DATABASE_ID>", + service.WithCreateBackupType("full"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/create-branch.md b/examples/2.3.x/server-go/examples/mongo/create-branch.md new file mode 100644 index 000000000..7288aeced --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/create-branch.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.CreateBranch( + "<DATABASE_ID>", + service.WithCreateBranchBranchId("<BRANCH_ID>"), + service.WithCreateBranchTtl(300), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/create-failover.md b/examples/2.3.x/server-go/examples/mongo/create-failover.md new file mode 100644 index 000000000..2d9e3ecd9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/create-failover.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.CreateFailover( + "<DATABASE_ID>", + service.WithCreateFailoverTargetReplicaId("<TARGET_REPLICA_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/create-migration.md b/examples/2.3.x/server-go/examples/mongo/create-migration.md new file mode 100644 index 000000000..2c06ea34b --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/create-migration.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.CreateMigration( + "<DATABASE_ID>", + "shared", + service.WithCreateMigrationSpecification("<SPECIFICATION>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/create-restoration.md b/examples/2.3.x/server-go/examples/mongo/create-restoration.md new file mode 100644 index 000000000..38f548c2f --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/create-restoration.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.CreateRestoration( + "<DATABASE_ID>", + service.WithCreateRestorationType("backup"), + service.WithCreateRestorationBackupId("<BACKUP_ID>"), + service.WithCreateRestorationTargetDatabaseId("<TARGET_DATABASE_ID>"), + service.WithCreateRestorationTargetTime("2020-10-15T06:38:00.000+00:00"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/create-upgrade.md b/examples/2.3.x/server-go/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..5eb44f57f --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/create-upgrade.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.CreateUpgrade( + "<DATABASE_ID>", + "<TARGET_VERSION>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/create.md b/examples/2.3.x/server-go/examples/mongo/create.md new file mode 100644 index 000000000..feae1c980 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/create.md @@ -0,0 +1,38 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.Create( + "<DATABASE_ID>", + "<NAME>", + service.WithCreateVersion("17"), + service.WithCreateSpecification("<SPECIFICATION>"), + service.WithCreateReplicas(0), + service.WithCreateSyncMode("async"), + service.WithCreateNetworkIdleTimeoutSeconds(60), + service.WithCreateNetworkIPAllowlist([]string{"example"}), + service.WithCreateIdleTimeoutMinutes(5), + service.WithCreatePitr(false), + service.WithCreatePitrRetentionDays(1), + service.WithCreateStorageAutoscaling(false), + service.WithCreateStorageAutoscalingThresholdPercent(50), + service.WithCreateStorageAutoscalingMaxGb(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-go/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..9bf4f4617 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/delete-backup-policy.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.DeleteBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/delete-backup.md b/examples/2.3.x/server-go/examples/mongo/delete-backup.md new file mode 100644 index 000000000..4c6b554e0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/delete-backup.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.DeleteBackup( + "<DATABASE_ID>", + "<BACKUP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/delete-branch.md b/examples/2.3.x/server-go/examples/mongo/delete-branch.md new file mode 100644 index 000000000..695eacb8f --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/delete-branch.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.DeleteBranch( + "<DATABASE_ID>", + "<BRANCH_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/delete.md b/examples/2.3.x/server-go/examples/mongo/delete.md new file mode 100644 index 000000000..30fd74de6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.Delete( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-go/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..b46d53ba5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/get-backup-policy.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.GetBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/get-backup.md b/examples/2.3.x/server-go/examples/mongo/get-backup.md new file mode 100644 index 000000000..8d510a9ed --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/get-backup.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.GetBackup( + "<DATABASE_ID>", + "<BACKUP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/get-pitr.md b/examples/2.3.x/server-go/examples/mongo/get-pitr.md new file mode 100644 index 000000000..6e8ac77f6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/get-pitr.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.GetPitr( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/get-replicas.md b/examples/2.3.x/server-go/examples/mongo/get-replicas.md new file mode 100644 index 000000000..240ec480f --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/get-replicas.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.GetReplicas( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/get-restoration.md b/examples/2.3.x/server-go/examples/mongo/get-restoration.md new file mode 100644 index 000000000..ebd8b1040 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/get-restoration.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.GetRestoration( + "<DATABASE_ID>", + "<RESTORATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/get-status.md b/examples/2.3.x/server-go/examples/mongo/get-status.md new file mode 100644 index 000000000..1c082097f --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/get-status.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.GetStatus( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/get.md b/examples/2.3.x/server-go/examples/mongo/get.md new file mode 100644 index 000000000..029753df9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.Get( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-go/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..485135e96 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/list-backup-policies.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.ListBackupPolicies( + "<DATABASE_ID>", + service.WithListBackupPoliciesQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/list-backups.md b/examples/2.3.x/server-go/examples/mongo/list-backups.md new file mode 100644 index 000000000..8f0e12799 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/list-backups.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.ListBackups( + "<DATABASE_ID>", + service.WithListBackupsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/list-branches.md b/examples/2.3.x/server-go/examples/mongo/list-branches.md new file mode 100644 index 000000000..e840b1fd7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/list-branches.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.ListBranches( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/list-operations.md b/examples/2.3.x/server-go/examples/mongo/list-operations.md new file mode 100644 index 000000000..ac92e7bc4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/list-operations.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.ListOperations( + "<DATABASE_ID>", + service.WithListOperationsStatus("queued"), + service.WithListOperationsLimit(1), + service.WithListOperationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/list-restorations.md b/examples/2.3.x/server-go/examples/mongo/list-restorations.md new file mode 100644 index 000000000..ba079d56c --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/list-restorations.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.ListRestorations( + "<DATABASE_ID>", + service.WithListRestorationsStatus("pending"), + service.WithListRestorationsType("backup"), + service.WithListRestorationsLimit(1), + service.WithListRestorationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/list-specifications.md b/examples/2.3.x/server-go/examples/mongo/list-specifications.md new file mode 100644 index 000000000..d4f94e166 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/list-specifications.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.ListSpecifications() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/list.md b/examples/2.3.x/server-go/examples/mongo/list.md new file mode 100644 index 000000000..2f4b8d6e9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/list.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-go/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..1ec967fab --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/update-backup-policy.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.UpdateBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + service.WithUpdateBackupPolicyName("<NAME>"), + service.WithUpdateBackupPolicySchedule(""), + service.WithUpdateBackupPolicyRetention(1), + service.WithUpdateBackupPolicyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-go/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..ac4574555 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/update-backup-storage.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.UpdateBackupStorage( + "<DATABASE_ID>", + "s3", + "<BUCKET>", + "<ACCESS_KEY>", + "<SECRET_KEY>", + service.WithUpdateBackupStorageRegion("<REGION>"), + service.WithUpdateBackupStoragePrefix("<PREFIX>"), + service.WithUpdateBackupStorageEndpoint("<ENDPOINT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/update-credentials.md b/examples/2.3.x/server-go/examples/mongo/update-credentials.md new file mode 100644 index 000000000..c9ef739ba --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/update-credentials.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.UpdateCredentials( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/update-maintenance.md b/examples/2.3.x/server-go/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..05b94e41e --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/update-maintenance.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/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.UpdateMaintenance( + "<DATABASE_ID>", + "sun", + 0, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mongo/update.md b/examples/2.3.x/server-go/examples/mongo/update.md new file mode 100644 index 000000000..6165bae84 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mongo/update.md @@ -0,0 +1,45 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mongo" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mongo.New(client) + + response, err := service.Update( + "<DATABASE_ID>", + service.WithUpdateName("<NAME>"), + service.WithUpdateStatus("ready"), + service.WithUpdateSpecification("<SPECIFICATION>"), + service.WithUpdateReplicas(0), + service.WithUpdateSyncMode("async"), + service.WithUpdateNetworkIdleTimeoutSeconds(60), + service.WithUpdateNetworkIPAllowlist([]string{"example"}), + service.WithUpdateIdleTimeoutMinutes(5), + service.WithUpdatePitr(false), + service.WithUpdatePitrRetentionDays(1), + service.WithUpdateStorageAutoscaling(false), + service.WithUpdateStorageAutoscalingThresholdPercent(50), + service.WithUpdateStorageAutoscalingMaxGb(0), + service.WithUpdateMetricsTraceSampleRate(0), + service.WithUpdateMetricsSlowQueryLogThresholdMs(0), + service.WithUpdateSqlApiEnabled(false), + service.WithUpdateSqlApiAllowedStatements([]string{"example"}), + service.WithUpdateSqlApiMaxRows(1), + service.WithUpdateSqlApiMaxBytes(1024), + service.WithUpdateSqlApiTimeoutSeconds(1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-go/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..d74f7a287 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create-backup-policy.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.CreateBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + "<NAME>", + "", + 1, + service.WithCreateBackupPolicyType("full"), + service.WithCreateBackupPolicyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create-backup.md b/examples/2.3.x/server-go/examples/mysql/create-backup.md new file mode 100644 index 000000000..d03500065 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create-backup.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.CreateBackup( + "<DATABASE_ID>", + service.WithCreateBackupType("full"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create-branch.md b/examples/2.3.x/server-go/examples/mysql/create-branch.md new file mode 100644 index 000000000..c699e08dd --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create-branch.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.CreateBranch( + "<DATABASE_ID>", + service.WithCreateBranchBranchId("<BRANCH_ID>"), + service.WithCreateBranchTtl(300), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create-execution.md b/examples/2.3.x/server-go/examples/mysql/create-execution.md new file mode 100644 index 000000000..18b817102 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create-execution.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.CreateExecution( + "<DATABASE_ID>", + "<SQL>", + service.WithCreateExecutionBindings([]interface{}{}), + service.WithCreateExecutionTimeoutSeconds(1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create-failover.md b/examples/2.3.x/server-go/examples/mysql/create-failover.md new file mode 100644 index 000000000..6bef3f30d --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create-failover.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.CreateFailover( + "<DATABASE_ID>", + service.WithCreateFailoverTargetReplicaId("<TARGET_REPLICA_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create-migration.md b/examples/2.3.x/server-go/examples/mysql/create-migration.md new file mode 100644 index 000000000..1a07bc218 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create-migration.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.CreateMigration( + "<DATABASE_ID>", + "shared", + service.WithCreateMigrationSpecification("<SPECIFICATION>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create-restoration.md b/examples/2.3.x/server-go/examples/mysql/create-restoration.md new file mode 100644 index 000000000..4ce7cd07b --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create-restoration.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.CreateRestoration( + "<DATABASE_ID>", + service.WithCreateRestorationType("backup"), + service.WithCreateRestorationBackupId("<BACKUP_ID>"), + service.WithCreateRestorationTargetDatabaseId("<TARGET_DATABASE_ID>"), + service.WithCreateRestorationTargetTime("2020-10-15T06:38:00.000+00:00"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create-upgrade.md b/examples/2.3.x/server-go/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..bdfc4f50f --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create-upgrade.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.CreateUpgrade( + "<DATABASE_ID>", + "<TARGET_VERSION>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/create.md b/examples/2.3.x/server-go/examples/mysql/create.md new file mode 100644 index 000000000..f0e0f781c --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/create.md @@ -0,0 +1,38 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.Create( + "<DATABASE_ID>", + "<NAME>", + service.WithCreateVersion("17"), + service.WithCreateSpecification("<SPECIFICATION>"), + service.WithCreateReplicas(0), + service.WithCreateSyncMode("async"), + service.WithCreateNetworkIdleTimeoutSeconds(60), + service.WithCreateNetworkIPAllowlist([]string{"example"}), + service.WithCreateIdleTimeoutMinutes(5), + service.WithCreatePitr(false), + service.WithCreatePitrRetentionDays(1), + service.WithCreateStorageAutoscaling(false), + service.WithCreateStorageAutoscalingThresholdPercent(50), + service.WithCreateStorageAutoscalingMaxGb(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-go/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..ed47c0d27 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/delete-backup-policy.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.DeleteBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/delete-backup.md b/examples/2.3.x/server-go/examples/mysql/delete-backup.md new file mode 100644 index 000000000..43ce17a6d --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/delete-backup.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.DeleteBackup( + "<DATABASE_ID>", + "<BACKUP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/delete-branch.md b/examples/2.3.x/server-go/examples/mysql/delete-branch.md new file mode 100644 index 000000000..808cd17e4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/delete-branch.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.DeleteBranch( + "<DATABASE_ID>", + "<BRANCH_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/delete.md b/examples/2.3.x/server-go/examples/mysql/delete.md new file mode 100644 index 000000000..f14907748 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.Delete( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-go/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..f9a2c35bd --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/get-backup-policy.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.GetBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/get-backup.md b/examples/2.3.x/server-go/examples/mysql/get-backup.md new file mode 100644 index 000000000..66f5455f9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/get-backup.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.GetBackup( + "<DATABASE_ID>", + "<BACKUP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/get-pitr.md b/examples/2.3.x/server-go/examples/mysql/get-pitr.md new file mode 100644 index 000000000..c34eb9876 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/get-pitr.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.GetPitr( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/get-pooler.md b/examples/2.3.x/server-go/examples/mysql/get-pooler.md new file mode 100644 index 000000000..b6067e212 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/get-pooler.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.GetPooler( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/get-replicas.md b/examples/2.3.x/server-go/examples/mysql/get-replicas.md new file mode 100644 index 000000000..d5f112c82 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/get-replicas.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.GetReplicas( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/get-restoration.md b/examples/2.3.x/server-go/examples/mysql/get-restoration.md new file mode 100644 index 000000000..2074bb5c2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/get-restoration.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.GetRestoration( + "<DATABASE_ID>", + "<RESTORATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/get-status.md b/examples/2.3.x/server-go/examples/mysql/get-status.md new file mode 100644 index 000000000..33a549041 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/get-status.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.GetStatus( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/get.md b/examples/2.3.x/server-go/examples/mysql/get.md new file mode 100644 index 000000000..536943407 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.Get( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-go/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..5b4305948 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/list-backup-policies.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.ListBackupPolicies( + "<DATABASE_ID>", + service.WithListBackupPoliciesQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/list-backups.md b/examples/2.3.x/server-go/examples/mysql/list-backups.md new file mode 100644 index 000000000..00ee583c2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/list-backups.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.ListBackups( + "<DATABASE_ID>", + service.WithListBackupsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/list-branches.md b/examples/2.3.x/server-go/examples/mysql/list-branches.md new file mode 100644 index 000000000..4ebaf6116 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/list-branches.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.ListBranches( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/list-operations.md b/examples/2.3.x/server-go/examples/mysql/list-operations.md new file mode 100644 index 000000000..9ab75f137 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/list-operations.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.ListOperations( + "<DATABASE_ID>", + service.WithListOperationsStatus("queued"), + service.WithListOperationsLimit(1), + service.WithListOperationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/list-restorations.md b/examples/2.3.x/server-go/examples/mysql/list-restorations.md new file mode 100644 index 000000000..b2e8b8f88 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/list-restorations.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.ListRestorations( + "<DATABASE_ID>", + service.WithListRestorationsStatus("pending"), + service.WithListRestorationsType("backup"), + service.WithListRestorationsLimit(1), + service.WithListRestorationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/list-specifications.md b/examples/2.3.x/server-go/examples/mysql/list-specifications.md new file mode 100644 index 000000000..6e3798d0b --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/list-specifications.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.ListSpecifications() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/list.md b/examples/2.3.x/server-go/examples/mysql/list.md new file mode 100644 index 000000000..d7a42a7e7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/list.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-go/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..11d39e455 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/update-backup-policy.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.UpdateBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + service.WithUpdateBackupPolicyName("<NAME>"), + service.WithUpdateBackupPolicySchedule(""), + service.WithUpdateBackupPolicyRetention(1), + service.WithUpdateBackupPolicyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-go/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..ab208769d --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/update-backup-storage.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.UpdateBackupStorage( + "<DATABASE_ID>", + "s3", + "<BUCKET>", + "<ACCESS_KEY>", + "<SECRET_KEY>", + service.WithUpdateBackupStorageRegion("<REGION>"), + service.WithUpdateBackupStoragePrefix("<PREFIX>"), + service.WithUpdateBackupStorageEndpoint("<ENDPOINT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/update-credentials.md b/examples/2.3.x/server-go/examples/mysql/update-credentials.md new file mode 100644 index 000000000..82165533d --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/update-credentials.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.UpdateCredentials( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/update-maintenance.md b/examples/2.3.x/server-go/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..47c4f7801 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/update-maintenance.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/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.UpdateMaintenance( + "<DATABASE_ID>", + "sun", + 0, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/update-pooler.md b/examples/2.3.x/server-go/examples/mysql/update-pooler.md new file mode 100644 index 000000000..7f6711cfd --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/update-pooler.md @@ -0,0 +1,33 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.UpdatePooler( + "<DATABASE_ID>", + service.WithUpdatePoolerMode("transaction"), + service.WithUpdatePoolerMaxConnections(10), + service.WithUpdatePoolerDefaultPoolSize(1), + service.WithUpdatePoolerReadWriteSplitting(false), + service.WithUpdatePoolerPoolerCpuRequest("<POOLER_CPU_REQUEST>"), + service.WithUpdatePoolerPoolerCpuLimit("<POOLER_CPU_LIMIT>"), + service.WithUpdatePoolerPoolerMemoryRequest("<POOLER_MEMORY_REQUEST>"), + service.WithUpdatePoolerPoolerMemoryLimit("<POOLER_MEMORY_LIMIT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/mysql/update.md b/examples/2.3.x/server-go/examples/mysql/update.md new file mode 100644 index 000000000..806aa9274 --- /dev/null +++ b/examples/2.3.x/server-go/examples/mysql/update.md @@ -0,0 +1,45 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/mysql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := mysql.New(client) + + response, err := service.Update( + "<DATABASE_ID>", + service.WithUpdateName("<NAME>"), + service.WithUpdateStatus("ready"), + service.WithUpdateSpecification("<SPECIFICATION>"), + service.WithUpdateReplicas(0), + service.WithUpdateSyncMode("async"), + service.WithUpdateNetworkIdleTimeoutSeconds(60), + service.WithUpdateNetworkIPAllowlist([]string{"example"}), + service.WithUpdateIdleTimeoutMinutes(5), + service.WithUpdatePitr(false), + service.WithUpdatePitrRetentionDays(1), + service.WithUpdateStorageAutoscaling(false), + service.WithUpdateStorageAutoscalingThresholdPercent(50), + service.WithUpdateStorageAutoscalingMaxGb(0), + service.WithUpdateMetricsTraceSampleRate(0), + service.WithUpdateMetricsSlowQueryLogThresholdMs(0), + service.WithUpdateSqlApiEnabled(false), + service.WithUpdateSqlApiAllowedStatements([]string{"example"}), + service.WithUpdateSqlApiMaxRows(1), + service.WithUpdateSqlApiMaxBytes(1024), + service.WithUpdateSqlApiTimeoutSeconds(1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/approve.md b/examples/2.3.x/server-go/examples/oauth2/approve.md new file mode 100644 index 000000000..4fd52e327 --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/approve.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/oauth2" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.Approve( + "<GRANT_ID>", + service.WithApproveAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + service.WithApproveScope("<SCOPE>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/authorize-post.md b/examples/2.3.x/server-go/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..406358bba --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/authorize-post.md @@ -0,0 +1,38 @@ +```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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.AuthorizePost( + service.WithAuthorizePostClientId("<CLIENT_ID>"), + service.WithAuthorizePostRedirectUri("https://example.com"), + service.WithAuthorizePostResponseType(""), + service.WithAuthorizePostScope("<SCOPE>"), + service.WithAuthorizePostState("<STATE>"), + service.WithAuthorizePostNonce("<NONCE>"), + service.WithAuthorizePostCodeChallenge("<CODE_CHALLENGE>"), + service.WithAuthorizePostCodeChallengeMethod("s256"), + service.WithAuthorizePostPrompt("<PROMPT>"), + service.WithAuthorizePostMaxAge(0), + service.WithAuthorizePostAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + service.WithAuthorizePostResource(""), + service.WithAuthorizePostAudience("<AUDIENCE>"), + service.WithAuthorizePostRequestUri("<REQUEST_URI>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/authorize.md b/examples/2.3.x/server-go/examples/oauth2/authorize.md new file mode 100644 index 000000000..432dc4b53 --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/authorize.md @@ -0,0 +1,38 @@ +```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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.Authorize( + service.WithAuthorizeClientId("<CLIENT_ID>"), + service.WithAuthorizeRedirectUri("https://example.com"), + service.WithAuthorizeResponseType(""), + service.WithAuthorizeScope("<SCOPE>"), + service.WithAuthorizeState("<STATE>"), + service.WithAuthorizeNonce("<NONCE>"), + service.WithAuthorizeCodeChallenge("<CODE_CHALLENGE>"), + service.WithAuthorizeCodeChallengeMethod("s256"), + service.WithAuthorizePrompt("<PROMPT>"), + service.WithAuthorizeMaxAge(0), + service.WithAuthorizeAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + service.WithAuthorizeResource(""), + service.WithAuthorizeAudience("<AUDIENCE>"), + service.WithAuthorizeRequestUri("<REQUEST_URI>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-go/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..f82ac6c8f --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/create-device-authorization.md @@ -0,0 +1,29 @@ +```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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.CreateDeviceAuthorization( + service.WithCreateDeviceAuthorizationClientId("<CLIENT_ID>"), + service.WithCreateDeviceAuthorizationScope("<SCOPE>"), + service.WithCreateDeviceAuthorizationAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + service.WithCreateDeviceAuthorizationResource(""), + service.WithCreateDeviceAuthorizationAudience("<AUDIENCE>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/create-grant.md b/examples/2.3.x/server-go/examples/oauth2/create-grant.md new file mode 100644 index 000000000..971d1b3bb --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/create-grant.md @@ -0,0 +1,25 @@ +```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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.CreateGrant( + "<USER_CODE>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/create-par.md b/examples/2.3.x/server-go/examples/oauth2/create-par.md new file mode 100644 index 000000000..29a1ba3aa --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/create-par.md @@ -0,0 +1,37 @@ +```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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.CreatePAR( + "<CLIENT_ID>", + "https://example.com", + "code", + service.WithCreatePARScope("<SCOPE>"), + service.WithCreatePARState("<STATE>"), + service.WithCreatePARNonce("<NONCE>"), + service.WithCreatePARCodeChallenge("<CODE_CHALLENGE>"), + service.WithCreatePARCodeChallengeMethod("s256"), + service.WithCreatePARPrompt("<PROMPT>"), + service.WithCreatePARMaxAge(0), + service.WithCreatePARAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + service.WithCreatePARResource(""), + service.WithCreatePARAudience("<AUDIENCE>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/create-token.md b/examples/2.3.x/server-go/examples/oauth2/create-token.md new file mode 100644 index 000000000..046abfd6c --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/create-token.md @@ -0,0 +1,34 @@ +```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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.CreateToken( + "<GRANT_TYPE>", + service.WithCreateTokenCode("<CODE>"), + service.WithCreateTokenRefreshToken("<REFRESH_TOKEN>"), + service.WithCreateTokenDeviceCode("<DEVICE_CODE>"), + service.WithCreateTokenClientId("<CLIENT_ID>"), + service.WithCreateTokenClientSecret("<CLIENT_SECRET>"), + service.WithCreateTokenCodeVerifier("<CODE_VERIFIER>"), + service.WithCreateTokenRedirectUri("https://example.com"), + service.WithCreateTokenResource(""), + service.WithCreateTokenAudience("<AUDIENCE>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/get-grant.md b/examples/2.3.x/server-go/examples/oauth2/get-grant.md new file mode 100644 index 000000000..c66d37bb0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/get-grant.md @@ -0,0 +1,25 @@ +```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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.GetGrant( + "<GRANT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/list-organizations.md b/examples/2.3.x/server-go/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..e9efdf1fe --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/list-organizations.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/oauth2" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.ListOrganizations( + service.WithListOrganizationsLimit(1), + service.WithListOrganizationsOffset(0), + service.WithListOrganizationsSearch("<SEARCH>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/list-projects.md b/examples/2.3.x/server-go/examples/oauth2/list-projects.md new file mode 100644 index 000000000..96b03a6d7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/list-projects.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/oauth2" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.ListProjects( + service.WithListProjectsLimit(1), + service.WithListProjectsOffset(0), + service.WithListProjectsSearch("<SEARCH>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/reject.md b/examples/2.3.x/server-go/examples/oauth2/reject.md new file mode 100644 index 000000000..a0af6a96f --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/reject.md @@ -0,0 +1,25 @@ +```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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.Reject( + "<GRANT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/oauth2/revoke.md b/examples/2.3.x/server-go/examples/oauth2/revoke.md new file mode 100644 index 000000000..1e809116e --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/revoke.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.WithSession(""), + ) + + service := oauth2.New(client) + + response, err := service.Revoke( + "<TOKEN>", + service.WithRevokeTokenTypeHint("access_token"), + service.WithRevokeClientId("<CLIENT_ID>"), + service.WithRevokeClientSecret("<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 new file mode 100644 index 000000000..012b2cafc --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/create-ephemeral-project-key.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.CreateEphemeralProjectKey( + "<PROJECT_ID>", + []string{"example"}, + 600, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/create-installation.md b/examples/2.3.x/server-go/examples/organization/create-installation.md new file mode 100644 index 000000000..0c9311156 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/create-installation.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := organization.New(client) + + response, err := service.CreateInstallation( + "<APP_ID>", + service.WithCreateInstallationAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/create-membership.md b/examples/2.3.x/server-go/examples/organization/create-membership.md new file mode 100644 index 000000000..d7d5476f9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/create-membership.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.CreateMembership( + []string{"example"}, + service.WithCreateMembershipEmail("email@example.com"), + service.WithCreateMembershipUserId("<USER_ID>"), + service.WithCreateMembershipPhone("+12065550100"), + service.WithCreateMembershipUrl("https://example.com"), + service.WithCreateMembershipName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/create-project.md b/examples/2.3.x/server-go/examples/organization/create-project.md new file mode 100644 index 000000000..7fc0d27f7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/create-project.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.CreateProject( + "<PROJECT_ID>", + "<NAME>", + service.WithCreateProjectRegion("fra"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/delete-installation.md b/examples/2.3.x/server-go/examples/organization/delete-installation.md new file mode 100644 index 000000000..ee5f78ede --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/delete-installation.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := organization.New(client) + + response, err := service.DeleteInstallation( + "<INSTALLATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/delete-membership.md b/examples/2.3.x/server-go/examples/organization/delete-membership.md new file mode 100644 index 000000000..49f9ea8ee --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/delete-membership.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.DeleteMembership( + "<MEMBERSHIP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/delete-project-key.md b/examples/2.3.x/server-go/examples/organization/delete-project-key.md new file mode 100644 index 000000000..4ad4d95a0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/delete-project-key.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.DeleteProjectKey( + "<PROJECT_ID>", + "<KEY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/delete-project.md b/examples/2.3.x/server-go/examples/organization/delete-project.md new file mode 100644 index 000000000..ffb2a8f3f --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/delete-project.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.DeleteProject( + "<PROJECT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/delete.md b/examples/2.3.x/server-go/examples/organization/delete.md new file mode 100644 index 000000000..95bf393ef --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/delete.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.Delete() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/get-installation.md b/examples/2.3.x/server-go/examples/organization/get-installation.md new file mode 100644 index 000000000..e9925d8c2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/get-installation.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := organization.New(client) + + response, err := service.GetInstallation( + "<INSTALLATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/get-membership.md b/examples/2.3.x/server-go/examples/organization/get-membership.md new file mode 100644 index 000000000..b02a93b97 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/get-membership.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.GetMembership( + "<MEMBERSHIP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/get-project-key.md b/examples/2.3.x/server-go/examples/organization/get-project-key.md new file mode 100644 index 000000000..2aa1a74dc --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/get-project-key.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.GetProjectKey( + "<PROJECT_ID>", + "<KEY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/get-project.md b/examples/2.3.x/server-go/examples/organization/get-project.md new file mode 100644 index 000000000..6a0d5ae2d --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/get-project.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.GetProject( + "<PROJECT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/get.md b/examples/2.3.x/server-go/examples/organization/get.md new file mode 100644 index 000000000..f8199ba30 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/get.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.Get() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/list-installations.md b/examples/2.3.x/server-go/examples/organization/list-installations.md new file mode 100644 index 000000000..32cb229d8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/list-installations.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := organization.New(client) + + response, err := service.ListInstallations( + service.WithListInstallationsQueries([]string{"example"}), + service.WithListInstallationsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/list-memberships.md b/examples/2.3.x/server-go/examples/organization/list-memberships.md new file mode 100644 index 000000000..295907aaf --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/list-memberships.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.ListMemberships( + service.WithListMembershipsQueries([]string{"example"}), + service.WithListMembershipsSearch("<SEARCH>"), + service.WithListMembershipsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/list-project-keys.md b/examples/2.3.x/server-go/examples/organization/list-project-keys.md new file mode 100644 index 000000000..05e80c0d8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/list-project-keys.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.ListProjectKeys( + "<PROJECT_ID>", + service.WithListProjectKeysQueries([]string{"example"}), + service.WithListProjectKeysTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/list-projects.md b/examples/2.3.x/server-go/examples/organization/list-projects.md new file mode 100644 index 000000000..34497238f --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/list-projects.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.ListProjects( + service.WithListProjectsQueries([]string{"example"}), + service.WithListProjectsSearch("<SEARCH>"), + service.WithListProjectsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/update-installation.md b/examples/2.3.x/server-go/examples/organization/update-installation.md new file mode 100644 index 000000000..4d94310fd --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/update-installation.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := organization.New(client) + + response, err := service.UpdateInstallation( + "<INSTALLATION_ID>", + service.WithUpdateInstallationAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/update-membership.md b/examples/2.3.x/server-go/examples/organization/update-membership.md new file mode 100644 index 000000000..a22a1ec7e --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/update-membership.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.UpdateMembership( + "<MEMBERSHIP_ID>", + []string{"example"}, + ) + 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 new file mode 100644 index 000000000..3b4a1b655 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/update-project-key.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.UpdateProjectKey( + "<PROJECT_ID>", + "<KEY_ID>", + "<NAME>", + []string{"example"}, + service.WithUpdateProjectKeyExpire("2020-10-15T06:38:00.000+00:00"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/update-project.md b/examples/2.3.x/server-go/examples/organization/update-project.md new file mode 100644 index 000000000..c3e9ae566 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/update-project.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/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.UpdateProject( + "<PROJECT_ID>", + "<NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/update.md b/examples/2.3.x/server-go/examples/organization/update.md new file mode 100644 index 000000000..dd74c6450 --- /dev/null +++ b/examples/2.3.x/server-go/examples/organization/update.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/organization" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := organization.New(client) + + response, err := service.Update( + "<NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-go/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..291ef8f9b --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-backup-policy.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + "<NAME>", + "", + 1, + service.WithCreateBackupPolicyType("full"), + service.WithCreateBackupPolicyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-backup.md b/examples/2.3.x/server-go/examples/postgresql/create-backup.md new file mode 100644 index 000000000..58a2b52b8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-backup.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateBackup( + "<DATABASE_ID>", + service.WithCreateBackupType("full"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-branch.md b/examples/2.3.x/server-go/examples/postgresql/create-branch.md new file mode 100644 index 000000000..bdcc0876f --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-branch.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateBranch( + "<DATABASE_ID>", + service.WithCreateBranchBranchId("<BRANCH_ID>"), + service.WithCreateBranchTtl(300), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-execution.md b/examples/2.3.x/server-go/examples/postgresql/create-execution.md new file mode 100644 index 000000000..59739252b --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-execution.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateExecution( + "<DATABASE_ID>", + "<SQL>", + service.WithCreateExecutionBindings([]interface{}{}), + service.WithCreateExecutionTimeoutSeconds(1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-extension.md b/examples/2.3.x/server-go/examples/postgresql/create-extension.md new file mode 100644 index 000000000..11dd2b9a0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-extension.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateExtension( + "<DATABASE_ID>", + "<NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-failover.md b/examples/2.3.x/server-go/examples/postgresql/create-failover.md new file mode 100644 index 000000000..15607cc57 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-failover.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateFailover( + "<DATABASE_ID>", + service.WithCreateFailoverTargetReplicaId("<TARGET_REPLICA_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-migration.md b/examples/2.3.x/server-go/examples/postgresql/create-migration.md new file mode 100644 index 000000000..7635d64ef --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-migration.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateMigration( + "<DATABASE_ID>", + "shared", + service.WithCreateMigrationSpecification("<SPECIFICATION>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-restoration.md b/examples/2.3.x/server-go/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..968ae9562 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-restoration.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateRestoration( + "<DATABASE_ID>", + service.WithCreateRestorationType("backup"), + service.WithCreateRestorationBackupId("<BACKUP_ID>"), + service.WithCreateRestorationTargetDatabaseId("<TARGET_DATABASE_ID>"), + service.WithCreateRestorationTargetTime("2020-10-15T06:38:00.000+00:00"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-go/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..6428786f9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create-upgrade.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.CreateUpgrade( + "<DATABASE_ID>", + "<TARGET_VERSION>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/create.md b/examples/2.3.x/server-go/examples/postgresql/create.md new file mode 100644 index 000000000..017853ac9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/create.md @@ -0,0 +1,38 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.Create( + "<DATABASE_ID>", + "<NAME>", + service.WithCreateVersion("17"), + service.WithCreateSpecification("<SPECIFICATION>"), + service.WithCreateReplicas(0), + service.WithCreateSyncMode("async"), + service.WithCreateNetworkIdleTimeoutSeconds(60), + service.WithCreateNetworkIPAllowlist([]string{"example"}), + service.WithCreateIdleTimeoutMinutes(5), + service.WithCreatePitr(false), + service.WithCreatePitrRetentionDays(1), + service.WithCreateStorageAutoscaling(false), + service.WithCreateStorageAutoscalingThresholdPercent(50), + service.WithCreateStorageAutoscalingMaxGb(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-go/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..7508df87e --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/delete-backup-policy.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.DeleteBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/delete-backup.md b/examples/2.3.x/server-go/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..1fe93cc57 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/delete-backup.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.DeleteBackup( + "<DATABASE_ID>", + "<BACKUP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/delete-branch.md b/examples/2.3.x/server-go/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..1ee32806a --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/delete-branch.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.DeleteBranch( + "<DATABASE_ID>", + "<BRANCH_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/delete-extension.md b/examples/2.3.x/server-go/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..50dec8e2e --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/delete-extension.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.DeleteExtension( + "<DATABASE_ID>", + "<EXTENSION_NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/delete.md b/examples/2.3.x/server-go/examples/postgresql/delete.md new file mode 100644 index 000000000..29d257b53 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.Delete( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-go/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..5b1f0bcb1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/get-backup-policy.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.GetBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/get-backup.md b/examples/2.3.x/server-go/examples/postgresql/get-backup.md new file mode 100644 index 000000000..5cf70c1aa --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/get-backup.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.GetBackup( + "<DATABASE_ID>", + "<BACKUP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/get-pitr.md b/examples/2.3.x/server-go/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..955ada96e --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/get-pitr.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.GetPitr( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/get-pooler.md b/examples/2.3.x/server-go/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..aaff33f99 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/get-pooler.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.GetPooler( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/get-replicas.md b/examples/2.3.x/server-go/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..9e5a2add1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/get-replicas.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.GetReplicas( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/get-restoration.md b/examples/2.3.x/server-go/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..506d82f68 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/get-restoration.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.GetRestoration( + "<DATABASE_ID>", + "<RESTORATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/get-status.md b/examples/2.3.x/server-go/examples/postgresql/get-status.md new file mode 100644 index 000000000..73e5026aa --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/get-status.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.GetStatus( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/get.md b/examples/2.3.x/server-go/examples/postgresql/get.md new file mode 100644 index 000000000..e04cdb26d --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.Get( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-go/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..05eafb5d1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/list-backup-policies.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.ListBackupPolicies( + "<DATABASE_ID>", + service.WithListBackupPoliciesQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/list-backups.md b/examples/2.3.x/server-go/examples/postgresql/list-backups.md new file mode 100644 index 000000000..bbfdd8852 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/list-backups.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.ListBackups( + "<DATABASE_ID>", + service.WithListBackupsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/list-branches.md b/examples/2.3.x/server-go/examples/postgresql/list-branches.md new file mode 100644 index 000000000..5663a00ba --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/list-branches.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.ListBranches( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/list-extensions.md b/examples/2.3.x/server-go/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..0bb171c0c --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/list-extensions.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.ListExtensions( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/list-operations.md b/examples/2.3.x/server-go/examples/postgresql/list-operations.md new file mode 100644 index 000000000..6305f28fb --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/list-operations.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.ListOperations( + "<DATABASE_ID>", + service.WithListOperationsStatus("queued"), + service.WithListOperationsLimit(1), + service.WithListOperationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/list-restorations.md b/examples/2.3.x/server-go/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..637e39a9f --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/list-restorations.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.ListRestorations( + "<DATABASE_ID>", + service.WithListRestorationsStatus("pending"), + service.WithListRestorationsType("backup"), + service.WithListRestorationsLimit(1), + service.WithListRestorationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/list-specifications.md b/examples/2.3.x/server-go/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..02d8dceba --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/list-specifications.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.ListSpecifications() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/list.md b/examples/2.3.x/server-go/examples/postgresql/list.md new file mode 100644 index 000000000..dccdb8435 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/list.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-go/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..c62b5bf12 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/update-backup-policy.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.UpdateBackupPolicy( + "<DATABASE_ID>", + "<POLICY_ID>", + service.WithUpdateBackupPolicyName("<NAME>"), + service.WithUpdateBackupPolicySchedule(""), + service.WithUpdateBackupPolicyRetention(1), + service.WithUpdateBackupPolicyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-go/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..329f67485 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/update-backup-storage.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.UpdateBackupStorage( + "<DATABASE_ID>", + "s3", + "<BUCKET>", + "<ACCESS_KEY>", + "<SECRET_KEY>", + service.WithUpdateBackupStorageRegion("<REGION>"), + service.WithUpdateBackupStoragePrefix("<PREFIX>"), + service.WithUpdateBackupStorageEndpoint("<ENDPOINT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/update-credentials.md b/examples/2.3.x/server-go/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..f04a88a6c --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/update-credentials.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.UpdateCredentials( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-go/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..ec580f037 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/update-maintenance.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/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.UpdateMaintenance( + "<DATABASE_ID>", + "sun", + 0, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/update-pooler.md b/examples/2.3.x/server-go/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..a25204e8e --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/update-pooler.md @@ -0,0 +1,33 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.UpdatePooler( + "<DATABASE_ID>", + service.WithUpdatePoolerMode("transaction"), + service.WithUpdatePoolerMaxConnections(10), + service.WithUpdatePoolerDefaultPoolSize(1), + service.WithUpdatePoolerReadWriteSplitting(false), + service.WithUpdatePoolerPoolerCpuRequest("<POOLER_CPU_REQUEST>"), + service.WithUpdatePoolerPoolerCpuLimit("<POOLER_CPU_LIMIT>"), + service.WithUpdatePoolerPoolerMemoryRequest("<POOLER_MEMORY_REQUEST>"), + service.WithUpdatePoolerPoolerMemoryLimit("<POOLER_MEMORY_LIMIT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/postgresql/update.md b/examples/2.3.x/server-go/examples/postgresql/update.md new file mode 100644 index 000000000..cd03ba482 --- /dev/null +++ b/examples/2.3.x/server-go/examples/postgresql/update.md @@ -0,0 +1,45 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/postgresql" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := postgresql.New(client) + + response, err := service.Update( + "<DATABASE_ID>", + service.WithUpdateName("<NAME>"), + service.WithUpdateStatus("ready"), + service.WithUpdateSpecification("<SPECIFICATION>"), + service.WithUpdateReplicas(0), + service.WithUpdateSyncMode("async"), + service.WithUpdateNetworkIdleTimeoutSeconds(60), + service.WithUpdateNetworkIPAllowlist([]string{"example"}), + service.WithUpdateIdleTimeoutMinutes(5), + service.WithUpdatePitr(false), + service.WithUpdatePitrRetentionDays(1), + service.WithUpdateStorageAutoscaling(false), + service.WithUpdateStorageAutoscalingThresholdPercent(50), + service.WithUpdateStorageAutoscalingMaxGb(0), + service.WithUpdateMetricsTraceSampleRate(0), + service.WithUpdateMetricsSlowQueryLogThresholdMs(0), + service.WithUpdateSqlApiEnabled(false), + service.WithUpdateSqlApiAllowedStatements([]string{"example"}), + service.WithUpdateSqlApiMaxRows(1), + service.WithUpdateSqlApiMaxBytes(1024), + service.WithUpdateSqlApiTimeoutSeconds(1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/presences/delete.md b/examples/2.3.x/server-go/examples/presences/delete.md new file mode 100644 index 000000000..4b5472782 --- /dev/null +++ b/examples/2.3.x/server-go/examples/presences/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/presences" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := presences.New(client) + + response, err := service.Delete( + "<PRESENCE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/presences/get.md b/examples/2.3.x/server-go/examples/presences/get.md new file mode 100644 index 000000000..d13ba6942 --- /dev/null +++ b/examples/2.3.x/server-go/examples/presences/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/presences" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := presences.New(client) + + response, err := service.Get( + "<PRESENCE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/presences/list.md b/examples/2.3.x/server-go/examples/presences/list.md new file mode 100644 index 000000000..2add5fbfe --- /dev/null +++ b/examples/2.3.x/server-go/examples/presences/list.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/presences" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := presences.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListTotal(false), + service.WithListTtl(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/presences/update.md b/examples/2.3.x/server-go/examples/presences/update.md new file mode 100644 index 000000000..05a305c2b --- /dev/null +++ b/examples/2.3.x/server-go/examples/presences/update.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/presences" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := presences.New(client) + + response, err := service.Update( + "<PRESENCE_ID>", + "<USER_ID>", + service.WithUpdateStatus("<STATUS>"), + service.WithUpdateExpiresAt("2020-10-15T06:38:00.000+00:00"), + service.WithUpdateMetadata([]interface{}{}), + service.WithUpdatePermissions([]string{"read(\"any\")"}), + service.WithUpdatePurge(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/presences/upsert.md b/examples/2.3.x/server-go/examples/presences/upsert.md new file mode 100644 index 000000000..f940d638d --- /dev/null +++ b/examples/2.3.x/server-go/examples/presences/upsert.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/presences" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := presences.New(client) + + response, err := service.Upsert( + "<PRESENCE_ID>", + "<USER_ID>", + "<STATUS>", + service.WithUpsertPermissions([]string{"read(\"any\")"}), + service.WithUpsertExpiresAt("2020-10-15T06:38:00.000+00:00"), + service.WithUpsertMetadata([]interface{}{}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/create-android-platform.md b/examples/2.3.x/server-go/examples/project/create-android-platform.md new file mode 100644 index 000000000..d2f9971e5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-android-platform.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.CreateAndroidPlatform( + "<PLATFORM_ID>", + "<NAME>", + "<APPLICATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/create-apple-platform.md b/examples/2.3.x/server-go/examples/project/create-apple-platform.md new file mode 100644 index 000000000..b0a3f42c6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-apple-platform.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.CreateApplePlatform( + "<PLATFORM_ID>", + "<NAME>", + "<BUNDLE_IDENTIFIER>", + ) + 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 new file mode 100644 index 000000000..0ee5d7ce3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-ephemeral-key.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/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.CreateEphemeralKey( + []string{"example"}, + 600, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/create-linux-platform.md b/examples/2.3.x/server-go/examples/project/create-linux-platform.md new file mode 100644 index 000000000..94ab90bc7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-linux-platform.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.CreateLinuxPlatform( + "<PLATFORM_ID>", + "<NAME>", + "<PACKAGE_NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/create-mock-phone.md b/examples/2.3.x/server-go/examples/project/create-mock-phone.md new file mode 100644 index 000000000..5367c33bc --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-mock-phone.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/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.CreateMockPhone( + "+12065550100", + "<OTP>", + ) + 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 new file mode 100644 index 000000000..9c3965275 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-smtp-test.md @@ -0,0 +1,25 @@ +```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.CreateSMTPTest( + []string{"example"}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/create-variable.md b/examples/2.3.x/server-go/examples/project/create-variable.md new file mode 100644 index 000000000..1c576989c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-variable.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/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.CreateVariable( + "<VARIABLE_ID>", + "<KEY>", + "<VALUE>", + service.WithCreateVariableSecret(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/create-web-platform.md b/examples/2.3.x/server-go/examples/project/create-web-platform.md new file mode 100644 index 000000000..f7f817566 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-web-platform.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.CreateWebPlatform( + "<PLATFORM_ID>", + "<NAME>", + "app.example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/create-windows-platform.md b/examples/2.3.x/server-go/examples/project/create-windows-platform.md new file mode 100644 index 000000000..88985b53b --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/create-windows-platform.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.CreateWindowsPlatform( + "<PLATFORM_ID>", + "<NAME>", + "<PACKAGE_IDENTIFIER_NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/delete-key.md b/examples/2.3.x/server-go/examples/project/delete-key.md new file mode 100644 index 000000000..92005dce7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/delete-key.md @@ -0,0 +1,25 @@ +```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.DeleteKey( + "<KEY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/delete-mock-phone.md b/examples/2.3.x/server-go/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..c68036af1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/delete-mock-phone.md @@ -0,0 +1,25 @@ +```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.DeleteMockPhone( + "+12065550100", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/delete-platform.md b/examples/2.3.x/server-go/examples/project/delete-platform.md new file mode 100644 index 000000000..2670d2404 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/delete-platform.md @@ -0,0 +1,25 @@ +```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.DeletePlatform( + "<PLATFORM_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/delete-variable.md b/examples/2.3.x/server-go/examples/project/delete-variable.md new file mode 100644 index 000000000..30455b7f3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/delete-variable.md @@ -0,0 +1,25 @@ +```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.DeleteVariable( + "<VARIABLE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/delete.md b/examples/2.3.x/server-go/examples/project/delete.md new file mode 100644 index 000000000..e5488b6bf --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/delete.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/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.Delete() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/get-email-template.md b/examples/2.3.x/server-go/examples/project/get-email-template.md new file mode 100644 index 000000000..084eeeea7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/get-email-template.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/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.GetEmailTemplate( + "verification", + service.WithGetEmailTemplateLocale("af"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/get-key.md b/examples/2.3.x/server-go/examples/project/get-key.md new file mode 100644 index 000000000..1f1aaf529 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/get-key.md @@ -0,0 +1,25 @@ +```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.GetKey( + "<KEY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/get-mock-phone.md b/examples/2.3.x/server-go/examples/project/get-mock-phone.md new file mode 100644 index 000000000..8fea6f6e9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/get-mock-phone.md @@ -0,0 +1,25 @@ +```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.GetMockPhone( + "+12065550100", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-go/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..470957afd --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,25 @@ +```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.GetOAuth2Provider( + "amazon", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/get-platform.md b/examples/2.3.x/server-go/examples/project/get-platform.md new file mode 100644 index 000000000..d890fa70d --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/get-platform.md @@ -0,0 +1,25 @@ +```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.GetPlatform( + "<PLATFORM_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/get-policy.md b/examples/2.3.x/server-go/examples/project/get-policy.md new file mode 100644 index 000000000..b3b029f74 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/get-policy.md @@ -0,0 +1,25 @@ +```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.GetPolicy( + "password-dictionary", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/get-variable.md b/examples/2.3.x/server-go/examples/project/get-variable.md new file mode 100644 index 000000000..56fdc779f --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/get-variable.md @@ -0,0 +1,25 @@ +```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.GetVariable( + "<VARIABLE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/get.md b/examples/2.3.x/server-go/examples/project/get.md new file mode 100644 index 000000000..3a44e2e08 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/get.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/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.Get() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/list-email-templates.md b/examples/2.3.x/server-go/examples/project/list-email-templates.md new file mode 100644 index 000000000..9138b5a4d --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/list-email-templates.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/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.ListEmailTemplates( + service.WithListEmailTemplatesQueries([]string{"example"}), + service.WithListEmailTemplatesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/list-keys.md b/examples/2.3.x/server-go/examples/project/list-keys.md new file mode 100644 index 000000000..060738bcf --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/list-keys.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/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.ListKeys( + service.WithListKeysQueries([]string{"example"}), + service.WithListKeysTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/list-mock-phones.md b/examples/2.3.x/server-go/examples/project/list-mock-phones.md new file mode 100644 index 000000000..871471407 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/list-mock-phones.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/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.ListMockPhones( + service.WithListMockPhonesQueries([]string{"example"}), + service.WithListMockPhonesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-go/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..51ef22aef --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/list-o-auth-2-providers.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/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.ListOAuth2Providers( + service.WithListOAuth2ProvidersQueries([]string{"example"}), + service.WithListOAuth2ProvidersTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/list-platforms.md b/examples/2.3.x/server-go/examples/project/list-platforms.md new file mode 100644 index 000000000..66ddd0589 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/list-platforms.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/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.ListPlatforms( + service.WithListPlatformsQueries([]string{"example"}), + service.WithListPlatformsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/list-policies.md b/examples/2.3.x/server-go/examples/project/list-policies.md new file mode 100644 index 000000000..cc5cf4e48 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/list-policies.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/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.ListPolicies( + service.WithListPoliciesQueries([]string{"example"}), + service.WithListPoliciesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/list-variables.md b/examples/2.3.x/server-go/examples/project/list-variables.md new file mode 100644 index 000000000..21110355e --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/list-variables.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/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.ListVariables( + service.WithListVariablesQueries([]string{"example"}), + service.WithListVariablesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-android-platform.md b/examples/2.3.x/server-go/examples/project/update-android-platform.md new file mode 100644 index 000000000..26d5b4fde --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-android-platform.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.UpdateAndroidPlatform( + "<PLATFORM_ID>", + "<NAME>", + "<APPLICATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-apple-platform.md b/examples/2.3.x/server-go/examples/project/update-apple-platform.md new file mode 100644 index 000000000..b695a216e --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-apple-platform.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.UpdateApplePlatform( + "<PLATFORM_ID>", + "<NAME>", + "<BUNDLE_IDENTIFIER>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-auth-method.md b/examples/2.3.x/server-go/examples/project/update-auth-method.md new file mode 100644 index 000000000..829f9ec42 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-auth-method.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/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.UpdateAuthMethod( + "email-password", + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-go/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..62c3f432e --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,25 @@ +```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.UpdateDenyAliasedEmailPolicy( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-go/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..48c2b455b --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,25 @@ +```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.UpdateDenyCorporateEmailPolicy( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-go/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..ef226ae92 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,25 @@ +```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.UpdateDenyDisposableEmailPolicy( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-go/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..352a9a90c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,25 @@ +```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.UpdateDenyFreeEmailPolicy( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-email-template.md b/examples/2.3.x/server-go/examples/project/update-email-template.md new file mode 100644 index 000000000..9fe7a4f91 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-email-template.md @@ -0,0 +1,32 @@ +```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.UpdateEmailTemplate( + "verification", + service.WithUpdateEmailTemplateLocale("af"), + service.WithUpdateEmailTemplateSubject("<SUBJECT>"), + service.WithUpdateEmailTemplateMessage("<MESSAGE>"), + service.WithUpdateEmailTemplateSenderName("<SENDER_NAME>"), + service.WithUpdateEmailTemplateSenderEmail("email@example.com"), + service.WithUpdateEmailTemplateReplyToEmail("email@example.com"), + service.WithUpdateEmailTemplateReplyToName("<REPLY_TO_NAME>"), + ) + 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 new file mode 100644 index 000000000..53c120533 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-key.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/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.UpdateKey( + "<KEY_ID>", + "<NAME>", + []string{"example"}, + 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 new file mode 100644 index 000000000..4bf910b03 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-labels.md @@ -0,0 +1,25 @@ +```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.UpdateLabels( + []string{"example"}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-linux-platform.md b/examples/2.3.x/server-go/examples/project/update-linux-platform.md new file mode 100644 index 000000000..3b5c5bcbc --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-linux-platform.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.UpdateLinuxPlatform( + "<PLATFORM_ID>", + "<NAME>", + "<PACKAGE_NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-go/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..d441a06a7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,30 @@ +```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.UpdateMembershipPrivacyPolicy( + service.WithUpdateMembershipPrivacyPolicyUserId(false), + service.WithUpdateMembershipPrivacyPolicyUserEmail(false), + service.WithUpdateMembershipPrivacyPolicyUserPhone(false), + service.WithUpdateMembershipPrivacyPolicyUserName(false), + service.WithUpdateMembershipPrivacyPolicyUserMFA(false), + service.WithUpdateMembershipPrivacyPolicyUserAccessedAt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-go/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..6004d4985 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-mfa-factors-policy.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/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.UpdateMFAFactorsPolicy( + service.WithUpdateMFAFactorsPolicyTotp(false), + service.WithUpdateMFAFactorsPolicyEmail(false), + service.WithUpdateMFAFactorsPolicyPhone(false), + service.WithUpdateMFAFactorsPolicyCustom(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-mock-phone.md b/examples/2.3.x/server-go/examples/project/update-mock-phone.md new file mode 100644 index 000000000..e570e6cff --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-mock-phone.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/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.UpdateMockPhone( + "+12065550100", + "<OTP>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..879660c56 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-amazon.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.UpdateOAuth2Amazon( + service.WithUpdateOAuth2AmazonClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2AmazonClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2AmazonEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-apple.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..cba0c091e --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,31 @@ +```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.UpdateOAuth2Apple( + service.WithUpdateOAuth2AppleServiceId("<SERVICE_ID>"), + service.WithUpdateOAuth2AppleKeyId("<KEY_ID>"), + service.WithUpdateOAuth2AppleTeamId("<TEAM_ID>"), + service.WithUpdateOAuth2AppleP8File("<P8_FILE>"), + service.WithUpdateOAuth2AppleNativeClientIds([]string{"example"}), + service.WithUpdateOAuth2AppleEnabled(false), + service.WithUpdateOAuth2AppleNativeEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..e0d0cd677 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-appwrite.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.UpdateOAuth2Appwrite( + service.WithUpdateOAuth2AppwriteClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2AppwriteClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2AppwriteEnabled(false), + ) + 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 new file mode 100644 index 000000000..1b423dd3d --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-auth-0.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/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.UpdateOAuth2Auth0( + service.WithUpdateOAuth2Auth0ClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2Auth0ClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2Auth0Endpoint("<ENDPOINT>"), + service.WithUpdateOAuth2Auth0Enabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..3321c537c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-authentik.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/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.UpdateOAuth2Authentik( + service.WithUpdateOAuth2AuthentikClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2AuthentikClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2AuthentikEndpoint("<ENDPOINT>"), + service.WithUpdateOAuth2AuthentikEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..a544c3caa --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-autodesk.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.UpdateOAuth2Autodesk( + service.WithUpdateOAuth2AutodeskClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2AutodeskClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2AutodeskEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-bitbucket.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..7b5fd41a7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-bitbucket.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.UpdateOAuth2Bitbucket( + service.WithUpdateOAuth2BitbucketKey("<KEY>"), + service.WithUpdateOAuth2BitbucketSecret("<SECRET>"), + service.WithUpdateOAuth2BitbucketEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..7ea359705 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-bitly.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.UpdateOAuth2Bitly( + service.WithUpdateOAuth2BitlyClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2BitlyClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2BitlyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-box.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..2aae95289 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-box.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.UpdateOAuth2Box( + service.WithUpdateOAuth2BoxClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2BoxClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2BoxEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-cloudflare.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..629d6e472 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-cloudflare.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.UpdateOAuth2Cloudflare( + service.WithUpdateOAuth2CloudflareClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2CloudflareClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2CloudflareEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-dailymotion.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..cd65d7e10 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-dailymotion.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.UpdateOAuth2Dailymotion( + service.WithUpdateOAuth2DailymotionApiKey("<API_KEY>"), + service.WithUpdateOAuth2DailymotionApiSecret("<API_SECRET>"), + service.WithUpdateOAuth2DailymotionEnabled(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 new file mode 100644 index 000000000..de4dffc80 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-discord.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.UpdateOAuth2Discord( + service.WithUpdateOAuth2DiscordClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2DiscordClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2DiscordEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-disqus.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..792e69fc1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-disqus.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.UpdateOAuth2Disqus( + service.WithUpdateOAuth2DisqusPublicKey("<PUBLIC_KEY>"), + service.WithUpdateOAuth2DisqusSecretKey("<SECRET_KEY>"), + service.WithUpdateOAuth2DisqusEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..4fb43e2da --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-dropbox.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.UpdateOAuth2Dropbox( + service.WithUpdateOAuth2DropboxAppKey("<APP_KEY>"), + service.WithUpdateOAuth2DropboxAppSecret("<APP_SECRET>"), + service.WithUpdateOAuth2DropboxEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..d75aeb7ff --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-etsy.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.UpdateOAuth2Etsy( + service.WithUpdateOAuth2EtsyKeyString("<KEY_STRING>"), + service.WithUpdateOAuth2EtsySharedSecret("<SHARED_SECRET>"), + service.WithUpdateOAuth2EtsyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..fffc014d6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-facebook.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.UpdateOAuth2Facebook( + service.WithUpdateOAuth2FacebookAppId("<APP_ID>"), + service.WithUpdateOAuth2FacebookAppSecret("<APP_SECRET>"), + service.WithUpdateOAuth2FacebookEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..ab70f29da --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-figma.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.UpdateOAuth2Figma( + service.WithUpdateOAuth2FigmaClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2FigmaClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2FigmaEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-fusion-auth.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..4b3fc9200 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-fusion-auth.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/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.UpdateOAuth2FusionAuth( + service.WithUpdateOAuth2FusionAuthClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2FusionAuthClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2FusionAuthEndpoint("<ENDPOINT>"), + service.WithUpdateOAuth2FusionAuthEnabled(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 new file mode 100644 index 000000000..19475e4b6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-git-hub.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.UpdateOAuth2GitHub( + service.WithUpdateOAuth2GitHubClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2GitHubClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2GitHubEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-gitlab.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..51c87da0a --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-gitlab.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/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.UpdateOAuth2Gitlab( + service.WithUpdateOAuth2GitlabApplicationId("<APPLICATION_ID>"), + service.WithUpdateOAuth2GitlabSecret("<SECRET>"), + service.WithUpdateOAuth2GitlabEndpoint("https://example.com"), + service.WithUpdateOAuth2GitlabEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..aeb0e60f5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-google.md @@ -0,0 +1,30 @@ +```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.UpdateOAuth2Google( + service.WithUpdateOAuth2GoogleClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2GoogleClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2GooglePrompt([]string{"example"}), + service.WithUpdateOAuth2GoogleNativeClientIds([]string{"example"}), + service.WithUpdateOAuth2GoogleEnabled(false), + service.WithUpdateOAuth2GoogleNativeEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..642159677 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-hugging-face.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.UpdateOAuth2HuggingFace( + service.WithUpdateOAuth2HuggingFaceClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2HuggingFaceClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2HuggingFaceEnabled(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 new file mode 100644 index 000000000..5979e6dfa --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-kakao.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.UpdateOAuth2Kakao( + service.WithUpdateOAuth2KakaoClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2KakaoClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2KakaoEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-keycloak.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..8c878bf7f --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,29 @@ +```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.UpdateOAuth2Keycloak( + service.WithUpdateOAuth2KeycloakClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2KeycloakClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2KeycloakEndpoint("<ENDPOINT>"), + service.WithUpdateOAuth2KeycloakRealmName("<REALM_NAME>"), + service.WithUpdateOAuth2KeycloakEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..87e733462 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-kick.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.UpdateOAuth2Kick( + service.WithUpdateOAuth2KickClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2KickClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2KickEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-linkedin.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..21bde3538 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-linkedin.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.UpdateOAuth2Linkedin( + service.WithUpdateOAuth2LinkedinClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2LinkedinPrimaryClientSecret("<PRIMARY_CLIENT_SECRET>"), + service.WithUpdateOAuth2LinkedinEnabled(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 new file mode 100644 index 000000000..3a6606aa6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-microsoft.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/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.UpdateOAuth2Microsoft( + service.WithUpdateOAuth2MicrosoftApplicationId("<APPLICATION_ID>"), + service.WithUpdateOAuth2MicrosoftApplicationSecret("<APPLICATION_SECRET>"), + service.WithUpdateOAuth2MicrosoftTenant("<TENANT>"), + service.WithUpdateOAuth2MicrosoftEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..bf6e0ae88 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-notion.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.UpdateOAuth2Notion( + service.WithUpdateOAuth2NotionOauthClientId("<OAUTH_CLIENT_ID>"), + service.WithUpdateOAuth2NotionOauthClientSecret("<OAUTH_CLIENT_SECRET>"), + service.WithUpdateOAuth2NotionEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..4642dc353 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,33 @@ +```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.UpdateOAuth2Oidc( + service.WithUpdateOAuth2OidcClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2OidcClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2OidcWellKnownURL("https://example.com"), + service.WithUpdateOAuth2OidcAuthorizationURL("https://example.com"), + service.WithUpdateOAuth2OidcTokenURL("https://example.com"), + service.WithUpdateOAuth2OidcUserInfoURL("https://example.com"), + service.WithUpdateOAuth2OidcPrompt([]string{"example"}), + service.WithUpdateOAuth2OidcMaxAge(0), + service.WithUpdateOAuth2OidcEnabled(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 new file mode 100644 index 000000000..187e372f9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,29 @@ +```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.UpdateOAuth2Okta( + service.WithUpdateOAuth2OktaClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2OktaClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2OktaDomain("example.com"), + service.WithUpdateOAuth2OktaAuthorizationServerId("<AUTHORIZATION_SERVER_ID>"), + service.WithUpdateOAuth2OktaEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..3aa251f0f --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-paypal-sandbox.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.UpdateOAuth2PaypalSandbox( + service.WithUpdateOAuth2PaypalSandboxClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2PaypalSandboxSecretKey("<SECRET_KEY>"), + service.WithUpdateOAuth2PaypalSandboxEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..08c57ce59 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-paypal.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.UpdateOAuth2Paypal( + service.WithUpdateOAuth2PaypalClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2PaypalSecretKey("<SECRET_KEY>"), + service.WithUpdateOAuth2PaypalEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..fa92cc056 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-podio.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.UpdateOAuth2Podio( + service.WithUpdateOAuth2PodioClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2PodioClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2PodioEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-resend.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..a709ac6a7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-resend.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.UpdateOAuth2Resend( + service.WithUpdateOAuth2ResendClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2ResendClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2ResendEnabled(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 new file mode 100644 index 000000000..7777013b3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-salesforce.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.UpdateOAuth2Salesforce( + service.WithUpdateOAuth2SalesforceCustomerKey("<CUSTOMER_KEY>"), + service.WithUpdateOAuth2SalesforceCustomerSecret("<CUSTOMER_SECRET>"), + service.WithUpdateOAuth2SalesforceEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..508d48a89 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-server.md @@ -0,0 +1,40 @@ +```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.UpdateOAuth2Server( + false, + "https://example.com", + service.WithUpdateOAuth2ServerScopes([]string{"example"}), + service.WithUpdateOAuth2ServerAuthorizationDetailsTypes([]string{"example"}), + service.WithUpdateOAuth2ServerAccessTokenDuration(60), + service.WithUpdateOAuth2ServerRefreshTokenDuration(60), + service.WithUpdateOAuth2ServerPublicAccessTokenDuration(60), + service.WithUpdateOAuth2ServerPublicRefreshTokenDuration(60), + service.WithUpdateOAuth2ServerInstallationAccessTokenDuration(60), + service.WithUpdateOAuth2ServerConfidentialPkce(false), + service.WithUpdateOAuth2ServerVerificationUrl("https://example.com"), + service.WithUpdateOAuth2ServerUserCodeLength(6), + service.WithUpdateOAuth2ServerUserCodeFormat("numeric"), + service.WithUpdateOAuth2ServerDeviceCodeDuration(60), + service.WithUpdateOAuth2ServerDefaultScopes([]string{"example"}), + service.WithUpdateOAuth2ServerInstallationScopes([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..b2396733e --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-slack.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.UpdateOAuth2Slack( + service.WithUpdateOAuth2SlackClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2SlackClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2SlackEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-spotify.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..47922dc0a --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-spotify.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.UpdateOAuth2Spotify( + service.WithUpdateOAuth2SpotifyClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2SpotifyClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2SpotifyEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-stripe.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..ed70854d7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-stripe.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.UpdateOAuth2Stripe( + service.WithUpdateOAuth2StripeClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2StripeApiSecretKey("<API_SECRET_KEY>"), + service.WithUpdateOAuth2StripeEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..f5d25d0c1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-tik-tok.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.UpdateOAuth2TikTok( + service.WithUpdateOAuth2TikTokClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2TikTokClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2TikTokEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-tradeshift-sandbox.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..01faf175b --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-tradeshift-sandbox.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.UpdateOAuth2TradeshiftSandbox( + service.WithUpdateOAuth2TradeshiftSandboxOauth2ClientId("<OAUTH2_CLIENT_ID>"), + service.WithUpdateOAuth2TradeshiftSandboxOauth2ClientSecret("<OAUTH2_CLIENT_SECRET>"), + service.WithUpdateOAuth2TradeshiftSandboxEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..ccfb72df0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-tradeshift.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.UpdateOAuth2Tradeshift( + service.WithUpdateOAuth2TradeshiftOauth2ClientId("<OAUTH2_CLIENT_ID>"), + service.WithUpdateOAuth2TradeshiftOauth2ClientSecret("<OAUTH2_CLIENT_SECRET>"), + service.WithUpdateOAuth2TradeshiftEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..4bf617cdb --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-twitch.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.UpdateOAuth2Twitch( + service.WithUpdateOAuth2TwitchClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2TwitchClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2TwitchEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-word-press.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..022aee542 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-word-press.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.UpdateOAuth2WordPress( + service.WithUpdateOAuth2WordPressClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2WordPressClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2WordPressEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-yahoo.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..0df346be6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-yahoo.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.UpdateOAuth2Yahoo( + service.WithUpdateOAuth2YahooClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2YahooClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2YahooEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-yandex.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..84ab65d7c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-yandex.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.UpdateOAuth2Yandex( + service.WithUpdateOAuth2YandexClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2YandexClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2YandexEnabled(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 new file mode 100644 index 000000000..4c4991006 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-zoho.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.UpdateOAuth2Zoho( + service.WithUpdateOAuth2ZohoClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2ZohoClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2ZohoEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-zoom.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..c7a154c8c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-zoom.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.UpdateOAuth2Zoom( + service.WithUpdateOAuth2ZoomClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2ZoomClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2ZoomEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2x.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..510530a5c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2x.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.UpdateOAuth2X( + service.WithUpdateOAuth2XCustomerKey("<CUSTOMER_KEY>"), + service.WithUpdateOAuth2XSecretKey("<SECRET_KEY>"), + service.WithUpdateOAuth2XEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-go/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..b65a1fa99 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,25 @@ +```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.UpdatePasswordDictionaryPolicy( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-password-history-policy.md b/examples/2.3.x/server-go/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..17afe8e6f --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-password-history-policy.md @@ -0,0 +1,25 @@ +```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.UpdatePasswordHistoryPolicy( + 1, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-go/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..659f91a3f --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,25 @@ +```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.UpdatePasswordPersonalDataPolicy( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-go/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..171d3d89d --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-password-pwned-policy.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.UpdatePasswordPwnedPolicy( + service.WithUpdatePasswordPwnedPolicyEnabled(false), + service.WithUpdatePasswordPwnedPolicySessions(false), + service.WithUpdatePasswordPwnedPolicyUsers(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-go/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..2e400c013 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-password-strength-policy.md @@ -0,0 +1,29 @@ +```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.UpdatePasswordStrengthPolicy( + service.WithUpdatePasswordStrengthPolicyMin(8), + service.WithUpdatePasswordStrengthPolicyUppercase(false), + service.WithUpdatePasswordStrengthPolicyLowercase(false), + service.WithUpdatePasswordStrengthPolicyNumber(false), + service.WithUpdatePasswordStrengthPolicySymbols(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-protocol.md b/examples/2.3.x/server-go/examples/project/update-protocol.md new file mode 100644 index 000000000..c20ca08bd --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-protocol.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/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.UpdateProtocol( + "rest", + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-service.md b/examples/2.3.x/server-go/examples/project/update-service.md new file mode 100644 index 000000000..f3e7fa5f4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-service.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/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.UpdateService( + "account", + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-go/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..5978f6e80 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-session-alert-policy.md @@ -0,0 +1,25 @@ +```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.UpdateSessionAlertPolicy( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-go/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..8f3922426 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-session-duration-policy.md @@ -0,0 +1,25 @@ +```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.UpdateSessionDurationPolicy( + 60, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-go/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..b8850fcf6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,25 @@ +```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.UpdateSessionInvalidationPolicy( + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-go/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..19faec05c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-session-limit-policy.md @@ -0,0 +1,25 @@ +```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.UpdateSessionLimitPolicy( + 1, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-smtp.md b/examples/2.3.x/server-go/examples/project/update-smtp.md new file mode 100644 index 000000000..9cd589edc --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-smtp.md @@ -0,0 +1,34 @@ +```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.UpdateSMTP( + service.WithUpdateSMTPHost("example.com"), + service.WithUpdateSMTPPort(587), + service.WithUpdateSMTPUsername("<USERNAME>"), + service.WithUpdateSMTPPassword("password"), + service.WithUpdateSMTPSenderEmail("email@example.com"), + service.WithUpdateSMTPSenderName("<SENDER_NAME>"), + service.WithUpdateSMTPReplyToEmail("email@example.com"), + service.WithUpdateSMTPReplyToName("<REPLY_TO_NAME>"), + service.WithUpdateSMTPSecure("tls"), + service.WithUpdateSMTPEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-go/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..78b81761f --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-user-limit-policy.md @@ -0,0 +1,25 @@ +```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.UpdateUserLimitPolicy( + 0, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-variable.md b/examples/2.3.x/server-go/examples/project/update-variable.md new file mode 100644 index 000000000..10fb739c9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-variable.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/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.UpdateVariable( + "<VARIABLE_ID>", + service.WithUpdateVariableKey("<KEY>"), + service.WithUpdateVariableValue("<VALUE>"), + service.WithUpdateVariableSecret(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-web-platform.md b/examples/2.3.x/server-go/examples/project/update-web-platform.md new file mode 100644 index 000000000..7f5854f7c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-web-platform.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.UpdateWebPlatform( + "<PLATFORM_ID>", + "<NAME>", + "app.example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-windows-platform.md b/examples/2.3.x/server-go/examples/project/update-windows-platform.md new file mode 100644 index 000000000..e91cc078c --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-windows-platform.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.UpdateWindowsPlatform( + "<PLATFORM_ID>", + "<NAME>", + "<PACKAGE_IDENTIFIER_NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/create-api-rule.md b/examples/2.3.x/server-go/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..5934665d2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/create-api-rule.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.CreateAPIRule( + "example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/create-function-rule.md b/examples/2.3.x/server-go/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..9662801d4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/create-function-rule.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/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.CreateFunctionRule( + "example.com", + "<FUNCTION_ID>", + service.WithCreateFunctionRuleBranch("<BRANCH>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/create-invalidation.md b/examples/2.3.x/server-go/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..50f22af52 --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/create-invalidation.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/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.CreateInvalidation( + "example.com", + "tag", + service.WithCreateInvalidationReference("<REFERENCE>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-go/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..524b42e33 --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/create-redirect-rule.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.CreateRedirectRule( + "example.com", + "https://example.com", + "301", + "<RESOURCE_ID>", + "site", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/create-site-rule.md b/examples/2.3.x/server-go/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..87c602000 --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/create-site-rule.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/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.CreateSiteRule( + "example.com", + "<SITE_ID>", + service.WithCreateSiteRuleBranch("<BRANCH>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/delete-rule.md b/examples/2.3.x/server-go/examples/proxy/delete-rule.md new file mode 100644 index 000000000..7d6b05b0e --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/delete-rule.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.DeleteRule( + "<RULE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/get-rule.md b/examples/2.3.x/server-go/examples/proxy/get-rule.md new file mode 100644 index 000000000..1c07d9c49 --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/get-rule.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.GetRule( + "<RULE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/list-rules.md b/examples/2.3.x/server-go/examples/proxy/list-rules.md new file mode 100644 index 000000000..b8eef7881 --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/list-rules.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/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.ListRules( + service.WithListRulesQueries([]string{"example"}), + service.WithListRulesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/proxy/update-rule-status.md b/examples/2.3.x/server-go/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..8568c3d55 --- /dev/null +++ b/examples/2.3.x/server-go/examples/proxy/update-rule-status.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/proxy" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := proxy.New(client) + + response, err := service.UpdateRuleStatus( + "<RULE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/create-deployment.md b/examples/2.3.x/server-go/examples/sites/create-deployment.md new file mode 100644 index 000000000..3240aa33b --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/create-deployment.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/file" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.CreateDeployment( + "<SITE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + service.WithCreateDeploymentInstallCommand("<INSTALL_COMMAND>"), + service.WithCreateDeploymentBuildCommand("<BUILD_COMMAND>"), + service.WithCreateDeploymentOutputDirectory("<OUTPUT_DIRECTORY>"), + service.WithCreateDeploymentActivate(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-go/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..2c2b65a49 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/create-duplicate-deployment.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.CreateDuplicateDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/create-template-deployment.md b/examples/2.3.x/server-go/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..11efe63c4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/create-template-deployment.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.CreateTemplateDeployment( + "<SITE_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "branch", + "<REFERENCE>", + service.WithCreateTemplateDeploymentActivate(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/create-variable.md b/examples/2.3.x/server-go/examples/sites/create-variable.md new file mode 100644 index 000000000..1f383231a --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/create-variable.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.CreateVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + "<KEY>", + "<VALUE>", + service.WithCreateVariableSecret(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-go/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..69c2991ee --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/create-vcs-deployment.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.CreateVcsDeployment( + "<SITE_ID>", + "branch", + "<REFERENCE>", + service.WithCreateVcsDeploymentActivate(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/create.md b/examples/2.3.x/server-go/examples/sites/create.md new file mode 100644 index 000000000..c667790d3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/create.md @@ -0,0 +1,48 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.Create( + "<SITE_ID>", + "<NAME>", + "analog", + "node-14.5", + service.WithCreateEnabled(false), + service.WithCreateLogging(false), + service.WithCreateTimeout(1), + service.WithCreateInstallCommand("<INSTALL_COMMAND>"), + service.WithCreateBuildCommand("<BUILD_COMMAND>"), + service.WithCreateStartCommand("<START_COMMAND>"), + service.WithCreateOutputDirectory("<OUTPUT_DIRECTORY>"), + service.WithCreateAdapter("static"), + service.WithCreateInstallationId("<INSTALLATION_ID>"), + service.WithCreateFallbackFile("<FALLBACK_FILE>"), + service.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + service.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + service.WithCreateProviderSilentMode(false), + service.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + service.WithCreateProviderBranches([]string{"example"}), + service.WithCreateProviderPaths([]string{"example"}), + service.WithCreateBuildSpecification("s-1vcpu-512mb"), + service.WithCreateRuntimeSpecification("s-1vcpu-512mb"), + service.WithCreateDeploymentRetention(0), + service.WithCreateScopes([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/delete-deployment.md b/examples/2.3.x/server-go/examples/sites/delete-deployment.md new file mode 100644 index 000000000..5ab597a92 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/delete-deployment.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.DeleteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/delete-log.md b/examples/2.3.x/server-go/examples/sites/delete-log.md new file mode 100644 index 000000000..4965612b8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/delete-log.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.DeleteLog( + "<SITE_ID>", + "<LOG_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/delete-variable.md b/examples/2.3.x/server-go/examples/sites/delete-variable.md new file mode 100644 index 000000000..e4e9a3366 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/delete-variable.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.DeleteVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/delete.md b/examples/2.3.x/server-go/examples/sites/delete.md new file mode 100644 index 000000000..c5fe47ff6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.Delete( + "<SITE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/get-deployment-download.md b/examples/2.3.x/server-go/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..7837cdaac --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/get-deployment-download.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.GetDeploymentDownload( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + service.WithGetDeploymentDownloadType("source"), + service.WithGetDeploymentDownloadToken("<TOKEN>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/get-deployment.md b/examples/2.3.x/server-go/examples/sites/get-deployment.md new file mode 100644 index 000000000..234641c65 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/get-deployment.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.GetDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/get-log.md b/examples/2.3.x/server-go/examples/sites/get-log.md new file mode 100644 index 000000000..fe41ce858 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/get-log.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.GetLog( + "<SITE_ID>", + "<LOG_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/get-variable.md b/examples/2.3.x/server-go/examples/sites/get-variable.md new file mode 100644 index 000000000..1cea9e147 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/get-variable.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.GetVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/get.md b/examples/2.3.x/server-go/examples/sites/get.md new file mode 100644 index 000000000..89d052b38 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.Get( + "<SITE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/list-deployments.md b/examples/2.3.x/server-go/examples/sites/list-deployments.md new file mode 100644 index 000000000..89919e38f --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/list-deployments.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.ListDeployments( + "<SITE_ID>", + service.WithListDeploymentsQueries([]string{"example"}), + service.WithListDeploymentsSearch("<SEARCH>"), + service.WithListDeploymentsTotal(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 new file mode 100644 index 000000000..6862114fb --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/list-frameworks.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.ListFrameworks() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/list-logs.md b/examples/2.3.x/server-go/examples/sites/list-logs.md new file mode 100644 index 000000000..8c1941db3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/list-logs.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.ListLogs( + "<SITE_ID>", + service.WithListLogsQueries([]string{"example"}), + service.WithListLogsTotal(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 new file mode 100644 index 000000000..ef95d028f --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/list-specifications.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.ListSpecifications( + service.WithListSpecificationsType("runtimes"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/list-variables.md b/examples/2.3.x/server-go/examples/sites/list-variables.md new file mode 100644 index 000000000..e5dc012ad --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/list-variables.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.ListVariables( + "<SITE_ID>", + service.WithListVariablesQueries([]string{"example"}), + service.WithListVariablesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/list.md b/examples/2.3.x/server-go/examples/sites/list.md new file mode 100644 index 000000000..9b55683cb --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/list.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListSearch("<SEARCH>"), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/update-deployment-status.md b/examples/2.3.x/server-go/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..595b0acec --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/update-deployment-status.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.UpdateDeploymentStatus( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/update-site-deployment.md b/examples/2.3.x/server-go/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..0c68a1c95 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/update-site-deployment.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/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.UpdateSiteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/update-variable.md b/examples/2.3.x/server-go/examples/sites/update-variable.md new file mode 100644 index 000000000..a410102e8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/update-variable.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.UpdateVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + service.WithUpdateVariableKey("<KEY>"), + service.WithUpdateVariableValue("<VALUE>"), + service.WithUpdateVariableSecret(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/sites/update.md b/examples/2.3.x/server-go/examples/sites/update.md new file mode 100644 index 000000000..a37fc5d96 --- /dev/null +++ b/examples/2.3.x/server-go/examples/sites/update.md @@ -0,0 +1,48 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/sites" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := sites.New(client) + + response, err := service.Update( + "<SITE_ID>", + "<NAME>", + "analog", + service.WithUpdateEnabled(false), + service.WithUpdateLogging(false), + service.WithUpdateTimeout(1), + service.WithUpdateInstallCommand("<INSTALL_COMMAND>"), + service.WithUpdateBuildCommand("<BUILD_COMMAND>"), + service.WithUpdateStartCommand("<START_COMMAND>"), + service.WithUpdateOutputDirectory("<OUTPUT_DIRECTORY>"), + service.WithUpdateBuildRuntime("node-14.5"), + service.WithUpdateAdapter("static"), + service.WithUpdateFallbackFile("<FALLBACK_FILE>"), + service.WithUpdateInstallationId("<INSTALLATION_ID>"), + service.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + service.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + service.WithUpdateProviderSilentMode(false), + service.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + service.WithUpdateProviderBranches([]string{"example"}), + service.WithUpdateProviderPaths([]string{"example"}), + service.WithUpdateBuildSpecification("s-1vcpu-512mb"), + service.WithUpdateRuntimeSpecification("s-1vcpu-512mb"), + service.WithUpdateDeploymentRetention(0), + service.WithUpdateScopes([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/create-bucket.md b/examples/2.3.x/server-go/examples/storage/create-bucket.md new file mode 100644 index 000000000..9cb504044 --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/create-bucket.md @@ -0,0 +1,35 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := storage.New(client) + + response, err := service.CreateBucket( + "<BUCKET_ID>", + "<NAME>", + service.WithCreateBucketPermissions([]string{"read(\"any\")"}), + service.WithCreateBucketFileSecurity(false), + service.WithCreateBucketEnabled(false), + service.WithCreateBucketMaximumFileSize(1), + service.WithCreateBucketAllowedFileExtensions([]string{"example"}), + service.WithCreateBucketCompression("none"), + service.WithCreateBucketEncryption(false), + service.WithCreateBucketAntivirus(false), + service.WithCreateBucketTransformations(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/create-file.md b/examples/2.3.x/server-go/examples/storage/create-file.md new file mode 100644 index 000000000..1afe79e4f --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/create-file.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/file" + "github.com/appwrite/sdk-for-go/v7/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := storage.New(client) + + response, err := service.CreateFile( + "<BUCKET_ID>", + "<FILE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + service.WithCreateFilePermissions([]string{"read(\"any\")"}), + service.WithCreateFileFolder("photos/2026"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/delete-bucket.md b/examples/2.3.x/server-go/examples/storage/delete-bucket.md new file mode 100644 index 000000000..2e0b8ea2a --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/delete-bucket.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := storage.New(client) + + response, err := service.DeleteBucket( + "<BUCKET_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/delete-file.md b/examples/2.3.x/server-go/examples/storage/delete-file.md new file mode 100644 index 000000000..5d672aeb3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/delete-file.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/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := storage.New(client) + + response, err := service.DeleteFile( + "<BUCKET_ID>", + "<FILE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/get-bucket.md b/examples/2.3.x/server-go/examples/storage/get-bucket.md new file mode 100644 index 000000000..d857aafd0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/get-bucket.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := storage.New(client) + + response, err := service.GetBucket( + "<BUCKET_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/get-file-download.md b/examples/2.3.x/server-go/examples/storage/get-file-download.md new file mode 100644 index 000000000..abf61068d --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/get-file-download.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/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := storage.New(client) + + response, err := service.GetFileDownload( + "<BUCKET_ID>", + "<FILE_ID>", + service.WithGetFileDownloadToken("<TOKEN>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/get-file-preview.md b/examples/2.3.x/server-go/examples/storage/get-file-preview.md new file mode 100644 index 000000000..2b7a583f0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/get-file-preview.md @@ -0,0 +1,38 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := storage.New(client) + + response, err := service.GetFilePreview( + "<BUCKET_ID>", + "<FILE_ID>", + service.WithGetFilePreviewWidth(0), + service.WithGetFilePreviewHeight(0), + service.WithGetFilePreviewGravity("auto"), + service.WithGetFilePreviewQuality(-1), + service.WithGetFilePreviewBorderWidth(0), + service.WithGetFilePreviewBorderColor("FFFFFF"), + service.WithGetFilePreviewBorderRadius(0), + service.WithGetFilePreviewOpacity(0), + service.WithGetFilePreviewRotation(-360), + service.WithGetFilePreviewBackground("FFFFFF"), + service.WithGetFilePreviewOutput("jpg"), + service.WithGetFilePreviewToken("<TOKEN>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/get-file-view.md b/examples/2.3.x/server-go/examples/storage/get-file-view.md new file mode 100644 index 000000000..18a8dbf18 --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/get-file-view.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/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := storage.New(client) + + response, err := service.GetFileView( + "<BUCKET_ID>", + "<FILE_ID>", + service.WithGetFileViewToken("<TOKEN>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/get-file.md b/examples/2.3.x/server-go/examples/storage/get-file.md new file mode 100644 index 000000000..148543b31 --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/get-file.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/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := storage.New(client) + + response, err := service.GetFile( + "<BUCKET_ID>", + "<FILE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/list-buckets.md b/examples/2.3.x/server-go/examples/storage/list-buckets.md new file mode 100644 index 000000000..bfc71b37a --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/list-buckets.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/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := storage.New(client) + + response, err := service.ListBuckets( + service.WithListBucketsQueries([]string{"example"}), + service.WithListBucketsSearch("<SEARCH>"), + service.WithListBucketsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/list-files.md b/examples/2.3.x/server-go/examples/storage/list-files.md new file mode 100644 index 000000000..2a5e1f988 --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/list-files.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/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := storage.New(client) + + response, err := service.ListFiles( + "<BUCKET_ID>", + service.WithListFilesQueries([]string{"example"}), + service.WithListFilesSearch("<SEARCH>"), + service.WithListFilesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/update-bucket.md b/examples/2.3.x/server-go/examples/storage/update-bucket.md new file mode 100644 index 000000000..52b6547aa --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/update-bucket.md @@ -0,0 +1,35 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := storage.New(client) + + response, err := service.UpdateBucket( + "<BUCKET_ID>", + "<NAME>", + service.WithUpdateBucketPermissions([]string{"read(\"any\")"}), + service.WithUpdateBucketFileSecurity(false), + service.WithUpdateBucketEnabled(false), + service.WithUpdateBucketMaximumFileSize(1), + service.WithUpdateBucketAllowedFileExtensions([]string{"example"}), + service.WithUpdateBucketCompression("none"), + service.WithUpdateBucketEncryption(false), + service.WithUpdateBucketAntivirus(false), + service.WithUpdateBucketTransformations(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/storage/update-file.md b/examples/2.3.x/server-go/examples/storage/update-file.md new file mode 100644 index 000000000..725482ee2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/storage/update-file.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/storage" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := storage.New(client) + + response, err := service.UpdateFile( + "<BUCKET_ID>", + "<FILE_ID>", + service.WithUpdateFileName("<NAME>"), + service.WithUpdateFilePermissions([]string{"read(\"any\")"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..682ea0ff0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateBigIntColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateBigIntColumnMin(0), + service.WithCreateBigIntColumnMax(1000000), + service.WithCreateBigIntColumnDefault(0), + service.WithCreateBigIntColumnArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..4f8eab3c0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateBooleanColumnDefault(false), + service.WithCreateBooleanColumnArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-go/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..437eaa32a --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-cutover.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateCutover( + "<DATABASE_ID>", + "<MIGRATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..df6b2c01a --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateDatetimeColumnDefault("2020-10-15T06:38:00.000+00:00"), + service.WithCreateDatetimeColumnArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..c0cd74280 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-email-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateEmailColumnDefault("email@example.com"), + service.WithCreateEmailColumnArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..edb71eb91 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-enum-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + []string{"active", "inactive"}, + false, + service.WithCreateEnumColumnDefault("active"), + service.WithCreateEnumColumnArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-failover.md b/examples/2.3.x/server-go/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..8bf887c26 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-failover.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateFailover( + "<DATABASE_ID>", + service.WithCreateFailoverTargetReplicaId("<TARGET_REPLICA_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..23946efa0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-float-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateFloatColumnMin(0), + service.WithCreateFloatColumnMax(100), + service.WithCreateFloatColumnDefault(10.5), + service.WithCreateFloatColumnArray(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 new file mode 100644 index 000000000..e39b2c13b --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-index.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + "key", + []string{"example"}, + service.WithCreateIndexOrders([]string{"example"}), + service.WithCreateIndexLengths([]int{0}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..aa657e281 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-integer-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateIntegerColumnMin(0), + service.WithCreateIntegerColumnMax(100), + service.WithCreateIntegerColumnDefault(10), + service.WithCreateIntegerColumnArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..a97bc1178 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-ip-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateIpColumnDefault("192.0.2.0"), + service.WithCreateIpColumnArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..b3081f067 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-line-column.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateLineColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateLineColumnDefault([][]interface{}{[]interface{}{1, 2}, []interface{}{3, 4}, []interface{}{5, 6}}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..d79d26651 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateLongtextColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateLongtextColumnDefault("Hello World"), + service.WithCreateLongtextColumnArray(false), + service.WithCreateLongtextColumnEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..2a92cb1e3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateMediumtextColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateMediumtextColumnDefault("Hello World"), + service.WithCreateMediumtextColumnArray(false), + service.WithCreateMediumtextColumnEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-migration.md b/examples/2.3.x/server-go/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..50b95fcd9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-migration.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateMigration( + "<DATABASE_ID>", + "s-1vcpu-1gb", + service.WithCreateMigrationAutoCutover(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-operations.md b/examples/2.3.x/server-go/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..1f497ff8e --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-operations.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateOperations( + "<TRANSACTION_ID>", + service.WithCreateOperationsOperations([]interface{}{map[string]interface{}{"action": "create", "databaseId": "<DATABASE_ID>", "tableId": "<TABLE_ID>", "rowId": "<ROW_ID>", "data": map[string]interface{}{"name": "Walter O'Brien"}}}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..3fc5f4770 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-point-column.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreatePointColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreatePointColumnDefault([]float64{1, 2}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..c79801564 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreatePolygonColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreatePolygonColumnDefault([][]interface{}{[]interface{}{[]interface{}{1, 2}, []interface{}{3, 4}, []interface{}{5, 6}, []interface{}{1, 2}}}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..7460813a0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + service.WithCreateRelationshipColumnTwoWay(false), + service.WithCreateRelationshipColumnKey("<KEY>"), + service.WithCreateRelationshipColumnTwoWayKey("<TWO_WAY_KEY>"), + service.WithCreateRelationshipColumnOnDelete("cascade"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-row.md b/examples/2.3.x/server-go/examples/tablesdb/create-row.md new file mode 100644 index 000000000..bbce2dd2f --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-row.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := tablesdb.New(client) + + response, err := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}, + service.WithCreateRowPermissions([]string{"read(\"any\")"}), + service.WithCreateRowTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` 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 new file mode 100644 index 000000000..42ebd01af --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-rows.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + service.WithCreateRowsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..b378e7ef2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-string-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + 1, + false, + service.WithCreateStringColumnDefault("Hello World"), + service.WithCreateStringColumnArray(false), + service.WithCreateStringColumnEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-table.md b/examples/2.3.x/server-go/examples/tablesdb/create-table.md new file mode 100644 index 000000000..bfaa943b8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-table.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + service.WithCreateTablePermissions([]string{"read(\"any\")"}), + service.WithCreateTableRowSecurity(false), + service.WithCreateTableEnabled(false), + service.WithCreateTableColumns([]interface{}{}), + service.WithCreateTableIndexes([]interface{}{}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..b3a0ef1a7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-text-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateTextColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateTextColumnDefault("Hello World"), + service.WithCreateTextColumnArray(false), + service.WithCreateTextColumnEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-go/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..ebd388008 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateTransaction( + service.WithCreateTransactionTtl(60), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..45297edcd --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-url-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithCreateUrlColumnDefault("https://example.com"), + service.WithCreateUrlColumnArray(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-go/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..1520d7d74 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.CreateVarcharColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + 1, + false, + service.WithCreateVarcharColumnDefault("Hello World"), + service.WithCreateVarcharColumnArray(false), + service.WithCreateVarcharColumnEncrypt(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/create.md b/examples/2.3.x/server-go/examples/tablesdb/create.md new file mode 100644 index 000000000..6d78cc77b --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/create.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.Create( + "<DATABASE_ID>", + "<NAME>", + service.WithCreateEnabled(false), + service.WithCreateSpecification("serverless"), + service.WithCreateReplicas(0), + service.WithCreateSyncMode("async"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-go/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..a3049e567 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := tablesdb.New(client) + + response, err := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "<COLUMN>", + service.WithDecrementRowColumnValue(1), + service.WithDecrementRowColumnMin(0), + service.WithDecrementRowColumnTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/delete-column.md b/examples/2.3.x/server-go/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..0cf81febb --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/delete-column.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/delete-index.md b/examples/2.3.x/server-go/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..a997564e0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/delete-index.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-go/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..e6609550a --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/delete-migration.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.DeleteMigration( + "<DATABASE_ID>", + "<MIGRATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/delete-row.md b/examples/2.3.x/server-go/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..687fbe860 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/delete-row.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := tablesdb.New(client) + + response, err := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + service.WithDeleteRowTransactionId("<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 new file mode 100644 index 000000000..9c2089943 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/delete-rows.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + service.WithDeleteRowsQueries([]string{"example"}), + service.WithDeleteRowsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/delete-table.md b/examples/2.3.x/server-go/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..4efe73b9e --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/delete-table.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.DeleteTable( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-go/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..afdb30a28 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/delete-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.DeleteTransaction( + "<TRANSACTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/delete.md b/examples/2.3.x/server-go/examples/tablesdb/delete.md new file mode 100644 index 000000000..b16658787 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.Delete( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get-column.md b/examples/2.3.x/server-go/examples/tablesdb/get-column.md new file mode 100644 index 000000000..4fcb25d84 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get-column.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get-index.md b/examples/2.3.x/server-go/examples/tablesdb/get-index.md new file mode 100644 index 000000000..25b10b6f6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get-index.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get-migration.md b/examples/2.3.x/server-go/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..b38ba848e --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get-migration.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.GetMigration( + "<DATABASE_ID>", + "<MIGRATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-go/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..0db3ba337 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get-replicas.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.GetReplicas( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get-row.md b/examples/2.3.x/server-go/examples/tablesdb/get-row.md new file mode 100644 index 000000000..b5d010bee --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get-row.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := tablesdb.New(client) + + response, err := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + service.WithGetRowQueries([]string{"example"}), + service.WithGetRowTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get-status.md b/examples/2.3.x/server-go/examples/tablesdb/get-status.md new file mode 100644 index 000000000..6df742525 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get-status.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.GetStatus( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get-table.md b/examples/2.3.x/server-go/examples/tablesdb/get-table.md new file mode 100644 index 000000000..c78b13ef7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get-table.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.GetTable( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-go/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..4341a3568 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.GetTransaction( + "<TRANSACTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/get.md b/examples/2.3.x/server-go/examples/tablesdb/get.md new file mode 100644 index 000000000..b5a40a323 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.Get( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-go/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..7fae687bf --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/increment-row-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := tablesdb.New(client) + + response, err := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "<COLUMN>", + service.WithIncrementRowColumnValue(1), + service.WithIncrementRowColumnMax(100), + service.WithIncrementRowColumnTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/list-columns.md b/examples/2.3.x/server-go/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..ad935483b --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list-columns.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + service.WithListColumnsQueries([]string{"example"}), + service.WithListColumnsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-go/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..4c64a84e1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list-indexes.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + service.WithListIndexesQueries([]string{"example"}), + service.WithListIndexesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-go/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..cdf3f2707 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list-migrations.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.ListMigrations( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/list-operations.md b/examples/2.3.x/server-go/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..8da534c32 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list-operations.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.ListOperations( + "<DATABASE_ID>", + service.WithListOperationsStatus("queued"), + service.WithListOperationsLimit(1), + service.WithListOperationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/list-rows.md b/examples/2.3.x/server-go/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..baadc27f1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list-rows.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := tablesdb.New(client) + + response, err := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + service.WithListRowsQueries([]string{"example"}), + service.WithListRowsTransactionId("<TRANSACTION_ID>"), + service.WithListRowsTotal(false), + service.WithListRowsTtl(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-go/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..d193cdfe2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list-specifications.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.ListSpecifications() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/list-tables.md b/examples/2.3.x/server-go/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..d120515de --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list-tables.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.ListTables( + "<DATABASE_ID>", + service.WithListTablesQueries([]string{"example"}), + service.WithListTablesSearch("<SEARCH>"), + service.WithListTablesTotal(false), + ) + 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 new file mode 100644 index 000000000..e5019450b --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list-transactions.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.ListTransactions( + service.WithListTransactionsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/list.md b/examples/2.3.x/server-go/examples/tablesdb/list.md new file mode 100644 index 000000000..d9c1d9f77 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/list.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListSearch("<SEARCH>"), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..4fc97f4f9 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateBigIntColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + 0, + service.WithUpdateBigIntColumnMin(0), + service.WithUpdateBigIntColumnMax(1000000), + service.WithUpdateBigIntColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..02e4ab60c --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + false, + service.WithUpdateBooleanColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..569dde6e3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "2020-10-15T06:38:00.000+00:00", + service.WithUpdateDatetimeColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..1560a6095 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-email-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "email@example.com", + service.WithUpdateEmailColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..8e9ff9a4c --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-enum-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + []string{"active", "inactive"}, + false, + "active", + service.WithUpdateEnumColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..5d8a8fcf8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-float-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + 10.5, + service.WithUpdateFloatColumnMin(0), + service.WithUpdateFloatColumnMax(100), + service.WithUpdateFloatColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..0bffeb085 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-integer-column.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + 10, + service.WithUpdateIntegerColumnMin(0), + service.WithUpdateIntegerColumnMax(100), + service.WithUpdateIntegerColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..cfc007fa5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-ip-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "192.0.2.0", + service.WithUpdateIpColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..4615b0f45 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-line-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateLineColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithUpdateLineColumnDefault([][]interface{}{[]interface{}{1, 2}, []interface{}{3, 4}, []interface{}{5, 6}}), + service.WithUpdateLineColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..64c1eb159 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateLongtextColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateLongtextColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..8215cfaf0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateMediumtextColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateMediumtextColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..4158b5006 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-point-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdatePointColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithUpdatePointColumnDefault([]float64{1, 2}), + service.WithUpdatePointColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..4bdb9155d --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdatePolygonColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + service.WithUpdatePolygonColumnDefault([][]interface{}{[]interface{}{[]interface{}{1, 2}, []interface{}{3, 4}, []interface{}{5, 6}, []interface{}{1, 2}}}), + service.WithUpdatePolygonColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..12cc34b20 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + service.WithUpdateRelationshipColumnOnDelete("cascade"), + service.WithUpdateRelationshipColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-row.md b/examples/2.3.x/server-go/examples/tablesdb/update-row.md new file mode 100644 index 000000000..79a195ece --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-row.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + service.WithUpdateRowData(map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 33, "isAdmin": false}), + service.WithUpdateRowPermissions([]string{"read(\"any\")"}), + service.WithUpdateRowTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-rows.md b/examples/2.3.x/server-go/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..66a6e1f4f --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-rows.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + service.WithUpdateRowsData(map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 33, "isAdmin": false}), + service.WithUpdateRowsQueries([]string{"example"}), + service.WithUpdateRowsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..0107ef0d8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-string-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateStringColumnSize(1), + service.WithUpdateStringColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-table.md b/examples/2.3.x/server-go/examples/tablesdb/update-table.md new file mode 100644 index 000000000..9c531653b --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-table.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + service.WithUpdateTableName("<NAME>"), + service.WithUpdateTablePermissions([]string{"read(\"any\")"}), + service.WithUpdateTableRowSecurity(false), + service.WithUpdateTableEnabled(false), + service.WithUpdateTablePurge(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..ba7b7f6e8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-text-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateTextColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateTextColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-go/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..dad119b7a --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-transaction.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateTransaction( + "<TRANSACTION_ID>", + service.WithUpdateTransactionCommit(false), + service.WithUpdateTransactionRollback(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..fc5c31906 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-url-column.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "https://example.com", + service.WithUpdateUrlColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-go/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..eec23c935 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpdateVarcharColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + "Hello World", + service.WithUpdateVarcharColumnSize(1), + service.WithUpdateVarcharColumnNewKey("<NEW_KEY>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/update.md b/examples/2.3.x/server-go/examples/tablesdb/update.md new file mode 100644 index 000000000..164234c99 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/update.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.Update( + "<DATABASE_ID>", + service.WithUpdateName("<NAME>"), + service.WithUpdateEnabled(false), + service.WithUpdateSpecification("serverless"), + service.WithUpdateReplicas(0), + service.WithUpdateSyncMode("async"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-go/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..7983b72df --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/upsert-row.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := tablesdb.New(client) + + response, err := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + service.WithUpsertRowData(map[string]interface{}{"username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 33, "isAdmin": false}), + service.WithUpsertRowPermissions([]string{"read(\"any\")"}), + service.WithUpsertRowTransactionId("<TRANSACTION_ID>"), + ) + 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 new file mode 100644 index 000000000..b90c54b90 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tablesdb/upsert-rows.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/tablesdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tablesdb.New(client) + + response, err := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + service.WithUpsertRowsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/create-installation.md b/examples/2.3.x/server-go/examples/teams/create-installation.md new file mode 100644 index 000000000..4fb78e727 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/create-installation.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.CreateInstallation( + "<TEAM_ID>", + "<APP_ID>", + service.WithCreateInstallationAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + ) + 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 new file mode 100644 index 000000000..c57f11ca6 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/create-membership.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.CreateMembership( + "<TEAM_ID>", + []string{"example"}, + service.WithCreateMembershipEmail("email@example.com"), + service.WithCreateMembershipUserId("<USER_ID>"), + service.WithCreateMembershipPhone("+12065550100"), + service.WithCreateMembershipUrl("https://example.com"), + service.WithCreateMembershipName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/create.md b/examples/2.3.x/server-go/examples/teams/create.md new file mode 100644 index 000000000..b1e2d9f44 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/create.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.Create( + "<TEAM_ID>", + "<NAME>", + service.WithCreateRoles([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/delete-installation.md b/examples/2.3.x/server-go/examples/teams/delete-installation.md new file mode 100644 index 000000000..61b898040 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/delete-installation.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.DeleteInstallation( + "<TEAM_ID>", + "<INSTALLATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/delete-membership.md b/examples/2.3.x/server-go/examples/teams/delete-membership.md new file mode 100644 index 000000000..ee9aaabdd --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/delete-membership.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.DeleteMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/delete.md b/examples/2.3.x/server-go/examples/teams/delete.md new file mode 100644 index 000000000..722229e63 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.Delete( + "<TEAM_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/get-installation.md b/examples/2.3.x/server-go/examples/teams/get-installation.md new file mode 100644 index 000000000..d8c8a7b09 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/get-installation.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.GetInstallation( + "<TEAM_ID>", + "<INSTALLATION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/get-membership.md b/examples/2.3.x/server-go/examples/teams/get-membership.md new file mode 100644 index 000000000..82ebb54c3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/get-membership.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.GetMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/get-prefs.md b/examples/2.3.x/server-go/examples/teams/get-prefs.md new file mode 100644 index 000000000..e2260269e --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/get-prefs.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.GetPrefs( + "<TEAM_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/get.md b/examples/2.3.x/server-go/examples/teams/get.md new file mode 100644 index 000000000..56215d394 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.Get( + "<TEAM_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/list-installations.md b/examples/2.3.x/server-go/examples/teams/list-installations.md new file mode 100644 index 000000000..bf7d5da65 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/list-installations.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.ListInstallations( + "<TEAM_ID>", + service.WithListInstallationsQueries([]string{"example"}), + service.WithListInstallationsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/list-memberships.md b/examples/2.3.x/server-go/examples/teams/list-memberships.md new file mode 100644 index 000000000..a1f4d8f32 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/list-memberships.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.ListMemberships( + "<TEAM_ID>", + service.WithListMembershipsQueries([]string{"example"}), + service.WithListMembershipsSearch("<SEARCH>"), + service.WithListMembershipsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/list.md b/examples/2.3.x/server-go/examples/teams/list.md new file mode 100644 index 000000000..88946fd6c --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/list.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListSearch("<SEARCH>"), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/update-installation.md b/examples/2.3.x/server-go/examples/teams/update-installation.md new file mode 100644 index 000000000..d894f01db --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/update-installation.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.UpdateInstallation( + "<TEAM_ID>", + "<INSTALLATION_ID>", + service.WithUpdateInstallationAuthorizationDetails("<AUTHORIZATION_DETAILS>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/update-membership-status.md b/examples/2.3.x/server-go/examples/teams/update-membership-status.md new file mode 100644 index 000000000..03e14d22d --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/update-membership-status.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.UpdateMembershipStatus( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + "<USER_ID>", + "<SECRET>", + ) + fmt.Println(response, err) +} +``` 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 new file mode 100644 index 000000000..a94eaf2b2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/update-membership.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.UpdateMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + []string{"example"}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/update-name.md b/examples/2.3.x/server-go/examples/teams/update-name.md new file mode 100644 index 000000000..abdf4b587 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/update-name.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.UpdateName( + "<TEAM_ID>", + "<NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/teams/update-prefs.md b/examples/2.3.x/server-go/examples/teams/update-prefs.md new file mode 100644 index 000000000..81dddcfd1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/teams/update-prefs.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/teams" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := teams.New(client) + + response, err := service.UpdatePrefs( + "<TEAM_ID>", + []interface{}{}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tokens/create-file-token.md b/examples/2.3.x/server-go/examples/tokens/create-file-token.md new file mode 100644 index 000000000..83e096d25 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tokens/create-file-token.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/tokens" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tokens.New(client) + + response, err := service.CreateFileToken( + "<BUCKET_ID>", + "<FILE_ID>", + service.WithCreateFileTokenExpire("2020-10-15T06:38:00.000+00:00"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tokens/delete.md b/examples/2.3.x/server-go/examples/tokens/delete.md new file mode 100644 index 000000000..381be9e43 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tokens/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tokens" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tokens.New(client) + + response, err := service.Delete( + "<TOKEN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tokens/get.md b/examples/2.3.x/server-go/examples/tokens/get.md new file mode 100644 index 000000000..fb80cb1f2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tokens/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/tokens" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tokens.New(client) + + response, err := service.Get( + "<TOKEN_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tokens/list.md b/examples/2.3.x/server-go/examples/tokens/list.md new file mode 100644 index 000000000..ff0b4ce3a --- /dev/null +++ b/examples/2.3.x/server-go/examples/tokens/list.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/tokens" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tokens.New(client) + + response, err := service.List( + "<BUCKET_ID>", + "<FILE_ID>", + service.WithListQueries([]string{"example"}), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/tokens/update.md b/examples/2.3.x/server-go/examples/tokens/update.md new file mode 100644 index 000000000..c4303a526 --- /dev/null +++ b/examples/2.3.x/server-go/examples/tokens/update.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/tokens" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := tokens.New(client) + + response, err := service.Update( + "<TOKEN_ID>", + service.WithUpdateExpire("2020-10-15T06:38:00.000+00:00"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-argon-2-user.md b/examples/2.3.x/server-go/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..7e2fc3d71 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-argon-2-user.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateArgon2User( + "<USER_ID>", + "email@example.com", + "password", + service.WithCreateArgon2UserName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-go/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..3e04c095b --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-bcrypt-user.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateBcryptUser( + "<USER_ID>", + "email@example.com", + "password", + service.WithCreateBcryptUserName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-jwt.md b/examples/2.3.x/server-go/examples/users/create-jwt.md new file mode 100644 index 000000000..a23b51644 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-jwt.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateJWT( + "<USER_ID>", + service.WithCreateJWTSessionId("recent()"), + service.WithCreateJWTDuration(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-md-5-user.md b/examples/2.3.x/server-go/examples/users/create-md-5-user.md new file mode 100644 index 000000000..d9939fb35 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-md-5-user.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateMD5User( + "<USER_ID>", + "email@example.com", + "password", + service.WithCreateMD5UserName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-go/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..5a3aba8e7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateMFARecoveryCodes( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-go/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..b77e6913a --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-ph-pass-user.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreatePHPassUser( + "<USER_ID>", + "email@example.com", + "password", + service.WithCreatePHPassUserName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-go/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..477eaf2e0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateScryptModifiedUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + "<PASSWORD_SALT_SEPARATOR>", + "<PASSWORD_SIGNER_KEY>", + service.WithCreateScryptModifiedUserName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-scrypt-user.md b/examples/2.3.x/server-go/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..2eed4a2b4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-scrypt-user.md @@ -0,0 +1,33 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateScryptUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + 8, + 65536, + 1, + 64, + service.WithCreateScryptUserName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-session.md b/examples/2.3.x/server-go/examples/users/create-session.md new file mode 100644 index 000000000..c74ead5b2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-session.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateSession( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-sha-user.md b/examples/2.3.x/server-go/examples/users/create-sha-user.md new file mode 100644 index 000000000..023a34d9c --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-sha-user.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateSHAUser( + "<USER_ID>", + "email@example.com", + "password", + service.WithCreateSHAUserPasswordVersion("sha1"), + service.WithCreateSHAUserName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-target.md b/examples/2.3.x/server-go/examples/users/create-target.md new file mode 100644 index 000000000..07c3414d7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-target.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateTarget( + "<USER_ID>", + "<TARGET_ID>", + "email", + "<IDENTIFIER>", + service.WithCreateTargetProviderId("<PROVIDER_ID>"), + service.WithCreateTargetName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create-token.md b/examples/2.3.x/server-go/examples/users/create-token.md new file mode 100644 index 000000000..f5e9ac01c --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create-token.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.CreateToken( + "<USER_ID>", + service.WithCreateTokenLength(4), + service.WithCreateTokenExpire(60), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/create.md b/examples/2.3.x/server-go/examples/users/create.md new file mode 100644 index 000000000..9fc8a97ac --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/create.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.Create( + "<USER_ID>", + service.WithCreateEmail("email@example.com"), + service.WithCreatePhone("+12065550100"), + service.WithCreatePassword("password"), + service.WithCreateName("<NAME>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/delete-identity.md b/examples/2.3.x/server-go/examples/users/delete-identity.md new file mode 100644 index 000000000..1e8877c0e --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/delete-identity.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.DeleteIdentity( + "<IDENTITY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-go/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..270759e68 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/delete-mfa-authenticator.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.DeleteMFAAuthenticator( + "<USER_ID>", + "totp", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/delete-session.md b/examples/2.3.x/server-go/examples/users/delete-session.md new file mode 100644 index 000000000..f79f1e8f2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/delete-session.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.DeleteSession( + "<USER_ID>", + "<SESSION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/delete-sessions.md b/examples/2.3.x/server-go/examples/users/delete-sessions.md new file mode 100644 index 000000000..26f47c121 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/delete-sessions.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.DeleteSessions( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/delete-target.md b/examples/2.3.x/server-go/examples/users/delete-target.md new file mode 100644 index 000000000..3f5853cfe --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/delete-target.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.DeleteTarget( + "<USER_ID>", + "<TARGET_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/delete.md b/examples/2.3.x/server-go/examples/users/delete.md new file mode 100644 index 000000000..113e9941f --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.Delete( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-go/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..790c0fe6b --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/get-mfa-challenge.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.GetMFAChallenge( + "<USER_ID>", + "<CHALLENGE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-go/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..60a912a68 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.GetMFARecoveryCodes( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/get-prefs.md b/examples/2.3.x/server-go/examples/users/get-prefs.md new file mode 100644 index 000000000..9185de44a --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/get-prefs.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.GetPrefs( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/get-target.md b/examples/2.3.x/server-go/examples/users/get-target.md new file mode 100644 index 000000000..528b48e58 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/get-target.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.GetTarget( + "<USER_ID>", + "<TARGET_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/get.md b/examples/2.3.x/server-go/examples/users/get.md new file mode 100644 index 000000000..36d167774 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.Get( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/list-identities.md b/examples/2.3.x/server-go/examples/users/list-identities.md new file mode 100644 index 000000000..d849ccd9e --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/list-identities.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.ListIdentities( + service.WithListIdentitiesQueries([]string{"example"}), + service.WithListIdentitiesSearch("<SEARCH>"), + service.WithListIdentitiesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/list-memberships.md b/examples/2.3.x/server-go/examples/users/list-memberships.md new file mode 100644 index 000000000..5249e588e --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/list-memberships.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.ListMemberships( + "<USER_ID>", + service.WithListMembershipsQueries([]string{"example"}), + service.WithListMembershipsSearch("<SEARCH>"), + service.WithListMembershipsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/list-mfa-factors.md b/examples/2.3.x/server-go/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..a123ecf0a --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/list-mfa-factors.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.ListMFAFactors( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/list-sessions.md b/examples/2.3.x/server-go/examples/users/list-sessions.md new file mode 100644 index 000000000..975a38607 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/list-sessions.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.ListSessions( + "<USER_ID>", + service.WithListSessionsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/list-targets.md b/examples/2.3.x/server-go/examples/users/list-targets.md new file mode 100644 index 000000000..f9d03ba94 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/list-targets.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.ListTargets( + "<USER_ID>", + service.WithListTargetsQueries([]string{"example"}), + service.WithListTargetsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/list.md b/examples/2.3.x/server-go/examples/users/list.md new file mode 100644 index 000000000..ae622696f --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/list.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListSearch("<SEARCH>"), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-email-verification.md b/examples/2.3.x/server-go/examples/users/update-email-verification.md new file mode 100644 index 000000000..229664a41 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-email-verification.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateEmailVerification( + "<USER_ID>", + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-email.md b/examples/2.3.x/server-go/examples/users/update-email.md new file mode 100644 index 000000000..2ca2a678e --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-email.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateEmail( + "<USER_ID>", + "email@example.com", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-impersonator.md b/examples/2.3.x/server-go/examples/users/update-impersonator.md new file mode 100644 index 000000000..443112cdc --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-impersonator.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateImpersonator( + "<USER_ID>", + false, + ) + 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 new file mode 100644 index 000000000..d673b10d0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-labels.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateLabels( + "<USER_ID>", + []string{"example"}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-go/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..b19ddfdfa --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateMFARecoveryCodes( + "<USER_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-mfa.md b/examples/2.3.x/server-go/examples/users/update-mfa.md new file mode 100644 index 000000000..0192780b8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-mfa.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateMFA( + "<USER_ID>", + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-name.md b/examples/2.3.x/server-go/examples/users/update-name.md new file mode 100644 index 000000000..8eda5e524 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-name.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateName( + "<USER_ID>", + "<NAME>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-password.md b/examples/2.3.x/server-go/examples/users/update-password.md new file mode 100644 index 000000000..1f4e17a3a --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-password.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdatePassword( + "<USER_ID>", + "password", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-phone-verification.md b/examples/2.3.x/server-go/examples/users/update-phone-verification.md new file mode 100644 index 000000000..ac14111b4 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-phone-verification.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdatePhoneVerification( + "<USER_ID>", + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-phone.md b/examples/2.3.x/server-go/examples/users/update-phone.md new file mode 100644 index 000000000..c72e566c3 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-phone.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdatePhone( + "<USER_ID>", + "+12065550100", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-prefs.md b/examples/2.3.x/server-go/examples/users/update-prefs.md new file mode 100644 index 000000000..767425c89 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-prefs.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdatePrefs( + "<USER_ID>", + []interface{}{}, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-status.md b/examples/2.3.x/server-go/examples/users/update-status.md new file mode 100644 index 000000000..070f35575 --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-status.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/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateStatus( + "<USER_ID>", + false, + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/users/update-target.md b/examples/2.3.x/server-go/examples/users/update-target.md new file mode 100644 index 000000000..5c3e2b90e --- /dev/null +++ b/examples/2.3.x/server-go/examples/users/update-target.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/users" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := users.New(client) + + response, err := service.UpdateTarget( + "<USER_ID>", + "<TARGET_ID>", + service.WithUpdateTargetIdentifier("<IDENTIFIER>"), + service.WithUpdateTargetProviderId("<PROVIDER_ID>"), + service.WithUpdateTargetName("<NAME>"), + ) + 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 new file mode 100644 index 000000000..6df7ac496 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-collection.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.CreateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + 1, + service.WithCreateCollectionPermissions([]string{"read(\"any\")"}), + service.WithCreateCollectionDocumentSecurity(false), + service.WithCreateCollectionEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create-document.md b/examples/2.3.x/server-go/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..42f6e0ca0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := vectorsdb.New(client) + + response, err := service.CreateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + map[string]interface{}{"embeddings": []interface{}{0.12, -0.55, 0.88, 1.02}, "metadata": map[string]interface{}{"key": "value"}}, + service.WithCreateDocumentPermissions([]string{"read(\"any\")"}), + service.WithCreateDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` 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 new file mode 100644 index 000000000..1f1eacde0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-documents.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.CreateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, + service.WithCreateDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-go/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..54045c5fe --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-failover.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.CreateFailover( + "<DATABASE_ID>", + service.WithCreateFailoverTargetReplicaId("<TARGET_REPLICA_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 new file mode 100644 index 000000000..7be384220 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-index.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.CreateIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + "hnsw_euclidean", + []string{"example"}, + service.WithCreateIndexOrders([]string{"example"}), + service.WithCreateIndexLengths([]int{0}), + ) + fmt.Println(response, err) +} +``` 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 new file mode 100644 index 000000000..c6e7737cb --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-operations.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + 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"}}}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create-query.md b/examples/2.3.x/server-go/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..caa3a74d1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-query.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := vectorsdb.New(client) + + response, err := service.CreateQuery( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithCreateQueryQueries([]string{"example"}), + service.WithCreateQueryTransactionId("<TRANSACTION_ID>"), + service.WithCreateQueryTotal(false), + service.WithCreateQueryTtl(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-go/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..b8a2c6f34 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.CreateTransaction( + service.WithCreateTransactionTtl(60), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create.md b/examples/2.3.x/server-go/examples/vectorsdb/create.md new file mode 100644 index 000000000..1bfc59223 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/create.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.Create( + "<DATABASE_ID>", + "<NAME>", + service.WithCreateEnabled(false), + service.WithCreateSpecification("serverless"), + service.WithCreateReplicas(0), + service.WithCreateSyncMode("async"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-go/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..bee0f57d1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/delete-collection.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.DeleteCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-go/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..8f6f981e5 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/delete-document.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := vectorsdb.New(client) + + response, err := service.DeleteDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithDeleteDocumentTransactionId("<TRANSACTION_ID>"), + ) + 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 new file mode 100644 index 000000000..6242d445f --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/delete-documents.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.DeleteDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithDeleteDocumentsQueries([]string{"example"}), + service.WithDeleteDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-go/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..0be9aebd8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/delete-index.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.DeleteIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-go/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..98491d2d0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.DeleteTransaction( + "<TRANSACTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/delete.md b/examples/2.3.x/server-go/examples/vectorsdb/delete.md new file mode 100644 index 000000000..fec369e9a --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.Delete( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-go/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..780103615 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/get-collection.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.GetCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/get-document.md b/examples/2.3.x/server-go/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..d59c0ac21 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/get-document.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := vectorsdb.New(client) + + response, err := service.GetDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithGetDocumentQueries([]string{"example"}), + service.WithGetDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/get-index.md b/examples/2.3.x/server-go/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..26c775e87 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/get-index.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.GetIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-go/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..393a35ae2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/get-replicas.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.GetReplicas( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/get-status.md b/examples/2.3.x/server-go/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..24f4d5a6f --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/get-status.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.GetStatus( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-go/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..3c766e3ee --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/get-transaction.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.GetTransaction( + "<TRANSACTION_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/get.md b/examples/2.3.x/server-go/examples/vectorsdb/get.md new file mode 100644 index 000000000..ad14efbeb --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.Get( + "<DATABASE_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-go/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..1fd75e64e --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/list-collections.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.ListCollections( + "<DATABASE_ID>", + service.WithListCollectionsQueries([]string{"example"}), + service.WithListCollectionsSearch("<SEARCH>"), + service.WithListCollectionsTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-go/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..e83e5a41d --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/list-documents.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := vectorsdb.New(client) + + response, err := service.ListDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithListDocumentsQueries([]string{"example"}), + service.WithListDocumentsTransactionId("<TRANSACTION_ID>"), + service.WithListDocumentsTotal(false), + service.WithListDocumentsTtl(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-go/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..b0e37819e --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/list-indexes.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.ListIndexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithListIndexesQueries([]string{"example"}), + service.WithListIndexesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-go/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..94d7545d0 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/list-operations.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.ListOperations( + "<DATABASE_ID>", + service.WithListOperationsStatus("queued"), + service.WithListOperationsLimit(1), + service.WithListOperationsOffset(0), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-go/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..05ccd2c84 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/list-specifications.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.ListSpecifications() + 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 new file mode 100644 index 000000000..5d70bdd05 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/list-transactions.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.ListTransactions( + service.WithListTransactionsQueries([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/list.md b/examples/2.3.x/server-go/examples/vectorsdb/list.md new file mode 100644 index 000000000..38c6f8534 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/list.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListTotal(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 new file mode 100644 index 000000000..6483561a7 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/update-collection.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.UpdateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + service.WithUpdateCollectionDimension(1), + service.WithUpdateCollectionPermissions([]string{"read(\"any\")"}), + service.WithUpdateCollectionDocumentSecurity(false), + service.WithUpdateCollectionEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/update-document.md b/examples/2.3.x/server-go/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..378806a51 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/update-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := vectorsdb.New(client) + + response, err := service.UpdateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithUpdateDocumentData([]interface{}{}), + service.WithUpdateDocumentPermissions([]string{"read(\"any\")"}), + service.WithUpdateDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-go/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..c524a4f05 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/update-documents.md @@ -0,0 +1,29 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.UpdateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + service.WithUpdateDocumentsData([]interface{}{}), + service.WithUpdateDocumentsQueries([]string{"example"}), + service.WithUpdateDocumentsTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-go/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..efc9d3b3d --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/update-transaction.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.UpdateTransaction( + "<TRANSACTION_ID>", + service.WithUpdateTransactionCommit(false), + service.WithUpdateTransactionRollback(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/update.md b/examples/2.3.x/server-go/examples/vectorsdb/update.md new file mode 100644 index 000000000..45e61f02a --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/update.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.Update( + "<DATABASE_ID>", + "<NAME>", + service.WithUpdateEnabled(false), + service.WithUpdateSpecification("serverless"), + service.WithUpdateReplicas(0), + service.WithUpdateSyncMode("async"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-go/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..a492c3a44 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/upsert-document.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := vectorsdb.New(client) + + response, err := service.UpsertDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + service.WithUpsertDocumentData([]interface{}{}), + service.WithUpsertDocumentPermissions([]string{"read(\"any\")"}), + service.WithUpsertDocumentTransactionId("<TRANSACTION_ID>"), + ) + fmt.Println(response, err) +} +``` 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 new file mode 100644 index 000000000..85fc23658 --- /dev/null +++ b/examples/2.3.x/server-go/examples/vectorsdb/upsert-documents.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/vectorsdb" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := vectorsdb.New(client) + + response, err := service.UpsertDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, + 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 new file mode 100644 index 000000000..90561b70e --- /dev/null +++ b/examples/2.3.x/server-go/examples/webhooks/create.md @@ -0,0 +1,33 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/webhooks" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := webhooks.New(client) + + response, err := service.Create( + "<WEBHOOK_ID>", + "https://example.com/webhook", + "<NAME>", + []string{"example"}, + service.WithCreateEnabled(false), + service.WithCreateTls(false), + service.WithCreateAuthUsername("<AUTH_USERNAME>"), + service.WithCreateAuthPassword("password"), + service.WithCreateSecret("<SECRET>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/webhooks/delete.md b/examples/2.3.x/server-go/examples/webhooks/delete.md new file mode 100644 index 000000000..5f9112c6a --- /dev/null +++ b/examples/2.3.x/server-go/examples/webhooks/delete.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/webhooks" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := webhooks.New(client) + + response, err := service.Delete( + "<WEBHOOK_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/webhooks/get.md b/examples/2.3.x/server-go/examples/webhooks/get.md new file mode 100644 index 000000000..fe40362b1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/webhooks/get.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/webhooks" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := webhooks.New(client) + + response, err := service.Get( + "<WEBHOOK_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/webhooks/list.md b/examples/2.3.x/server-go/examples/webhooks/list.md new file mode 100644 index 000000000..133bcd638 --- /dev/null +++ b/examples/2.3.x/server-go/examples/webhooks/list.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/webhooks" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := webhooks.New(client) + + response, err := service.List( + service.WithListQueries([]string{"example"}), + service.WithListTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/webhooks/update-secret.md b/examples/2.3.x/server-go/examples/webhooks/update-secret.md new file mode 100644 index 000000000..6b7585555 --- /dev/null +++ b/examples/2.3.x/server-go/examples/webhooks/update-secret.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/webhooks" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := webhooks.New(client) + + response, err := service.UpdateSecret( + "<WEBHOOK_ID>", + service.WithUpdateSecretSecret("<SECRET>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/webhooks/update.md b/examples/2.3.x/server-go/examples/webhooks/update.md new file mode 100644 index 000000000..e344b75f8 --- /dev/null +++ b/examples/2.3.x/server-go/examples/webhooks/update.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/webhooks" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := webhooks.New(client) + + response, err := service.Update( + "<WEBHOOK_ID>", + "<NAME>", + "https://example.com/webhook", + []string{"example"}, + service.WithUpdateEnabled(false), + service.WithUpdateTls(false), + service.WithUpdateAuthUsername("<AUTH_USERNAME>"), + service.WithUpdateAuthPassword("password"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-anonymous-session.md b/examples/2.3.x/server-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..c040efb8c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,35 @@ +```graphql +mutation { + accountCreateAnonymousSession { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` 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 new file mode 100644 index 000000000..c68a4feb2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-email-password-session.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountCreateEmailPasswordSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-email-token.md b/examples/2.3.x/server-graphql/examples/account/create-email-token.md new file mode 100644 index 000000000..f9db2e2cc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-email-token.md @@ -0,0 +1,16 @@ +```graphql +mutation { + accountCreateEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-graphql/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..5a0e10202 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-email-verification-otp.md @@ -0,0 +1,14 @@ +```graphql +mutation { + accountCreateEmailVerificationOTP( + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-email-verification.md b/examples/2.3.x/server-graphql/examples/account/create-email-verification.md new file mode 100644 index 000000000..3a4c559b2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-email-verification.md @@ -0,0 +1,14 @@ +```graphql +mutation { + accountCreateEmailVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-id-token-session.md b/examples/2.3.x/server-graphql/examples/account/create-id-token-session.md new file mode 100644 index 000000000..3c0bb50ff --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-id-token-session.md @@ -0,0 +1,42 @@ +```graphql +mutation { + accountCreateIdTokenSession( + provider: "apple", + idToken: "<ID_TOKEN>", + nonce: "<NONCE>", + accessToken: "<ACCESS_TOKEN>", + accessTokenExpiry: 0, + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-magic-url-token.md b/examples/2.3.x/server-graphql/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..59b2c94f2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-magic-url-token.md @@ -0,0 +1,17 @@ +```graphql +mutation { + accountCreateMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-graphql/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..a3920a197 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-mfa-authenticator.md @@ -0,0 +1,10 @@ +```graphql +mutation { + accountCreateMFAAuthenticator( + type: "totp" + ) { + secret + uri + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-graphql/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..3da400f67 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-mfa-challenge.md @@ -0,0 +1,12 @@ +```graphql +mutation { + accountCreateMFAChallenge( + factor: "email" + ) { + _id + _createdAt + userId + expire + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-graphql/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..9f1c3596e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```graphql +mutation { + accountCreateMFARecoveryCodes { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-phone-token.md b/examples/2.3.x/server-graphql/examples/account/create-phone-token.md new file mode 100644 index 000000000..e382df55c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-phone-token.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountCreatePhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-phone-verification.md b/examples/2.3.x/server-graphql/examples/account/create-phone-verification.md new file mode 100644 index 000000000..88ce51a14 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +```graphql +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-recovery-otp.md b/examples/2.3.x/server-graphql/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..94088b137 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-recovery-otp.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountCreateRecoveryOTP( + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-recovery.md b/examples/2.3.x/server-graphql/examples/account/create-recovery.md new file mode 100644 index 000000000..f72f5a653 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-session.md b/examples/2.3.x/server-graphql/examples/account/create-session.md new file mode 100644 index 000000000..b5dda77e1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-session.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountCreateSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create-verification.md b/examples/2.3.x/server-graphql/examples/account/create-verification.md new file mode 100644 index 000000000..818efe4dd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create-verification.md @@ -0,0 +1,14 @@ +```graphql +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/create.md b/examples/2.3.x/server-graphql/examples/account/create.md new file mode 100644 index 000000000..76ace14aa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/create.md @@ -0,0 +1,50 @@ +```graphql +mutation { + accountCreate( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/delete-consent-token.md b/examples/2.3.x/server-graphql/examples/account/delete-consent-token.md new file mode 100644 index 000000000..aaca4bc86 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/delete-consent-token.md @@ -0,0 +1,10 @@ +```graphql +mutation { + accountDeleteConsentToken( + consentId: "<CONSENT_ID>", + tokenId: "<TOKEN_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/delete-consent.md b/examples/2.3.x/server-graphql/examples/account/delete-consent.md new file mode 100644 index 000000000..698e6c46e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/delete-consent.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeleteConsent( + consentId: "<CONSENT_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/delete-identity.md b/examples/2.3.x/server-graphql/examples/account/delete-identity.md new file mode 100644 index 000000000..d984a934b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/delete-identity.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeleteIdentity( + identityId: "<IDENTITY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-graphql/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..7c78bc317 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeleteMFAAuthenticator( + type: "totp" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/delete-session.md b/examples/2.3.x/server-graphql/examples/account/delete-session.md new file mode 100644 index 000000000..36c3de994 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/delete-session.md @@ -0,0 +1,9 @@ +```graphql +mutation { + accountDeleteSession( + sessionId: "<SESSION_ID>" + ) { + status + } +} +``` 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 new file mode 100644 index 000000000..65f6900e5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/delete-sessions.md @@ -0,0 +1,7 @@ +```graphql +mutation { + accountDeleteSessions { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/get-consent-token.md b/examples/2.3.x/server-graphql/examples/account/get-consent-token.md new file mode 100644 index 000000000..8294afb8d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/get-consent-token.md @@ -0,0 +1,20 @@ +```graphql +query { + accountGetConsentToken( + consentId: "<CONSENT_ID>", + tokenId: "<TOKEN_ID>" + ) { + _id + _createdAt + _updatedAt + consentId + userId + appId + cimdUrl + scopes + resources + authorizationDetails + expire + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/get-consent.md b/examples/2.3.x/server-graphql/examples/account/get-consent.md new file mode 100644 index 000000000..999c7aedd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/get-consent.md @@ -0,0 +1,18 @@ +```graphql +query { + accountGetConsent( + consentId: "<CONSENT_ID>" + ) { + _id + _createdAt + _updatedAt + userId + appId + cimdUrl + scopes + resources + authorizationDetails + expire + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-graphql/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..430d5f42c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```graphql +query { + accountGetMFARecoveryCodes { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/get-prefs.md b/examples/2.3.x/server-graphql/examples/account/get-prefs.md new file mode 100644 index 000000000..f7920fc2e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/get-prefs.md @@ -0,0 +1,7 @@ +```graphql +query { + accountGetPrefs { + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/get-session.md b/examples/2.3.x/server-graphql/examples/account/get-session.md new file mode 100644 index 000000000..0ff57c396 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/get-session.md @@ -0,0 +1,37 @@ +```graphql +query { + accountGetSession( + sessionId: "<SESSION_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/get.md b/examples/2.3.x/server-graphql/examples/account/get.md new file mode 100644 index 000000000..a1f4a9075 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/get.md @@ -0,0 +1,45 @@ +```graphql +query { + accountGet { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/list-consent-tokens.md b/examples/2.3.x/server-graphql/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..1bdb2d9fe --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/list-consent-tokens.md @@ -0,0 +1,24 @@ +```graphql +query { + accountListConsentTokens( + consentId: "<CONSENT_ID>", + queries: [], + total: false + ) { + total + tokens { + _id + _createdAt + _updatedAt + consentId + userId + appId + cimdUrl + scopes + resources + authorizationDetails + expire + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/list-consents.md b/examples/2.3.x/server-graphql/examples/account/list-consents.md new file mode 100644 index 000000000..cca99e441 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/list-consents.md @@ -0,0 +1,22 @@ +```graphql +query { + accountListConsents( + queries: [], + total: false + ) { + total + consents { + _id + _createdAt + _updatedAt + userId + appId + cimdUrl + scopes + resources + authorizationDetails + expire + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/list-identities.md b/examples/2.3.x/server-graphql/examples/account/list-identities.md new file mode 100644 index 000000000..a5d30d3b6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/list-identities.md @@ -0,0 +1,23 @@ +```graphql +query { + accountListIdentities( + queries: [], + total: false + ) { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + providerIdToken + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/list-mfa-factors.md b/examples/2.3.x/server-graphql/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..cca647fec --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +```graphql +query { + accountListMFAFactors { + totp + phone + email + recoveryCode + custom + } +} +``` 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 new file mode 100644 index 000000000..106419a76 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/list-sessions.md @@ -0,0 +1,38 @@ +```graphql +query { + accountListSessions { + total + sessions { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-graphql/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..262cdf417 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-email-verification-otp.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountUpdateEmailVerificationOTP( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-email-verification.md b/examples/2.3.x/server-graphql/examples/account/update-email-verification.md new file mode 100644 index 000000000..9a045dd80 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-email-verification.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountUpdateEmailVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-email.md b/examples/2.3.x/server-graphql/examples/account/update-email.md new file mode 100644 index 000000000..bfab99aa5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-email.md @@ -0,0 +1,48 @@ +```graphql +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-magic-url-session.md b/examples/2.3.x/server-graphql/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..92ad9693d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-magic-url-session.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountUpdateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-graphql/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..55c258878 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-mfa-authenticator.md @@ -0,0 +1,48 @@ +```graphql +mutation { + accountUpdateMFAAuthenticator( + type: "totp", + otp: "<OTP>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-graphql/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..d3a438cf0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-mfa-challenge.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountUpdateMFAChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-graphql/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..5f0c5c2d6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```graphql +mutation { + accountUpdateMFARecoveryCodes { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-mfa.md b/examples/2.3.x/server-graphql/examples/account/update-mfa.md new file mode 100644 index 000000000..59179a358 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-mfa.md @@ -0,0 +1,47 @@ +```graphql +mutation { + accountUpdateMFA( + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-name.md b/examples/2.3.x/server-graphql/examples/account/update-name.md new file mode 100644 index 000000000..58703b1b9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-name.md @@ -0,0 +1,47 @@ +```graphql +mutation { + accountUpdateName( + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-password.md b/examples/2.3.x/server-graphql/examples/account/update-password.md new file mode 100644 index 000000000..9290fcfe0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-password.md @@ -0,0 +1,48 @@ +```graphql +mutation { + accountUpdatePassword( + password: "password", + oldPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-phone-session.md b/examples/2.3.x/server-graphql/examples/account/update-phone-session.md new file mode 100644 index 000000000..aa054709d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-phone-session.md @@ -0,0 +1,38 @@ +```graphql +mutation { + accountUpdatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-phone-verification.md b/examples/2.3.x/server-graphql/examples/account/update-phone-verification.md new file mode 100644 index 000000000..2122d41be --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountUpdatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-phone.md b/examples/2.3.x/server-graphql/examples/account/update-phone.md new file mode 100644 index 000000000..e2d632912 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-phone.md @@ -0,0 +1,48 @@ +```graphql +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-prefs.md b/examples/2.3.x/server-graphql/examples/account/update-prefs.md new file mode 100644 index 000000000..00338b2fd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-prefs.md @@ -0,0 +1,47 @@ +```graphql +mutation { + accountUpdatePrefs( + prefs: "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-recovery-otp.md b/examples/2.3.x/server-graphql/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..879ae3d8c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-recovery-otp.md @@ -0,0 +1,16 @@ +```graphql +mutation { + accountUpdateRecoveryOTP( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "password" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-recovery.md b/examples/2.3.x/server-graphql/examples/account/update-recovery.md new file mode 100644 index 000000000..8d4c37a99 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +```graphql +mutation { + accountUpdateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "password" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-session.md b/examples/2.3.x/server-graphql/examples/account/update-session.md new file mode 100644 index 000000000..c045df3c1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-session.md @@ -0,0 +1,37 @@ +```graphql +mutation { + accountUpdateSession( + sessionId: "<SESSION_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-status.md b/examples/2.3.x/server-graphql/examples/account/update-status.md new file mode 100644 index 000000000..a2b65cb15 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-status.md @@ -0,0 +1,45 @@ +```graphql +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/account/update-verification.md b/examples/2.3.x/server-graphql/examples/account/update-verification.md new file mode 100644 index 000000000..927ce4953 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/account/update-verification.md @@ -0,0 +1,15 @@ +```graphql +mutation { + accountUpdateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/activities/get-event.md b/examples/2.3.x/server-graphql/examples/activities/get-event.md new file mode 100644 index 000000000..d2840b571 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/activities/get-event.md @@ -0,0 +1,37 @@ +```graphql +query { + activitiesGetEvent( + eventId: "<EVENT_ID>" + ) { + _id + actorType + actorId + actorEmail + actorName + resourceParent + resourceType + resourceId + resource + event + userAgent + ip + mode + country + continentCode + city + subdivisions + isp + autonomousSystemNumber + autonomousSystemOrganization + connectionType + connectionUsageType + connectionOrganization + time + projectId + teamId + hostname + sdk + sdkVersion + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/activities/list-events.md b/examples/2.3.x/server-graphql/examples/activities/list-events.md new file mode 100644 index 000000000..a36770de9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/activities/list-events.md @@ -0,0 +1,40 @@ +```graphql +query { + activitiesListEvents( + queries: [] + ) { + total + events { + _id + actorType + actorId + actorEmail + actorName + resourceParent + resourceType + resourceId + resource + event + userAgent + ip + mode + country + continentCode + city + subdivisions + isp + autonomousSystemNumber + autonomousSystemOrganization + connectionType + connectionUsageType + connectionOrganization + time + projectId + teamId + hostname + sdk + sdkVersion + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/advisor/delete-report.md b/examples/2.3.x/server-graphql/examples/advisor/delete-report.md new file mode 100644 index 000000000..9c3b5d164 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/advisor/delete-report.md @@ -0,0 +1,9 @@ +```graphql +mutation { + advisorDeleteReport( + reportId: "<REPORT_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/advisor/get-insight.md b/examples/2.3.x/server-graphql/examples/advisor/get-insight.md new file mode 100644 index 000000000..17316e591 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/advisor/get-insight.md @@ -0,0 +1,31 @@ +```graphql +query { + advisorGetInsight( + reportId: "<REPORT_ID>", + insightId: "<INSIGHT_ID>" + ) { + _id + _createdAt + _updatedAt + reportId + type + severity + status + resourceType + resourceId + parentResourceType + parentResourceId + title + summary + ctas { + label + service + method + params + } + analyzedAt + dismissedAt + dismissedBy + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/advisor/get-report.md b/examples/2.3.x/server-graphql/examples/advisor/get-report.md new file mode 100644 index 000000000..0078ee661 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/advisor/get-report.md @@ -0,0 +1,43 @@ +```graphql +query { + advisorGetReport( + reportId: "<REPORT_ID>" + ) { + _id + _createdAt + _updatedAt + appId + type + title + summary + targetType + target + categories + insights { + _id + _createdAt + _updatedAt + reportId + type + severity + status + resourceType + resourceId + parentResourceType + parentResourceId + title + summary + ctas { + label + service + method + params + } + analyzedAt + dismissedAt + dismissedBy + } + analyzedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/advisor/list-insights.md b/examples/2.3.x/server-graphql/examples/advisor/list-insights.md new file mode 100644 index 000000000..15d57638d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/advisor/list-insights.md @@ -0,0 +1,35 @@ +```graphql +query { + advisorListInsights( + reportId: "<REPORT_ID>", + queries: [], + total: false + ) { + total + insights { + _id + _createdAt + _updatedAt + reportId + type + severity + status + resourceType + resourceId + parentResourceType + parentResourceId + title + summary + ctas { + label + service + method + params + } + analyzedAt + dismissedAt + dismissedBy + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/advisor/list-reports.md b/examples/2.3.x/server-graphql/examples/advisor/list-reports.md new file mode 100644 index 000000000..a33af1167 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/advisor/list-reports.md @@ -0,0 +1,47 @@ +```graphql +query { + advisorListReports( + queries: [], + total: false + ) { + total + reports { + _id + _createdAt + _updatedAt + appId + type + title + summary + targetType + target + categories + insights { + _id + _createdAt + _updatedAt + reportId + type + severity + status + resourceType + resourceId + parentResourceType + parentResourceId + title + summary + ctas { + label + service + method + params + } + analyzedAt + dismissedAt + dismissedBy + } + analyzedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/create-installation-token.md b/examples/2.3.x/server-graphql/examples/apps/create-installation-token.md new file mode 100644 index 000000000..bf3a90f9a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```graphql +mutation { + appsCreateInstallationToken( + appId: "<APP_ID>", + installationId: "<INSTALLATION_ID>" + ) { + access_token + token_type + expires_in + refresh_token + scope + authorization_details + id_token + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/create-key.md b/examples/2.3.x/server-graphql/examples/apps/create-key.md new file mode 100644 index 000000000..07d925653 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/create-key.md @@ -0,0 +1,17 @@ +```graphql +mutation { + appsCreateKey( + appId: "<APP_ID>" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/create-secret.md b/examples/2.3.x/server-graphql/examples/apps/create-secret.md new file mode 100644 index 000000000..8c1294f4a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/create-secret.md @@ -0,0 +1,17 @@ +```graphql +mutation { + appsCreateSecret( + appId: "<APP_ID>" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/create.md b/examples/2.3.x/server-graphql/examples/apps/create.md new file mode 100644 index 000000000..79441525c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/create.md @@ -0,0 +1,62 @@ +```graphql +mutation { + appsCreate( + appId: "<APP_ID>", + name: "<NAME>", + redirectUris: [], + description: "<DESCRIPTION>", + clientUri: "https://example.com", + logoUri: "https://example.com", + privacyPolicyUrl: "https://example.com", + termsUrl: "https://example.com", + contacts: [], + tagline: "<TAGLINE>", + tags: [], + images: [], + supportUrl: "https://example.com", + dataDeletionUrl: "https://example.com", + postLogoutRedirectUris: [], + enabled: false, + type: "public", + deviceFlow: false, + teamId: "<TEAM_ID>" + ) { + _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/server-graphql/examples/apps/delete-installation.md b/examples/2.3.x/server-graphql/examples/apps/delete-installation.md new file mode 100644 index 000000000..451708bf4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/delete-installation.md @@ -0,0 +1,10 @@ +```graphql +mutation { + appsDeleteInstallation( + appId: "<APP_ID>", + installationId: "<INSTALLATION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/delete-key.md b/examples/2.3.x/server-graphql/examples/apps/delete-key.md new file mode 100644 index 000000000..81dcc6383 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/delete-key.md @@ -0,0 +1,10 @@ +```graphql +mutation { + appsDeleteKey( + appId: "<APP_ID>", + keyId: "<KEY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/delete-secret.md b/examples/2.3.x/server-graphql/examples/apps/delete-secret.md new file mode 100644 index 000000000..05f82edcf --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/delete-secret.md @@ -0,0 +1,10 @@ +```graphql +mutation { + appsDeleteSecret( + appId: "<APP_ID>", + secretId: "<SECRET_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/delete-tokens.md b/examples/2.3.x/server-graphql/examples/apps/delete-tokens.md new file mode 100644 index 000000000..a6dd21b78 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/delete-tokens.md @@ -0,0 +1,9 @@ +```graphql +mutation { + appsDeleteTokens( + appId: "<APP_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/delete.md b/examples/2.3.x/server-graphql/examples/apps/delete.md new file mode 100644 index 000000000..e9989153b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + appsDelete( + appId: "<APP_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/get-installation.md b/examples/2.3.x/server-graphql/examples/apps/get-installation.md new file mode 100644 index 000000000..1ef5ca9b5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/get-installation.md @@ -0,0 +1,19 @@ +```graphql +query { + appsGetInstallation( + appId: "<APP_ID>", + installationId: "<INSTALLATION_ID>" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/get-key.md b/examples/2.3.x/server-graphql/examples/apps/get-key.md new file mode 100644 index 000000000..36435f09c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/get-key.md @@ -0,0 +1,18 @@ +```graphql +query { + appsGetKey( + appId: "<APP_ID>", + keyId: "<KEY_ID>" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/get-secret.md b/examples/2.3.x/server-graphql/examples/apps/get-secret.md new file mode 100644 index 000000000..c389a15cc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/get-secret.md @@ -0,0 +1,18 @@ +```graphql +query { + appsGetSecret( + appId: "<APP_ID>", + secretId: "<SECRET_ID>" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/get.md b/examples/2.3.x/server-graphql/examples/apps/get.md new file mode 100644 index 000000000..21d2bc950 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/get.md @@ -0,0 +1,44 @@ +```graphql +query { + appsGet( + appId: "<APP_ID>" + ) { + _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/server-graphql/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-graphql/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..453eff637 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/list-installation-scopes.md @@ -0,0 +1,14 @@ +```graphql +query { + appsListInstallationScopes { + total + scopes { + value + description + type + category + deprecated + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/list-installations.md b/examples/2.3.x/server-graphql/examples/apps/list-installations.md new file mode 100644 index 000000000..cf47dd81f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/list-installations.md @@ -0,0 +1,23 @@ +```graphql +query { + appsListInstallations( + appId: "<APP_ID>", + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/list-keys.md b/examples/2.3.x/server-graphql/examples/apps/list-keys.md new file mode 100644 index 000000000..0aa5dd759 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/list-keys.md @@ -0,0 +1,22 @@ +```graphql +query { + appsListKeys( + appId: "<APP_ID>", + queries: [], + total: false + ) { + total + keys { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-graphql/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..bce864f54 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,14 @@ +```graphql +query { + appsListOAuth2Scopes { + total + scopes { + value + description + type + category + deprecated + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/list-secrets.md b/examples/2.3.x/server-graphql/examples/apps/list-secrets.md new file mode 100644 index 000000000..c14c63a89 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/list-secrets.md @@ -0,0 +1,22 @@ +```graphql +query { + appsListSecrets( + appId: "<APP_ID>", + queries: [], + total: false + ) { + total + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/list.md b/examples/2.3.x/server-graphql/examples/apps/list.md new file mode 100644 index 000000000..2b6087049 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/list.md @@ -0,0 +1,48 @@ +```graphql +query { + appsList( + queries: [], + total: false + ) { + total + apps { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/update-labels.md b/examples/2.3.x/server-graphql/examples/apps/update-labels.md new file mode 100644 index 000000000..afefcaee6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/update-labels.md @@ -0,0 +1,45 @@ +```graphql +mutation { + appsUpdateLabels( + appId: "<APP_ID>", + labels: [] + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/apps/update-team.md b/examples/2.3.x/server-graphql/examples/apps/update-team.md new file mode 100644 index 000000000..80f53a055 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/update-team.md @@ -0,0 +1,45 @@ +```graphql +mutation { + appsUpdateTeam( + appId: "<APP_ID>", + teamId: "<TEAM_ID>" + ) { + _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/server-graphql/examples/apps/update.md b/examples/2.3.x/server-graphql/examples/apps/update.md new file mode 100644 index 000000000..94031890b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/apps/update.md @@ -0,0 +1,63 @@ +```graphql +mutation { + appsUpdate( + appId: "<APP_ID>", + name: "<NAME>", + description: "<DESCRIPTION>", + clientUri: "https://example.com", + logoUri: "https://example.com", + privacyPolicyUrl: "https://example.com", + termsUrl: "https://example.com", + contacts: [], + tagline: "<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/server-graphql/examples/avatars/get-browser.md b/examples/2.3.x/server-graphql/examples/avatars/get-browser.md new file mode 100644 index 000000000..2f432681b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-browser.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetBrowser( + code: "aa", + width: 0, + height: 0, + quality: -1 + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/get-credit-card.md b/examples/2.3.x/server-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..952c23021 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-credit-card.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetCreditCard( + code: "amex", + width: 0, + height: 0, + quality: -1 + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/get-favicon.md b/examples/2.3.x/server-graphql/examples/avatars/get-favicon.md new file mode 100644 index 000000000..22653ab58 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-favicon.md @@ -0,0 +1,9 @@ +```graphql +query { + avatarsGetFavicon( + url: "https://example.com" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/get-flag.md b/examples/2.3.x/server-graphql/examples/avatars/get-flag.md new file mode 100644 index 000000000..6444e6988 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-flag.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetFlag( + code: "af", + width: 0, + height: 0, + quality: -1 + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/get-image.md b/examples/2.3.x/server-graphql/examples/avatars/get-image.md new file mode 100644 index 000000000..8acc02134 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-image.md @@ -0,0 +1,11 @@ +```graphql +query { + avatarsGetImage( + url: "https://example.com", + width: 0, + height: 0 + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/get-initials.md b/examples/2.3.x/server-graphql/examples/avatars/get-initials.md new file mode 100644 index 000000000..c172740be --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-initials.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetInitials( + name: "<NAME>", + width: 0, + height: 0, + background: "FFFFFF" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/get-photo.md b/examples/2.3.x/server-graphql/examples/avatars/get-photo.md new file mode 100644 index 000000000..101335eac --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-photo.md @@ -0,0 +1,16 @@ +```graphql +query { + avatarsGetPhoto( + width: 0, + height: 0, + quality: 0, + output: "png", + rating: "g", + userId: "current()", + emailHash: "<EMAIL_HASH>", + name: "<NAME>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/get-qr.md b/examples/2.3.x/server-graphql/examples/avatars/get-qr.md new file mode 100644 index 000000000..9206b404e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-qr.md @@ -0,0 +1,12 @@ +```graphql +query { + avatarsGetQR( + text: "<TEXT>", + size: 1, + margin: 0, + download: false + ) { + 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 new file mode 100644 index 000000000..f5cab660c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/get-screenshot.md @@ -0,0 +1,28 @@ +```graphql +query { + avatarsGetScreenshot( + url: "https://example.com", + headers: "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + viewportWidth: 1920, + viewportHeight: 1080, + scale: 2, + theme: "dark", + userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", + fullpage: true, + locale: "en-US", + timezone: "America/New_York", + latitude: 37.7749, + longitude: -122.4194, + accuracy: 100, + touch: true, + permissions: ["geolocation", "notifications"], + sleep: 3, + width: 800, + height: 600, + quality: 85, + output: "jpeg" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/create-archive.md b/examples/2.3.x/server-graphql/examples/backups/create-archive.md new file mode 100644 index 000000000..1187cd0a6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/create-archive.md @@ -0,0 +1,21 @@ +```graphql +mutation { + backupsCreateArchive( + services: [], + resourceId: "<RESOURCE_ID>" + ) { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/create-policy.md b/examples/2.3.x/server-graphql/examples/backups/create-policy.md new file mode 100644 index 000000000..beb188695 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/create-policy.md @@ -0,0 +1,26 @@ +```graphql +mutation { + backupsCreatePolicy( + policyId: "<POLICY_ID>", + services: [], + retention: 1, + schedule: "", + name: "<NAME>", + resourceId: "<RESOURCE_ID>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/create-restoration.md b/examples/2.3.x/server-graphql/examples/backups/create-restoration.md new file mode 100644 index 000000000..3ad263c6c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/create-restoration.md @@ -0,0 +1,22 @@ +```graphql +mutation { + backupsCreateRestoration( + archiveId: "<ARCHIVE_ID>", + services: [], + newResourceId: "<NEW_RESOURCE_ID>", + newResourceName: "<NEW_RESOURCE_NAME>" + ) { + _id + _createdAt + _updatedAt + archiveId + policyId + status + startedAt + migrationId + services + resources + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/delete-archive.md b/examples/2.3.x/server-graphql/examples/backups/delete-archive.md new file mode 100644 index 000000000..be1cd1bae --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/delete-archive.md @@ -0,0 +1,9 @@ +```graphql +mutation { + backupsDeleteArchive( + archiveId: "<ARCHIVE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/delete-policy.md b/examples/2.3.x/server-graphql/examples/backups/delete-policy.md new file mode 100644 index 000000000..7a897aae6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/delete-policy.md @@ -0,0 +1,9 @@ +```graphql +mutation { + backupsDeletePolicy( + policyId: "<POLICY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/get-archive.md b/examples/2.3.x/server-graphql/examples/backups/get-archive.md new file mode 100644 index 000000000..f6a74a4ca --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/get-archive.md @@ -0,0 +1,20 @@ +```graphql +query { + backupsGetArchive( + archiveId: "<ARCHIVE_ID>" + ) { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/get-policy.md b/examples/2.3.x/server-graphql/examples/backups/get-policy.md new file mode 100644 index 000000000..72d33fdce --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/get-policy.md @@ -0,0 +1,20 @@ +```graphql +query { + backupsGetPolicy( + policyId: "<POLICY_ID>" + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/get-restoration.md b/examples/2.3.x/server-graphql/examples/backups/get-restoration.md new file mode 100644 index 000000000..d55bc4843 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/get-restoration.md @@ -0,0 +1,19 @@ +```graphql +query { + backupsGetRestoration( + restorationId: "<RESTORATION_ID>" + ) { + _id + _createdAt + _updatedAt + archiveId + policyId + status + startedAt + migrationId + services + resources + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/list-archives.md b/examples/2.3.x/server-graphql/examples/backups/list-archives.md new file mode 100644 index 000000000..756317a70 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/list-archives.md @@ -0,0 +1,23 @@ +```graphql +query { + backupsListArchives( + queries: [] + ) { + total + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/list-policies.md b/examples/2.3.x/server-graphql/examples/backups/list-policies.md new file mode 100644 index 000000000..d10250158 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/list-policies.md @@ -0,0 +1,23 @@ +```graphql +query { + backupsListPolicies( + queries: [] + ) { + total + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/list-restorations.md b/examples/2.3.x/server-graphql/examples/backups/list-restorations.md new file mode 100644 index 000000000..31fcb99ad --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/list-restorations.md @@ -0,0 +1,22 @@ +```graphql +query { + backupsListRestorations( + queries: [] + ) { + total + restorations { + _id + _createdAt + _updatedAt + archiveId + policyId + status + startedAt + migrationId + services + resources + options + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/backups/update-policy.md b/examples/2.3.x/server-graphql/examples/backups/update-policy.md new file mode 100644 index 000000000..24687838e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/backups/update-policy.md @@ -0,0 +1,24 @@ +```graphql +mutation { + backupsUpdatePolicy( + policyId: "<POLICY_ID>", + name: "<NAME>", + retention: 1, + schedule: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..f4eca12e6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-big-int-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesCreateBigIntAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, + max: 1000000, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..64b6ffa53 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-boolean-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesCreateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-collection.md b/examples/2.3.x/server-graphql/examples/databases/create-collection.md new file mode 100644 index 000000000..d082f4e8c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-collection.md @@ -0,0 +1,38 @@ +```graphql +mutation { + databasesCreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"], + documentSecurity: false, + enabled: false, + attributes: [], + indexes: [] + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..8e58c6f12 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-datetime-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesCreateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-document.md b/examples/2.3.x/server-graphql/examples/databases/create-document.md new file mode 100644 index 000000000..5ca3e372a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesCreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..67d038e93 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesCreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-email-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..a463a4ead --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-email-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesCreateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..0d4f254c1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-enum-attribute.md @@ -0,0 +1,25 @@ +```graphql +mutation { + databasesCreateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + elements: ["active", "inactive"], + required: false, + default: "active", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-float-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..d1a466b10 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-float-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesCreateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, + max: 100, + default: 10.5, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` 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 new file mode 100644 index 000000000..6676113e4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-index.md @@ -0,0 +1,24 @@ +```graphql +mutation { + databasesCreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: "key", + attributes: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..7edf71910 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-integer-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesCreateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, + max: 100, + default: 10, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..dc995d7bc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-ip-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesCreateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-line-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..dca609e98 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-line-attribute.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesCreateLineAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [[1, 2], [3, 4], [5, 6]] + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..7748eb04d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-longtext-attribute.md @@ -0,0 +1,24 @@ +```graphql +mutation { + databasesCreateLongtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..8aea0150d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,24 @@ +```graphql +mutation { + databasesCreateMediumtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-operations.md b/examples/2.3.x/server-graphql/examples/databases/create-operations.md new file mode 100644 index 000000000..7fa29cf3f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-operations.md @@ -0,0 +1,25 @@ +```graphql +mutation { + databasesCreateOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-point-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..304cfa295 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-point-attribute.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesCreatePointAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [1, 2] + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..9ff2f46f0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-polygon-attribute.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesCreatePolygonAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..9fe8ff312 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-relationship-attribute.md @@ -0,0 +1,29 @@ +```graphql +mutation { + databasesCreateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: "oneToOne", + twoWay: false, + key: "<KEY>", + twoWayKey: "<TWO_WAY_KEY>", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-string-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..3398a7b89 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-string-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesCreateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-text-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..651cbb6de --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-text-attribute.md @@ -0,0 +1,24 @@ +```graphql +mutation { + databasesCreateTextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-transaction.md b/examples/2.3.x/server-graphql/examples/databases/create-transaction.md new file mode 100644 index 000000000..d28f2eadc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-transaction.md @@ -0,0 +1,14 @@ +```graphql +mutation { + databasesCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-url-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..b28c679bc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-url-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesCreateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-graphql/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..081f0c357 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create-varchar-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesCreateVarcharAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create.md b/examples/2.3.x/server-graphql/examples/databases/create.md new file mode 100644 index 000000000..970eba35a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/create.md @@ -0,0 +1,51 @@ +```graphql +mutation { + databasesCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-graphql/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..0b5428ae6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesDecrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, + min: 0, + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/delete-attribute.md b/examples/2.3.x/server-graphql/examples/databases/delete-attribute.md new file mode 100644 index 000000000..1c2d0a923 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/delete-attribute.md @@ -0,0 +1,11 @@ +```graphql +mutation { + databasesDeleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/delete-collection.md b/examples/2.3.x/server-graphql/examples/databases/delete-collection.md new file mode 100644 index 000000000..6d6db5b1a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/delete-collection.md @@ -0,0 +1,10 @@ +```graphql +mutation { + databasesDeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/delete-document.md b/examples/2.3.x/server-graphql/examples/databases/delete-document.md new file mode 100644 index 000000000..f6d166b0c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/delete-document.md @@ -0,0 +1,12 @@ +```graphql +mutation { + databasesDeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" + ) { + status + } +} +``` 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 new file mode 100644 index 000000000..6cf4405ca --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/delete-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesDeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/delete-index.md b/examples/2.3.x/server-graphql/examples/databases/delete-index.md new file mode 100644 index 000000000..8a4930c7a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/delete-index.md @@ -0,0 +1,11 @@ +```graphql +mutation { + databasesDeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/delete-transaction.md b/examples/2.3.x/server-graphql/examples/databases/delete-transaction.md new file mode 100644 index 000000000..9230d0c85 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + databasesDeleteTransaction( + transactionId: "<TRANSACTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/delete.md b/examples/2.3.x/server-graphql/examples/databases/delete.md new file mode 100644 index 000000000..a5fc46409 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + databasesDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/get-attribute.md b/examples/2.3.x/server-graphql/examples/databases/get-attribute.md new file mode 100644 index 000000000..9ddb17b8e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/get-attribute.md @@ -0,0 +1,19 @@ +```graphql +query { + databasesGetAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/get-collection.md b/examples/2.3.x/server-graphql/examples/databases/get-collection.md new file mode 100644 index 000000000..2e83ac46d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/get-collection.md @@ -0,0 +1,32 @@ +```graphql +query { + databasesGetCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/get-document.md b/examples/2.3.x/server-graphql/examples/databases/get-document.md new file mode 100644 index 000000000..e188dee38 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/get-document.md @@ -0,0 +1,20 @@ +```graphql +query { + databasesGetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/get-index.md b/examples/2.3.x/server-graphql/examples/databases/get-index.md new file mode 100644 index 000000000..39256475d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/get-index.md @@ -0,0 +1,20 @@ +```graphql +query { + databasesGetIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/get-transaction.md b/examples/2.3.x/server-graphql/examples/databases/get-transaction.md new file mode 100644 index 000000000..001554140 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + databasesGetTransaction( + transactionId: "<TRANSACTION_ID>" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/get.md b/examples/2.3.x/server-graphql/examples/databases/get.md new file mode 100644 index 000000000..c17e23986 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/get.md @@ -0,0 +1,49 @@ +```graphql +query { + databasesGet( + databaseId: "<DATABASE_ID>" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-graphql/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..8c3246a05 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/increment-document-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesIncrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, + max: 100, + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/list-attributes.md b/examples/2.3.x/server-graphql/examples/databases/list-attributes.md new file mode 100644 index 000000000..c8a93ecb8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/list-attributes.md @@ -0,0 +1,13 @@ +```graphql +query { + databasesListAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + total: false + ) { + total + attributes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/list-collections.md b/examples/2.3.x/server-graphql/examples/databases/list-collections.md new file mode 100644 index 000000000..804545134 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/list-collections.md @@ -0,0 +1,37 @@ +```graphql +query { + databasesListCollections( + databaseId: "<DATABASE_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + collections { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/list-documents.md b/examples/2.3.x/server-graphql/examples/databases/list-documents.md new file mode 100644 index 000000000..d0e331d0e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/list-documents.md @@ -0,0 +1,24 @@ +```graphql +query { + databasesListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/list-indexes.md b/examples/2.3.x/server-graphql/examples/databases/list-indexes.md new file mode 100644 index 000000000..a6ab75e12 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/list-indexes.md @@ -0,0 +1,24 @@ +```graphql +query { + databasesListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + total: false + ) { + total + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + } +} +``` 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 new file mode 100644 index 000000000..2fc18db35 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + databasesListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/list.md b/examples/2.3.x/server-graphql/examples/databases/list.md new file mode 100644 index 000000000..00c0826f7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/list.md @@ -0,0 +1,54 @@ +```graphql +query { + databasesList( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + databases { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..d1821878e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-big-int-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesUpdateBigIntAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 0, + min: 0, + max: 1000000, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..f40dcccba --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-boolean-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesUpdateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: false, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-collection.md b/examples/2.3.x/server-graphql/examples/databases/update-collection.md new file mode 100644 index 000000000..d3c159f1a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-collection.md @@ -0,0 +1,37 @@ +```graphql +mutation { + databasesUpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"], + documentSecurity: false, + enabled: false, + purge: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..86c659f07 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-datetime-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesUpdateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-document.md b/examples/2.3.x/server-graphql/examples/databases/update-document.md new file mode 100644 index 000000000..5b9eaf050 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesUpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-documents.md b/examples/2.3.x/server-graphql/examples/databases/update-documents.md new file mode 100644 index 000000000..b9773fce2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-documents.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesUpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-email-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..1eb5807b8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-email-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesUpdateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..903b43e9e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-enum-attribute.md @@ -0,0 +1,25 @@ +```graphql +mutation { + databasesUpdateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + elements: ["active", "inactive"], + required: false, + default: "active", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-float-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..9eff9e705 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-float-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesUpdateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 10.5, + min: 0, + max: 100, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..8d346abc9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-integer-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesUpdateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 10, + min: 0, + max: 100, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..cf91d0f58 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-ip-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesUpdateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-line-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..9a3cc72ca --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-line-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesUpdateLineAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [[1, 2], [3, 4], [5, 6]], + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..53c6fdaa5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-longtext-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesUpdateLongtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..60a101367 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesUpdateMediumtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-point-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..17940f033 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-point-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesUpdatePointAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [1, 2], + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..ede02ed4a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-polygon-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesUpdatePolygonAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..d642c9b83 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-relationship-attribute.md @@ -0,0 +1,26 @@ +```graphql +mutation { + databasesUpdateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + onDelete: "cascade", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-string-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..75f177d20 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-string-attribute.md @@ -0,0 +1,25 @@ +```graphql +mutation { + databasesUpdateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-text-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..22ef57e1a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-text-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesUpdateTextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-transaction.md b/examples/2.3.x/server-graphql/examples/databases/update-transaction.md new file mode 100644 index 000000000..a2d8cb145 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-transaction.md @@ -0,0 +1,16 @@ +```graphql +mutation { + databasesUpdateTransaction( + transactionId: "<TRANSACTION_ID>", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-url-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..214ab674e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-url-attribute.md @@ -0,0 +1,23 @@ +```graphql +mutation { + databasesUpdateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-graphql/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..2f610d9eb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update-varchar-attribute.md @@ -0,0 +1,25 @@ +```graphql +mutation { + databasesUpdateVarcharAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/update.md b/examples/2.3.x/server-graphql/examples/databases/update.md new file mode 100644 index 000000000..8b820932f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/update.md @@ -0,0 +1,51 @@ +```graphql +mutation { + databasesUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/upsert-document.md b/examples/2.3.x/server-graphql/examples/databases/upsert-document.md new file mode 100644 index 000000000..910971ed5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/upsert-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + databasesUpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..eb0573545 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/databases/upsert-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + databasesUpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/create-collection.md b/examples/2.3.x/server-graphql/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..2352e900a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-collection.md @@ -0,0 +1,38 @@ +```graphql +mutation { + documentsDBCreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"], + documentSecurity: false, + enabled: false, + attributes: [], + indexes: [] + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/create-document.md b/examples/2.3.x/server-graphql/examples/documentsdb/create-document.md new file mode 100644 index 000000000..f8415e6af --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + documentsDBCreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..211576113 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + documentsDBCreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/create-failover.md b/examples/2.3.x/server-graphql/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..51634662b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-failover.md @@ -0,0 +1,61 @@ +```graphql +mutation { + documentsDBCreateFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` 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 new file mode 100644 index 000000000..bc51f4562 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-index.md @@ -0,0 +1,24 @@ +```graphql +mutation { + documentsDBCreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: "key", + attributes: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/create-operations.md b/examples/2.3.x/server-graphql/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..153d00770 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```graphql +mutation { + documentsDBCreateOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-graphql/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..75a9d53d4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-transaction.md @@ -0,0 +1,14 @@ +```graphql +mutation { + documentsDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/create.md b/examples/2.3.x/server-graphql/examples/documentsdb/create.md new file mode 100644 index 000000000..f173984e7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create.md @@ -0,0 +1,54 @@ +```graphql +mutation { + documentsDBCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, + specification: "serverless", + replicas: 0, + syncMode: "async" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-graphql/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..180e2af17 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + documentsDBDecrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, + min: 0, + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-graphql/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..75bc5fd38 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/delete-collection.md @@ -0,0 +1,10 @@ +```graphql +mutation { + documentsDBDeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/delete-document.md b/examples/2.3.x/server-graphql/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..64f03c698 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/delete-document.md @@ -0,0 +1,12 @@ +```graphql +mutation { + documentsDBDeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" + ) { + status + } +} +``` 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 new file mode 100644 index 000000000..46deb6f75 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/delete-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + documentsDBDeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/delete-index.md b/examples/2.3.x/server-graphql/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..962c9a7bc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/delete-index.md @@ -0,0 +1,11 @@ +```graphql +mutation { + documentsDBDeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-graphql/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..d6cea68f2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + documentsDBDeleteTransaction( + transactionId: "<TRANSACTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/delete.md b/examples/2.3.x/server-graphql/examples/documentsdb/delete.md new file mode 100644 index 000000000..9e40f04a5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + documentsDBDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/get-collection.md b/examples/2.3.x/server-graphql/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..aad2761e6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/get-collection.md @@ -0,0 +1,32 @@ +```graphql +query { + documentsDBGetCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/get-document.md b/examples/2.3.x/server-graphql/examples/documentsdb/get-document.md new file mode 100644 index 000000000..970f56656 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/get-document.md @@ -0,0 +1,20 @@ +```graphql +query { + documentsDBGetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/get-index.md b/examples/2.3.x/server-graphql/examples/documentsdb/get-index.md new file mode 100644 index 000000000..68bb5c7c1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/get-index.md @@ -0,0 +1,20 @@ +```graphql +query { + documentsDBGetIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-graphql/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..6560a8a66 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/get-replicas.md @@ -0,0 +1,22 @@ +```graphql +query { + documentsDBGetReplicas( + databaseId: "<DATABASE_ID>" + ) { + replicas + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + members { + _id + role + status + replicating + lagSeconds + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/get-status.md b/examples/2.3.x/server-graphql/examples/documentsdb/get-status.md new file mode 100644 index 000000000..e72614b94 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/get-status.md @@ -0,0 +1,36 @@ +```graphql +query { + documentsDBGetStatus( + databaseId: "<DATABASE_ID>" + ) { + health + ready + engine + version + uptime + connections { + current + max + } + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + replicas { + index + role + healthy + replicating + lagSeconds + } + volumes { + path + usedPercent + available + mounted + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-graphql/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..76e3dd728 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + documentsDBGetTransaction( + transactionId: "<TRANSACTION_ID>" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/get.md b/examples/2.3.x/server-graphql/examples/documentsdb/get.md new file mode 100644 index 000000000..4086c8cd2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/get.md @@ -0,0 +1,49 @@ +```graphql +query { + documentsDBGet( + databaseId: "<DATABASE_ID>" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-graphql/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..cb70414fd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,22 @@ +```graphql +mutation { + documentsDBIncrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, + max: 100, + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/list-collections.md b/examples/2.3.x/server-graphql/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..1ea7ed863 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/list-collections.md @@ -0,0 +1,37 @@ +```graphql +query { + documentsDBListCollections( + databaseId: "<DATABASE_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + collections { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/list-documents.md b/examples/2.3.x/server-graphql/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..89a23cf05 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/list-documents.md @@ -0,0 +1,24 @@ +```graphql +query { + documentsDBListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-graphql/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..39e333334 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/list-indexes.md @@ -0,0 +1,24 @@ +```graphql +query { + documentsDBListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + total: false + ) { + total + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/list-operations.md b/examples/2.3.x/server-graphql/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..455259825 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/list-operations.md @@ -0,0 +1,25 @@ +```graphql +query { + documentsDBListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", + limit: 1, + offset: 0 + ) { + total + operations { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-graphql/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..e419bba8a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/list-specifications.md @@ -0,0 +1,22 @@ +```graphql +query { + documentsDBListSpecifications { + specifications { + slug + name + price + storageOverageRate + bandwidthOverageRate + replicaRate + pitrRate + cpu + memory + maxConnections + includedStorage + includedBandwidth + enabled + } + 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 new file mode 100644 index 000000000..2569dde05 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + documentsDBListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/list.md b/examples/2.3.x/server-graphql/examples/documentsdb/list.md new file mode 100644 index 000000000..f3fec0847 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/list.md @@ -0,0 +1,53 @@ +```graphql +query { + documentsDBList( + queries: [], + total: false + ) { + total + databases { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/update-collection.md b/examples/2.3.x/server-graphql/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..73db3382c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/update-collection.md @@ -0,0 +1,37 @@ +```graphql +mutation { + documentsDBUpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"], + documentSecurity: false, + enabled: false, + purge: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/update-document.md b/examples/2.3.x/server-graphql/examples/documentsdb/update-document.md new file mode 100644 index 000000000..40a4898c9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/update-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + documentsDBUpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/update-documents.md b/examples/2.3.x/server-graphql/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..05a4665e7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/update-documents.md @@ -0,0 +1,23 @@ +```graphql +mutation { + documentsDBUpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: "{}", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-graphql/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..a9616ca48 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/update-transaction.md @@ -0,0 +1,16 @@ +```graphql +mutation { + documentsDBUpdateTransaction( + transactionId: "<TRANSACTION_ID>", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/update.md b/examples/2.3.x/server-graphql/examples/documentsdb/update.md new file mode 100644 index 000000000..559b7904f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/update.md @@ -0,0 +1,54 @@ +```graphql +mutation { + documentsDBUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, + specification: "serverless", + replicas: 0, + syncMode: "async" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-graphql/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..1b75a2830 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/upsert-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + documentsDBUpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..2a6ed4885 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/documentsdb/upsert-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + documentsDBUpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-graphql/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..6c8f4e351 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,23 @@ +```graphql +mutation { + domainsCreatePresetGoogleWorkspace( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-graphql/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..e45da1158 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,23 @@ +```graphql +mutation { + domainsCreatePresetICloud( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-graphql/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..2652bc442 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-preset-mailgun.md @@ -0,0 +1,23 @@ +```graphql +mutation { + domainsCreatePresetMailgun( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-graphql/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..cae6fc64c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-preset-outlook.md @@ -0,0 +1,23 @@ +```graphql +mutation { + domainsCreatePresetOutlook( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-graphql/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..ffbe421fd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,23 @@ +```graphql +mutation { + domainsCreatePresetProtonMail( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-graphql/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..ba1b05866 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-preset-zoho.md @@ -0,0 +1,23 @@ +```graphql +mutation { + domainsCreatePresetZoho( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-a.md b/examples/2.3.x/server-graphql/examples/domains/create-record-a.md new file mode 100644 index 000000000..1fd0fd0ba --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-a.md @@ -0,0 +1,24 @@ +```graphql +mutation { + domainsCreateRecordA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-graphql/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..d9e41b67a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-aaaa.md @@ -0,0 +1,24 @@ +```graphql +mutation { + domainsCreateRecordAAAA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-alias.md b/examples/2.3.x/server-graphql/examples/domains/create-record-alias.md new file mode 100644 index 000000000..d8f97bc42 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-alias.md @@ -0,0 +1,24 @@ +```graphql +mutation { + domainsCreateRecordAlias( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-caa.md b/examples/2.3.x/server-graphql/examples/domains/create-record-caa.md new file mode 100644 index 000000000..27425c93c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-caa.md @@ -0,0 +1,24 @@ +```graphql +mutation { + domainsCreateRecordCAA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-cname.md b/examples/2.3.x/server-graphql/examples/domains/create-record-cname.md new file mode 100644 index 000000000..dcc11a03b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-cname.md @@ -0,0 +1,24 @@ +```graphql +mutation { + domainsCreateRecordCNAME( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-https.md b/examples/2.3.x/server-graphql/examples/domains/create-record-https.md new file mode 100644 index 000000000..28f5d59ea --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-https.md @@ -0,0 +1,24 @@ +```graphql +mutation { + domainsCreateRecordHTTPS( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-mx.md b/examples/2.3.x/server-graphql/examples/domains/create-record-mx.md new file mode 100644 index 000000000..23c8bccaf --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-mx.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsCreateRecordMX( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-ns.md b/examples/2.3.x/server-graphql/examples/domains/create-record-ns.md new file mode 100644 index 000000000..6c5bb195c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-ns.md @@ -0,0 +1,24 @@ +```graphql +mutation { + domainsCreateRecordNS( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-srv.md b/examples/2.3.x/server-graphql/examples/domains/create-record-srv.md new file mode 100644 index 000000000..b11793015 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-srv.md @@ -0,0 +1,27 @@ +```graphql +mutation { + domainsCreateRecordSRV( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create-record-txt.md b/examples/2.3.x/server-graphql/examples/domains/create-record-txt.md new file mode 100644 index 000000000..9a4974117 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create-record-txt.md @@ -0,0 +1,24 @@ +```graphql +mutation { + domainsCreateRecordTXT( + domainId: "<DOMAIN_ID>", + name: "", + ttl: 1, + value: "<VALUE>", + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/create.md b/examples/2.3.x/server-graphql/examples/domains/create.md new file mode 100644 index 000000000..d27ee0e10 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/create.md @@ -0,0 +1,35 @@ +```graphql +mutation { + domainsCreate( + teamId: "<TEAM_ID>", + domain: "example.com" + ) { + _id + _createdAt + _updatedAt + domain + registrar + nameservers + expire + renewal + autoRenewal + renewalPrice + transferStatus + teamId + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/delete-record.md b/examples/2.3.x/server-graphql/examples/domains/delete-record.md new file mode 100644 index 000000000..c798e30e5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/delete-record.md @@ -0,0 +1,10 @@ +```graphql +mutation { + domainsDeleteRecord( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/delete.md b/examples/2.3.x/server-graphql/examples/domains/delete.md new file mode 100644 index 000000000..5c704a7b6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + domainsDelete( + domainId: "<DOMAIN_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-graphql/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..b64fb7334 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,23 @@ +```graphql +query { + domainsGetPresetGoogleWorkspace( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-graphql/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..f17c7f254 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,23 @@ +```graphql +query { + domainsGetPresetICloud( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-graphql/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..813359962 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-preset-mailgun.md @@ -0,0 +1,23 @@ +```graphql +query { + domainsGetPresetMailgun( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-graphql/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..5bd28b0af --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-preset-outlook.md @@ -0,0 +1,23 @@ +```graphql +query { + domainsGetPresetOutlook( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-graphql/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..1a747e246 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,23 @@ +```graphql +query { + domainsGetPresetProtonMail( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-graphql/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..e9b33bdb3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-preset-zoho.md @@ -0,0 +1,23 @@ +```graphql +query { + domainsGetPresetZoho( + domainId: "<DOMAIN_ID>" + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-price.md b/examples/2.3.x/server-graphql/examples/domains/get-price.md new file mode 100644 index 000000000..23b577815 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-price.md @@ -0,0 +1,18 @@ +```graphql +query { + domainsGetPrice( + domain: "example.com", + periodYears: 0, + registrationType: "new" + ) { + domain + tld + available + price + periodYears + premium + renewalPrice + renewalPeriodYears + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-record.md b/examples/2.3.x/server-graphql/examples/domains/get-record.md new file mode 100644 index 000000000..19c30f443 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-record.md @@ -0,0 +1,21 @@ +```graphql +query { + domainsGetRecord( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-transfer-status.md b/examples/2.3.x/server-graphql/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..461ea2b55 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-transfer-status.md @@ -0,0 +1,11 @@ +```graphql +query { + domainsGetTransferStatus( + domainId: "<DOMAIN_ID>" + ) { + status + reason + timestamp + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get-zone.md b/examples/2.3.x/server-graphql/examples/domains/get-zone.md new file mode 100644 index 000000000..2d6afe99f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get-zone.md @@ -0,0 +1,9 @@ +```graphql +query { + domainsGetZone( + domainId: "<DOMAIN_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/get.md b/examples/2.3.x/server-graphql/examples/domains/get.md new file mode 100644 index 000000000..f25d45889 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/get.md @@ -0,0 +1,34 @@ +```graphql +query { + domainsGet( + domainId: "<DOMAIN_ID>" + ) { + _id + _createdAt + _updatedAt + domain + registrar + nameservers + expire + renewal + autoRenewal + renewalPrice + transferStatus + teamId + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/list-prices.md b/examples/2.3.x/server-graphql/examples/domains/list-prices.md new file mode 100644 index 000000000..79fac32a5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/list-prices.md @@ -0,0 +1,21 @@ +```graphql +query { + domainsListPrices( + domains: [], + periodYears: 0, + registrationType: "new" + ) { + total + prices { + domain + tld + available + price + periodYears + premium + renewalPrice + renewalPeriodYears + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/list-records.md b/examples/2.3.x/server-graphql/examples/domains/list-records.md new file mode 100644 index 000000000..d18443be1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/list-records.md @@ -0,0 +1,24 @@ +```graphql +query { + domainsListRecords( + domainId: "<DOMAIN_ID>", + queries: [] + ) { + total + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/list.md b/examples/2.3.x/server-graphql/examples/domains/list.md new file mode 100644 index 000000000..05c2f5670 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/list.md @@ -0,0 +1,38 @@ +```graphql +query { + domainsList( + queries: [], + search: "<SEARCH>" + ) { + total + domains { + _id + _createdAt + _updatedAt + domain + registrar + nameservers + expire + renewal + autoRenewal + renewalPrice + transferStatus + teamId + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-nameservers.md b/examples/2.3.x/server-graphql/examples/domains/update-nameservers.md new file mode 100644 index 000000000..e8b1de4ee --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-nameservers.md @@ -0,0 +1,35 @@ +```graphql +mutation { + domainsUpdateNameservers( + domainId: "<DOMAIN_ID>", + nameservers: [] + ) { + _id + _createdAt + _updatedAt + domain + registrar + nameservers + expire + renewal + autoRenewal + renewalPrice + transferStatus + teamId + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-a.md b/examples/2.3.x/server-graphql/examples/domains/update-record-a.md new file mode 100644 index 000000000..b7c2bd80f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-a.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsUpdateRecordA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-graphql/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..7a8fded79 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-aaaa.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsUpdateRecordAAAA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-alias.md b/examples/2.3.x/server-graphql/examples/domains/update-record-alias.md new file mode 100644 index 000000000..77c9850d6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-alias.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsUpdateRecordAlias( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-caa.md b/examples/2.3.x/server-graphql/examples/domains/update-record-caa.md new file mode 100644 index 000000000..6c7dac70c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-caa.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsUpdateRecordCAA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-cname.md b/examples/2.3.x/server-graphql/examples/domains/update-record-cname.md new file mode 100644 index 000000000..483f06107 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-cname.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsUpdateRecordCNAME( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-https.md b/examples/2.3.x/server-graphql/examples/domains/update-record-https.md new file mode 100644 index 000000000..1fedbe894 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-https.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsUpdateRecordHTTPS( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-mx.md b/examples/2.3.x/server-graphql/examples/domains/update-record-mx.md new file mode 100644 index 000000000..26648e553 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-mx.md @@ -0,0 +1,26 @@ +```graphql +mutation { + domainsUpdateRecordMX( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-ns.md b/examples/2.3.x/server-graphql/examples/domains/update-record-ns.md new file mode 100644 index 000000000..48e849625 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-ns.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsUpdateRecordNS( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-srv.md b/examples/2.3.x/server-graphql/examples/domains/update-record-srv.md new file mode 100644 index 000000000..c68f64d25 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-srv.md @@ -0,0 +1,28 @@ +```graphql +mutation { + domainsUpdateRecordSRV( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-record-txt.md b/examples/2.3.x/server-graphql/examples/domains/update-record-txt.md new file mode 100644 index 000000000..a47c8dc49 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-record-txt.md @@ -0,0 +1,25 @@ +```graphql +mutation { + domainsUpdateRecordTXT( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" + ) { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-team.md b/examples/2.3.x/server-graphql/examples/domains/update-team.md new file mode 100644 index 000000000..41658e9e5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-team.md @@ -0,0 +1,35 @@ +```graphql +mutation { + domainsUpdateTeam( + domainId: "<DOMAIN_ID>", + teamId: "<TEAM_ID>" + ) { + _id + _createdAt + _updatedAt + domain + registrar + nameservers + expire + renewal + autoRenewal + renewalPrice + transferStatus + teamId + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/update-zone.md b/examples/2.3.x/server-graphql/examples/domains/update-zone.md new file mode 100644 index 000000000..75298d645 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/update-zone.md @@ -0,0 +1,35 @@ +```graphql +mutation { + domainsUpdateZone( + domainId: "<DOMAIN_ID>", + content: "<CONTENT>" + ) { + _id + _createdAt + _updatedAt + domain + registrar + nameservers + expire + renewal + autoRenewal + renewalPrice + transferStatus + teamId + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/domains/verify-nameservers.md b/examples/2.3.x/server-graphql/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..f1639e048 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/domains/verify-nameservers.md @@ -0,0 +1,34 @@ +```graphql +mutation { + domainsVerifyNameservers( + domainId: "<DOMAIN_ID>" + ) { + _id + _createdAt + _updatedAt + domain + registrar + nameservers + expire + renewal + autoRenewal + renewalPrice + transferStatus + teamId + dnsRecords { + _id + _createdAt + _updatedAt + type + name + value + ttl + priority + lock + weight + port + comment + } + } +} +``` 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 new file mode 100644 index 000000000..0fcc63982 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,16 @@ +```graphql +mutation { + embeddingsCreateTextEmbeddings( + texts: [], + model: "nomic-embed-text" + ) { + total + embeddings { + model + dimension + embedding + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/create-deployment.md b/examples/2.3.x/server-graphql/examples/functions/create-deployment.md new file mode 100644 index 000000000..df5cd320a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/create-deployment.md @@ -0,0 +1,26 @@ +```graphql +POST /v1/functions/{functionId}/deployments 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 { functionsCreateDeployment(functionId: $functionId, code: $code, activate: $activate, entrypoint: $entrypoint, commands: $commands) { id }" }, "variables": { "functionId": "<FUNCTION_ID>", "code": null, "activate": false, "entrypoint": "<ENTRYPOINT>", "commands": "<COMMANDS>" } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-graphql/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..4838d0403 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,37 @@ +```graphql +mutation { + functionsCreateDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/create-execution.md b/examples/2.3.x/server-graphql/examples/functions/create-execution.md new file mode 100644 index 000000000..1009c36d5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/create-execution.md @@ -0,0 +1,39 @@ +```graphql +mutation { + functionsCreateExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", + async: false, + path: "<PATH>", + method: "GET", + headers: "{}", + scheduledAt: "<SCHEDULED_AT>" + ) { + _id + _createdAt + _updatedAt + _permissions + resourceId + resourceType + deploymentId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/create-template-deployment.md b/examples/2.3.x/server-graphql/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..57a0cf475 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/create-template-deployment.md @@ -0,0 +1,41 @@ +```graphql +mutation { + functionsCreateTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + type: "commit", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/create-variable.md b/examples/2.3.x/server-graphql/examples/functions/create-variable.md new file mode 100644 index 000000000..0747cb110 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/create-variable.md @@ -0,0 +1,20 @@ +```graphql +mutation { + functionsCreateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-graphql/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..3bedd7a85 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/create-vcs-deployment.md @@ -0,0 +1,38 @@ +```graphql +mutation { + functionsCreateVcsDeployment( + functionId: "<FUNCTION_ID>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/create.md b/examples/2.3.x/server-graphql/examples/functions/create.md new file mode 100644 index 000000000..3f12f57a2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/create.md @@ -0,0 +1,70 @@ +```graphql +mutation { + functionsCreate( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: "node-14.5", + execute: ["any"], + events: [], + schedule: "0 0 * * *", + timeout: 1, + enabled: false, + logging: false, + entrypoint: "<ENTRYPOINT>", + commands: "<COMMANDS>", + scopes: [], + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + providerBranches: [], + providerPaths: [], + buildSpecification: "s-1vcpu-512mb", + runtimeSpecification: "s-1vcpu-512mb", + deploymentRetention: 0 + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentRetention + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/delete-deployment.md b/examples/2.3.x/server-graphql/examples/functions/delete-deployment.md new file mode 100644 index 000000000..7ea06f5dd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/delete-deployment.md @@ -0,0 +1,10 @@ +```graphql +mutation { + functionsDeleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/delete-execution.md b/examples/2.3.x/server-graphql/examples/functions/delete-execution.md new file mode 100644 index 000000000..f0d516075 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/delete-execution.md @@ -0,0 +1,10 @@ +```graphql +mutation { + functionsDeleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/delete-variable.md b/examples/2.3.x/server-graphql/examples/functions/delete-variable.md new file mode 100644 index 000000000..b0c4110ef --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/delete-variable.md @@ -0,0 +1,10 @@ +```graphql +mutation { + functionsDeleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/delete.md b/examples/2.3.x/server-graphql/examples/functions/delete.md new file mode 100644 index 000000000..b941489af --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + functionsDelete( + functionId: "<FUNCTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/get-deployment-download.md b/examples/2.3.x/server-graphql/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..65e956f80 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/get-deployment-download.md @@ -0,0 +1,12 @@ +```graphql +query { + functionsGetDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: "source", + token: "<TOKEN>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/get-deployment.md b/examples/2.3.x/server-graphql/examples/functions/get-deployment.md new file mode 100644 index 000000000..0c72d44b9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/get-deployment.md @@ -0,0 +1,36 @@ +```graphql +query { + functionsGetDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/get-execution.md b/examples/2.3.x/server-graphql/examples/functions/get-execution.md new file mode 100644 index 000000000..314b7423e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/get-execution.md @@ -0,0 +1,34 @@ +```graphql +query { + functionsGetExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + resourceId + resourceType + deploymentId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/get-variable.md b/examples/2.3.x/server-graphql/examples/functions/get-variable.md new file mode 100644 index 000000000..198acbdde --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/get-variable.md @@ -0,0 +1,17 @@ +```graphql +query { + functionsGetVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/get.md b/examples/2.3.x/server-graphql/examples/functions/get.md new file mode 100644 index 000000000..ac9557147 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/get.md @@ -0,0 +1,49 @@ +```graphql +query { + functionsGet( + functionId: "<FUNCTION_ID>" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentRetention + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/list-deployments.md b/examples/2.3.x/server-graphql/examples/functions/list-deployments.md new file mode 100644 index 000000000..8ba4d3d9d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/list-deployments.md @@ -0,0 +1,41 @@ +```graphql +query { + functionsListDeployments( + functionId: "<FUNCTION_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + deployments { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/list-executions.md b/examples/2.3.x/server-graphql/examples/functions/list-executions.md new file mode 100644 index 000000000..b76e92aca --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/list-executions.md @@ -0,0 +1,38 @@ +```graphql +query { + functionsListExecutions( + functionId: "<FUNCTION_ID>", + queries: [], + total: false + ) { + total + executions { + _id + _createdAt + _updatedAt + _permissions + resourceId + resourceType + deploymentId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } + } +} +``` 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 new file mode 100644 index 000000000..ef88ce307 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/list-runtimes.md @@ -0,0 +1,17 @@ +```graphql +query { + functionsListRuntimes { + total + runtimes { + _id + key + name + version + base + image + logo + supports + } + } +} +``` 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 new file mode 100644 index 000000000..75402c357 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/list-specifications.md @@ -0,0 +1,15 @@ +```graphql +query { + functionsListSpecifications( + type: "runtimes" + ) { + total + specifications { + memory + cpus + enabled + slug + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/list-variables.md b/examples/2.3.x/server-graphql/examples/functions/list-variables.md new file mode 100644 index 000000000..f58181d9a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/list-variables.md @@ -0,0 +1,21 @@ +```graphql +query { + functionsListVariables( + functionId: "<FUNCTION_ID>", + queries: [], + total: false + ) { + total + variables { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/list.md b/examples/2.3.x/server-graphql/examples/functions/list.md new file mode 100644 index 000000000..188b81043 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/list.md @@ -0,0 +1,54 @@ +```graphql +query { + functionsList( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + functions { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentRetention + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/update-deployment-status.md b/examples/2.3.x/server-graphql/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..2097e1201 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/update-deployment-status.md @@ -0,0 +1,36 @@ +```graphql +mutation { + functionsUpdateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/update-function-deployment.md b/examples/2.3.x/server-graphql/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..d97150d4a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/update-function-deployment.md @@ -0,0 +1,50 @@ +```graphql +mutation { + functionsUpdateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentRetention + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/update-variable.md b/examples/2.3.x/server-graphql/examples/functions/update-variable.md new file mode 100644 index 000000000..a1eededb9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/update-variable.md @@ -0,0 +1,20 @@ +```graphql +mutation { + functionsUpdateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/functions/update.md b/examples/2.3.x/server-graphql/examples/functions/update.md new file mode 100644 index 000000000..2ba5cc7e5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/functions/update.md @@ -0,0 +1,70 @@ +```graphql +mutation { + functionsUpdate( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: "node-14.5", + execute: ["any"], + events: [], + schedule: "0 0 * * *", + timeout: 1, + enabled: false, + logging: false, + entrypoint: "<ENTRYPOINT>", + commands: "<COMMANDS>", + scopes: [], + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + providerBranches: [], + providerPaths: [], + buildSpecification: "s-1vcpu-512mb", + runtimeSpecification: "s-1vcpu-512mb", + deploymentRetention: 0 + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentRetention + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/locale/get.md b/examples/2.3.x/server-graphql/examples/locale/get.md new file mode 100644 index 000000000..5ab0b0f78 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/locale/get.md @@ -0,0 +1,24 @@ +```graphql +query { + localeGet { + ip + countryCode + country + continentCode + continent + eu + currency + city + timeZone + postalCode + latitude + longitude + autonomousSystemNumber + autonomousSystemOrganization + isp + connectionType + connectionUsageType + connectionOrganization + } +} +``` 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 new file mode 100644 index 000000000..0e3967246 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +```graphql +query { + localeListCodes { + total + localeCodes { + code + name + } + } +} +``` 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 new file mode 100644 index 000000000..16ad0fd94 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +```graphql +query { + localeListContinents { + total + continents { + name + code + } + } +} +``` 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 new file mode 100644 index 000000000..293d32c9c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/locale/list-countries-eu.md @@ -0,0 +1,11 @@ +```graphql +query { + localeListCountriesEU { + total + countries { + name + code + } + } +} +``` 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 new file mode 100644 index 000000000..b17b065e3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +```graphql +query { + localeListCountriesPhones { + total + phones { + code + countryCode + countryName + } + } +} +``` 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 new file mode 100644 index 000000000..15f566af0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +```graphql +query { + localeListCountries { + total + countries { + name + code + } + } +} +``` 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 new file mode 100644 index 000000000..374d67126 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/locale/list-currencies.md @@ -0,0 +1,16 @@ +```graphql +query { + localeListCurrencies { + total + currencies { + symbol + name + symbolNative + decimalDigits + rounding + code + namePlural + } + } +} +``` 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 new file mode 100644 index 000000000..ed108f5a4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +```graphql +query { + localeListLanguages { + total + languages { + name + code + nativeName + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..851a80154 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-apns-provider.md @@ -0,0 +1,24 @@ +```graphql +mutation { + messagingCreateAPNSProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", + authKeyId: "<AUTH_KEY_ID>", + teamId: "<TEAM_ID>", + bundleId: "<BUNDLE_ID>", + sandbox: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..3fa22ead9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,21 @@ +```graphql +mutation { + messagingCreateAppwriteProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + qos: 0, + expiry: 0 + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-email.md b/examples/2.3.x/server-graphql/examples/messaging/create-email.md new file mode 100644 index 000000000..18b99a2a3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-email.md @@ -0,0 +1,34 @@ +```graphql +mutation { + messagingCreateEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: [], + users: [], + targets: [], + cc: [], + bcc: [], + attachments: [], + replyToEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + draft: false, + html: false, + scheduledAt: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..d531a2d6d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-fcm-provider.md @@ -0,0 +1,20 @@ +```graphql +mutation { + messagingCreateFCMProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: "{}", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..7d465e628 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,26 @@ +```graphql +mutation { + messagingCreateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + domain: "example.com", + isEuRegion: false, + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..130aa6e6f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingCreateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", + senderId: "<SENDER_ID>", + authKey: "<AUTH_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` 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 new file mode 100644 index 000000000..0f5f68545 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-push.md @@ -0,0 +1,39 @@ +```graphql +mutation { + messagingCreatePush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", + body: "<BODY>", + topics: [], + users: [], + targets: [], + data: "{}", + action: "<ACTION>", + image: "<ID1:ID2>", + icon: "<ICON>", + sound: "<SOUND>", + color: "<COLOR>", + tag: "<TAG>", + badge: 1, + draft: false, + scheduledAt: "2020-10-15T06:38:00.000+00:00", + contentAvailable: false, + critical: false, + priority: "normal" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..afb9a56b9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-resend-provider.md @@ -0,0 +1,24 @@ +```graphql +mutation { + messagingCreateResendProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..709e17e69 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,24 @@ +```graphql +mutation { + messagingCreateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..112de8673 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-ses-provider.md @@ -0,0 +1,26 @@ +```graphql +mutation { + messagingCreateSesProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-sms.md b/examples/2.3.x/server-graphql/examples/messaging/create-sms.md new file mode 100644 index 000000000..d193ef9de --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-sms.md @@ -0,0 +1,27 @@ +```graphql +mutation { + messagingCreateSMS( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: [], + users: [], + targets: [], + draft: false, + scheduledAt: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..99b3b9dac --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-smtp-provider.md @@ -0,0 +1,30 @@ +```graphql +mutation { + messagingCreateSMTPProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 587, + username: "<USERNAME>", + password: "password", + encryption: "none", + autoTLS: false, + mailer: "<MAILER>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-subscriber.md b/examples/2.3.x/server-graphql/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..50d67e14f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-subscriber.md @@ -0,0 +1,29 @@ +```graphql +mutation { + messagingCreateSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..cffc2d92a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-telesign-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingCreateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + customerId: "<CUSTOMER_ID>", + apiKey: "<API_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..5456ed54c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingCreateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + username: "<USERNAME>", + apiKey: "<API_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-topic.md b/examples/2.3.x/server-graphql/examples/messaging/create-topic.md new file mode 100644 index 000000000..20ad2dfc0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-topic.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingCreateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"], + qos: 0, + expiry: 0 + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + qos + expiry + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..6f82b65cf --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-twilio-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingCreateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "<FROM>", + accountSid: "<ACCOUNT_SID>", + authToken: "<AUTH_TOKEN>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-graphql/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..73604b737 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/create-vonage-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingCreateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/delete-provider.md b/examples/2.3.x/server-graphql/examples/messaging/delete-provider.md new file mode 100644 index 000000000..5c8e46cd8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/delete-provider.md @@ -0,0 +1,9 @@ +```graphql +mutation { + messagingDeleteProvider( + providerId: "<PROVIDER_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-graphql/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..81c5558ad --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/delete-subscriber.md @@ -0,0 +1,10 @@ +```graphql +mutation { + messagingDeleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/delete-topic.md b/examples/2.3.x/server-graphql/examples/messaging/delete-topic.md new file mode 100644 index 000000000..c25fe8dea --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/delete-topic.md @@ -0,0 +1,9 @@ +```graphql +mutation { + messagingDeleteTopic( + topicId: "<TOPIC_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/delete.md b/examples/2.3.x/server-graphql/examples/messaging/delete.md new file mode 100644 index 000000000..c7a525be9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + messagingDelete( + messageId: "<MESSAGE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/get-message.md b/examples/2.3.x/server-graphql/examples/messaging/get-message.md new file mode 100644 index 000000000..d899f2e2f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/get-message.md @@ -0,0 +1,21 @@ +```graphql +query { + messagingGetMessage( + messageId: "<MESSAGE_ID>" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/get-provider.md b/examples/2.3.x/server-graphql/examples/messaging/get-provider.md new file mode 100644 index 000000000..531f98fbf --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/get-provider.md @@ -0,0 +1,17 @@ +```graphql +query { + messagingGetProvider( + providerId: "<PROVIDER_ID>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/get-subscriber.md b/examples/2.3.x/server-graphql/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..78d9c8693 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/get-subscriber.md @@ -0,0 +1,28 @@ +```graphql +query { + messagingGetSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/get-topic.md b/examples/2.3.x/server-graphql/examples/messaging/get-topic.md new file mode 100644 index 000000000..767a7d9fb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/get-topic.md @@ -0,0 +1,18 @@ +```graphql +query { + messagingGetTopic( + topicId: "<TOPIC_ID>" + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + qos + expiry + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/list-messages.md b/examples/2.3.x/server-graphql/examples/messaging/list-messages.md new file mode 100644 index 000000000..c7cc2806c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/list-messages.md @@ -0,0 +1,26 @@ +```graphql +query { + messagingListMessages( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + messages { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/list-providers.md b/examples/2.3.x/server-graphql/examples/messaging/list-providers.md new file mode 100644 index 000000000..279564060 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/list-providers.md @@ -0,0 +1,22 @@ +```graphql +query { + messagingListProviders( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + providers { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/list-subscribers.md b/examples/2.3.x/server-graphql/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..13e3e6e8f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/list-subscribers.md @@ -0,0 +1,33 @@ +```graphql +query { + messagingListSubscribers( + topicId: "<TOPIC_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + subscribers { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/list-targets.md b/examples/2.3.x/server-graphql/examples/messaging/list-targets.md new file mode 100644 index 000000000..d3f2886a2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/list-targets.md @@ -0,0 +1,22 @@ +```graphql +query { + messagingListTargets( + messageId: "<MESSAGE_ID>", + queries: [], + total: false + ) { + total + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/list-topics.md b/examples/2.3.x/server-graphql/examples/messaging/list-topics.md new file mode 100644 index 000000000..78121d703 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/list-topics.md @@ -0,0 +1,23 @@ +```graphql +query { + messagingListTopics( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + topics { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + qos + expiry + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..7659ce2bc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-apns-provider.md @@ -0,0 +1,24 @@ +```graphql +mutation { + messagingUpdateAPNSProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + authKey: "<AUTH_KEY>", + authKeyId: "<AUTH_KEY_ID>", + teamId: "<TEAM_ID>", + bundleId: "<BUNDLE_ID>", + sandbox: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..a78b1de8d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,21 @@ +```graphql +mutation { + messagingUpdateAppwriteProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + qos: 0, + expiry: 0 + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` 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 new file mode 100644 index 000000000..75e45a507 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-email.md @@ -0,0 +1,34 @@ +```graphql +mutation { + messagingUpdateEmail( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + subject: "<SUBJECT>", + content: "<CONTENT>", + draft: false, + html: false, + cc: [], + bcc: [], + replyToEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + scheduledAt: "2020-10-15T06:38:00.000+00:00", + attachments: [] + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-fcm-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..a2f640717 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-fcm-provider.md @@ -0,0 +1,20 @@ +```graphql +mutation { + messagingUpdateFCMProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + serviceAccountJSON: "{}" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..865020575 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,26 @@ +```graphql +mutation { + messagingUpdateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + domain: "example.com", + isEuRegion: false, + enabled: false, + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..433051f58 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingUpdateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + templateId: "<TEMPLATE_ID>", + senderId: "<SENDER_ID>", + authKey: "<AUTH_KEY>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` 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 new file mode 100644 index 000000000..6431427d1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-push.md @@ -0,0 +1,39 @@ +```graphql +mutation { + messagingUpdatePush( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + title: "<TITLE>", + body: "<BODY>", + data: "{}", + action: "<ACTION>", + image: "<ID1:ID2>", + icon: "<ICON>", + sound: "<SOUND>", + color: "<COLOR>", + tag: "<TAG>", + badge: 1, + draft: false, + scheduledAt: "2020-10-15T06:38:00.000+00:00", + contentAvailable: false, + critical: false, + priority: "normal" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..153c0239c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-resend-provider.md @@ -0,0 +1,24 @@ +```graphql +mutation { + messagingUpdateResendProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..79b4a5c6f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,24 @@ +```graphql +mutation { + messagingUpdateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..c5c519647 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-ses-provider.md @@ -0,0 +1,26 @@ +```graphql +mutation { + messagingUpdateSesProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` 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 new file mode 100644 index 000000000..4f02a8256 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-sms.md @@ -0,0 +1,27 @@ +```graphql +mutation { + messagingUpdateSMS( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + content: "<CONTENT>", + draft: false, + scheduledAt: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-smtp-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..fc7d11b77 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-smtp-provider.md @@ -0,0 +1,30 @@ +```graphql +mutation { + messagingUpdateSMTPProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, + username: "<USERNAME>", + password: "password", + encryption: "none", + autoTLS: false, + mailer: "<MAILER>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..d442b6280 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-telesign-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingUpdateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + customerId: "<CUSTOMER_ID>", + apiKey: "<API_KEY>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..7754889bb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingUpdateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + username: "<USERNAME>", + apiKey: "<API_KEY>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-topic.md b/examples/2.3.x/server-graphql/examples/messaging/update-topic.md new file mode 100644 index 000000000..0f5f8b938 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-topic.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingUpdateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"], + qos: 0, + expiry: 0 + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + qos + expiry + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..3069e78bc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-twilio-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingUpdateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + accountSid: "<ACCOUNT_SID>", + authToken: "<AUTH_TOKEN>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-graphql/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..0dce8721b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/messaging/update-vonage-provider.md @@ -0,0 +1,22 @@ +```graphql +mutation { + messagingUpdateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-graphql/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..3be81b1e8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/create-backup-policy.md @@ -0,0 +1,26 @@ +```graphql +mutation { + mongoCreateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/create-backup.md b/examples/2.3.x/server-graphql/examples/mongo/create-backup.md new file mode 100644 index 000000000..acfd7020a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/create-backup.md @@ -0,0 +1,26 @@ +```graphql +mutation { + mongoCreateBackup( + databaseId: "<DATABASE_ID>", + type: "full" + ) { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/create-branch.md b/examples/2.3.x/server-graphql/examples/mongo/create-branch.md new file mode 100644 index 000000000..93e2cd30b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/create-branch.md @@ -0,0 +1,62 @@ +```graphql +mutation { + mongoCreateBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>", + ttl: 300 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/create-failover.md b/examples/2.3.x/server-graphql/examples/mongo/create-failover.md new file mode 100644 index 000000000..0da473c31 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/create-failover.md @@ -0,0 +1,61 @@ +```graphql +mutation { + mongoCreateFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/create-migration.md b/examples/2.3.x/server-graphql/examples/mongo/create-migration.md new file mode 100644 index 000000000..fc1330a53 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/create-migration.md @@ -0,0 +1,62 @@ +```graphql +mutation { + mongoCreateMigration( + databaseId: "<DATABASE_ID>", + targetType: "shared", + specification: "<SPECIFICATION>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/create-restoration.md b/examples/2.3.x/server-graphql/examples/mongo/create-restoration.md new file mode 100644 index 000000000..f05a34a24 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/create-restoration.md @@ -0,0 +1,24 @@ +```graphql +mutation { + mongoCreateRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", + backupId: "<BACKUP_ID>", + targetDatabaseId: "<TARGET_DATABASE_ID>", + targetTime: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/create-upgrade.md b/examples/2.3.x/server-graphql/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..75ac14513 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/create-upgrade.md @@ -0,0 +1,61 @@ +```graphql +mutation { + mongoCreateUpgrade( + databaseId: "<DATABASE_ID>", + targetVersion: "<TARGET_VERSION>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/create.md b/examples/2.3.x/server-graphql/examples/mongo/create.md new file mode 100644 index 000000000..aa89b3431 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/create.md @@ -0,0 +1,73 @@ +```graphql +mutation { + mongoCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", + specification: "<SPECIFICATION>", + replicas: 0, + syncMode: "async", + networkIdleTimeoutSeconds: 60, + networkIPAllowlist: [], + idleTimeoutMinutes: 5, + pitr: false, + pitrRetentionDays: 1, + storageAutoscaling: false, + storageAutoscalingThresholdPercent: 50, + storageAutoscalingMaxGb: 0 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-graphql/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..7e198de02 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/delete-backup-policy.md @@ -0,0 +1,10 @@ +```graphql +mutation { + mongoDeleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/delete-backup.md b/examples/2.3.x/server-graphql/examples/mongo/delete-backup.md new file mode 100644 index 000000000..9991e86be --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/delete-backup.md @@ -0,0 +1,10 @@ +```graphql +mutation { + mongoDeleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/delete-branch.md b/examples/2.3.x/server-graphql/examples/mongo/delete-branch.md new file mode 100644 index 000000000..f19cc8892 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/delete-branch.md @@ -0,0 +1,61 @@ +```graphql +mutation { + mongoDeleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/delete.md b/examples/2.3.x/server-graphql/examples/mongo/delete.md new file mode 100644 index 000000000..4009b55cd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + mongoDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-graphql/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..a4bd966b0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/get-backup-policy.md @@ -0,0 +1,21 @@ +```graphql +query { + mongoGetBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/get-backup.md b/examples/2.3.x/server-graphql/examples/mongo/get-backup.md new file mode 100644 index 000000000..d3d60c184 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/get-backup.md @@ -0,0 +1,26 @@ +```graphql +query { + mongoGetBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" + ) { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/get-pitr.md b/examples/2.3.x/server-graphql/examples/mongo/get-pitr.md new file mode 100644 index 000000000..368ba6c7e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/get-pitr.md @@ -0,0 +1,10 @@ +```graphql +query { + mongoGetPitr( + databaseId: "<DATABASE_ID>" + ) { + earliest + latest + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/get-replicas.md b/examples/2.3.x/server-graphql/examples/mongo/get-replicas.md new file mode 100644 index 000000000..73c40e987 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/get-replicas.md @@ -0,0 +1,22 @@ +```graphql +query { + mongoGetReplicas( + databaseId: "<DATABASE_ID>" + ) { + replicas + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + members { + _id + role + status + replicating + lagSeconds + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/get-restoration.md b/examples/2.3.x/server-graphql/examples/mongo/get-restoration.md new file mode 100644 index 000000000..a5f73fefa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/get-restoration.md @@ -0,0 +1,21 @@ +```graphql +query { + mongoGetRestoration( + databaseId: "<DATABASE_ID>", + restorationId: "<RESTORATION_ID>" + ) { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/get-status.md b/examples/2.3.x/server-graphql/examples/mongo/get-status.md new file mode 100644 index 000000000..344cc04f3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/get-status.md @@ -0,0 +1,36 @@ +```graphql +query { + mongoGetStatus( + databaseId: "<DATABASE_ID>" + ) { + health + ready + engine + version + uptime + connections { + current + max + } + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + replicas { + index + role + healthy + replicating + lagSeconds + } + volumes { + path + usedPercent + available + mounted + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/get.md b/examples/2.3.x/server-graphql/examples/mongo/get.md new file mode 100644 index 000000000..8db72822c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/get.md @@ -0,0 +1,60 @@ +```graphql +query { + mongoGet( + databaseId: "<DATABASE_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-graphql/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..f98390dc3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/list-backup-policies.md @@ -0,0 +1,24 @@ +```graphql +query { + mongoListBackupPolicies( + databaseId: "<DATABASE_ID>", + queries: [] + ) { + total + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/list-backups.md b/examples/2.3.x/server-graphql/examples/mongo/list-backups.md new file mode 100644 index 000000000..2f06b54ea --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/list-backups.md @@ -0,0 +1,29 @@ +```graphql +query { + mongoListBackups( + databaseId: "<DATABASE_ID>", + queries: [] + ) { + total + backups { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/list-branches.md b/examples/2.3.x/server-graphql/examples/mongo/list-branches.md new file mode 100644 index 000000000..aa23a5d71 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/list-branches.md @@ -0,0 +1,23 @@ +```graphql +query { + mongoListBranches( + databaseId: "<DATABASE_ID>" + ) { + total + branches { + branchId + branchName + namespace + expiresAt + host + port + database + username + password + ssl + engine + connectionString + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/list-operations.md b/examples/2.3.x/server-graphql/examples/mongo/list-operations.md new file mode 100644 index 000000000..f24e70077 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/list-operations.md @@ -0,0 +1,25 @@ +```graphql +query { + mongoListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", + limit: 1, + offset: 0 + ) { + total + operations { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/list-restorations.md b/examples/2.3.x/server-graphql/examples/mongo/list-restorations.md new file mode 100644 index 000000000..dd74be35d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/list-restorations.md @@ -0,0 +1,27 @@ +```graphql +query { + mongoListRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", + type: "backup", + limit: 1, + offset: 0 + ) { + total + restorations { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/list-specifications.md b/examples/2.3.x/server-graphql/examples/mongo/list-specifications.md new file mode 100644 index 000000000..196e5c6da --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/list-specifications.md @@ -0,0 +1,22 @@ +```graphql +query { + mongoListSpecifications { + specifications { + slug + name + price + storageOverageRate + bandwidthOverageRate + replicaRate + pitrRate + cpu + memory + maxConnections + includedStorage + includedBandwidth + enabled + } + total + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/list.md b/examples/2.3.x/server-graphql/examples/mongo/list.md new file mode 100644 index 000000000..ab9bda16b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/list.md @@ -0,0 +1,63 @@ +```graphql +query { + mongoList( + queries: [] + ) { + total + databases { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-graphql/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..942aba10c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/update-backup-policy.md @@ -0,0 +1,25 @@ +```graphql +mutation { + mongoUpdateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + enabled: false + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-graphql/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..51d6e9cc7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/update-backup-storage.md @@ -0,0 +1,20 @@ +```graphql +mutation { + mongoUpdateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", + prefix: "<PREFIX>", + endpoint: "<ENDPOINT>" + ) { + provider + bucket + region + prefix + endpoint + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/update-credentials.md b/examples/2.3.x/server-graphql/examples/mongo/update-credentials.md new file mode 100644 index 000000000..22a3d503f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/update-credentials.md @@ -0,0 +1,19 @@ +```graphql +mutation { + mongoUpdateCredentials( + databaseId: "<DATABASE_ID>" + ) { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/update-maintenance.md b/examples/2.3.x/server-graphql/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..940d59769 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/update-maintenance.md @@ -0,0 +1,62 @@ +```graphql +mutation { + mongoUpdateMaintenance( + databaseId: "<DATABASE_ID>", + day: "sun", + hourUtc: 0 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mongo/update.md b/examples/2.3.x/server-graphql/examples/mongo/update.md new file mode 100644 index 000000000..26d1bfe2e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mongo/update.md @@ -0,0 +1,80 @@ +```graphql +mutation { + mongoUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + status: "ready", + specification: "<SPECIFICATION>", + replicas: 0, + syncMode: "async", + networkIdleTimeoutSeconds: 60, + networkIPAllowlist: [], + idleTimeoutMinutes: 5, + pitr: false, + pitrRetentionDays: 1, + storageAutoscaling: false, + storageAutoscalingThresholdPercent: 50, + storageAutoscalingMaxGb: 0, + metricsTraceSampleRate: 0, + metricsSlowQueryLogThresholdMs: 0, + sqlApiEnabled: false, + sqlApiAllowedStatements: [], + sqlApiMaxRows: 1, + sqlApiMaxBytes: 1024, + sqlApiTimeoutSeconds: 1 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-graphql/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..4455a3b00 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create-backup-policy.md @@ -0,0 +1,26 @@ +```graphql +mutation { + mysqlCreateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create-backup.md b/examples/2.3.x/server-graphql/examples/mysql/create-backup.md new file mode 100644 index 000000000..9ddc67911 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create-backup.md @@ -0,0 +1,26 @@ +```graphql +mutation { + mysqlCreateBackup( + databaseId: "<DATABASE_ID>", + type: "full" + ) { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create-branch.md b/examples/2.3.x/server-graphql/examples/mysql/create-branch.md new file mode 100644 index 000000000..d82b427da --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create-branch.md @@ -0,0 +1,62 @@ +```graphql +mutation { + mysqlCreateBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>", + ttl: 300 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create-execution.md b/examples/2.3.x/server-graphql/examples/mysql/create-execution.md new file mode 100644 index 000000000..2ff12d7ad --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create-execution.md @@ -0,0 +1,20 @@ +```graphql +mutation { + mysqlCreateExecution( + databaseId: "<DATABASE_ID>", + sql: "<SQL>", + bindings: "{}", + timeoutSeconds: 1 + ) { + rows + rowCount + columns { + name + type + } + durationMs + truncated + bytes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create-failover.md b/examples/2.3.x/server-graphql/examples/mysql/create-failover.md new file mode 100644 index 000000000..94e271635 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create-failover.md @@ -0,0 +1,61 @@ +```graphql +mutation { + mysqlCreateFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create-migration.md b/examples/2.3.x/server-graphql/examples/mysql/create-migration.md new file mode 100644 index 000000000..a7239b01d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create-migration.md @@ -0,0 +1,62 @@ +```graphql +mutation { + mysqlCreateMigration( + databaseId: "<DATABASE_ID>", + targetType: "shared", + specification: "<SPECIFICATION>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create-restoration.md b/examples/2.3.x/server-graphql/examples/mysql/create-restoration.md new file mode 100644 index 000000000..2ebd2289e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create-restoration.md @@ -0,0 +1,24 @@ +```graphql +mutation { + mysqlCreateRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", + backupId: "<BACKUP_ID>", + targetDatabaseId: "<TARGET_DATABASE_ID>", + targetTime: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create-upgrade.md b/examples/2.3.x/server-graphql/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..40a2a5c08 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create-upgrade.md @@ -0,0 +1,61 @@ +```graphql +mutation { + mysqlCreateUpgrade( + databaseId: "<DATABASE_ID>", + targetVersion: "<TARGET_VERSION>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/create.md b/examples/2.3.x/server-graphql/examples/mysql/create.md new file mode 100644 index 000000000..64e860e82 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/create.md @@ -0,0 +1,73 @@ +```graphql +mutation { + mysqlCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", + specification: "<SPECIFICATION>", + replicas: 0, + syncMode: "async", + networkIdleTimeoutSeconds: 60, + networkIPAllowlist: [], + idleTimeoutMinutes: 5, + pitr: false, + pitrRetentionDays: 1, + storageAutoscaling: false, + storageAutoscalingThresholdPercent: 50, + storageAutoscalingMaxGb: 0 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-graphql/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..deebc54bf --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/delete-backup-policy.md @@ -0,0 +1,10 @@ +```graphql +mutation { + mysqlDeleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/delete-backup.md b/examples/2.3.x/server-graphql/examples/mysql/delete-backup.md new file mode 100644 index 000000000..0b3687a93 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/delete-backup.md @@ -0,0 +1,10 @@ +```graphql +mutation { + mysqlDeleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/delete-branch.md b/examples/2.3.x/server-graphql/examples/mysql/delete-branch.md new file mode 100644 index 000000000..dae6d364f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/delete-branch.md @@ -0,0 +1,61 @@ +```graphql +mutation { + mysqlDeleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/delete.md b/examples/2.3.x/server-graphql/examples/mysql/delete.md new file mode 100644 index 000000000..55bfbe82b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + mysqlDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-graphql/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..e2b8522c1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/get-backup-policy.md @@ -0,0 +1,21 @@ +```graphql +query { + mysqlGetBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/get-backup.md b/examples/2.3.x/server-graphql/examples/mysql/get-backup.md new file mode 100644 index 000000000..4417d2354 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/get-backup.md @@ -0,0 +1,26 @@ +```graphql +query { + mysqlGetBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" + ) { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/get-pitr.md b/examples/2.3.x/server-graphql/examples/mysql/get-pitr.md new file mode 100644 index 000000000..64fb8746f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/get-pitr.md @@ -0,0 +1,10 @@ +```graphql +query { + mysqlGetPitr( + databaseId: "<DATABASE_ID>" + ) { + earliest + latest + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/get-pooler.md b/examples/2.3.x/server-graphql/examples/mysql/get-pooler.md new file mode 100644 index 000000000..120671d09 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/get-pooler.md @@ -0,0 +1,18 @@ +```graphql +query { + mysqlGetPooler( + databaseId: "<DATABASE_ID>" + ) { + enabled + mode + maxConnections + defaultPoolSize + port + readWriteSplitting + poolerCpuRequest + poolerCpuLimit + poolerMemoryRequest + poolerMemoryLimit + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/get-replicas.md b/examples/2.3.x/server-graphql/examples/mysql/get-replicas.md new file mode 100644 index 000000000..84e1431b6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/get-replicas.md @@ -0,0 +1,22 @@ +```graphql +query { + mysqlGetReplicas( + databaseId: "<DATABASE_ID>" + ) { + replicas + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + members { + _id + role + status + replicating + lagSeconds + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/get-restoration.md b/examples/2.3.x/server-graphql/examples/mysql/get-restoration.md new file mode 100644 index 000000000..7c612596f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/get-restoration.md @@ -0,0 +1,21 @@ +```graphql +query { + mysqlGetRestoration( + databaseId: "<DATABASE_ID>", + restorationId: "<RESTORATION_ID>" + ) { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/get-status.md b/examples/2.3.x/server-graphql/examples/mysql/get-status.md new file mode 100644 index 000000000..1665096df --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/get-status.md @@ -0,0 +1,36 @@ +```graphql +query { + mysqlGetStatus( + databaseId: "<DATABASE_ID>" + ) { + health + ready + engine + version + uptime + connections { + current + max + } + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + replicas { + index + role + healthy + replicating + lagSeconds + } + volumes { + path + usedPercent + available + mounted + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/get.md b/examples/2.3.x/server-graphql/examples/mysql/get.md new file mode 100644 index 000000000..5ac256a80 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/get.md @@ -0,0 +1,60 @@ +```graphql +query { + mysqlGet( + databaseId: "<DATABASE_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-graphql/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..70eee2edc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/list-backup-policies.md @@ -0,0 +1,24 @@ +```graphql +query { + mysqlListBackupPolicies( + databaseId: "<DATABASE_ID>", + queries: [] + ) { + total + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/list-backups.md b/examples/2.3.x/server-graphql/examples/mysql/list-backups.md new file mode 100644 index 000000000..fe0d72462 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/list-backups.md @@ -0,0 +1,29 @@ +```graphql +query { + mysqlListBackups( + databaseId: "<DATABASE_ID>", + queries: [] + ) { + total + backups { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/list-branches.md b/examples/2.3.x/server-graphql/examples/mysql/list-branches.md new file mode 100644 index 000000000..55b3ea076 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/list-branches.md @@ -0,0 +1,23 @@ +```graphql +query { + mysqlListBranches( + databaseId: "<DATABASE_ID>" + ) { + total + branches { + branchId + branchName + namespace + expiresAt + host + port + database + username + password + ssl + engine + connectionString + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/list-operations.md b/examples/2.3.x/server-graphql/examples/mysql/list-operations.md new file mode 100644 index 000000000..db5d35652 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/list-operations.md @@ -0,0 +1,25 @@ +```graphql +query { + mysqlListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", + limit: 1, + offset: 0 + ) { + total + operations { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/list-restorations.md b/examples/2.3.x/server-graphql/examples/mysql/list-restorations.md new file mode 100644 index 000000000..c6609fda0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/list-restorations.md @@ -0,0 +1,27 @@ +```graphql +query { + mysqlListRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", + type: "backup", + limit: 1, + offset: 0 + ) { + total + restorations { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/list-specifications.md b/examples/2.3.x/server-graphql/examples/mysql/list-specifications.md new file mode 100644 index 000000000..1ef41959c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/list-specifications.md @@ -0,0 +1,22 @@ +```graphql +query { + mysqlListSpecifications { + specifications { + slug + name + price + storageOverageRate + bandwidthOverageRate + replicaRate + pitrRate + cpu + memory + maxConnections + includedStorage + includedBandwidth + enabled + } + total + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/list.md b/examples/2.3.x/server-graphql/examples/mysql/list.md new file mode 100644 index 000000000..47df4ba0e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/list.md @@ -0,0 +1,63 @@ +```graphql +query { + mysqlList( + queries: [] + ) { + total + databases { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-graphql/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..7dd428c9e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/update-backup-policy.md @@ -0,0 +1,25 @@ +```graphql +mutation { + mysqlUpdateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + enabled: false + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-graphql/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..e40673c12 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/update-backup-storage.md @@ -0,0 +1,20 @@ +```graphql +mutation { + mysqlUpdateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", + prefix: "<PREFIX>", + endpoint: "<ENDPOINT>" + ) { + provider + bucket + region + prefix + endpoint + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/update-credentials.md b/examples/2.3.x/server-graphql/examples/mysql/update-credentials.md new file mode 100644 index 000000000..26ede72ec --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/update-credentials.md @@ -0,0 +1,19 @@ +```graphql +mutation { + mysqlUpdateCredentials( + databaseId: "<DATABASE_ID>" + ) { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/update-maintenance.md b/examples/2.3.x/server-graphql/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..f52ba8ac2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/update-maintenance.md @@ -0,0 +1,62 @@ +```graphql +mutation { + mysqlUpdateMaintenance( + databaseId: "<DATABASE_ID>", + day: "sun", + hourUtc: 0 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/update-pooler.md b/examples/2.3.x/server-graphql/examples/mysql/update-pooler.md new file mode 100644 index 000000000..bc0e469fc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/update-pooler.md @@ -0,0 +1,26 @@ +```graphql +mutation { + mysqlUpdatePooler( + databaseId: "<DATABASE_ID>", + mode: "transaction", + maxConnections: 10, + defaultPoolSize: 1, + readWriteSplitting: false, + poolerCpuRequest: "<POOLER_CPU_REQUEST>", + poolerCpuLimit: "<POOLER_CPU_LIMIT>", + poolerMemoryRequest: "<POOLER_MEMORY_REQUEST>", + poolerMemoryLimit: "<POOLER_MEMORY_LIMIT>" + ) { + enabled + mode + maxConnections + defaultPoolSize + port + readWriteSplitting + poolerCpuRequest + poolerCpuLimit + poolerMemoryRequest + poolerMemoryLimit + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/mysql/update.md b/examples/2.3.x/server-graphql/examples/mysql/update.md new file mode 100644 index 000000000..1a850f10b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/mysql/update.md @@ -0,0 +1,80 @@ +```graphql +mutation { + mysqlUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + status: "ready", + specification: "<SPECIFICATION>", + replicas: 0, + syncMode: "async", + networkIdleTimeoutSeconds: 60, + networkIPAllowlist: [], + idleTimeoutMinutes: 5, + pitr: false, + pitrRetentionDays: 1, + storageAutoscaling: false, + storageAutoscalingThresholdPercent: 50, + storageAutoscalingMaxGb: 0, + metricsTraceSampleRate: 0, + metricsSlowQueryLogThresholdMs: 0, + sqlApiEnabled: false, + sqlApiAllowedStatements: [], + sqlApiMaxRows: 1, + sqlApiMaxBytes: 1024, + sqlApiTimeoutSeconds: 1 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/approve.md b/examples/2.3.x/server-graphql/examples/oauth2/approve.md new file mode 100644 index 000000000..9441d5a4c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/approve.md @@ -0,0 +1,11 @@ +```graphql +mutation { + oauth2Approve( + grantId: "<GRANT_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>", + scope: "<SCOPE>" + ) { + redirectUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/authorize-post.md b/examples/2.3.x/server-graphql/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..ec6d490ae --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/authorize-post.md @@ -0,0 +1,23 @@ +```graphql +mutation { + oauth2AuthorizePost( + clientId: "<CLIENT_ID>", + redirectUri: "https://example.com", + responseType: "", + scope: "<SCOPE>", + state: "<STATE>", + nonce: "<NONCE>", + codeChallenge: "<CODE_CHALLENGE>", + codeChallengeMethod: "s256", + prompt: "<PROMPT>", + maxAge: 0, + authorizationDetails: "<AUTHORIZATION_DETAILS>", + resource: "", + audience: "<AUDIENCE>", + requestUri: "<REQUEST_URI>" + ) { + grantId + redirectUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/authorize.md b/examples/2.3.x/server-graphql/examples/oauth2/authorize.md new file mode 100644 index 000000000..f6e74d435 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/authorize.md @@ -0,0 +1,23 @@ +```graphql +query { + oauth2Authorize( + clientId: "<CLIENT_ID>", + redirectUri: "https://example.com", + responseType: "", + scope: "<SCOPE>", + state: "<STATE>", + nonce: "<NONCE>", + codeChallenge: "<CODE_CHALLENGE>", + codeChallengeMethod: "s256", + prompt: "<PROMPT>", + maxAge: 0, + authorizationDetails: "<AUTHORIZATION_DETAILS>", + resource: "", + audience: "<AUDIENCE>", + requestUri: "<REQUEST_URI>" + ) { + grantId + redirectUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-graphql/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..dddd74a5f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/create-device-authorization.md @@ -0,0 +1,18 @@ +```graphql +mutation { + oauth2CreateDeviceAuthorization( + clientId: "<CLIENT_ID>", + scope: "<SCOPE>", + authorizationDetails: "<AUTHORIZATION_DETAILS>", + resource: "", + audience: "<AUDIENCE>" + ) { + device_code + user_code + verification_uri + verification_uri_complete + expires_in + interval + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/create-grant.md b/examples/2.3.x/server-graphql/examples/oauth2/create-grant.md new file mode 100644 index 000000000..da3978290 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/create-grant.md @@ -0,0 +1,20 @@ +```graphql +mutation { + oauth2CreateGrant( + userCode: "<USER_CODE>" + ) { + _id + _createdAt + _updatedAt + userId + appId + scopes + resources + authorizationDetails + prompt + redirectUri + authTime + expire + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/create-par.md b/examples/2.3.x/server-graphql/examples/oauth2/create-par.md new file mode 100644 index 000000000..7b360967c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/create-par.md @@ -0,0 +1,22 @@ +```graphql +mutation { + oauth2CreatePAR( + clientId: "<CLIENT_ID>", + redirectUri: "https://example.com", + responseType: "code", + scope: "<SCOPE>", + state: "<STATE>", + nonce: "<NONCE>", + codeChallenge: "<CODE_CHALLENGE>", + codeChallengeMethod: "s256", + prompt: "<PROMPT>", + maxAge: 0, + authorizationDetails: "<AUTHORIZATION_DETAILS>", + resource: "", + audience: "<AUDIENCE>" + ) { + request_uri + expires_in + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/create-token.md b/examples/2.3.x/server-graphql/examples/oauth2/create-token.md new file mode 100644 index 000000000..24f812bae --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```graphql +mutation { + oauth2CreateToken( + grantType: "<GRANT_TYPE>", + code: "<CODE>", + refreshToken: "<REFRESH_TOKEN>", + deviceCode: "<DEVICE_CODE>", + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + codeVerifier: "<CODE_VERIFIER>", + redirectUri: "https://example.com", + resource: "", + audience: "<AUDIENCE>" + ) { + access_token + token_type + expires_in + refresh_token + scope + authorization_details + id_token + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/get-grant.md b/examples/2.3.x/server-graphql/examples/oauth2/get-grant.md new file mode 100644 index 000000000..e21ef4338 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/get-grant.md @@ -0,0 +1,20 @@ +```graphql +query { + oauth2GetGrant( + grantId: "<GRANT_ID>" + ) { + _id + _createdAt + _updatedAt + userId + appId + scopes + resources + authorizationDetails + prompt + redirectUri + authTime + expire + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/list-organizations.md b/examples/2.3.x/server-graphql/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..c36f1d741 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/list-organizations.md @@ -0,0 +1,14 @@ +```graphql +query { + oauth2ListOrganizations( + limit: 1, + offset: 0, + search: "<SEARCH>" + ) { + total + organizations { + _id + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/list-projects.md b/examples/2.3.x/server-graphql/examples/oauth2/list-projects.md new file mode 100644 index 000000000..a5073fc1a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/list-projects.md @@ -0,0 +1,16 @@ +```graphql +query { + oauth2ListProjects( + limit: 1, + offset: 0, + search: "<SEARCH>" + ) { + total + projects { + _id + region + endpoint + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/reject.md b/examples/2.3.x/server-graphql/examples/oauth2/reject.md new file mode 100644 index 000000000..35ac07ca8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/reject.md @@ -0,0 +1,9 @@ +```graphql +mutation { + oauth2Reject( + grantId: "<GRANT_ID>" + ) { + redirectUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/oauth2/revoke.md b/examples/2.3.x/server-graphql/examples/oauth2/revoke.md new file mode 100644 index 000000000..06858fc0e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/revoke.md @@ -0,0 +1,12 @@ +```graphql +mutation { + oauth2Revoke( + token: "<TOKEN>", + tokenTypeHint: "access_token", + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>" + ) { + status + } +} +``` 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 new file mode 100644 index 000000000..0cf04734f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,19 @@ +```graphql +mutation { + organizationCreateEphemeralProjectKey( + projectId: "<PROJECT_ID>", + scopes: [], + duration: 600 + ) { + _id + _createdAt + _updatedAt + name + expire + scopes + secret + accessedAt + sdks + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/create-installation.md b/examples/2.3.x/server-graphql/examples/organization/create-installation.md new file mode 100644 index 000000000..39ff45096 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/create-installation.md @@ -0,0 +1,19 @@ +```graphql +mutation { + organizationCreateInstallation( + appId: "<APP_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/create-membership.md b/examples/2.3.x/server-graphql/examples/organization/create-membership.md new file mode 100644 index 000000000..98d652d60 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/create-membership.md @@ -0,0 +1,28 @@ +```graphql +mutation { + organizationCreateMembership( + roles: [], + email: "email@example.com", + userId: "<USER_ID>", + phone: "+12065550100", + url: "https://example.com", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/create-project.md b/examples/2.3.x/server-graphql/examples/organization/create-project.md new file mode 100644 index 000000000..e397b949c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/create-project.md @@ -0,0 +1,81 @@ +```graphql +mutation { + organizationCreateProject( + projectId: "<PROJECT_ID>", + name: "<NAME>", + region: "fra" + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/delete-installation.md b/examples/2.3.x/server-graphql/examples/organization/delete-installation.md new file mode 100644 index 000000000..67a69768c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/delete-installation.md @@ -0,0 +1,9 @@ +```graphql +mutation { + organizationDeleteInstallation( + installationId: "<INSTALLATION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/delete-membership.md b/examples/2.3.x/server-graphql/examples/organization/delete-membership.md new file mode 100644 index 000000000..78b2a807a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/delete-membership.md @@ -0,0 +1,9 @@ +```graphql +mutation { + organizationDeleteMembership( + membershipId: "<MEMBERSHIP_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/delete-project-key.md b/examples/2.3.x/server-graphql/examples/organization/delete-project-key.md new file mode 100644 index 000000000..ab5ad7564 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/delete-project-key.md @@ -0,0 +1,10 @@ +```graphql +mutation { + organizationDeleteProjectKey( + projectId: "<PROJECT_ID>", + keyId: "<KEY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/delete-project.md b/examples/2.3.x/server-graphql/examples/organization/delete-project.md new file mode 100644 index 000000000..42e3c1c09 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/delete-project.md @@ -0,0 +1,9 @@ +```graphql +mutation { + organizationDeleteProject( + projectId: "<PROJECT_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/delete.md b/examples/2.3.x/server-graphql/examples/organization/delete.md new file mode 100644 index 000000000..b7f921cae --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/delete.md @@ -0,0 +1,7 @@ +```graphql +mutation { + organizationDelete { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/get-installation.md b/examples/2.3.x/server-graphql/examples/organization/get-installation.md new file mode 100644 index 000000000..d5748da24 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/get-installation.md @@ -0,0 +1,18 @@ +```graphql +query { + organizationGetInstallation( + installationId: "<INSTALLATION_ID>" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/get-membership.md b/examples/2.3.x/server-graphql/examples/organization/get-membership.md new file mode 100644 index 000000000..c0994b30d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/get-membership.md @@ -0,0 +1,23 @@ +```graphql +query { + organizationGetMembership( + membershipId: "<MEMBERSHIP_ID>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/get-project-key.md b/examples/2.3.x/server-graphql/examples/organization/get-project-key.md new file mode 100644 index 000000000..a2b9c5c87 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/get-project-key.md @@ -0,0 +1,18 @@ +```graphql +query { + organizationGetProjectKey( + projectId: "<PROJECT_ID>", + keyId: "<KEY_ID>" + ) { + _id + _createdAt + _updatedAt + name + expire + scopes + secret + accessedAt + sdks + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/get-project.md b/examples/2.3.x/server-graphql/examples/organization/get-project.md new file mode 100644 index 000000000..9041ca8bd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/get-project.md @@ -0,0 +1,79 @@ +```graphql +query { + organizationGetProject( + projectId: "<PROJECT_ID>" + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/get.md b/examples/2.3.x/server-graphql/examples/organization/get.md new file mode 100644 index 000000000..89df566e6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/get.md @@ -0,0 +1,273 @@ +```graphql +query { + organizationGet { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + billingBudget + budgetAlerts + billingPlan + billingPlanId + billingPlanDetails { + _id + name + desc + order + price + trial + bandwidth + storage + imageTransformations + screenshotsGenerated + members + webhooks + wafRules + projects + platforms + users + teams + databases + databasesReads + databasesWrites + databasesBatchSize + buckets + fileSize + functions + sites + executions + executionsRetentionCount + GBHours + realtime + realtimeMessages + messages + topics + authPhone + domains + activityLogs + usageLogs + usageLogsIntervals + usageAggregateOnlyMetrics + projectInactivityDays + alertLimit + usage { + bandwidth { + name + unit + currency + price + value + invoiceDesc + } + executions { + name + unit + currency + price + value + invoiceDesc + } + member { + name + unit + currency + price + value + invoiceDesc + } + realtime { + name + unit + currency + price + value + invoiceDesc + } + realtimeMessages { + name + unit + currency + price + value + invoiceDesc + } + realtimeBandwidth { + name + unit + currency + price + value + invoiceDesc + } + storage { + name + unit + currency + price + value + invoiceDesc + } + users { + name + unit + currency + price + value + invoiceDesc + } + GBHours { + name + unit + currency + price + value + invoiceDesc + } + imageTransformations { + name + unit + currency + price + value + invoiceDesc + } + credits { + name + unit + currency + price + value + invoiceDesc + } + } + addons { + seats { + supported + planIncluded + limit + type + currency + price + value + invoiceDesc + } + projects { + supported + planIncluded + limit + type + currency + price + value + invoiceDesc + } + } + budgetCapEnabled + customSmtp + emailBranding + requiresPaymentMethod + requiresBillingAddress + eligibleCountries + isAvailable + selfService + premiumSupport + budgeting + supportsMockNumbers + supportsOrganizationRoles + supportsCredits + supportsDedicatedDatabases + supportsDisposableEmailValidation + supportsCanonicalEmailValidation + supportsFreeEmailValidation + supportsCorporateEmailValidation + supportsProjectSpecificRoles + backupsEnabled + usagePerProject + supportedAddons { + baa + premiumGeoDB + premiumGeoDBOrg + } + backupPolicies + deploymentSize + buildSize + databasesAllowEncrypt + limits { + credits + dailyCredits + } + group + program { + _id + title + description + tag + icon + url + active + external + billingPlanId + } + databaseComputeCredit + dedicatedDatabases { + minCpu + maxCpu + minMemoryMb + maxMemoryMb + minStorageGb + maxStorageGb + maxReplicas + maxConnections + maxIpAllowlistSize + maxExtensions + maxBackupRetentionDays + maxPitrRetentionDays + maxSqlApiMaxRows + maxSqlApiMaxBytes + maxSqlApiTimeoutSeconds + maxSqlApiAllowedStatements + allowedSqlStatements + allowedStorageClasses + allowedSyncModes + } + } + billingEmail + billingStartDate + billingCurrentInvoiceDate + billingNextInvoiceDate + billingTrialStartDate + billingTrialDays + billingAggregationId + billingInvoiceId + paymentMethodId + billingAddressId + backupPaymentMethodId + status + remarks + agreementBAA + programManagerName + programManagerCalendar + programDiscordChannelName + programDiscordChannelUrl + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + billingPlanDowngrade + billingTaxId + markedForDeletion + platform + projects + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/list-installations.md b/examples/2.3.x/server-graphql/examples/organization/list-installations.md new file mode 100644 index 000000000..900a0a2d9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/list-installations.md @@ -0,0 +1,22 @@ +```graphql +query { + organizationListInstallations( + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/list-memberships.md b/examples/2.3.x/server-graphql/examples/organization/list-memberships.md new file mode 100644 index 000000000..1d23bc0a0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/list-memberships.md @@ -0,0 +1,28 @@ +```graphql +query { + organizationListMemberships( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/list-project-keys.md b/examples/2.3.x/server-graphql/examples/organization/list-project-keys.md new file mode 100644 index 000000000..6f79f237d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/list-project-keys.md @@ -0,0 +1,22 @@ +```graphql +query { + organizationListProjectKeys( + projectId: "<PROJECT_ID>", + queries: [], + total: false + ) { + total + keys { + _id + _createdAt + _updatedAt + name + expire + scopes + secret + accessedAt + sdks + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/list-projects.md b/examples/2.3.x/server-graphql/examples/organization/list-projects.md new file mode 100644 index 000000000..9a2308e4c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/list-projects.md @@ -0,0 +1,84 @@ +```graphql +query { + organizationListProjects( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + projects { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/update-installation.md b/examples/2.3.x/server-graphql/examples/organization/update-installation.md new file mode 100644 index 000000000..05434914f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/update-installation.md @@ -0,0 +1,19 @@ +```graphql +mutation { + organizationUpdateInstallation( + installationId: "<INSTALLATION_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/update-membership.md b/examples/2.3.x/server-graphql/examples/organization/update-membership.md new file mode 100644 index 000000000..b999c2172 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/update-membership.md @@ -0,0 +1,24 @@ +```graphql +mutation { + organizationUpdateMembership( + membershipId: "<MEMBERSHIP_ID>", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` 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 new file mode 100644 index 000000000..e9d3661f4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/update-project-key.md @@ -0,0 +1,21 @@ +```graphql +mutation { + organizationUpdateProjectKey( + projectId: "<PROJECT_ID>", + keyId: "<KEY_ID>", + name: "<NAME>", + scopes: [], + expire: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + _updatedAt + name + expire + scopes + secret + accessedAt + sdks + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/update-project.md b/examples/2.3.x/server-graphql/examples/organization/update-project.md new file mode 100644 index 000000000..5af5ed1e7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/update-project.md @@ -0,0 +1,80 @@ +```graphql +mutation { + organizationUpdateProject( + projectId: "<PROJECT_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/update.md b/examples/2.3.x/server-graphql/examples/organization/update.md new file mode 100644 index 000000000..052452fca --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/organization/update.md @@ -0,0 +1,275 @@ +```graphql +mutation { + organizationUpdate( + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + billingBudget + budgetAlerts + billingPlan + billingPlanId + billingPlanDetails { + _id + name + desc + order + price + trial + bandwidth + storage + imageTransformations + screenshotsGenerated + members + webhooks + wafRules + projects + platforms + users + teams + databases + databasesReads + databasesWrites + databasesBatchSize + buckets + fileSize + functions + sites + executions + executionsRetentionCount + GBHours + realtime + realtimeMessages + messages + topics + authPhone + domains + activityLogs + usageLogs + usageLogsIntervals + usageAggregateOnlyMetrics + projectInactivityDays + alertLimit + usage { + bandwidth { + name + unit + currency + price + value + invoiceDesc + } + executions { + name + unit + currency + price + value + invoiceDesc + } + member { + name + unit + currency + price + value + invoiceDesc + } + realtime { + name + unit + currency + price + value + invoiceDesc + } + realtimeMessages { + name + unit + currency + price + value + invoiceDesc + } + realtimeBandwidth { + name + unit + currency + price + value + invoiceDesc + } + storage { + name + unit + currency + price + value + invoiceDesc + } + users { + name + unit + currency + price + value + invoiceDesc + } + GBHours { + name + unit + currency + price + value + invoiceDesc + } + imageTransformations { + name + unit + currency + price + value + invoiceDesc + } + credits { + name + unit + currency + price + value + invoiceDesc + } + } + addons { + seats { + supported + planIncluded + limit + type + currency + price + value + invoiceDesc + } + projects { + supported + planIncluded + limit + type + currency + price + value + invoiceDesc + } + } + budgetCapEnabled + customSmtp + emailBranding + requiresPaymentMethod + requiresBillingAddress + eligibleCountries + isAvailable + selfService + premiumSupport + budgeting + supportsMockNumbers + supportsOrganizationRoles + supportsCredits + supportsDedicatedDatabases + supportsDisposableEmailValidation + supportsCanonicalEmailValidation + supportsFreeEmailValidation + supportsCorporateEmailValidation + supportsProjectSpecificRoles + backupsEnabled + usagePerProject + supportedAddons { + baa + premiumGeoDB + premiumGeoDBOrg + } + backupPolicies + deploymentSize + buildSize + databasesAllowEncrypt + limits { + credits + dailyCredits + } + group + program { + _id + title + description + tag + icon + url + active + external + billingPlanId + } + databaseComputeCredit + dedicatedDatabases { + minCpu + maxCpu + minMemoryMb + maxMemoryMb + minStorageGb + maxStorageGb + maxReplicas + maxConnections + maxIpAllowlistSize + maxExtensions + maxBackupRetentionDays + maxPitrRetentionDays + maxSqlApiMaxRows + maxSqlApiMaxBytes + maxSqlApiTimeoutSeconds + maxSqlApiAllowedStatements + allowedSqlStatements + allowedStorageClasses + allowedSyncModes + } + } + billingEmail + billingStartDate + billingCurrentInvoiceDate + billingNextInvoiceDate + billingTrialStartDate + billingTrialDays + billingAggregationId + billingInvoiceId + paymentMethodId + billingAddressId + backupPaymentMethodId + status + remarks + agreementBAA + programManagerName + programManagerCalendar + programDiscordChannelName + programDiscordChannelUrl + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + billingPlanDowngrade + billingTaxId + markedForDeletion + platform + projects + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-graphql/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..00edeaecb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-backup-policy.md @@ -0,0 +1,26 @@ +```graphql +mutation { + postgresqlCreateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-backup.md b/examples/2.3.x/server-graphql/examples/postgresql/create-backup.md new file mode 100644 index 000000000..f6d855b02 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-backup.md @@ -0,0 +1,26 @@ +```graphql +mutation { + postgresqlCreateBackup( + databaseId: "<DATABASE_ID>", + type: "full" + ) { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-branch.md b/examples/2.3.x/server-graphql/examples/postgresql/create-branch.md new file mode 100644 index 000000000..6c0c46b84 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-branch.md @@ -0,0 +1,62 @@ +```graphql +mutation { + postgresqlCreateBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>", + ttl: 300 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-execution.md b/examples/2.3.x/server-graphql/examples/postgresql/create-execution.md new file mode 100644 index 000000000..07265abad --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-execution.md @@ -0,0 +1,20 @@ +```graphql +mutation { + postgresqlCreateExecution( + databaseId: "<DATABASE_ID>", + sql: "<SQL>", + bindings: "{}", + timeoutSeconds: 1 + ) { + rows + rowCount + columns { + name + type + } + durationMs + truncated + bytes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-extension.md b/examples/2.3.x/server-graphql/examples/postgresql/create-extension.md new file mode 100644 index 000000000..c1418d519 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-extension.md @@ -0,0 +1,61 @@ +```graphql +mutation { + postgresqlCreateExtension( + databaseId: "<DATABASE_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-failover.md b/examples/2.3.x/server-graphql/examples/postgresql/create-failover.md new file mode 100644 index 000000000..88572b496 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-failover.md @@ -0,0 +1,61 @@ +```graphql +mutation { + postgresqlCreateFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-migration.md b/examples/2.3.x/server-graphql/examples/postgresql/create-migration.md new file mode 100644 index 000000000..c816bfbd2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-migration.md @@ -0,0 +1,62 @@ +```graphql +mutation { + postgresqlCreateMigration( + databaseId: "<DATABASE_ID>", + targetType: "shared", + specification: "<SPECIFICATION>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-restoration.md b/examples/2.3.x/server-graphql/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..898a795b5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-restoration.md @@ -0,0 +1,24 @@ +```graphql +mutation { + postgresqlCreateRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", + backupId: "<BACKUP_ID>", + targetDatabaseId: "<TARGET_DATABASE_ID>", + targetTime: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-graphql/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..74d485a8c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create-upgrade.md @@ -0,0 +1,61 @@ +```graphql +mutation { + postgresqlCreateUpgrade( + databaseId: "<DATABASE_ID>", + targetVersion: "<TARGET_VERSION>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/create.md b/examples/2.3.x/server-graphql/examples/postgresql/create.md new file mode 100644 index 000000000..a5285eb19 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/create.md @@ -0,0 +1,73 @@ +```graphql +mutation { + postgresqlCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", + specification: "<SPECIFICATION>", + replicas: 0, + syncMode: "async", + networkIdleTimeoutSeconds: 60, + networkIPAllowlist: [], + idleTimeoutMinutes: 5, + pitr: false, + pitrRetentionDays: 1, + storageAutoscaling: false, + storageAutoscalingThresholdPercent: 50, + storageAutoscalingMaxGb: 0 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-graphql/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..9d073b9e2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,10 @@ +```graphql +mutation { + postgresqlDeleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/delete-backup.md b/examples/2.3.x/server-graphql/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..434a35398 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/delete-backup.md @@ -0,0 +1,10 @@ +```graphql +mutation { + postgresqlDeleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/delete-branch.md b/examples/2.3.x/server-graphql/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..d7f29682d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/delete-branch.md @@ -0,0 +1,61 @@ +```graphql +mutation { + postgresqlDeleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/delete-extension.md b/examples/2.3.x/server-graphql/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..bc9715732 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/delete-extension.md @@ -0,0 +1,61 @@ +```graphql +mutation { + postgresqlDeleteExtension( + databaseId: "<DATABASE_ID>", + extensionName: "<EXTENSION_NAME>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/delete.md b/examples/2.3.x/server-graphql/examples/postgresql/delete.md new file mode 100644 index 000000000..6ead08baa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + postgresqlDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-graphql/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..6730be221 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/get-backup-policy.md @@ -0,0 +1,21 @@ +```graphql +query { + postgresqlGetBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/get-backup.md b/examples/2.3.x/server-graphql/examples/postgresql/get-backup.md new file mode 100644 index 000000000..08d8cb13f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/get-backup.md @@ -0,0 +1,26 @@ +```graphql +query { + postgresqlGetBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" + ) { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/get-pitr.md b/examples/2.3.x/server-graphql/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..4fea22153 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/get-pitr.md @@ -0,0 +1,10 @@ +```graphql +query { + postgresqlGetPitr( + databaseId: "<DATABASE_ID>" + ) { + earliest + latest + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/get-pooler.md b/examples/2.3.x/server-graphql/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..a4578c899 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/get-pooler.md @@ -0,0 +1,18 @@ +```graphql +query { + postgresqlGetPooler( + databaseId: "<DATABASE_ID>" + ) { + enabled + mode + maxConnections + defaultPoolSize + port + readWriteSplitting + poolerCpuRequest + poolerCpuLimit + poolerMemoryRequest + poolerMemoryLimit + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/get-replicas.md b/examples/2.3.x/server-graphql/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..d235e79e7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/get-replicas.md @@ -0,0 +1,22 @@ +```graphql +query { + postgresqlGetReplicas( + databaseId: "<DATABASE_ID>" + ) { + replicas + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + members { + _id + role + status + replicating + lagSeconds + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/get-restoration.md b/examples/2.3.x/server-graphql/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..d910c5efc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/get-restoration.md @@ -0,0 +1,21 @@ +```graphql +query { + postgresqlGetRestoration( + databaseId: "<DATABASE_ID>", + restorationId: "<RESTORATION_ID>" + ) { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/get-status.md b/examples/2.3.x/server-graphql/examples/postgresql/get-status.md new file mode 100644 index 000000000..e429e90fd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/get-status.md @@ -0,0 +1,36 @@ +```graphql +query { + postgresqlGetStatus( + databaseId: "<DATABASE_ID>" + ) { + health + ready + engine + version + uptime + connections { + current + max + } + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + replicas { + index + role + healthy + replicating + lagSeconds + } + volumes { + path + usedPercent + available + mounted + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/get.md b/examples/2.3.x/server-graphql/examples/postgresql/get.md new file mode 100644 index 000000000..3812867d7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/get.md @@ -0,0 +1,60 @@ +```graphql +query { + postgresqlGet( + databaseId: "<DATABASE_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-graphql/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..5a3db3d52 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/list-backup-policies.md @@ -0,0 +1,24 @@ +```graphql +query { + postgresqlListBackupPolicies( + databaseId: "<DATABASE_ID>", + queries: [] + ) { + total + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/list-backups.md b/examples/2.3.x/server-graphql/examples/postgresql/list-backups.md new file mode 100644 index 000000000..ca8255a0b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/list-backups.md @@ -0,0 +1,29 @@ +```graphql +query { + postgresqlListBackups( + databaseId: "<DATABASE_ID>", + queries: [] + ) { + total + backups { + _id + _createdAt + databaseId + projectId + policyId + trigger + type + requestedType + fallbackReason + status + sizeBytes + startedAt + completedAt + verifiedAt + expiresAt + logPosition + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/list-branches.md b/examples/2.3.x/server-graphql/examples/postgresql/list-branches.md new file mode 100644 index 000000000..bbd6dc81b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/list-branches.md @@ -0,0 +1,23 @@ +```graphql +query { + postgresqlListBranches( + databaseId: "<DATABASE_ID>" + ) { + total + branches { + branchId + branchName + namespace + expiresAt + host + port + database + username + password + ssl + engine + connectionString + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/list-extensions.md b/examples/2.3.x/server-graphql/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..434a7cef0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/list-extensions.md @@ -0,0 +1,16 @@ +```graphql +query { + postgresqlListExtensions( + databaseId: "<DATABASE_ID>" + ) { + installed + available + metadata { + key + name + description + category + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/list-operations.md b/examples/2.3.x/server-graphql/examples/postgresql/list-operations.md new file mode 100644 index 000000000..755fded26 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/list-operations.md @@ -0,0 +1,25 @@ +```graphql +query { + postgresqlListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", + limit: 1, + offset: 0 + ) { + total + operations { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/list-restorations.md b/examples/2.3.x/server-graphql/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..fcb779c88 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/list-restorations.md @@ -0,0 +1,27 @@ +```graphql +query { + postgresqlListRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", + type: "backup", + limit: 1, + offset: 0 + ) { + total + restorations { + _id + _createdAt + databaseId + sourceDatabaseId + projectId + backupId + type + status + targetTime + startedAt + completedAt + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/list-specifications.md b/examples/2.3.x/server-graphql/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..6bd484537 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/list-specifications.md @@ -0,0 +1,22 @@ +```graphql +query { + postgresqlListSpecifications { + specifications { + slug + name + price + storageOverageRate + bandwidthOverageRate + replicaRate + pitrRate + cpu + memory + maxConnections + includedStorage + includedBandwidth + enabled + } + total + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/list.md b/examples/2.3.x/server-graphql/examples/postgresql/list.md new file mode 100644 index 000000000..eeb731ec8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/list.md @@ -0,0 +1,63 @@ +```graphql +query { + postgresqlList( + queries: [] + ) { + total + databases { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-graphql/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..414271f71 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/update-backup-policy.md @@ -0,0 +1,25 @@ +```graphql +mutation { + postgresqlUpdateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + enabled: false + ) { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-graphql/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..20d681755 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/update-backup-storage.md @@ -0,0 +1,20 @@ +```graphql +mutation { + postgresqlUpdateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", + prefix: "<PREFIX>", + endpoint: "<ENDPOINT>" + ) { + provider + bucket + region + prefix + endpoint + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/update-credentials.md b/examples/2.3.x/server-graphql/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..8661d46ba --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/update-credentials.md @@ -0,0 +1,19 @@ +```graphql +mutation { + postgresqlUpdateCredentials( + databaseId: "<DATABASE_ID>" + ) { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-graphql/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..62588c14a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/update-maintenance.md @@ -0,0 +1,62 @@ +```graphql +mutation { + postgresqlUpdateMaintenance( + databaseId: "<DATABASE_ID>", + day: "sun", + hourUtc: 0 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/update-pooler.md b/examples/2.3.x/server-graphql/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..f687e5c30 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/update-pooler.md @@ -0,0 +1,26 @@ +```graphql +mutation { + postgresqlUpdatePooler( + databaseId: "<DATABASE_ID>", + mode: "transaction", + maxConnections: 10, + defaultPoolSize: 1, + readWriteSplitting: false, + poolerCpuRequest: "<POOLER_CPU_REQUEST>", + poolerCpuLimit: "<POOLER_CPU_LIMIT>", + poolerMemoryRequest: "<POOLER_MEMORY_REQUEST>", + poolerMemoryLimit: "<POOLER_MEMORY_LIMIT>" + ) { + enabled + mode + maxConnections + defaultPoolSize + port + readWriteSplitting + poolerCpuRequest + poolerCpuLimit + poolerMemoryRequest + poolerMemoryLimit + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/postgresql/update.md b/examples/2.3.x/server-graphql/examples/postgresql/update.md new file mode 100644 index 000000000..c9ac94178 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/postgresql/update.md @@ -0,0 +1,80 @@ +```graphql +mutation { + postgresqlUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + status: "ready", + specification: "<SPECIFICATION>", + replicas: 0, + syncMode: "async", + networkIdleTimeoutSeconds: 60, + networkIPAllowlist: [], + idleTimeoutMinutes: 5, + pitr: false, + pitrRetentionDays: 1, + storageAutoscaling: false, + storageAutoscalingThresholdPercent: 50, + storageAutoscalingMaxGb: 0, + metricsTraceSampleRate: 0, + metricsSlowQueryLogThresholdMs: 0, + sqlApiEnabled: false, + sqlApiAllowedStatements: [], + sqlApiMaxRows: 1, + sqlApiMaxBytes: 1024, + sqlApiTimeoutSeconds: 1 + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/presences/delete.md b/examples/2.3.x/server-graphql/examples/presences/delete.md new file mode 100644 index 000000000..cc8294d0c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/presences/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + presencesDelete( + presenceId: "<PRESENCE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/presences/get.md b/examples/2.3.x/server-graphql/examples/presences/get.md new file mode 100644 index 000000000..c7c9da818 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/presences/get.md @@ -0,0 +1,17 @@ +```graphql +query { + presencesGet( + presenceId: "<PRESENCE_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/presences/list.md b/examples/2.3.x/server-graphql/examples/presences/list.md new file mode 100644 index 000000000..ff95bbd1c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/presences/list.md @@ -0,0 +1,22 @@ +```graphql +query { + presencesList( + queries: [], + total: false, + ttl: 0 + ) { + total + presences { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/presences/update.md b/examples/2.3.x/server-graphql/examples/presences/update.md new file mode 100644 index 000000000..880c01694 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/presences/update.md @@ -0,0 +1,23 @@ +```graphql +mutation { + presencesUpdate( + presenceId: "<PRESENCE_ID>", + userId: "<USER_ID>", + status: "<STATUS>", + expiresAt: "2020-10-15T06:38:00.000+00:00", + metadata: "{}", + permissions: ["read(\"any\")"], + purge: false + ) { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/presences/upsert.md b/examples/2.3.x/server-graphql/examples/presences/upsert.md new file mode 100644 index 000000000..d103565b3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/presences/upsert.md @@ -0,0 +1,22 @@ +```graphql +mutation { + presencesUpsert( + presenceId: "<PRESENCE_ID>", + userId: "<USER_ID>", + status: "<STATUS>", + permissions: ["read(\"any\")"], + expiresAt: "2020-10-15T06:38:00.000+00:00", + metadata: "{}" + ) { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/create-android-platform.md b/examples/2.3.x/server-graphql/examples/project/create-android-platform.md new file mode 100644 index 000000000..1f53067c1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-android-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectCreateAndroidPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + applicationId: "<APPLICATION_ID>" + ) { + _id + _createdAt + _updatedAt + name + type + applicationId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/create-apple-platform.md b/examples/2.3.x/server-graphql/examples/project/create-apple-platform.md new file mode 100644 index 000000000..f1afeae02 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-apple-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectCreateApplePlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + bundleIdentifier: "<BUNDLE_IDENTIFIER>" + ) { + _id + _createdAt + _updatedAt + name + type + bundleIdentifier + } +} +``` 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 new file mode 100644 index 000000000..c4b996d3d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-ephemeral-key.md @@ -0,0 +1,18 @@ +```graphql +mutation { + projectCreateEphemeralKey( + scopes: [], + duration: 600 + ) { + _id + _createdAt + _updatedAt + name + expire + scopes + secret + accessedAt + sdks + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/create-linux-platform.md b/examples/2.3.x/server-graphql/examples/project/create-linux-platform.md new file mode 100644 index 000000000..045381c30 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-linux-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectCreateLinuxPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + packageName: "<PACKAGE_NAME>" + ) { + _id + _createdAt + _updatedAt + name + type + packageName + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/create-mock-phone.md b/examples/2.3.x/server-graphql/examples/project/create-mock-phone.md new file mode 100644 index 000000000..4c46c01bd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-mock-phone.md @@ -0,0 +1,13 @@ +```graphql +mutation { + projectCreateMockPhone( + number: "+12065550100", + otp: "<OTP>" + ) { + number + otp + _createdAt + _updatedAt + } +} +``` 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 new file mode 100644 index 000000000..2640b7658 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-smtp-test.md @@ -0,0 +1,9 @@ +```graphql +mutation { + projectCreateSMTPTest( + emails: [] + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/create-variable.md b/examples/2.3.x/server-graphql/examples/project/create-variable.md new file mode 100644 index 000000000..feffcdada --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-variable.md @@ -0,0 +1,19 @@ +```graphql +mutation { + projectCreateVariable( + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/create-web-platform.md b/examples/2.3.x/server-graphql/examples/project/create-web-platform.md new file mode 100644 index 000000000..9e5030ea8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-web-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectCreateWebPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + hostname: "app.example.com" + ) { + _id + _createdAt + _updatedAt + name + type + hostname + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/create-windows-platform.md b/examples/2.3.x/server-graphql/examples/project/create-windows-platform.md new file mode 100644 index 000000000..2f58d6a1f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/create-windows-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectCreateWindowsPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + packageIdentifierName: "<PACKAGE_IDENTIFIER_NAME>" + ) { + _id + _createdAt + _updatedAt + name + type + packageIdentifierName + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/delete-key.md b/examples/2.3.x/server-graphql/examples/project/delete-key.md new file mode 100644 index 000000000..fe9464f49 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/delete-key.md @@ -0,0 +1,9 @@ +```graphql +mutation { + projectDeleteKey( + keyId: "<KEY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/delete-mock-phone.md b/examples/2.3.x/server-graphql/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..0626a7d3c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/delete-mock-phone.md @@ -0,0 +1,9 @@ +```graphql +mutation { + projectDeleteMockPhone( + number: "+12065550100" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/delete-platform.md b/examples/2.3.x/server-graphql/examples/project/delete-platform.md new file mode 100644 index 000000000..12c015007 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/delete-platform.md @@ -0,0 +1,9 @@ +```graphql +mutation { + projectDeletePlatform( + platformId: "<PLATFORM_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/delete-variable.md b/examples/2.3.x/server-graphql/examples/project/delete-variable.md new file mode 100644 index 000000000..c210d2309 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/delete-variable.md @@ -0,0 +1,9 @@ +```graphql +mutation { + projectDeleteVariable( + variableId: "<VARIABLE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/delete.md b/examples/2.3.x/server-graphql/examples/project/delete.md new file mode 100644 index 000000000..aae98b628 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/delete.md @@ -0,0 +1,7 @@ +```graphql +mutation { + projectDelete { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/get-email-template.md b/examples/2.3.x/server-graphql/examples/project/get-email-template.md new file mode 100644 index 000000000..2030912c3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/get-email-template.md @@ -0,0 +1,17 @@ +```graphql +query { + projectGetEmailTemplate( + templateId: "verification", + locale: "af" + ) { + templateId + locale + message + senderName + senderEmail + replyToEmail + replyToName + subject + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/get-key.md b/examples/2.3.x/server-graphql/examples/project/get-key.md new file mode 100644 index 000000000..04f990ebc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/get-key.md @@ -0,0 +1,17 @@ +```graphql +query { + projectGetKey( + keyId: "<KEY_ID>" + ) { + _id + _createdAt + _updatedAt + name + expire + scopes + secret + accessedAt + sdks + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/get-mock-phone.md b/examples/2.3.x/server-graphql/examples/project/get-mock-phone.md new file mode 100644 index 000000000..9110f327c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/get-mock-phone.md @@ -0,0 +1,12 @@ +```graphql +query { + projectGetMockPhone( + number: "+12065550100" + ) { + number + otp + _createdAt + _updatedAt + } +} +``` 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 new file mode 100644 index 000000000..5e49dccd6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,12 @@ +```graphql +query { + projectGetOAuth2Provider( + providerId: "amazon" + ) { + _id + enabled + clientId + clientSecret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/get-platform.md b/examples/2.3.x/server-graphql/examples/project/get-platform.md new file mode 100644 index 000000000..bcb956cbd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/get-platform.md @@ -0,0 +1,14 @@ +```graphql +query { + projectGetPlatform( + platformId: "<PLATFORM_ID>" + ) { + _id + _createdAt + _updatedAt + name + type + hostname + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/get-policy.md b/examples/2.3.x/server-graphql/examples/project/get-policy.md new file mode 100644 index 000000000..ed8e29654 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/get-policy.md @@ -0,0 +1,10 @@ +```graphql +query { + projectGetPolicy( + policyId: "password-dictionary" + ) { + _id + enabled + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/get-variable.md b/examples/2.3.x/server-graphql/examples/project/get-variable.md new file mode 100644 index 000000000..7455044ef --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/get-variable.md @@ -0,0 +1,16 @@ +```graphql +query { + projectGetVariable( + variableId: "<VARIABLE_ID>" + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/get.md b/examples/2.3.x/server-graphql/examples/project/get.md new file mode 100644 index 000000000..87a05e37b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/get.md @@ -0,0 +1,77 @@ +```graphql +query { + projectGet { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/list-email-templates.md b/examples/2.3.x/server-graphql/examples/project/list-email-templates.md new file mode 100644 index 000000000..637f3206d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/list-email-templates.md @@ -0,0 +1,20 @@ +```graphql +query { + projectListEmailTemplates( + queries: [], + total: false + ) { + total + templates { + templateId + locale + message + senderName + senderEmail + replyToEmail + replyToName + subject + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/list-keys.md b/examples/2.3.x/server-graphql/examples/project/list-keys.md new file mode 100644 index 000000000..d23c0804e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/list-keys.md @@ -0,0 +1,21 @@ +```graphql +query { + projectListKeys( + queries: [], + total: false + ) { + total + keys { + _id + _createdAt + _updatedAt + name + expire + scopes + secret + accessedAt + sdks + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/list-mock-phones.md b/examples/2.3.x/server-graphql/examples/project/list-mock-phones.md new file mode 100644 index 000000000..8ce0c6f36 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/list-mock-phones.md @@ -0,0 +1,16 @@ +```graphql +query { + projectListMockPhones( + queries: [], + total: false + ) { + total + mockNumbers { + number + otp + _createdAt + _updatedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-graphql/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..666bbd8af --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,11 @@ +```graphql +query { + projectListOAuth2Providers( + queries: [], + total: false + ) { + total + providers + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/list-platforms.md b/examples/2.3.x/server-graphql/examples/project/list-platforms.md new file mode 100644 index 000000000..6e5ba0f23 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/list-platforms.md @@ -0,0 +1,11 @@ +```graphql +query { + projectListPlatforms( + queries: [], + total: false + ) { + total + platforms + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/list-policies.md b/examples/2.3.x/server-graphql/examples/project/list-policies.md new file mode 100644 index 000000000..e0590c3e5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/list-policies.md @@ -0,0 +1,11 @@ +```graphql +query { + projectListPolicies( + queries: [], + total: false + ) { + total + policies + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/list-variables.md b/examples/2.3.x/server-graphql/examples/project/list-variables.md new file mode 100644 index 000000000..a4c950a8f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/list-variables.md @@ -0,0 +1,20 @@ +```graphql +query { + projectListVariables( + queries: [], + total: false + ) { + total + variables { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-android-platform.md b/examples/2.3.x/server-graphql/examples/project/update-android-platform.md new file mode 100644 index 000000000..0b33ee8b1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-android-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateAndroidPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + applicationId: "<APPLICATION_ID>" + ) { + _id + _createdAt + _updatedAt + name + type + applicationId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-apple-platform.md b/examples/2.3.x/server-graphql/examples/project/update-apple-platform.md new file mode 100644 index 000000000..53e2cf536 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-apple-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateApplePlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + bundleIdentifier: "<BUNDLE_IDENTIFIER>" + ) { + _id + _createdAt + _updatedAt + name + type + bundleIdentifier + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-auth-method.md b/examples/2.3.x/server-graphql/examples/project/update-auth-method.md new file mode 100644 index 000000000..d0661384d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-auth-method.md @@ -0,0 +1,80 @@ +```graphql +mutation { + projectUpdateAuthMethod( + methodId: "email-password", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-graphql/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..4ec4a4783 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateDenyAliasedEmailPolicy( + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-graphql/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..14f251c4f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateDenyCorporateEmailPolicy( + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-graphql/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..815b7da5a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateDenyDisposableEmailPolicy( + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-graphql/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..ae12b1983 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateDenyFreeEmailPolicy( + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-email-template.md b/examples/2.3.x/server-graphql/examples/project/update-email-template.md new file mode 100644 index 000000000..cbb98d86b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-email-template.md @@ -0,0 +1,23 @@ +```graphql +mutation { + projectUpdateEmailTemplate( + templateId: "verification", + locale: "af", + subject: "<SUBJECT>", + message: "<MESSAGE>", + senderName: "<SENDER_NAME>", + senderEmail: "email@example.com", + replyToEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>" + ) { + templateId + locale + message + senderName + senderEmail + replyToEmail + replyToName + subject + } +} +``` 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 new file mode 100644 index 000000000..a981941eb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-key.md @@ -0,0 +1,20 @@ +```graphql +mutation { + projectUpdateKey( + keyId: "<KEY_ID>", + name: "<NAME>", + scopes: [], + expire: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + _updatedAt + name + expire + scopes + secret + accessedAt + sdks + } +} +``` 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 new file mode 100644 index 000000000..cc25ff201 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-labels.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateLabels( + labels: [] + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-linux-platform.md b/examples/2.3.x/server-graphql/examples/project/update-linux-platform.md new file mode 100644 index 000000000..141398304 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-linux-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateLinuxPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + packageName: "<PACKAGE_NAME>" + ) { + _id + _createdAt + _updatedAt + name + type + packageName + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-graphql/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..9b79a3c51 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,84 @@ +```graphql +mutation { + projectUpdateMembershipPrivacyPolicy( + userId: false, + userEmail: false, + userPhone: false, + userName: false, + userMFA: false, + userAccessedAt: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-graphql/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..29582e663 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-mfa-factors-policy.md @@ -0,0 +1,82 @@ +```graphql +mutation { + projectUpdateMFAFactorsPolicy( + totp: false, + email: false, + phone: false, + custom: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-mock-phone.md b/examples/2.3.x/server-graphql/examples/project/update-mock-phone.md new file mode 100644 index 000000000..4194a6bb2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-mock-phone.md @@ -0,0 +1,13 @@ +```graphql +mutation { + projectUpdateMockPhone( + number: "+12065550100", + otp: "<OTP>" + ) { + number + otp + _createdAt + _updatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..96cfe2796 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-amazon.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Amazon( + 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-apple.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..be393c101 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,22 @@ +```graphql +mutation { + projectUpdateOAuth2Apple( + serviceId: "<SERVICE_ID>", + keyId: "<KEY_ID>", + teamId: "<TEAM_ID>", + p8File: "<P8_FILE>", + nativeClientIds: [], + enabled: false, + nativeEnabled: false + ) { + _id + enabled + serviceId + keyId + teamId + p8File + nativeEnabled + nativeClientIds + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..672a878b9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-appwrite.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Appwrite( + 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-auth-0.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..746d0517f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-auth-0.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateOAuth2Auth0( + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + endpoint: "<ENDPOINT>", + enabled: false + ) { + _id + enabled + clientId + clientSecret + endpoint + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..bee04673c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-authentik.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateOAuth2Authentik( + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + endpoint: "<ENDPOINT>", + enabled: false + ) { + _id + enabled + clientId + clientSecret + endpoint + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..d238ce1a0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-autodesk.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Autodesk( + 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-bitbucket.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..41139c2e1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-bitbucket.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Bitbucket( + key: "<KEY>", + secret: "<SECRET>", + enabled: false + ) { + _id + enabled + key + secret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..72c7707a1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-bitly.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Bitly( + 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-box.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..faa83fc35 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-box.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Box( + 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-cloudflare.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..9054192c6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-cloudflare.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Cloudflare( + 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-dailymotion.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..dad14b649 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-dailymotion.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Dailymotion( + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + enabled: false + ) { + _id + enabled + apiKey + apiSecret + } +} +``` 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 new file mode 100644 index 000000000..0b3ed71c6 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-discord.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Discord( + 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-disqus.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..34890edfa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-disqus.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Disqus( + publicKey: "<PUBLIC_KEY>", + secretKey: "<SECRET_KEY>", + enabled: false + ) { + _id + enabled + publicKey + secretKey + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..1a78a1ffd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-dropbox.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Dropbox( + appKey: "<APP_KEY>", + appSecret: "<APP_SECRET>", + enabled: false + ) { + _id + enabled + appKey + appSecret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..70ca5c82f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-etsy.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Etsy( + keyString: "<KEY_STRING>", + sharedSecret: "<SHARED_SECRET>", + enabled: false + ) { + _id + enabled + keyString + sharedSecret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..e282290d1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-facebook.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Facebook( + appId: "<APP_ID>", + appSecret: "<APP_SECRET>", + enabled: false + ) { + _id + enabled + appId + appSecret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..17d332abc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-figma.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Figma( + 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-fusion-auth.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..e7447d1c8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateOAuth2FusionAuth( + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + endpoint: "<ENDPOINT>", + enabled: false + ) { + _id + enabled + clientId + clientSecret + endpoint + } +} +``` 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 new file mode 100644 index 000000000..f5a3880bd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-git-hub.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2GitHub( + 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-gitlab.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..7ff242b8e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-gitlab.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateOAuth2Gitlab( + applicationId: "<APPLICATION_ID>", + secret: "<SECRET>", + endpoint: "https://example.com", + enabled: false + ) { + _id + enabled + applicationId + secret + endpoint + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..84c365f3e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-google.md @@ -0,0 +1,20 @@ +```graphql +mutation { + projectUpdateOAuth2Google( + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + prompt: [], + nativeClientIds: [], + enabled: false, + nativeEnabled: false + ) { + _id + enabled + clientId + clientSecret + prompt + nativeEnabled + nativeClientIds + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..67f2e02ca --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-hugging-face.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2HuggingFace( + 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-kakao.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..5efba028a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kakao.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Kakao( + 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-keycloak.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..881cb1d5c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,18 @@ +```graphql +mutation { + projectUpdateOAuth2Keycloak( + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + endpoint: "<ENDPOINT>", + realmName: "<REALM_NAME>", + enabled: false + ) { + _id + enabled + clientId + clientSecret + endpoint + realmName + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..09d6779e1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kick.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Kick( + 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-linkedin.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..50f56f116 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-linkedin.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Linkedin( + clientId: "<CLIENT_ID>", + primaryClientSecret: "<PRIMARY_CLIENT_SECRET>", + enabled: false + ) { + _id + enabled + clientId + primaryClientSecret + } +} +``` 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 new file mode 100644 index 000000000..b80848c01 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-microsoft.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateOAuth2Microsoft( + applicationId: "<APPLICATION_ID>", + applicationSecret: "<APPLICATION_SECRET>", + tenant: "<TENANT>", + enabled: false + ) { + _id + enabled + applicationId + applicationSecret + tenant + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..be481aecd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-notion.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Notion( + oauthClientId: "<OAUTH_CLIENT_ID>", + oauthClientSecret: "<OAUTH_CLIENT_SECRET>", + enabled: false + ) { + _id + enabled + oauthClientId + oauthClientSecret + } +} +``` 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 new file mode 100644 index 000000000..ddbd12084 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,26 @@ +```graphql +mutation { + projectUpdateOAuth2Oidc( + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + wellKnownURL: "https://example.com", + authorizationURL: "https://example.com", + tokenURL: "https://example.com", + userInfoURL: "https://example.com", + prompt: [], + maxAge: 0, + enabled: false + ) { + _id + enabled + clientId + clientSecret + 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 new file mode 100644 index 000000000..5075b3f27 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,18 @@ +```graphql +mutation { + projectUpdateOAuth2Okta( + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + domain: "example.com", + authorizationServerId: "<AUTHORIZATION_SERVER_ID>", + enabled: false + ) { + _id + enabled + clientId + clientSecret + domain + authorizationServerId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..9d22e49be --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-paypal-sandbox.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2PaypalSandbox( + clientId: "<CLIENT_ID>", + secretKey: "<SECRET_KEY>", + enabled: false + ) { + _id + enabled + clientId + secretKey + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..d106a4ddb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-paypal.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Paypal( + clientId: "<CLIENT_ID>", + secretKey: "<SECRET_KEY>", + enabled: false + ) { + _id + enabled + clientId + secretKey + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..41847a43f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-podio.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Podio( + 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-resend.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..f81474a91 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-resend.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Resend( + 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-salesforce.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..ab63ff525 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-salesforce.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Salesforce( + customerKey: "<CUSTOMER_KEY>", + customerSecret: "<CUSTOMER_SECRET>", + enabled: false + ) { + _id + enabled + customerKey + customerSecret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..086bf66c3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-server.md @@ -0,0 +1,94 @@ +```graphql +mutation { + projectUpdateOAuth2Server( + enabled: false, + authorizationUrl: "https://example.com", + scopes: [], + authorizationDetailsTypes: [], + accessTokenDuration: 60, + refreshTokenDuration: 60, + publicAccessTokenDuration: 60, + publicRefreshTokenDuration: 60, + installationAccessTokenDuration: 60, + confidentialPkce: false, + verificationUrl: "https://example.com", + userCodeLength: 6, + userCodeFormat: "numeric", + deviceCodeDuration: 60, + defaultScopes: [], + installationScopes: [] + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..cdee16942 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-slack.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Slack( + 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-spotify.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..cd0b342ae --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-spotify.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Spotify( + 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-stripe.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..c34176870 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-stripe.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Stripe( + clientId: "<CLIENT_ID>", + apiSecretKey: "<API_SECRET_KEY>", + enabled: false + ) { + _id + enabled + clientId + apiSecretKey + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..259de0919 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-tik-tok.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2TikTok( + 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-tradeshift-sandbox.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..6bcf5dc9b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-tradeshift-sandbox.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2TradeshiftSandbox( + oauth2ClientId: "<OAUTH2_CLIENT_ID>", + oauth2ClientSecret: "<OAUTH2_CLIENT_SECRET>", + enabled: false + ) { + _id + enabled + oauth2ClientId + oauth2ClientSecret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..dda26edc9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-tradeshift.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Tradeshift( + oauth2ClientId: "<OAUTH2_CLIENT_ID>", + oauth2ClientSecret: "<OAUTH2_CLIENT_SECRET>", + enabled: false + ) { + _id + enabled + oauth2ClientId + oauth2ClientSecret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..60893d37a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-twitch.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Twitch( + 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-word-press.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..2c1a90d4b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-word-press.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2WordPress( + 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-yahoo.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..0cebeb3bb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-yahoo.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Yahoo( + 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-yandex.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..e26e2c344 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-yandex.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Yandex( + 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 new file mode 100644 index 000000000..b71bd18d5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-zoho.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Zoho( + 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-zoom.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..3ef225a46 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-zoom.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Zoom( + 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-2x.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..79bb52c9a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2x.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2X( + customerKey: "<CUSTOMER_KEY>", + secretKey: "<SECRET_KEY>", + enabled: false + ) { + _id + enabled + customerKey + secretKey + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-graphql/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..2f121a88c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdatePasswordDictionaryPolicy( + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-password-history-policy.md b/examples/2.3.x/server-graphql/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..2e7317aa0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-password-history-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdatePasswordHistoryPolicy( + total: 1 + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-graphql/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..af14297a3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdatePasswordPersonalDataPolicy( + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-graphql/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..416416b0e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-password-pwned-policy.md @@ -0,0 +1,81 @@ +```graphql +mutation { + projectUpdatePasswordPwnedPolicy( + enabled: false, + sessions: false, + users: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-graphql/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..8ae09a725 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-password-strength-policy.md @@ -0,0 +1,18 @@ +```graphql +mutation { + projectUpdatePasswordStrengthPolicy( + min: 8, + uppercase: false, + lowercase: false, + number: false, + symbols: false + ) { + _id + min + uppercase + lowercase + number + symbols + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-protocol.md b/examples/2.3.x/server-graphql/examples/project/update-protocol.md new file mode 100644 index 000000000..f97a1ee10 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-protocol.md @@ -0,0 +1,80 @@ +```graphql +mutation { + projectUpdateProtocol( + protocolId: "rest", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-service.md b/examples/2.3.x/server-graphql/examples/project/update-service.md new file mode 100644 index 000000000..634adb31b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-service.md @@ -0,0 +1,80 @@ +```graphql +mutation { + projectUpdateService( + serviceId: "account", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-graphql/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..34f146950 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-session-alert-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateSessionAlertPolicy( + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-graphql/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..c365ab05d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-session-duration-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateSessionDurationPolicy( + duration: 60 + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-graphql/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..8242e48db --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateSessionInvalidationPolicy( + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-graphql/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..372a3fb5a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-session-limit-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateSessionLimitPolicy( + total: 1 + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-smtp.md b/examples/2.3.x/server-graphql/examples/project/update-smtp.md new file mode 100644 index 000000000..2530e1e5d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-smtp.md @@ -0,0 +1,88 @@ +```graphql +mutation { + projectUpdateSMTP( + host: "example.com", + port: 587, + username: "<USERNAME>", + password: "password", + senderEmail: "email@example.com", + senderName: "<SENDER_NAME>", + replyToEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + secure: "tls", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-graphql/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..34d0c5c47 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-user-limit-policy.md @@ -0,0 +1,79 @@ +```graphql +mutation { + projectUpdateUserLimitPolicy( + total: 0 + ) { + _id + _createdAt + _updatedAt + name + teamId + region + smtpEnabled + smtpSenderName + smtpSenderEmail + smtpReplyToName + smtpReplyToEmail + smtpHost + smtpPort + smtpUsername + smtpPassword + smtpSecure + pingCount + pingedAt + labels + status + onboarding + authMethods { + _id + enabled + } + services { + _id + enabled + } + protocols { + _id + enabled + } + blocks { + _createdAt + resourceType + resourceId + mode + expiredAt + } + consoleAccessedAt + wafEnabled + billingLimits { + bandwidth + storage + users + executions + GBHours + imageTransformations + authPhone + budgetLimit + } + firstAccessedAt + mcpAccessedAt + oAuth2ServerEnabled + oAuth2ServerAuthorizationUrl + oAuth2ServerScopes + oAuth2ServerDefaultScopes + oAuth2ServerInstallationScopes + oAuth2ServerAuthorizationDetailsTypes + oAuth2ServerAccessTokenDuration + oAuth2ServerRefreshTokenDuration + oAuth2ServerPublicAccessTokenDuration + oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration + oAuth2ServerConfidentialPkce + oAuth2ServerVerificationUrl + oAuth2ServerUserCodeLength + oAuth2ServerUserCodeFormat + oAuth2ServerDeviceCodeDuration + oAuth2ServerDiscoveryUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-variable.md b/examples/2.3.x/server-graphql/examples/project/update-variable.md new file mode 100644 index 000000000..aed16928b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-variable.md @@ -0,0 +1,19 @@ +```graphql +mutation { + projectUpdateVariable( + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-web-platform.md b/examples/2.3.x/server-graphql/examples/project/update-web-platform.md new file mode 100644 index 000000000..afca13f00 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-web-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateWebPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + hostname: "app.example.com" + ) { + _id + _createdAt + _updatedAt + name + type + hostname + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-windows-platform.md b/examples/2.3.x/server-graphql/examples/project/update-windows-platform.md new file mode 100644 index 000000000..f0142c5bb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-windows-platform.md @@ -0,0 +1,16 @@ +```graphql +mutation { + projectUpdateWindowsPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + packageIdentifierName: "<PACKAGE_IDENTIFIER_NAME>" + ) { + _id + _createdAt + _updatedAt + name + type + packageIdentifierName + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/create-api-rule.md b/examples/2.3.x/server-graphql/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..edce1a59d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/create-api-rule.md @@ -0,0 +1,23 @@ +```graphql +mutation { + proxyCreateAPIRule( + domain: "example.com" + ) { + _id + _createdAt + _updatedAt + domain + type + trigger + redirectUrl + redirectStatusCode + deploymentId + deploymentResourceType + deploymentResourceId + deploymentVcsProviderBranch + status + logs + renewAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/create-function-rule.md b/examples/2.3.x/server-graphql/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..00a2bdcce --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/create-function-rule.md @@ -0,0 +1,25 @@ +```graphql +mutation { + proxyCreateFunctionRule( + domain: "example.com", + functionId: "<FUNCTION_ID>", + branch: "<BRANCH>" + ) { + _id + _createdAt + _updatedAt + domain + type + trigger + redirectUrl + redirectStatusCode + deploymentId + deploymentResourceType + deploymentResourceId + deploymentVcsProviderBranch + status + logs + renewAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/create-invalidation.md b/examples/2.3.x/server-graphql/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..42a11cf89 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/create-invalidation.md @@ -0,0 +1,14 @@ +```graphql +mutation { + proxyCreateInvalidation( + domain: "example.com", + type: "tag", + reference: "<REFERENCE>" + ) { + domain + type + reference + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-graphql/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..1db10bffd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/create-redirect-rule.md @@ -0,0 +1,27 @@ +```graphql +mutation { + proxyCreateRedirectRule( + domain: "example.com", + url: "https://example.com", + statusCode: "301", + resourceId: "<RESOURCE_ID>", + resourceType: "site" + ) { + _id + _createdAt + _updatedAt + domain + type + trigger + redirectUrl + redirectStatusCode + deploymentId + deploymentResourceType + deploymentResourceId + deploymentVcsProviderBranch + status + logs + renewAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/create-site-rule.md b/examples/2.3.x/server-graphql/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..029ebb327 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/create-site-rule.md @@ -0,0 +1,25 @@ +```graphql +mutation { + proxyCreateSiteRule( + domain: "example.com", + siteId: "<SITE_ID>", + branch: "<BRANCH>" + ) { + _id + _createdAt + _updatedAt + domain + type + trigger + redirectUrl + redirectStatusCode + deploymentId + deploymentResourceType + deploymentResourceId + deploymentVcsProviderBranch + status + logs + renewAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/delete-rule.md b/examples/2.3.x/server-graphql/examples/proxy/delete-rule.md new file mode 100644 index 000000000..08780bf47 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/delete-rule.md @@ -0,0 +1,9 @@ +```graphql +mutation { + proxyDeleteRule( + ruleId: "<RULE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/get-rule.md b/examples/2.3.x/server-graphql/examples/proxy/get-rule.md new file mode 100644 index 000000000..2e921ebbd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/get-rule.md @@ -0,0 +1,23 @@ +```graphql +query { + proxyGetRule( + ruleId: "<RULE_ID>" + ) { + _id + _createdAt + _updatedAt + domain + type + trigger + redirectUrl + redirectStatusCode + deploymentId + deploymentResourceType + deploymentResourceId + deploymentVcsProviderBranch + status + logs + renewAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/list-rules.md b/examples/2.3.x/server-graphql/examples/proxy/list-rules.md new file mode 100644 index 000000000..984f3e8db --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/list-rules.md @@ -0,0 +1,27 @@ +```graphql +query { + proxyListRules( + queries: [], + total: false + ) { + total + rules { + _id + _createdAt + _updatedAt + domain + type + trigger + redirectUrl + redirectStatusCode + deploymentId + deploymentResourceType + deploymentResourceId + deploymentVcsProviderBranch + status + logs + renewAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/proxy/update-rule-status.md b/examples/2.3.x/server-graphql/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..dd9fbf67e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/proxy/update-rule-status.md @@ -0,0 +1,23 @@ +```graphql +mutation { + proxyUpdateRuleStatus( + ruleId: "<RULE_ID>" + ) { + _id + _createdAt + _updatedAt + domain + type + trigger + redirectUrl + redirectStatusCode + deploymentId + deploymentResourceType + deploymentResourceId + deploymentVcsProviderBranch + status + logs + renewAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/create-deployment.md b/examples/2.3.x/server-graphql/examples/sites/create-deployment.md new file mode 100644 index 000000000..0b32fe5d0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/create-deployment.md @@ -0,0 +1,26 @@ +```graphql +POST /v1/sites/{siteId}/deployments 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 { sitesCreateDeployment(siteId: $siteId, code: $code, installCommand: $installCommand, buildCommand: $buildCommand, outputDirectory: $outputDirectory, activate: $activate) { id }" }, "variables": { "siteId": "<SITE_ID>", "code": null, "installCommand": "<INSTALL_COMMAND>", "buildCommand": "<BUILD_COMMAND>", "outputDirectory": "<OUTPUT_DIRECTORY>", "activate": false } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-graphql/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..598ed8c4a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,36 @@ +```graphql +mutation { + sitesCreateDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/create-template-deployment.md b/examples/2.3.x/server-graphql/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..8c449e086 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/create-template-deployment.md @@ -0,0 +1,41 @@ +```graphql +mutation { + sitesCreateTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/create-variable.md b/examples/2.3.x/server-graphql/examples/sites/create-variable.md new file mode 100644 index 000000000..6c66d109d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/create-variable.md @@ -0,0 +1,20 @@ +```graphql +mutation { + sitesCreateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-graphql/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..ef9b8aeb2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/create-vcs-deployment.md @@ -0,0 +1,38 @@ +```graphql +mutation { + sitesCreateVcsDeployment( + siteId: "<SITE_ID>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/create.md b/examples/2.3.x/server-graphql/examples/sites/create.md new file mode 100644 index 000000000..538d4848a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/create.md @@ -0,0 +1,75 @@ +```graphql +mutation { + sitesCreate( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: "analog", + buildRuntime: "node-14.5", + enabled: false, + logging: false, + timeout: 1, + installCommand: "<INSTALL_COMMAND>", + buildCommand: "<BUILD_COMMAND>", + startCommand: "<START_COMMAND>", + outputDirectory: "<OUTPUT_DIRECTORY>", + adapter: "static", + installationId: "<INSTALLATION_ID>", + fallbackFile: "<FALLBACK_FILE>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + providerBranches: [], + providerPaths: [], + buildSpecification: "s-1vcpu-512mb", + runtimeSpecification: "s-1vcpu-512mb", + deploymentRetention: 0, + scopes: [] + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentRetention + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + startCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + buildRuntime + adapter + fallbackFile + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/delete-deployment.md b/examples/2.3.x/server-graphql/examples/sites/delete-deployment.md new file mode 100644 index 000000000..cc7ed0d0d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/delete-deployment.md @@ -0,0 +1,10 @@ +```graphql +mutation { + sitesDeleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/delete-log.md b/examples/2.3.x/server-graphql/examples/sites/delete-log.md new file mode 100644 index 000000000..b10099edc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/delete-log.md @@ -0,0 +1,10 @@ +```graphql +mutation { + sitesDeleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/delete-variable.md b/examples/2.3.x/server-graphql/examples/sites/delete-variable.md new file mode 100644 index 000000000..39d44d871 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/delete-variable.md @@ -0,0 +1,10 @@ +```graphql +mutation { + sitesDeleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/delete.md b/examples/2.3.x/server-graphql/examples/sites/delete.md new file mode 100644 index 000000000..3be9a17ba --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + sitesDelete( + siteId: "<SITE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/get-deployment-download.md b/examples/2.3.x/server-graphql/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..df3ee5dd8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/get-deployment-download.md @@ -0,0 +1,12 @@ +```graphql +query { + sitesGetDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: "source", + token: "<TOKEN>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/get-deployment.md b/examples/2.3.x/server-graphql/examples/sites/get-deployment.md new file mode 100644 index 000000000..1a05a08fa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/get-deployment.md @@ -0,0 +1,36 @@ +```graphql +query { + sitesGetDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/get-log.md b/examples/2.3.x/server-graphql/examples/sites/get-log.md new file mode 100644 index 000000000..0b67f34e3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/get-log.md @@ -0,0 +1,34 @@ +```graphql +query { + sitesGetLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + resourceId + resourceType + deploymentId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/get-variable.md b/examples/2.3.x/server-graphql/examples/sites/get-variable.md new file mode 100644 index 000000000..bb8500f84 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/get-variable.md @@ -0,0 +1,17 @@ +```graphql +query { + sitesGetVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/get.md b/examples/2.3.x/server-graphql/examples/sites/get.md new file mode 100644 index 000000000..79085fd76 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/get.md @@ -0,0 +1,52 @@ +```graphql +query { + sitesGet( + siteId: "<SITE_ID>" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentRetention + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + startCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + buildRuntime + adapter + fallbackFile + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/list-deployments.md b/examples/2.3.x/server-graphql/examples/sites/list-deployments.md new file mode 100644 index 000000000..385bff80d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/list-deployments.md @@ -0,0 +1,41 @@ +```graphql +query { + sitesListDeployments( + siteId: "<SITE_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + deployments { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } + } +} +``` 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 new file mode 100644 index 000000000..1faf1fd83 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/list-frameworks.md @@ -0,0 +1,20 @@ +```graphql +query { + sitesListFrameworks { + total + frameworks { + key + name + buildRuntime + runtimes + adapters { + key + installCommand + buildCommand + outputDirectory + fallbackFile + } + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/list-logs.md b/examples/2.3.x/server-graphql/examples/sites/list-logs.md new file mode 100644 index 000000000..8fe1de05f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/list-logs.md @@ -0,0 +1,38 @@ +```graphql +query { + sitesListLogs( + siteId: "<SITE_ID>", + queries: [], + total: false + ) { + total + executions { + _id + _createdAt + _updatedAt + _permissions + resourceId + resourceType + deploymentId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } + } +} +``` 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 new file mode 100644 index 000000000..db5395067 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/list-specifications.md @@ -0,0 +1,15 @@ +```graphql +query { + sitesListSpecifications( + type: "runtimes" + ) { + total + specifications { + memory + cpus + enabled + slug + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/list-variables.md b/examples/2.3.x/server-graphql/examples/sites/list-variables.md new file mode 100644 index 000000000..dddd1ae55 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/list-variables.md @@ -0,0 +1,21 @@ +```graphql +query { + sitesListVariables( + siteId: "<SITE_ID>", + queries: [], + total: false + ) { + total + variables { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/list.md b/examples/2.3.x/server-graphql/examples/sites/list.md new file mode 100644 index 000000000..c4be4dbee --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/list.md @@ -0,0 +1,57 @@ +```graphql +query { + sitesList( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + sites { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentRetention + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + startCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + buildRuntime + adapter + fallbackFile + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/update-deployment-status.md b/examples/2.3.x/server-graphql/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..4bb5c5977 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/update-deployment-status.md @@ -0,0 +1,36 @@ +```graphql +mutation { + sitesUpdateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranch + providerBranchUrl + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/update-site-deployment.md b/examples/2.3.x/server-graphql/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..615f71dbc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/update-site-deployment.md @@ -0,0 +1,53 @@ +```graphql +mutation { + sitesUpdateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentRetention + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + startCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + buildRuntime + adapter + fallbackFile + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/update-variable.md b/examples/2.3.x/server-graphql/examples/sites/update-variable.md new file mode 100644 index 000000000..05a8a186c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/update-variable.md @@ -0,0 +1,20 @@ +```graphql +mutation { + sitesUpdateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/sites/update.md b/examples/2.3.x/server-graphql/examples/sites/update.md new file mode 100644 index 000000000..09b477905 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/sites/update.md @@ -0,0 +1,75 @@ +```graphql +mutation { + sitesUpdate( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: "analog", + enabled: false, + logging: false, + timeout: 1, + installCommand: "<INSTALL_COMMAND>", + buildCommand: "<BUILD_COMMAND>", + startCommand: "<START_COMMAND>", + outputDirectory: "<OUTPUT_DIRECTORY>", + buildRuntime: "node-14.5", + adapter: "static", + fallbackFile: "<FALLBACK_FILE>", + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + providerBranches: [], + providerPaths: [], + buildSpecification: "s-1vcpu-512mb", + runtimeSpecification: "s-1vcpu-512mb", + deploymentRetention: 0, + scopes: [] + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentRetention + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + startCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + providerBranches + providerPaths + buildSpecification + runtimeSpecification + buildRuntime + adapter + fallbackFile + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/create-bucket.md b/examples/2.3.x/server-graphql/examples/storage/create-bucket.md new file mode 100644 index 000000000..3b09f3052 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/create-bucket.md @@ -0,0 +1,32 @@ +```graphql +mutation { + storageCreateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: "none", + encryption: false, + antivirus: false, + transformations: false + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + transformations + totalSize + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/create-file.md b/examples/2.3.x/server-graphql/examples/storage/create-file.md new file mode 100644 index 000000000..1f2b982c5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/create-file.md @@ -0,0 +1,26 @@ +```graphql +POST /v1/storage/buckets/{bucketId}/files 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 { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions, folder: $folder) { id }" }, "variables": { "bucketId": "<BUCKET_ID>", "fileId": "<FILE_ID>", "file": null, "permissions": ["read(\"any\")"], "folder": "photos/2026" } } + +--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/storage/delete-bucket.md b/examples/2.3.x/server-graphql/examples/storage/delete-bucket.md new file mode 100644 index 000000000..ac2022e96 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/delete-bucket.md @@ -0,0 +1,9 @@ +```graphql +mutation { + storageDeleteBucket( + bucketId: "<BUCKET_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/delete-file.md b/examples/2.3.x/server-graphql/examples/storage/delete-file.md new file mode 100644 index 000000000..c36fa0e94 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/delete-file.md @@ -0,0 +1,10 @@ +```graphql +mutation { + storageDeleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/get-bucket.md b/examples/2.3.x/server-graphql/examples/storage/get-bucket.md new file mode 100644 index 000000000..fe4b523b8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/get-bucket.md @@ -0,0 +1,22 @@ +```graphql +query { + storageGetBucket( + bucketId: "<BUCKET_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + transformations + totalSize + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/get-file-download.md b/examples/2.3.x/server-graphql/examples/storage/get-file-download.md new file mode 100644 index 000000000..f323f21e2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/get-file-download.md @@ -0,0 +1,11 @@ +```graphql +query { + storageGetFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/get-file-preview.md b/examples/2.3.x/server-graphql/examples/storage/get-file-preview.md new file mode 100644 index 000000000..0c06ca2b8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/get-file-preview.md @@ -0,0 +1,22 @@ +```graphql +query { + storageGetFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, + height: 0, + gravity: "auto", + quality: -1, + borderWidth: 0, + borderColor: "FFFFFF", + borderRadius: 0, + opacity: 0, + rotation: -360, + background: "FFFFFF", + output: "jpg", + token: "<TOKEN>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/get-file-view.md b/examples/2.3.x/server-graphql/examples/storage/get-file-view.md new file mode 100644 index 000000000..7871a3111 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/get-file-view.md @@ -0,0 +1,11 @@ +```graphql +query { + storageGetFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/get-file.md b/examples/2.3.x/server-graphql/examples/storage/get-file.md new file mode 100644 index 000000000..3bbbfcb4b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/get-file.md @@ -0,0 +1,25 @@ +```graphql +query { + storageGetFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + folder + key + signature + mimeType + sizeOriginal + sizeActual + chunksTotal + chunksUploaded + encryption + compression + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/list-buckets.md b/examples/2.3.x/server-graphql/examples/storage/list-buckets.md new file mode 100644 index 000000000..96d6ed47d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/list-buckets.md @@ -0,0 +1,27 @@ +```graphql +query { + storageListBuckets( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + buckets { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + transformations + totalSize + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/list-files.md b/examples/2.3.x/server-graphql/examples/storage/list-files.md new file mode 100644 index 000000000..974b01a7f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/list-files.md @@ -0,0 +1,30 @@ +```graphql +query { + storageListFiles( + bucketId: "<BUCKET_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + files { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + folder + key + signature + mimeType + sizeOriginal + sizeActual + chunksTotal + chunksUploaded + encryption + compression + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/update-bucket.md b/examples/2.3.x/server-graphql/examples/storage/update-bucket.md new file mode 100644 index 000000000..f94410399 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/update-bucket.md @@ -0,0 +1,32 @@ +```graphql +mutation { + storageUpdateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: "none", + encryption: false, + antivirus: false, + transformations: false + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + transformations + totalSize + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/storage/update-file.md b/examples/2.3.x/server-graphql/examples/storage/update-file.md new file mode 100644 index 000000000..ace17f9b1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/storage/update-file.md @@ -0,0 +1,27 @@ +```graphql +mutation { + storageUpdateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"] + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + folder + key + signature + mimeType + sizeOriginal + sizeActual + chunksTotal + chunksUploaded + encryption + compression + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..4ee68a023 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBCreateBigIntColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, + max: 1000000, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..af90411ad --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBCreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..b77ff11b2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-cutover.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBCreateCutover( + databaseId: "<DATABASE_ID>", + migrationId: "<MIGRATION_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + databaseId + specification + phase + attempt + lastError + lagDocuments + changelogWatermark + verifiedAt + cutoverAt + soakUntil + autoCutover + cutoverRequested + paused + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..5f3dd3eca --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBCreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..b21198b4c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-email-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBCreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..ced32697f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-enum-column.md @@ -0,0 +1,25 @@ +```graphql +mutation { + tablesDBCreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + elements: ["active", "inactive"], + required: false, + default: "active", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-failover.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..263bb960b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-failover.md @@ -0,0 +1,61 @@ +```graphql +mutation { + tablesDBCreateFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..fa884e0c5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-float-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBCreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, + max: 100, + default: 10.5, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` 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 new file mode 100644 index 000000000..4edc9f94e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-index.md @@ -0,0 +1,24 @@ +```graphql +mutation { + tablesDBCreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + type: "key", + columns: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..f493946a1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-integer-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBCreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, + max: 100, + default: 10, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..1e9c768a9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-ip-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBCreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..c00a3f8cc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-line-column.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBCreateLineColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [[1, 2], [3, 4], [5, 6]] + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..8697c6a4e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,24 @@ +```graphql +mutation { + tablesDBCreateLongtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..1eda32371 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,24 @@ +```graphql +mutation { + tablesDBCreateMediumtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-migration.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..22b26f47e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-migration.md @@ -0,0 +1,27 @@ +```graphql +mutation { + tablesDBCreateMigration( + databaseId: "<DATABASE_ID>", + specification: "s-1vcpu-1gb", + autoCutover: false + ) { + _id + _createdAt + _updatedAt + projectId + databaseId + specification + phase + attempt + lastError + lagDocuments + changelogWatermark + verifiedAt + cutoverAt + soakUntil + autoCutover + cutoverRequested + paused + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-operations.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..f5721ece9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-operations.md @@ -0,0 +1,25 @@ +```graphql +mutation { + tablesDBCreateOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..7979dd3d4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-point-column.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBCreatePointColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [1, 2] + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..9bb624f91 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBCreatePolygonColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..ffeb3e2a9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,29 @@ +```graphql +mutation { + tablesDBCreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: "oneToOne", + twoWay: false, + key: "<KEY>", + twoWayKey: "<TWO_WAY_KEY>", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-row.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-row.md new file mode 100644 index 000000000..556147030 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-row.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..9a93b02fa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-rows.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBCreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..802ee084c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-string-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBCreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-table.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-table.md new file mode 100644 index 000000000..9dd7b9dfa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-table.md @@ -0,0 +1,38 @@ +```graphql +mutation { + tablesDBCreateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"], + rowSecurity: false, + enabled: false, + columns: [], + indexes: [] + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..cc51eb7bb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-text-column.md @@ -0,0 +1,24 @@ +```graphql +mutation { + tablesDBCreateTextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..2ecb30310 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-transaction.md @@ -0,0 +1,14 @@ +```graphql +mutation { + tablesDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..c566c358a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-url-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBCreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..30c7aeb65 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBCreateVarcharColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create.md b/examples/2.3.x/server-graphql/examples/tablesdb/create.md new file mode 100644 index 000000000..020c26791 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create.md @@ -0,0 +1,54 @@ +```graphql +mutation { + tablesDBCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, + specification: "serverless", + replicas: 0, + syncMode: "async" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..203ed56e9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBDecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "<COLUMN>", + value: 1, + min: 0, + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/delete-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..fc63a8d5b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete-column.md @@ -0,0 +1,11 @@ +```graphql +mutation { + tablesDBDeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/delete-index.md b/examples/2.3.x/server-graphql/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..0a7d1c84f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete-index.md @@ -0,0 +1,11 @@ +```graphql +mutation { + tablesDBDeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-graphql/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..c07ebe1a7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete-migration.md @@ -0,0 +1,10 @@ +```graphql +mutation { + tablesDBDeleteMigration( + databaseId: "<DATABASE_ID>", + migrationId: "<MIGRATION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/delete-row.md b/examples/2.3.x/server-graphql/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..0acff213e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete-row.md @@ -0,0 +1,12 @@ +```graphql +mutation { + tablesDBDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + transactionId: "<TRANSACTION_ID>" + ) { + status + } +} +``` 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 new file mode 100644 index 000000000..6fa0a40fd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete-rows.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBDeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/delete-table.md b/examples/2.3.x/server-graphql/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..a377f661e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete-table.md @@ -0,0 +1,10 @@ +```graphql +mutation { + tablesDBDeleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-graphql/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..e12bd209a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + tablesDBDeleteTransaction( + transactionId: "<TRANSACTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/delete.md b/examples/2.3.x/server-graphql/examples/tablesdb/delete.md new file mode 100644 index 000000000..066f034a5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + tablesDBDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/get-column.md new file mode 100644 index 000000000..510f5b5b5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get-column.md @@ -0,0 +1,19 @@ +```graphql +query { + tablesDBGetColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get-index.md b/examples/2.3.x/server-graphql/examples/tablesdb/get-index.md new file mode 100644 index 000000000..b35cc261e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get-index.md @@ -0,0 +1,20 @@ +```graphql +query { + tablesDBGetIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" + ) { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get-migration.md b/examples/2.3.x/server-graphql/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..3a665d643 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get-migration.md @@ -0,0 +1,26 @@ +```graphql +query { + tablesDBGetMigration( + databaseId: "<DATABASE_ID>", + migrationId: "<MIGRATION_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + databaseId + specification + phase + attempt + lastError + lagDocuments + changelogWatermark + verifiedAt + cutoverAt + soakUntil + autoCutover + cutoverRequested + paused + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-graphql/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..b0088ee5d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get-replicas.md @@ -0,0 +1,22 @@ +```graphql +query { + tablesDBGetReplicas( + databaseId: "<DATABASE_ID>" + ) { + replicas + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + members { + _id + role + status + replicating + lagSeconds + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get-row.md b/examples/2.3.x/server-graphql/examples/tablesdb/get-row.md new file mode 100644 index 000000000..354f847dc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get-row.md @@ -0,0 +1,20 @@ +```graphql +query { + tablesDBGetRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get-status.md b/examples/2.3.x/server-graphql/examples/tablesdb/get-status.md new file mode 100644 index 000000000..6d084a078 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get-status.md @@ -0,0 +1,36 @@ +```graphql +query { + tablesDBGetStatus( + databaseId: "<DATABASE_ID>" + ) { + health + ready + engine + version + uptime + connections { + current + max + } + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + replicas { + index + role + healthy + replicating + lagSeconds + } + volumes { + path + usedPercent + available + mounted + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get-table.md b/examples/2.3.x/server-graphql/examples/tablesdb/get-table.md new file mode 100644 index 000000000..284e864d7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get-table.md @@ -0,0 +1,32 @@ +```graphql +query { + tablesDBGetTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-graphql/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..0c520f611 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + tablesDBGetTransaction( + transactionId: "<TRANSACTION_ID>" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/get.md b/examples/2.3.x/server-graphql/examples/tablesdb/get.md new file mode 100644 index 000000000..38286f967 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/get.md @@ -0,0 +1,49 @@ +```graphql +query { + tablesDBGet( + databaseId: "<DATABASE_ID>" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..1137e3e4d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/increment-row-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBIncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "<COLUMN>", + value: 1, + max: 100, + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list-columns.md b/examples/2.3.x/server-graphql/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..de893f696 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-columns.md @@ -0,0 +1,13 @@ +```graphql +query { + tablesDBListColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [], + total: false + ) { + total + columns + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-graphql/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..907ea571d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-indexes.md @@ -0,0 +1,24 @@ +```graphql +query { + tablesDBListIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [], + total: false + ) { + total + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-graphql/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..461bd1191 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-migrations.md @@ -0,0 +1,28 @@ +```graphql +query { + tablesDBListMigrations( + databaseId: "<DATABASE_ID>" + ) { + total + migrations { + _id + _createdAt + _updatedAt + projectId + databaseId + specification + phase + attempt + lastError + lagDocuments + changelogWatermark + verifiedAt + cutoverAt + soakUntil + autoCutover + cutoverRequested + paused + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list-operations.md b/examples/2.3.x/server-graphql/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..81a4a9f8d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-operations.md @@ -0,0 +1,25 @@ +```graphql +query { + tablesDBListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", + limit: 1, + offset: 0 + ) { + total + operations { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list-rows.md b/examples/2.3.x/server-graphql/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..6927344f1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-rows.md @@ -0,0 +1,24 @@ +```graphql +query { + tablesDBListRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>", + total: false, + ttl: 0 + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-graphql/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..e447d21ff --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-specifications.md @@ -0,0 +1,22 @@ +```graphql +query { + tablesDBListSpecifications { + specifications { + slug + name + price + storageOverageRate + bandwidthOverageRate + replicaRate + pitrRate + cpu + memory + maxConnections + includedStorage + includedBandwidth + enabled + } + total + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list-tables.md b/examples/2.3.x/server-graphql/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..7c10afcfd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-tables.md @@ -0,0 +1,37 @@ +```graphql +query { + tablesDBListTables( + databaseId: "<DATABASE_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + tables { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + bytesMax + bytesUsed + } + } +} +``` 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 new file mode 100644 index 000000000..bc3663bec --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + tablesDBListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list.md b/examples/2.3.x/server-graphql/examples/tablesdb/list.md new file mode 100644 index 000000000..6b023e4eb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list.md @@ -0,0 +1,54 @@ +```graphql +query { + tablesDBList( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + databases { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..ead90236a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBUpdateBigIntColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 0, + min: 0, + max: 1000000, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..f571ec568 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBUpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: false, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..fd68f2c1c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBUpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..adf2d5a59 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-email-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBUpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..31f85012f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-enum-column.md @@ -0,0 +1,25 @@ +```graphql +mutation { + tablesDBUpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + elements: ["active", "inactive"], + required: false, + default: "active", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..ba07a7a9b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-float-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBUpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 10.5, + min: 0, + max: 100, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..7b18fe7ce --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-integer-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBUpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 10, + min: 0, + max: 100, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..88a59d337 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-ip-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBUpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..8ad1c2975 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-line-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBUpdateLineColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [[1, 2], [3, 4], [5, 6]], + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..87c733ed2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBUpdateLongtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..1390d7b4e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBUpdateMediumtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..843298936 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-point-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBUpdatePointColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [1, 2], + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..83605a856 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBUpdatePolygonColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..e75a78d3c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,26 @@ +```graphql +mutation { + tablesDBUpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + onDelete: "cascade", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-row.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-row.md new file mode 100644 index 000000000..2f3abc144 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-row.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-rows.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..7fcae0620 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-rows.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBUpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..9b496deb2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-string-column.md @@ -0,0 +1,25 @@ +```graphql +mutation { + tablesDBUpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-table.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-table.md new file mode 100644 index 000000000..749889797 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-table.md @@ -0,0 +1,37 @@ +```graphql +mutation { + tablesDBUpdateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read(\"any\")"], + rowSecurity: false, + enabled: false, + purge: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..4b22fc55d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-text-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBUpdateTextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..0d0986b85 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-transaction.md @@ -0,0 +1,16 @@ +```graphql +mutation { + tablesDBUpdateTransaction( + transactionId: "<TRANSACTION_ID>", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..685a97ff0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-url-column.md @@ -0,0 +1,23 @@ +```graphql +mutation { + tablesDBUpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-graphql/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..bd5afff79 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,25 @@ +```graphql +mutation { + tablesDBUpdateVarcharColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, + newKey: "<NEW_KEY>" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/update.md b/examples/2.3.x/server-graphql/examples/tablesdb/update.md new file mode 100644 index 000000000..71b86e15f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/update.md @@ -0,0 +1,54 @@ +```graphql +mutation { + tablesDBUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, + specification: "serverless", + replicas: 0, + syncMode: "async" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-graphql/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..027687876 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/upsert-row.md @@ -0,0 +1,21 @@ +```graphql +mutation { + tablesDBUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..fe106a6d5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tablesdb/upsert-rows.md @@ -0,0 +1,22 @@ +```graphql +mutation { + tablesDBUpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/create-installation.md b/examples/2.3.x/server-graphql/examples/teams/create-installation.md new file mode 100644 index 000000000..e40ba133c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/create-installation.md @@ -0,0 +1,20 @@ +```graphql +mutation { + teamsCreateInstallation( + teamId: "<TEAM_ID>", + appId: "<APP_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` 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 new file mode 100644 index 000000000..67b153ea1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/create-membership.md @@ -0,0 +1,29 @@ +```graphql +mutation { + teamsCreateMembership( + teamId: "<TEAM_ID>", + roles: [], + email: "email@example.com", + userId: "<USER_ID>", + phone: "+12065550100", + url: "https://example.com", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/create.md b/examples/2.3.x/server-graphql/examples/teams/create.md new file mode 100644 index 000000000..c31af8335 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/create.md @@ -0,0 +1,18 @@ +```graphql +mutation { + teamsCreate( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: [] + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/delete-installation.md b/examples/2.3.x/server-graphql/examples/teams/delete-installation.md new file mode 100644 index 000000000..2ca9fc4ec --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/delete-installation.md @@ -0,0 +1,10 @@ +```graphql +mutation { + teamsDeleteInstallation( + teamId: "<TEAM_ID>", + installationId: "<INSTALLATION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/delete-membership.md b/examples/2.3.x/server-graphql/examples/teams/delete-membership.md new file mode 100644 index 000000000..297d48689 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/delete-membership.md @@ -0,0 +1,10 @@ +```graphql +mutation { + teamsDeleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/delete.md b/examples/2.3.x/server-graphql/examples/teams/delete.md new file mode 100644 index 000000000..924ab91c9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + teamsDelete( + teamId: "<TEAM_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/get-installation.md b/examples/2.3.x/server-graphql/examples/teams/get-installation.md new file mode 100644 index 000000000..051aa484a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/get-installation.md @@ -0,0 +1,19 @@ +```graphql +query { + teamsGetInstallation( + teamId: "<TEAM_ID>", + installationId: "<INSTALLATION_ID>" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/get-membership.md b/examples/2.3.x/server-graphql/examples/teams/get-membership.md new file mode 100644 index 000000000..cccc945b4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/get-membership.md @@ -0,0 +1,24 @@ +```graphql +query { + teamsGetMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/get-prefs.md b/examples/2.3.x/server-graphql/examples/teams/get-prefs.md new file mode 100644 index 000000000..182735730 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/get-prefs.md @@ -0,0 +1,9 @@ +```graphql +query { + teamsGetPrefs( + teamId: "<TEAM_ID>" + ) { + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/get.md b/examples/2.3.x/server-graphql/examples/teams/get.md new file mode 100644 index 000000000..17f4a5ee9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/get.md @@ -0,0 +1,16 @@ +```graphql +query { + teamsGet( + teamId: "<TEAM_ID>" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/list-installations.md b/examples/2.3.x/server-graphql/examples/teams/list-installations.md new file mode 100644 index 000000000..e67a0d520 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/list-installations.md @@ -0,0 +1,23 @@ +```graphql +query { + teamsListInstallations( + teamId: "<TEAM_ID>", + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/list-memberships.md b/examples/2.3.x/server-graphql/examples/teams/list-memberships.md new file mode 100644 index 000000000..9f76ab1d5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/list-memberships.md @@ -0,0 +1,29 @@ +```graphql +query { + teamsListMemberships( + teamId: "<TEAM_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/list.md b/examples/2.3.x/server-graphql/examples/teams/list.md new file mode 100644 index 000000000..a714bd0bc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/list.md @@ -0,0 +1,21 @@ +```graphql +query { + teamsList( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + teams { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/update-installation.md b/examples/2.3.x/server-graphql/examples/teams/update-installation.md new file mode 100644 index 000000000..1c784643d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/update-installation.md @@ -0,0 +1,20 @@ +```graphql +mutation { + teamsUpdateInstallation( + teamId: "<TEAM_ID>", + installationId: "<INSTALLATION_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/update-membership-status.md b/examples/2.3.x/server-graphql/examples/teams/update-membership-status.md new file mode 100644 index 000000000..2b86ad398 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,26 @@ +```graphql +mutation { + teamsUpdateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` 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 new file mode 100644 index 000000000..c08593729 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/update-membership.md @@ -0,0 +1,25 @@ +```graphql +mutation { + teamsUpdateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/update-name.md b/examples/2.3.x/server-graphql/examples/teams/update-name.md new file mode 100644 index 000000000..a3ce2bd1f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/update-name.md @@ -0,0 +1,17 @@ +```graphql +mutation { + teamsUpdateName( + teamId: "<TEAM_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/teams/update-prefs.md b/examples/2.3.x/server-graphql/examples/teams/update-prefs.md new file mode 100644 index 000000000..411431a12 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/teams/update-prefs.md @@ -0,0 +1,10 @@ +```graphql +mutation { + teamsUpdatePrefs( + teamId: "<TEAM_ID>", + prefs: "{}" + ) { + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tokens/create-file-token.md b/examples/2.3.x/server-graphql/examples/tokens/create-file-token.md new file mode 100644 index 000000000..2d9501d7c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tokens/create-file-token.md @@ -0,0 +1,17 @@ +```graphql +mutation { + tokensCreateFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + resourceId + resourceType + expire + secret + accessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tokens/delete.md b/examples/2.3.x/server-graphql/examples/tokens/delete.md new file mode 100644 index 000000000..d29249a40 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tokens/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + tokensDelete( + tokenId: "<TOKEN_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tokens/get.md b/examples/2.3.x/server-graphql/examples/tokens/get.md new file mode 100644 index 000000000..35e1206dd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tokens/get.md @@ -0,0 +1,15 @@ +```graphql +query { + tokensGet( + tokenId: "<TOKEN_ID>" + ) { + _id + _createdAt + resourceId + resourceType + expire + secret + accessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tokens/list.md b/examples/2.3.x/server-graphql/examples/tokens/list.md new file mode 100644 index 000000000..ab80ac7b5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tokens/list.md @@ -0,0 +1,21 @@ +```graphql +query { + tokensList( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: [], + total: false + ) { + total + tokens { + _id + _createdAt + resourceId + resourceType + expire + secret + accessedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/tokens/update.md b/examples/2.3.x/server-graphql/examples/tokens/update.md new file mode 100644 index 000000000..01d04bb30 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/tokens/update.md @@ -0,0 +1,16 @@ +```graphql +mutation { + tokensUpdate( + tokenId: "<TOKEN_ID>", + expire: "2020-10-15T06:38:00.000+00:00" + ) { + _id + _createdAt + resourceId + resourceType + expire + secret + accessedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-argon-2-user.md b/examples/2.3.x/server-graphql/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..f12dc744b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-argon-2-user.md @@ -0,0 +1,50 @@ +```graphql +mutation { + usersCreateArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-graphql/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..da6882d3e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-bcrypt-user.md @@ -0,0 +1,50 @@ +```graphql +mutation { + usersCreateBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-jwt.md b/examples/2.3.x/server-graphql/examples/users/create-jwt.md new file mode 100644 index 000000000..0004b6fd2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-jwt.md @@ -0,0 +1,11 @@ +```graphql +mutation { + usersCreateJWT( + userId: "<USER_ID>", + sessionId: "recent()", + duration: 0 + ) { + jwt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-md-5-user.md b/examples/2.3.x/server-graphql/examples/users/create-md-5-user.md new file mode 100644 index 000000000..f403250a3 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-md-5-user.md @@ -0,0 +1,50 @@ +```graphql +mutation { + usersCreateMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-graphql/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..787528eb0 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```graphql +mutation { + usersCreateMFARecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-graphql/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..ad9a8a16c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-ph-pass-user.md @@ -0,0 +1,50 @@ +```graphql +mutation { + usersCreatePHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-graphql/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..11efb4c81 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,53 @@ +```graphql +mutation { + usersCreateScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-scrypt-user.md b/examples/2.3.x/server-graphql/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..672d9f890 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-scrypt-user.md @@ -0,0 +1,55 @@ +```graphql +mutation { + usersCreateScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 8, + passwordMemory: 65536, + passwordParallel: 1, + passwordLength: 64, + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-session.md b/examples/2.3.x/server-graphql/examples/users/create-session.md new file mode 100644 index 000000000..5e806de2c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-session.md @@ -0,0 +1,37 @@ +```graphql +mutation { + usersCreateSession( + userId: "<USER_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-sha-user.md b/examples/2.3.x/server-graphql/examples/users/create-sha-user.md new file mode 100644 index 000000000..5a5f38075 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-sha-user.md @@ -0,0 +1,51 @@ +```graphql +mutation { + usersCreateSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: "sha1", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-target.md b/examples/2.3.x/server-graphql/examples/users/create-target.md new file mode 100644 index 000000000..b25a469dc --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-target.md @@ -0,0 +1,22 @@ +```graphql +mutation { + usersCreateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: "email", + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create-token.md b/examples/2.3.x/server-graphql/examples/users/create-token.md new file mode 100644 index 000000000..6d4ea54fe --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create-token.md @@ -0,0 +1,16 @@ +```graphql +mutation { + usersCreateToken( + userId: "<USER_ID>", + length: 4, + expire: 60 + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/create.md b/examples/2.3.x/server-graphql/examples/users/create.md new file mode 100644 index 000000000..901a41716 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/create.md @@ -0,0 +1,51 @@ +```graphql +mutation { + usersCreate( + userId: "<USER_ID>", + email: "email@example.com", + phone: "+12065550100", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/delete-identity.md b/examples/2.3.x/server-graphql/examples/users/delete-identity.md new file mode 100644 index 000000000..9965b492f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/delete-identity.md @@ -0,0 +1,9 @@ +```graphql +mutation { + usersDeleteIdentity( + identityId: "<IDENTITY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-graphql/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..095d5f13c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,10 @@ +```graphql +mutation { + usersDeleteMFAAuthenticator( + userId: "<USER_ID>", + type: "totp" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/delete-session.md b/examples/2.3.x/server-graphql/examples/users/delete-session.md new file mode 100644 index 000000000..fd8363b66 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/delete-session.md @@ -0,0 +1,10 @@ +```graphql +mutation { + usersDeleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/delete-sessions.md b/examples/2.3.x/server-graphql/examples/users/delete-sessions.md new file mode 100644 index 000000000..8d445f8e4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/delete-sessions.md @@ -0,0 +1,9 @@ +```graphql +mutation { + usersDeleteSessions( + userId: "<USER_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/delete-target.md b/examples/2.3.x/server-graphql/examples/users/delete-target.md new file mode 100644 index 000000000..0e630003d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/delete-target.md @@ -0,0 +1,10 @@ +```graphql +mutation { + usersDeleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/delete.md b/examples/2.3.x/server-graphql/examples/users/delete.md new file mode 100644 index 000000000..8bdf41f88 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + usersDelete( + userId: "<USER_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-graphql/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..74dd2c9f2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/get-mfa-challenge.md @@ -0,0 +1,14 @@ +```graphql +query { + usersGetMFAChallenge( + userId: "<USER_ID>", + challengeId: "<CHALLENGE_ID>" + ) { + _id + _createdAt + userId + expire + code + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-graphql/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..2c86f0b31 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```graphql +query { + usersGetMFARecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/get-prefs.md b/examples/2.3.x/server-graphql/examples/users/get-prefs.md new file mode 100644 index 000000000..e6c5d5284 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/get-prefs.md @@ -0,0 +1,9 @@ +```graphql +query { + usersGetPrefs( + userId: "<USER_ID>" + ) { + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/get-target.md b/examples/2.3.x/server-graphql/examples/users/get-target.md new file mode 100644 index 000000000..c93658e35 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/get-target.md @@ -0,0 +1,18 @@ +```graphql +query { + usersGetTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/get.md b/examples/2.3.x/server-graphql/examples/users/get.md new file mode 100644 index 000000000..3b7275a2d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/get.md @@ -0,0 +1,47 @@ +```graphql +query { + usersGet( + userId: "<USER_ID>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/list-identities.md b/examples/2.3.x/server-graphql/examples/users/list-identities.md new file mode 100644 index 000000000..4e388615d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/list-identities.md @@ -0,0 +1,24 @@ +```graphql +query { + usersListIdentities( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + providerIdToken + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/list-memberships.md b/examples/2.3.x/server-graphql/examples/users/list-memberships.md new file mode 100644 index 000000000..bf2b9e010 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/list-memberships.md @@ -0,0 +1,29 @@ +```graphql +query { + usersListMemberships( + userId: "<USER_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + userPhone + teamId + teamName + invited + joined + confirm + mfa + userAccessedAt + roles + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/list-mfa-factors.md b/examples/2.3.x/server-graphql/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..b50907114 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +```graphql +query { + usersListMFAFactors( + userId: "<USER_ID>" + ) { + totp + phone + email + recoveryCode + custom + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/list-sessions.md b/examples/2.3.x/server-graphql/examples/users/list-sessions.md new file mode 100644 index 000000000..1f9086d5d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/list-sessions.md @@ -0,0 +1,41 @@ +```graphql +query { + usersListSessions( + userId: "<USER_ID>", + total: false + ) { + total + sessions { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/list-targets.md b/examples/2.3.x/server-graphql/examples/users/list-targets.md new file mode 100644 index 000000000..f22b1c70d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/list-targets.md @@ -0,0 +1,22 @@ +```graphql +query { + usersListTargets( + userId: "<USER_ID>", + queries: [], + total: false + ) { + total + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/list.md b/examples/2.3.x/server-graphql/examples/users/list.md new file mode 100644 index 000000000..19fe68d1d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/list.md @@ -0,0 +1,52 @@ +```graphql +query { + usersList( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + users { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-email-verification.md b/examples/2.3.x/server-graphql/examples/users/update-email-verification.md new file mode 100644 index 000000000..9df604caa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-email-verification.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdateEmailVerification( + userId: "<USER_ID>", + emailVerification: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-email.md b/examples/2.3.x/server-graphql/examples/users/update-email.md new file mode 100644 index 000000000..245f197dd --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-email.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdateEmail( + userId: "<USER_ID>", + email: "email@example.com" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-impersonator.md b/examples/2.3.x/server-graphql/examples/users/update-impersonator.md new file mode 100644 index 000000000..befe6a907 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-impersonator.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdateImpersonator( + userId: "<USER_ID>", + impersonator: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` 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 new file mode 100644 index 000000000..518dbc487 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-labels.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdateLabels( + userId: "<USER_ID>", + labels: [] + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-graphql/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..f49db0ed5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```graphql +mutation { + usersUpdateMFARecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-mfa.md b/examples/2.3.x/server-graphql/examples/users/update-mfa.md new file mode 100644 index 000000000..e746feb40 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-mfa.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdateMFA( + userId: "<USER_ID>", + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-name.md b/examples/2.3.x/server-graphql/examples/users/update-name.md new file mode 100644 index 000000000..6fc8c50a8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-name.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdateName( + userId: "<USER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-password.md b/examples/2.3.x/server-graphql/examples/users/update-password.md new file mode 100644 index 000000000..e62d07a12 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-password.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdatePassword( + userId: "<USER_ID>", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-phone-verification.md b/examples/2.3.x/server-graphql/examples/users/update-phone-verification.md new file mode 100644 index 000000000..214b9e25b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-phone-verification.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-phone.md b/examples/2.3.x/server-graphql/examples/users/update-phone.md new file mode 100644 index 000000000..6c1e22b35 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-phone.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdatePhone( + userId: "<USER_ID>", + number: "+12065550100" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-prefs.md b/examples/2.3.x/server-graphql/examples/users/update-prefs.md new file mode 100644 index 000000000..f636b511e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-prefs.md @@ -0,0 +1,10 @@ +```graphql +mutation { + usersUpdatePrefs( + userId: "<USER_ID>", + prefs: "{}" + ) { + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-status.md b/examples/2.3.x/server-graphql/examples/users/update-status.md new file mode 100644 index 000000000..bc725d84e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-status.md @@ -0,0 +1,48 @@ +```graphql +mutation { + usersUpdateStatus( + userId: "<USER_ID>", + status: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + emailCanonical + emailIsFree + emailIsDisposable + emailIsCorporate + emailIsCanonical + passwordPwned + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + impersonator + impersonatorUserId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/users/update-target.md b/examples/2.3.x/server-graphql/examples/users/update-target.md new file mode 100644 index 000000000..df1556e26 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/users/update-target.md @@ -0,0 +1,21 @@ +```graphql +mutation { + usersUpdateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} +``` 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 new file mode 100644 index 000000000..be4bcde18 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-collection.md @@ -0,0 +1,38 @@ +```graphql +mutation { + vectorsDBCreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + dimension: 1, + permissions: ["read(\"any\")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create-document.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..e81b723e9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + vectorsDBCreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{\"embeddings\":[0.12,-0.55,0.88,1.02],\"metadata\":{\"key\":\"value\"}}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..6b7a5298d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + vectorsDBCreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..3c978f1cb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-failover.md @@ -0,0 +1,61 @@ +```graphql +mutation { + vectorsDBCreateFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" + ) { + _id + _createdAt + _updatedAt + projectId + name + api + engine + version + specification + backend + hostname + connectionPort + connectionUser + connectionPassword + credentialGeneration + connectionString + ssl + status + containerStatus + lastAccessedAt + idleUntil + lifecycleState + idleTimeoutMinutes + cpu + memory + storage + storageStatus + storageTargetGb + storageResizeStartedAt + storageClass + storageMaxGb + nodePool + replicas + syncMode + networkMaxConnections + networkIdleTimeoutSeconds + networkIPAllowlist + backupEnabled + pitr + pitrRetentionDays + storageAutoscaling + storageAutoscalingThresholdPercent + storageAutoscalingMaxGb + maintenanceWindowDay + maintenanceWindowHourUtc + metricsEnabled + sqlApiEnabled + sqlApiAllowedStatements + sqlApiMaxRows + sqlApiMaxBytes + sqlApiTimeoutSeconds + error + } +} +``` 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 new file mode 100644 index 000000000..c24dab95f --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-index.md @@ -0,0 +1,24 @@ +```graphql +mutation { + vectorsDBCreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: "hnsw_euclidean", + attributes: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` 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 new file mode 100644 index 000000000..b1d86d55b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```graphql +mutation { + vectorsDBCreateOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create-query.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..fac71fdf8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-query.md @@ -0,0 +1,24 @@ +```graphql +mutation { + vectorsDBCreateQuery( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..d3057810c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-transaction.md @@ -0,0 +1,14 @@ +```graphql +mutation { + vectorsDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create.md new file mode 100644 index 000000000..582ba244d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create.md @@ -0,0 +1,54 @@ +```graphql +mutation { + vectorsDBCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, + specification: "serverless", + replicas: 0, + syncMode: "async" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..3f00fc664 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-collection.md @@ -0,0 +1,10 @@ +```graphql +mutation { + vectorsDBDeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..2da5f257d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-document.md @@ -0,0 +1,12 @@ +```graphql +mutation { + vectorsDBDeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" + ) { + status + } +} +``` 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 new file mode 100644 index 000000000..e84bededa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + vectorsDBDeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..59332bcca --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-index.md @@ -0,0 +1,11 @@ +```graphql +mutation { + vectorsDBDeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..ba12d0e13 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + vectorsDBDeleteTransaction( + transactionId: "<TRANSACTION_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/delete.md b/examples/2.3.x/server-graphql/examples/vectorsdb/delete.md new file mode 100644 index 000000000..c55cc5a50 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + vectorsDBDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-graphql/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..05a489740 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/get-collection.md @@ -0,0 +1,33 @@ +```graphql +query { + vectorsDBGetCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/get-document.md b/examples/2.3.x/server-graphql/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..4a2ca99c9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/get-document.md @@ -0,0 +1,20 @@ +```graphql +query { + vectorsDBGetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/get-index.md b/examples/2.3.x/server-graphql/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..03af68306 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/get-index.md @@ -0,0 +1,20 @@ +```graphql +query { + vectorsDBGetIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-graphql/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..2f75c57fa --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/get-replicas.md @@ -0,0 +1,22 @@ +```graphql +query { + vectorsDBGetReplicas( + databaseId: "<DATABASE_ID>" + ) { + replicas + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + members { + _id + role + status + replicating + lagSeconds + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/get-status.md b/examples/2.3.x/server-graphql/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..8440abf24 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/get-status.md @@ -0,0 +1,36 @@ +```graphql +query { + vectorsDBGetStatus( + databaseId: "<DATABASE_ID>" + ) { + health + ready + engine + version + uptime + connections { + current + max + } + syncMode + effectiveSyncMode + syncDegraded + syncAcknowledgements + syncStandbyCount + syncStateConfirmed + replicas { + index + role + healthy + replicating + lagSeconds + } + volumes { + path + usedPercent + available + mounted + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-graphql/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..df2dbc325 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + vectorsDBGetTransaction( + transactionId: "<TRANSACTION_ID>" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/get.md b/examples/2.3.x/server-graphql/examples/vectorsdb/get.md new file mode 100644 index 000000000..c60051f06 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/get.md @@ -0,0 +1,49 @@ +```graphql +query { + vectorsDBGet( + databaseId: "<DATABASE_ID>" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-graphql/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..afdcd73c5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/list-collections.md @@ -0,0 +1,38 @@ +```graphql +query { + vectorsDBListCollections( + databaseId: "<DATABASE_ID>", + queries: [], + search: "<SEARCH>", + total: false + ) { + total + collections { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-graphql/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..68f1ff5c7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/list-documents.md @@ -0,0 +1,24 @@ +```graphql +query { + vectorsDBListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + transactionId: "<TRANSACTION_ID>", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-graphql/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..3d7b06c0a --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/list-indexes.md @@ -0,0 +1,24 @@ +```graphql +query { + vectorsDBListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], + total: false + ) { + total + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-graphql/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..65a8ab9cf --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/list-operations.md @@ -0,0 +1,25 @@ +```graphql +query { + vectorsDBListOperations( + databaseId: "<DATABASE_ID>", + status: "queued", + limit: 1, + offset: 0 + ) { + total + operations { + _id + _createdAt + databaseId + type + status + attempts + requestedAt + startedAt + completedAt + errorCode + errorMessage + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-graphql/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..fddbd05e8 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/list-specifications.md @@ -0,0 +1,22 @@ +```graphql +query { + vectorsDBListSpecifications { + specifications { + slug + name + price + storageOverageRate + bandwidthOverageRate + replicaRate + pitrRate + cpu + memory + maxConnections + includedStorage + includedBandwidth + enabled + } + 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 new file mode 100644 index 000000000..1f2ea4aa4 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + vectorsDBListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/list.md b/examples/2.3.x/server-graphql/examples/vectorsdb/list.md new file mode 100644 index 000000000..6c06925bb --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/list.md @@ -0,0 +1,53 @@ +```graphql +query { + vectorsDBList( + queries: [], + total: false + ) { + total + databases { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } + } +} +``` 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 new file mode 100644 index 000000000..4728d0970 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/update-collection.md @@ -0,0 +1,38 @@ +```graphql +mutation { + vectorsDBUpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + dimension: 1, + permissions: ["read(\"any\")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/update-document.md b/examples/2.3.x/server-graphql/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..328c52df5 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/update-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + vectorsDBUpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-graphql/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..990a62d18 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/update-documents.md @@ -0,0 +1,23 @@ +```graphql +mutation { + vectorsDBUpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: "{}", + queries: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-graphql/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..106a7b51d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/update-transaction.md @@ -0,0 +1,16 @@ +```graphql +mutation { + vectorsDBUpdateTransaction( + transactionId: "<TRANSACTION_ID>", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/update.md b/examples/2.3.x/server-graphql/examples/vectorsdb/update.md new file mode 100644 index 000000000..cd00edc77 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/update.md @@ -0,0 +1,54 @@ +```graphql +mutation { + vectorsDBUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, + specification: "serverless", + replicas: 0, + syncMode: "async" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + engine + specification + replicas + error + containerStatus + lifecycleState + policies { + _id + name + _createdAt + _updatedAt + services + resources + resourceId + resourceType + retention + schedule + type + enabled + } + archives { + _id + _createdAt + _updatedAt + policyId + size + status + startedAt + migrationId + services + resources + resourceId + resourceType + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-graphql/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..21e56bc8b --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/upsert-document.md @@ -0,0 +1,21 @@ +```graphql +mutation { + vectorsDBUpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read(\"any\")"], + transactionId: "<TRANSACTION_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` 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 new file mode 100644 index 000000000..852f90d7c --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,22 @@ +```graphql +mutation { + vectorsDBUpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/webhooks/create.md b/examples/2.3.x/server-graphql/examples/webhooks/create.md new file mode 100644 index 000000000..20182a3b9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/webhooks/create.md @@ -0,0 +1,29 @@ +```graphql +mutation { + webhooksCreate( + webhookId: "<WEBHOOK_ID>", + url: "https://example.com/webhook", + name: "<NAME>", + events: [], + enabled: false, + tls: false, + authUsername: "<AUTH_USERNAME>", + authPassword: "password", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + name + url + events + tls + authUsername + authPassword + secret + enabled + logs + attempts + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/webhooks/delete.md b/examples/2.3.x/server-graphql/examples/webhooks/delete.md new file mode 100644 index 000000000..2a6724843 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/webhooks/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + webhooksDelete( + webhookId: "<WEBHOOK_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/webhooks/get.md b/examples/2.3.x/server-graphql/examples/webhooks/get.md new file mode 100644 index 000000000..727d554d9 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/webhooks/get.md @@ -0,0 +1,21 @@ +```graphql +query { + webhooksGet( + webhookId: "<WEBHOOK_ID>" + ) { + _id + _createdAt + _updatedAt + name + url + events + tls + authUsername + authPassword + secret + enabled + logs + attempts + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/webhooks/list.md b/examples/2.3.x/server-graphql/examples/webhooks/list.md new file mode 100644 index 000000000..a500b2ee7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/webhooks/list.md @@ -0,0 +1,25 @@ +```graphql +query { + webhooksList( + queries: [], + total: false + ) { + total + webhooks { + _id + _createdAt + _updatedAt + name + url + events + tls + authUsername + authPassword + secret + enabled + logs + attempts + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/webhooks/update-secret.md b/examples/2.3.x/server-graphql/examples/webhooks/update-secret.md new file mode 100644 index 000000000..278f8f8ed --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/webhooks/update-secret.md @@ -0,0 +1,22 @@ +```graphql +mutation { + webhooksUpdateSecret( + webhookId: "<WEBHOOK_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + name + url + events + tls + authUsername + authPassword + secret + enabled + logs + attempts + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/webhooks/update.md b/examples/2.3.x/server-graphql/examples/webhooks/update.md new file mode 100644 index 000000000..6917853a7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/webhooks/update.md @@ -0,0 +1,28 @@ +```graphql +mutation { + webhooksUpdate( + webhookId: "<WEBHOOK_ID>", + name: "<NAME>", + url: "https://example.com/webhook", + events: [], + enabled: false, + tls: false, + authUsername: "<AUTH_USERNAME>", + authPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + url + events + tls + authUsername + authPassword + secret + enabled + logs + attempts + } +} +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-anonymous-session.md b/examples/2.3.x/server-kotlin/java/account/create-anonymous-session.md new file mode 100644 index 000000000..e6e2e4398 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-anonymous-session.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` 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 new file mode 100644 index 000000000..c6c08c959 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-email-password-session.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createEmailPasswordSession( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-email-token.md b/examples/2.3.x/server-kotlin/java/account/create-email-token.md new file mode 100644 index 000000000..a718e2d5e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-email-token.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createEmailToken( + "<USER_ID>", // userId + "email@example.com", // email + false, // phrase (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/account/create-email-verification-otp.md b/examples/2.3.x/server-kotlin/java/account/create-email-verification-otp.md new file mode 100644 index 000000000..428406a09 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-email-verification-otp.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createEmailVerificationOTP( + false, // phrase (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/account/create-email-verification.md b/examples/2.3.x/server-kotlin/java/account/create-email-verification.md new file mode 100644 index 000000000..109ae076c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-email-verification.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createEmailVerification( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..358d32266 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-id-token-session.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.IdTokenProvider; + +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 + +Account account = new Account(client); + +account.createIdTokenSession( + IdTokenProvider.APPLE, // provider + "<ID_TOKEN>", // idToken + "<NONCE>", // nonce (optional) + "<ACCESS_TOKEN>", // accessToken (optional) + 0, // accessTokenExpiry (optional) + "<NAME>", // name (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/account/create-magic-url-token.md b/examples/2.3.x/server-kotlin/java/account/create-magic-url-token.md new file mode 100644 index 000000000..2f6e83ec8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-magic-url-token.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createMagicURLToken( + "<USER_ID>", // userId + "email@example.com", // email + "https://example.com", // url (optional) + false, // phrase (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/account/create-mfa-authenticator.md b/examples/2.3.x/server-kotlin/java/account/create-mfa-authenticator.md new file mode 100644 index 000000000..123866a91 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-mfa-authenticator.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +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 + +Account account = new Account(client); + +account.createMFAAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-mfa-challenge.md b/examples/2.3.x/server-kotlin/java/account/create-mfa-challenge.md new file mode 100644 index 000000000..458936398 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-mfa-challenge.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +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 + +Account account = new Account(client); + +account.createMFAChallenge( + AuthenticationFactor.EMAIL, // factor + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/java/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..090c61d1e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-mfa-recovery-codes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-o-auth-2-token.md b/examples/2.3.x/server-kotlin/java/account/create-o-auth-2-token.md new file mode 100644 index 000000000..3f7472704 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-o-auth-2-token.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +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 + +Account account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + List.of(), // scopes (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/account/create-phone-token.md b/examples/2.3.x/server-kotlin/java/account/create-phone-token.md new file mode 100644 index 000000000..45bc0ccb6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-phone-token.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createPhoneToken( + "<USER_ID>", // userId + "+12065550100", // phone + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-phone-verification.md b/examples/2.3.x/server-kotlin/java/account/create-phone-verification.md new file mode 100644 index 000000000..6ed21235c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-phone-verification.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-recovery-otp.md b/examples/2.3.x/server-kotlin/java/account/create-recovery-otp.md new file mode 100644 index 000000000..8ceb1ee9c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-recovery-otp.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createRecoveryOTP( + "email@example.com", // email + false, // phrase (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/account/create-recovery.md b/examples/2.3.x/server-kotlin/java/account/create-recovery.md new file mode 100644 index 000000000..64951b257 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-recovery.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", // email + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-session.md b/examples/2.3.x/server-kotlin/java/account/create-session.md new file mode 100644 index 000000000..3376cb85d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-session.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create-verification.md b/examples/2.3.x/server-kotlin/java/account/create-verification.md new file mode 100644 index 000000000..f0f221b45 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create-verification.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.createVerification( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/create.md b/examples/2.3.x/server-kotlin/java/account/create.md new file mode 100644 index 000000000..f7815f788 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/create.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.create( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (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/account/delete-consent-token.md b/examples/2.3.x/server-kotlin/java/account/delete-consent-token.md new file mode 100644 index 000000000..7cc051374 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/delete-consent-token.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.deleteConsentToken( + "<CONSENT_ID>", // consentId + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/delete-consent.md b/examples/2.3.x/server-kotlin/java/account/delete-consent.md new file mode 100644 index 000000000..7df5d3941 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/delete-consent.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.deleteConsent( + "<CONSENT_ID>", // consentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/delete-identity.md b/examples/2.3.x/server-kotlin/java/account/delete-identity.md new file mode 100644 index 000000000..5bb897f5d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/delete-identity.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.deleteIdentity( + "<IDENTITY_ID>", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/delete-mfa-authenticator.md b/examples/2.3.x/server-kotlin/java/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..4ce42b4e4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/delete-mfa-authenticator.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +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 + +Account account = new Account(client); + +account.deleteMFAAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/delete-session.md b/examples/2.3.x/server-kotlin/java/account/delete-session.md new file mode 100644 index 000000000..781161c74 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/delete-session.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.deleteSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..ef087fd4a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/delete-sessions.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/get-consent-token.md b/examples/2.3.x/server-kotlin/java/account/get-consent-token.md new file mode 100644 index 000000000..348faf81f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/get-consent-token.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.getConsentToken( + "<CONSENT_ID>", // consentId + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/get-consent.md b/examples/2.3.x/server-kotlin/java/account/get-consent.md new file mode 100644 index 000000000..350b98321 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/get-consent.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.getConsent( + "<CONSENT_ID>", // consentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/java/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..6d59890b3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/get-mfa-recovery-codes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/get-prefs.md b/examples/2.3.x/server-kotlin/java/account/get-prefs.md new file mode 100644 index 000000000..eb6c6e56b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/get-prefs.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/get-session.md b/examples/2.3.x/server-kotlin/java/account/get-session.md new file mode 100644 index 000000000..e5d96a82a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/get-session.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.getSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/get.md b/examples/2.3.x/server-kotlin/java/account/get.md new file mode 100644 index 000000000..83caeaffa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/get.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/list-consent-tokens.md b/examples/2.3.x/server-kotlin/java/account/list-consent-tokens.md new file mode 100644 index 000000000..347b20a30 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/list-consent-tokens.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.listConsentTokens( + "<CONSENT_ID>", // consentId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/list-consents.md b/examples/2.3.x/server-kotlin/java/account/list-consents.md new file mode 100644 index 000000000..e090c7f8e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/list-consents.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.listConsents( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/list-identities.md b/examples/2.3.x/server-kotlin/java/account/list-identities.md new file mode 100644 index 000000000..4c439111c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/list-identities.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.listIdentities( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/list-mfa-factors.md b/examples/2.3.x/server-kotlin/java/account/list-mfa-factors.md new file mode 100644 index 000000000..d69f23e13 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/list-mfa-factors.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.listMFAFactors(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..bb25cff16 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/list-sessions.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-email-verification-otp.md b/examples/2.3.x/server-kotlin/java/account/update-email-verification-otp.md new file mode 100644 index 000000000..b355a8359 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-email-verification-otp.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateEmailVerificationOTP( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-email-verification.md b/examples/2.3.x/server-kotlin/java/account/update-email-verification.md new file mode 100644 index 000000000..dd13e6fe6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-email-verification.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateEmailVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-email.md b/examples/2.3.x/server-kotlin/java/account/update-email.md new file mode 100644 index 000000000..06baceaef --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-email.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-magic-url-session.md b/examples/2.3.x/server-kotlin/java/account/update-magic-url-session.md new file mode 100644 index 000000000..8ed558d11 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-magic-url-session.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateMagicURLSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-mfa-authenticator.md b/examples/2.3.x/server-kotlin/java/account/update-mfa-authenticator.md new file mode 100644 index 000000000..aaceb2971 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-mfa-authenticator.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +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 + +Account account = new Account(client); + +account.updateMFAAuthenticator( + AuthenticatorType.TOTP, // type + "<OTP>", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-mfa-challenge.md b/examples/2.3.x/server-kotlin/java/account/update-mfa-challenge.md new file mode 100644 index 000000000..a80179951 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-mfa-challenge.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateMFAChallenge( + "<CHALLENGE_ID>", // challengeId + "<OTP>", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/java/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..7062704b6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-mfa-recovery-codes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-mfa.md b/examples/2.3.x/server-kotlin/java/account/update-mfa.md new file mode 100644 index 000000000..f63ee870c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-mfa.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateMFA( + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-name.md b/examples/2.3.x/server-kotlin/java/account/update-name.md new file mode 100644 index 000000000..fe63d7e4a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-name.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateName( + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-password.md b/examples/2.3.x/server-kotlin/java/account/update-password.md new file mode 100644 index 000000000..764aeb067 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-password.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updatePassword( + "password", // password + "password", // oldPassword (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/account/update-phone-session.md b/examples/2.3.x/server-kotlin/java/account/update-phone-session.md new file mode 100644 index 000000000..33e701c8d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-phone-session.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updatePhoneSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-phone-verification.md b/examples/2.3.x/server-kotlin/java/account/update-phone-verification.md new file mode 100644 index 000000000..7b692cb47 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-phone-verification.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updatePhoneVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-phone.md b/examples/2.3.x/server-kotlin/java/account/update-phone.md new file mode 100644 index 000000000..2ffdc2349 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-phone.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", // phone + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-prefs.md b/examples/2.3.x/server-kotlin/java/account/update-prefs.md new file mode 100644 index 000000000..a3f58f5f6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-prefs.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updatePrefs( + Map.of( + "language", "en", + "timezone", "UTC", + "darkTheme", true + ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-recovery-otp.md b/examples/2.3.x/server-kotlin/java/account/update-recovery-otp.md new file mode 100644 index 000000000..7bece530f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-recovery-otp.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateRecoveryOTP( + "<USER_ID>", // userId + "<SECRET>", // secret + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-recovery.md b/examples/2.3.x/server-kotlin/java/account/update-recovery.md new file mode 100644 index 000000000..542d13461 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-recovery.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateRecovery( + "<USER_ID>", // userId + "<SECRET>", // secret + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-session.md b/examples/2.3.x/server-kotlin/java/account/update-session.md new file mode 100644 index 000000000..a33ee5cf8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-session.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-status.md b/examples/2.3.x/server-kotlin/java/account/update-status.md new file mode 100644 index 000000000..777ff6b55 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-status.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/account/update-verification.md b/examples/2.3.x/server-kotlin/java/account/update-verification.md new file mode 100644 index 000000000..3c19f4f1c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/account/update-verification.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +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 + +Account account = new Account(client); + +account.updateVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/activities/get-event.md b/examples/2.3.x/server-kotlin/java/activities/get-event.md new file mode 100644 index 000000000..1e7f49d25 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/activities/get-event.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Activities; + +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 + +Activities activities = new Activities(client); + +activities.getEvent( + "<EVENT_ID>", // eventId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/activities/list-events.md b/examples/2.3.x/server-kotlin/java/activities/list-events.md new file mode 100644 index 000000000..6d734b414 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/activities/list-events.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Activities; + +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 + +Activities activities = new Activities(client); + +activities.listEvents( + List.of(), // queries (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/advisor/delete-report.md b/examples/2.3.x/server-kotlin/java/advisor/delete-report.md new file mode 100644 index 000000000..1ecfdda81 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/advisor/delete-report.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Advisor; + +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 + +Advisor advisor = new Advisor(client); + +advisor.deleteReport( + "<REPORT_ID>", // reportId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/advisor/get-insight.md b/examples/2.3.x/server-kotlin/java/advisor/get-insight.md new file mode 100644 index 000000000..324de8563 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/advisor/get-insight.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Advisor; + +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 + +Advisor advisor = new Advisor(client); + +advisor.getInsight( + "<REPORT_ID>", // reportId + "<INSIGHT_ID>", // insightId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/advisor/get-report.md b/examples/2.3.x/server-kotlin/java/advisor/get-report.md new file mode 100644 index 000000000..3cc1a07d0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/advisor/get-report.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Advisor; + +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 + +Advisor advisor = new Advisor(client); + +advisor.getReport( + "<REPORT_ID>", // reportId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/advisor/list-insights.md b/examples/2.3.x/server-kotlin/java/advisor/list-insights.md new file mode 100644 index 000000000..5aecf631b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/advisor/list-insights.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Advisor; + +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 + +Advisor advisor = new Advisor(client); + +advisor.listInsights( + "<REPORT_ID>", // reportId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/advisor/list-reports.md b/examples/2.3.x/server-kotlin/java/advisor/list-reports.md new file mode 100644 index 000000000..a8a5a46a6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/advisor/list-reports.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Advisor; + +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 + +Advisor advisor = new Advisor(client); + +advisor.listReports( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/create-installation-token.md b/examples/2.3.x/server-kotlin/java/apps/create-installation-token.md new file mode 100644 index 000000000..62d9d3698 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/create-installation-token.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.createInstallationToken( + "<APP_ID>", // appId + "<INSTALLATION_ID>", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/create-key.md b/examples/2.3.x/server-kotlin/java/apps/create-key.md new file mode 100644 index 000000000..b086e4068 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/create-key.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.createKey( + "<APP_ID>", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/create-secret.md b/examples/2.3.x/server-kotlin/java/apps/create-secret.md new file mode 100644 index 000000000..372ca4a75 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/create-secret.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.createSecret( + "<APP_ID>", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/create.md b/examples/2.3.x/server-kotlin/java/apps/create.md new file mode 100644 index 000000000..b0085fb88 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/create.md @@ -0,0 +1,43 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.create( + "<APP_ID>", // appId + "<NAME>", // name + List.of(), // redirectUris + "<DESCRIPTION>", // 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>", // 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) + "<TEAM_ID>", // teamId (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/apps/delete-installation.md b/examples/2.3.x/server-kotlin/java/apps/delete-installation.md new file mode 100644 index 000000000..7bf3fe1bf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/delete-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.deleteInstallation( + "<APP_ID>", // appId + "<INSTALLATION_ID>", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/delete-key.md b/examples/2.3.x/server-kotlin/java/apps/delete-key.md new file mode 100644 index 000000000..aa849b21c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/delete-key.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.deleteKey( + "<APP_ID>", // appId + "<KEY_ID>", // keyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/delete-secret.md b/examples/2.3.x/server-kotlin/java/apps/delete-secret.md new file mode 100644 index 000000000..f4d38682b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/delete-secret.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.deleteSecret( + "<APP_ID>", // appId + "<SECRET_ID>", // secretId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/delete-tokens.md b/examples/2.3.x/server-kotlin/java/apps/delete-tokens.md new file mode 100644 index 000000000..4f99fdeea --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/delete-tokens.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.deleteTokens( + "<APP_ID>", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/delete.md b/examples/2.3.x/server-kotlin/java/apps/delete.md new file mode 100644 index 000000000..a2aa59ce8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.delete( + "<APP_ID>", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/get-installation.md b/examples/2.3.x/server-kotlin/java/apps/get-installation.md new file mode 100644 index 000000000..0f50a106a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/get-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.getInstallation( + "<APP_ID>", // appId + "<INSTALLATION_ID>", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/get-key.md b/examples/2.3.x/server-kotlin/java/apps/get-key.md new file mode 100644 index 000000000..1c534a0df --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/get-key.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.getKey( + "<APP_ID>", // appId + "<KEY_ID>", // keyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/get-secret.md b/examples/2.3.x/server-kotlin/java/apps/get-secret.md new file mode 100644 index 000000000..0052e1863 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/get-secret.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.getSecret( + "<APP_ID>", // appId + "<SECRET_ID>", // secretId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/get.md b/examples/2.3.x/server-kotlin/java/apps/get.md new file mode 100644 index 000000000..65c66d8f3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.get( + "<APP_ID>", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/list-installation-scopes.md b/examples/2.3.x/server-kotlin/java/apps/list-installation-scopes.md new file mode 100644 index 000000000..319f3d152 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/list-installation-scopes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listInstallationScopes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/list-installations.md b/examples/2.3.x/server-kotlin/java/apps/list-installations.md new file mode 100644 index 000000000..38f0ebda5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/list-installations.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listInstallations( + "<APP_ID>", // appId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/list-keys.md b/examples/2.3.x/server-kotlin/java/apps/list-keys.md new file mode 100644 index 000000000..cc290923f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/list-keys.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listKeys( + "<APP_ID>", // appId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-kotlin/java/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..94654dc77 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/list-o-auth-2-scopes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listOAuth2Scopes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/list-secrets.md b/examples/2.3.x/server-kotlin/java/apps/list-secrets.md new file mode 100644 index 000000000..6194c0bee --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/list-secrets.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listSecrets( + "<APP_ID>", // appId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/list.md b/examples/2.3.x/server-kotlin/java/apps/list.md new file mode 100644 index 000000000..1af06ca0a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/list.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.list( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/update-labels.md b/examples/2.3.x/server-kotlin/java/apps/update-labels.md new file mode 100644 index 000000000..72a0a8e39 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/update-labels.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Apps apps = new Apps(client); + +apps.updateLabels( + "<APP_ID>", // appId + List.of(), // labels + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/update-team.md b/examples/2.3.x/server-kotlin/java/apps/update-team.md new file mode 100644 index 000000000..bec576116 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/update-team.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.updateTeam( + "<APP_ID>", // appId + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/apps/update.md b/examples/2.3.x/server-kotlin/java/apps/update.md new file mode 100644 index 000000000..06062f13e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/apps/update.md @@ -0,0 +1,44 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.update( + "<APP_ID>", // appId + "<NAME>", // name + "<DESCRIPTION>", // 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>", // tagline (optional) + List.of(), // tags (optional) + List.of(), // images (optional) + "https://example.com", // supportUrl (optional) + "https://example.com", // dataDeletionUrl (optional) + false, // enabled (optional) + List.of(), // redirectUris (optional) + List.of(), // postLogoutRedirectUris (optional) + "public", // type (optional) + false, // deviceFlow (optional) + List.of(), // installationScopes (optional) + "https://example.com", // installationRedirectUrl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-browser.md b/examples/2.3.x/server-kotlin/java/avatars/get-browser.md new file mode 100644 index 000000000..72748afcb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-browser.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Browser; + +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.getBrowser( + Browser.AVANT_BROWSER, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (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/get-credit-card.md b/examples/2.3.x/server-kotlin/java/avatars/get-credit-card.md new file mode 100644 index 000000000..8f93da91a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-credit-card.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.CreditCard; + +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.getCreditCard( + CreditCard.AMERICAN_EXPRESS, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (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/get-favicon.md b/examples/2.3.x/server-kotlin/java/avatars/get-favicon.md new file mode 100644 index 000000000..6df13f5e8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-favicon.md @@ -0,0 +1,25 @@ +```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.getFavicon( + "https://example.com", // url + 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-flag.md b/examples/2.3.x/server-kotlin/java/avatars/get-flag.md new file mode 100644 index 000000000..f66a872d3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-flag.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Flag; + +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.getFlag( + Flag.AFGHANISTAN, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (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/get-image.md b/examples/2.3.x/server-kotlin/java/avatars/get-image.md new file mode 100644 index 000000000..7f93b9f9f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-image.md @@ -0,0 +1,27 @@ +```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.getImage( + "https://example.com", // url + 0, // width (optional) + 0, // height (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/get-initials.md b/examples/2.3.x/server-kotlin/java/avatars/get-initials.md new file mode 100644 index 000000000..79e9c7b14 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-initials.md @@ -0,0 +1,28 @@ +```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.getInitials( + "<NAME>", // name (optional) + 0, // width (optional) + 0, // height (optional) + "FFFFFF", // background (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/get-photo.md b/examples/2.3.x/server-kotlin/java/avatars/get-photo.md new file mode 100644 index 000000000..831e9cc3d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-photo.md @@ -0,0 +1,32 @@ +```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.getPhoto( + 0, // width (optional) + 0, // height (optional) + 0, // quality (optional) + "png", // output (optional) + "g", // rating (optional) + "current()", // userId (optional) + "<EMAIL_HASH>", // emailHash (optional) + "<NAME>", // name (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/get-qr.md b/examples/2.3.x/server-kotlin/java/avatars/get-qr.md new file mode 100644 index 000000000..0e22f63f1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-qr.md @@ -0,0 +1,28 @@ +```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.getQR( + "<TEXT>", // text + 1, // size (optional) + 0, // margin (optional) + false, // download (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/get-screenshot.md b/examples/2.3.x/server-kotlin/java/avatars/get-screenshot.md new file mode 100644 index 000000000..c8b5966fe --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/get-screenshot.md @@ -0,0 +1,51 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.BrowserTheme; +import io.appwrite.enums.Timezone; +import io.appwrite.enums.BrowserPermission; +import io.appwrite.enums.ImageFormat; + +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.getScreenshot( + "https://example.com", // url + Map.of( + "Authorization", "Bearer token123", + "X-Custom-Header", "value" + ), // headers (optional) + 1920, // viewportWidth (optional) + 1080, // viewportHeight (optional) + 2, // 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) + "en-US", // locale (optional) + Timezone.AFRICA_ABIDJAN, // timezone (optional) + 37.7749, // latitude (optional) + -122.4194, // longitude (optional) + 100, // 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) + ImageFormat.JPEG, // output (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/backups/create-archive.md b/examples/2.3.x/server-kotlin/java/backups/create-archive.md new file mode 100644 index 000000000..fb181fccb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/create-archive.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; +import io.appwrite.enums.BackupServices; + +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 + +Backups backups = new Backups(client); + +backups.createArchive( + List.of(BackupServices.DATABASES), // services + "<RESOURCE_ID>", // resourceId (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/backups/create-policy.md b/examples/2.3.x/server-kotlin/java/backups/create-policy.md new file mode 100644 index 000000000..42003cc4a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/create-policy.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; +import io.appwrite.enums.BackupServices; + +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 + +Backups backups = new Backups(client); + +backups.createPolicy( + "<POLICY_ID>", // policyId + List.of(BackupServices.DATABASES), // services + 1, // retention + "", // schedule + "<NAME>", // name (optional) + "<RESOURCE_ID>", // resourceId (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/backups/create-restoration.md b/examples/2.3.x/server-kotlin/java/backups/create-restoration.md new file mode 100644 index 000000000..099f5704e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/create-restoration.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; +import io.appwrite.enums.BackupServices; + +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 + +Backups backups = new Backups(client); + +backups.createRestoration( + "<ARCHIVE_ID>", // archiveId + List.of(BackupServices.DATABASES), // services + "<NEW_RESOURCE_ID>", // newResourceId (optional) + "<NEW_RESOURCE_NAME>", // newResourceName (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/backups/delete-archive.md b/examples/2.3.x/server-kotlin/java/backups/delete-archive.md new file mode 100644 index 000000000..c413a5de7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/delete-archive.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.deleteArchive( + "<ARCHIVE_ID>", // archiveId + 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/delete-policy.md b/examples/2.3.x/server-kotlin/java/backups/delete-policy.md new file mode 100644 index 000000000..3ece5e389 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/delete-policy.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.deletePolicy( + "<POLICY_ID>", // policyId + 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/get-archive.md b/examples/2.3.x/server-kotlin/java/backups/get-archive.md new file mode 100644 index 000000000..2fea53712 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/get-archive.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.getArchive( + "<ARCHIVE_ID>", // archiveId + 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/get-policy.md b/examples/2.3.x/server-kotlin/java/backups/get-policy.md new file mode 100644 index 000000000..844e436d5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/get-policy.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.getPolicy( + "<POLICY_ID>", // policyId + 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/get-restoration.md b/examples/2.3.x/server-kotlin/java/backups/get-restoration.md new file mode 100644 index 000000000..cba9b0420 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/get-restoration.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.getRestoration( + "<RESTORATION_ID>", // restorationId + 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/list-archives.md b/examples/2.3.x/server-kotlin/java/backups/list-archives.md new file mode 100644 index 000000000..e4990166b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/list-archives.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.listArchives( + List.of(), // queries (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/backups/list-policies.md b/examples/2.3.x/server-kotlin/java/backups/list-policies.md new file mode 100644 index 000000000..89f2ecf60 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/list-policies.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.listPolicies( + List.of(), // queries (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/backups/list-restorations.md b/examples/2.3.x/server-kotlin/java/backups/list-restorations.md new file mode 100644 index 000000000..997d80027 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/list-restorations.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.listRestorations( + List.of(), // queries (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/backups/update-policy.md b/examples/2.3.x/server-kotlin/java/backups/update-policy.md new file mode 100644 index 000000000..c27053628 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/backups/update-policy.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Backups; + +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 + +Backups backups = new Backups(client); + +backups.updatePolicy( + "<POLICY_ID>", // policyId + "<NAME>", // name (optional) + 1, // retention (optional) + "", // schedule (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/databases/create-big-int-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-big-int-attribute.md new file mode 100644 index 000000000..ab0a21c6a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-big-int-attribute.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createBigIntAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + 0, // min (optional) + 1000000, // max (optional) + 0, // default (optional) + false, // array (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/databases/create-boolean-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-boolean-attribute.md new file mode 100644 index 000000000..f34934c1e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-boolean-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createBooleanAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + false, // default (optional) + false, // array (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/databases/create-collection.md b/examples/2.3.x/server-kotlin/java/databases/create-collection.md new file mode 100644 index 000000000..32d9cd54e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-collection.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + List.of(), // attributes (optional) + List.of(), // indexes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/create-datetime-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-datetime-attribute.md new file mode 100644 index 000000000..d84637da6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-datetime-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createDatetimeAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "2020-10-15T06:38:00.000+00:00", // default (optional) + false, // array (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/databases/create-document.md b/examples/2.3.x/server-kotlin/java/databases/create-document.md new file mode 100644 index 000000000..34206c2d4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-document.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (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/databases/create-documents.md b/examples/2.3.x/server-kotlin/java/databases/create-documents.md new file mode 100644 index 000000000..5a158bf59 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // documents + "<TRANSACTION_ID>", // transactionId (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/databases/create-email-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-email-attribute.md new file mode 100644 index 000000000..1bc93f1ca --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-email-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createEmailAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "email@example.com", // default (optional) + false, // array (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/databases/create-enum-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-enum-attribute.md new file mode 100644 index 000000000..197dc01a2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-enum-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createEnumAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + List.of("active", "inactive"), // elements + false, // required + "active", // default (optional) + false, // array (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/databases/create-float-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-float-attribute.md new file mode 100644 index 000000000..6af5f366b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-float-attribute.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createFloatAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + 0, // min (optional) + 100, // max (optional) + 10.5, // default (optional) + false, // array (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/databases/create-index.md b/examples/2.3.x/server-kotlin/java/databases/create-index.md new file mode 100644 index 000000000..357440dc8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-index.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.DatabasesIndexType; +import io.appwrite.enums.OrderBy; + +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 + +Databases databases = new Databases(client); + +databases.createIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + DatabasesIndexType.KEY, // type + List.of(), // attributes + List.of(OrderBy.ASC), // orders (optional) + List.of(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/create-integer-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-integer-attribute.md new file mode 100644 index 000000000..72cccd75d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-integer-attribute.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createIntegerAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + 0, // min (optional) + 100, // max (optional) + 10, // default (optional) + false, // array (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/databases/create-ip-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-ip-attribute.md new file mode 100644 index 000000000..d185ef76f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-ip-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createIpAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "192.0.2.0", // default (optional) + false, // array (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/databases/create-line-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-line-attribute.md new file mode 100644 index 000000000..e38258615 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-line-attribute.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createLineAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/create-longtext-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-longtext-attribute.md new file mode 100644 index 000000000..37f46dde8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-longtext-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createLongtextAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..57c8d610d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-mediumtext-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createMediumtextAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/databases/create-operations.md b/examples/2.3.x/server-kotlin/java/databases/create-operations.md new file mode 100644 index 000000000..29f1efbde --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-operations.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createOperations( + "<TRANSACTION_ID>", // transactionId + List.of(Map.of( + "action", "create", + "databaseId", "<DATABASE_ID>", + "collectionId", "<COLLECTION_ID>", + "documentId", "<DOCUMENT_ID>", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/create-point-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-point-attribute.md new file mode 100644 index 000000000..d48c69c56 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-point-attribute.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createPointAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + List.of(1, 2), // default (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/databases/create-polygon-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-polygon-attribute.md new file mode 100644 index 000000000..84f2ab929 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-polygon-attribute.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createPolygonAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/create-relationship-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-relationship-attribute.md new file mode 100644 index 000000000..7b100a10a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-relationship-attribute.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.RelationshipType; +import io.appwrite.enums.RelationMutate; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createRelationshipAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<RELATED_COLLECTION_ID>", // relatedCollectionId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "<KEY>", // key (optional) + "<TWO_WAY_KEY>", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (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/databases/create-string-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-string-attribute.md new file mode 100644 index 000000000..2a06f8c12 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-string-attribute.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createStringAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + 1, // size + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/databases/create-text-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-text-attribute.md new file mode 100644 index 000000000..31f6af205 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-text-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createTextAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/databases/create-transaction.md b/examples/2.3.x/server-kotlin/java/databases/create-transaction.md new file mode 100644 index 000000000..4cbee4edb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createTransaction( + 60, // ttl (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/databases/create-url-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-url-attribute.md new file mode 100644 index 000000000..90ab19c0d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-url-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createUrlAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "https://example.com", // default (optional) + false, // array (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/databases/create-varchar-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-varchar-attribute.md new file mode 100644 index 000000000..0b16ca203 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create-varchar-attribute.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.createVarcharAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + 1, // size + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/databases/create.md b/examples/2.3.x/server-kotlin/java/databases/create.md new file mode 100644 index 000000000..8806db37d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/create.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + 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/databases/decrement-document-attribute.md b/examples/2.3.x/server-kotlin/java/databases/decrement-document-attribute.md new file mode 100644 index 000000000..9c271f5b7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/decrement-document-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.decrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "<ATTRIBUTE>", // attribute + 1, // value (optional) + 0, // min (optional) + "<TRANSACTION_ID>", // transactionId (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/databases/delete-attribute.md b/examples/2.3.x/server-kotlin/java/databases/delete-attribute.md new file mode 100644 index 000000000..1b04159ad --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/delete-attribute.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.deleteAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/delete-collection.md b/examples/2.3.x/server-kotlin/java/databases/delete-collection.md new file mode 100644 index 000000000..c2849bb78 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/delete-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.deleteCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/delete-document.md b/examples/2.3.x/server-kotlin/java/databases/delete-document.md new file mode 100644 index 000000000..cd67c320c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/delete-document.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.deleteDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "<TRANSACTION_ID>", // transactionId (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/databases/delete-documents.md b/examples/2.3.x/server-kotlin/java/databases/delete-documents.md new file mode 100644 index 000000000..5c4392309 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/delete-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.deleteDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/databases/delete-index.md b/examples/2.3.x/server-kotlin/java/databases/delete-index.md new file mode 100644 index 000000000..31b706523 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/delete-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.deleteIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/delete-transaction.md b/examples/2.3.x/server-kotlin/java/databases/delete-transaction.md new file mode 100644 index 000000000..1175643fa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/delete-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.deleteTransaction( + "<TRANSACTION_ID>", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/delete.md b/examples/2.3.x/server-kotlin/java/databases/delete.md new file mode 100644 index 000000000..2993d7980 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/get-attribute.md b/examples/2.3.x/server-kotlin/java/databases/get-attribute.md new file mode 100644 index 000000000..550aa300f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/get-attribute.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.getAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/get-collection.md b/examples/2.3.x/server-kotlin/java/databases/get-collection.md new file mode 100644 index 000000000..0584c0edf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/get-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.getCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/get-document.md b/examples/2.3.x/server-kotlin/java/databases/get-document.md new file mode 100644 index 000000000..80d63bb26 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/get-document.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.getDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/databases/get-index.md b/examples/2.3.x/server-kotlin/java/databases/get-index.md new file mode 100644 index 000000000..e8edcc978 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/get-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.getIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/get-transaction.md b/examples/2.3.x/server-kotlin/java/databases/get-transaction.md new file mode 100644 index 000000000..48f44db7a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/get-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.getTransaction( + "<TRANSACTION_ID>", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/get.md b/examples/2.3.x/server-kotlin/java/databases/get.md new file mode 100644 index 000000000..aafe37981 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..b78f9af02 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/increment-document-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.incrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "<ATTRIBUTE>", // attribute + 1, // value (optional) + 100, // max (optional) + "<TRANSACTION_ID>", // transactionId (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/databases/list-attributes.md b/examples/2.3.x/server-kotlin/java/databases/list-attributes.md new file mode 100644 index 000000000..43019a15d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/list-attributes.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.listAttributes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/list-collections.md b/examples/2.3.x/server-kotlin/java/databases/list-collections.md new file mode 100644 index 000000000..53684f090 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/list-collections.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.listCollections( + "<DATABASE_ID>", // databaseId + 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/databases/list-documents.md b/examples/2.3.x/server-kotlin/java/databases/list-documents.md new file mode 100644 index 000000000..f961c7a18 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/list-documents.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.listDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/list-indexes.md b/examples/2.3.x/server-kotlin/java/databases/list-indexes.md new file mode 100644 index 000000000..e483c5e7e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/list-indexes.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.listIndexes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/list-transactions.md b/examples/2.3.x/server-kotlin/java/databases/list-transactions.md new file mode 100644 index 000000000..27fe4e936 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/list-transactions.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.listTransactions( + List.of(), // queries (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/databases/list.md b/examples/2.3.x/server-kotlin/java/databases/list.md new file mode 100644 index 000000000..aa4d2d7b0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.list( + 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/databases/update-big-int-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-big-int-attribute.md new file mode 100644 index 000000000..def245d7b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-big-int-attribute.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateBigIntAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + 0, // default + 0, // min (optional) + 1000000, // max (optional) + "<NEW_KEY>", // newKey (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/databases/update-boolean-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-boolean-attribute.md new file mode 100644 index 000000000..c960e192e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-boolean-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateBooleanAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + false, // default + "<NEW_KEY>", // newKey (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/databases/update-collection.md b/examples/2.3.x/server-kotlin/java/databases/update-collection.md new file mode 100644 index 000000000..4308488ed --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-collection.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + false, // purge (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/update-datetime-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-datetime-attribute.md new file mode 100644 index 000000000..a75d79b11 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-datetime-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateDatetimeAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "2020-10-15T06:38:00.000+00:00", // default + "<NEW_KEY>", // newKey (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/databases/update-document.md b/examples/2.3.x/server-kotlin/java/databases/update-document.md new file mode 100644 index 000000000..cb47ac15a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-document.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 33, + "isAdmin", false + ), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (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/databases/update-documents.md b/examples/2.3.x/server-kotlin/java/databases/update-documents.md new file mode 100644 index 000000000..641a69c8c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-documents.md @@ -0,0 +1,35 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 33, + "isAdmin", false + ), // data (optional) + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/databases/update-email-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-email-attribute.md new file mode 100644 index 000000000..1bce2e7aa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-email-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateEmailAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "email@example.com", // default + "<NEW_KEY>", // newKey (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/databases/update-enum-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-enum-attribute.md new file mode 100644 index 000000000..7df8304d3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-enum-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateEnumAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + List.of("active", "inactive"), // elements + false, // required + "active", // default + "<NEW_KEY>", // newKey (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/databases/update-float-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-float-attribute.md new file mode 100644 index 000000000..b8277c551 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-float-attribute.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateFloatAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + 10.5, // default + 0, // min (optional) + 100, // max (optional) + "<NEW_KEY>", // newKey (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/databases/update-integer-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-integer-attribute.md new file mode 100644 index 000000000..ae0d0ccdc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-integer-attribute.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateIntegerAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + 10, // default + 0, // min (optional) + 100, // max (optional) + "<NEW_KEY>", // newKey (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/databases/update-ip-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-ip-attribute.md new file mode 100644 index 000000000..c4340014c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-ip-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateIpAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "192.0.2.0", // default + "<NEW_KEY>", // newKey (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/databases/update-line-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-line-attribute.md new file mode 100644 index 000000000..38791c1d0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-line-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateLineAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional) + "<NEW_KEY>", // newKey (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/databases/update-longtext-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-longtext-attribute.md new file mode 100644 index 000000000..953cf4567 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-longtext-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateLongtextAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "Hello World", // default + "<NEW_KEY>", // newKey (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/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..7210f8dd5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-mediumtext-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateMediumtextAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "Hello World", // default + "<NEW_KEY>", // newKey (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/databases/update-point-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-point-attribute.md new file mode 100644 index 000000000..af7601aca --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-point-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updatePointAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + List.of(1, 2), // default (optional) + "<NEW_KEY>", // newKey (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/databases/update-polygon-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-polygon-attribute.md new file mode 100644 index 000000000..9a30d18eb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-polygon-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updatePolygonAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional) + "<NEW_KEY>", // newKey (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/databases/update-relationship-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-relationship-attribute.md new file mode 100644 index 000000000..9bda786f0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-relationship-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.RelationMutate; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateRelationshipAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + RelationMutate.CASCADE, // onDelete (optional) + "<NEW_KEY>", // newKey (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/databases/update-string-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-string-attribute.md new file mode 100644 index 000000000..49c4f9558 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-string-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateStringAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "Hello World", // default + 1, // size (optional) + "<NEW_KEY>", // newKey (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/databases/update-text-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-text-attribute.md new file mode 100644 index 000000000..51c06bc4c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-text-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateTextAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "Hello World", // default + "<NEW_KEY>", // newKey (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/databases/update-transaction.md b/examples/2.3.x/server-kotlin/java/databases/update-transaction.md new file mode 100644 index 000000000..7f1918268 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-transaction.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateTransaction( + "<TRANSACTION_ID>", // transactionId + false, // commit (optional) + false, // rollback (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/databases/update-url-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-url-attribute.md new file mode 100644 index 000000000..83dfc575c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-url-attribute.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateUrlAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "https://example.com", // default + "<NEW_KEY>", // newKey (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/databases/update-varchar-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-varchar-attribute.md new file mode 100644 index 000000000..a00d323a8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update-varchar-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.updateVarcharAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + false, // required + "Hello World", // default + 1, // size (optional) + "<NEW_KEY>", // newKey (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/databases/update.md b/examples/2.3.x/server-kotlin/java/databases/update.md new file mode 100644 index 000000000..f8ad19f03 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/update.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name (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/databases/upsert-document.md b/examples/2.3.x/server-kotlin/java/databases/upsert-document.md new file mode 100644 index 000000000..3f8105210 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/upsert-document.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.upsertDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (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/databases/upsert-documents.md b/examples/2.3.x/server-kotlin/java/databases/upsert-documents.md new file mode 100644 index 000000000..80e3862e1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/databases/upsert-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +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 + +Databases databases = new Databases(client); + +databases.upsertDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // documents + "<TRANSACTION_ID>", // transactionId (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/documentsdb/create-collection.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-collection.md new file mode 100644 index 000000000..306abf693 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-collection.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + List.of(), // attributes (optional) + List.of(), // indexes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/create-document.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-document.md new file mode 100644 index 000000000..9c50b9220 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-document.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (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/documentsdb/create-documents.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-documents.md new file mode 100644 index 000000000..10058e931 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // documents + "<TRANSACTION_ID>", // transactionId (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/documentsdb/create-failover.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-failover.md new file mode 100644 index 000000000..b01f06308 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-failover.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createFailover( + "<DATABASE_ID>", // databaseId + "<TARGET_REPLICA_ID>", // targetReplicaId (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/documentsdb/create-index.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-index.md new file mode 100644 index 000000000..b72b576bf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-index.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; +import io.appwrite.enums.DocumentsDBIndexType; +import io.appwrite.enums.OrderBy; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + DocumentsDBIndexType.KEY, // type + List.of(), // attributes + List.of(OrderBy.ASC), // orders (optional) + List.of(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/create-operations.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-operations.md new file mode 100644 index 000000000..b7dc4880f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-operations.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createOperations( + "<TRANSACTION_ID>", // transactionId + List.of(Map.of( + "action", "create", + "databaseId", "<DATABASE_ID>", + "collectionId", "<COLLECTION_ID>", + "documentId", "<DOCUMENT_ID>", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/create-transaction.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-transaction.md new file mode 100644 index 000000000..1cd52e528 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createTransaction( + 60, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/create.md b/examples/2.3.x/server-kotlin/java/documentsdb/create.md new file mode 100644 index 000000000..3911b1e89 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + "serverless", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (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/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-kotlin/java/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..6f5803d23 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/decrement-document-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.decrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "<ATTRIBUTE>", // attribute + 1, // value (optional) + 0, // min (optional) + "<TRANSACTION_ID>", // transactionId (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/documentsdb/delete-collection.md b/examples/2.3.x/server-kotlin/java/documentsdb/delete-collection.md new file mode 100644 index 000000000..6953b7ef1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/delete-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/delete-document.md b/examples/2.3.x/server-kotlin/java/documentsdb/delete-document.md new file mode 100644 index 000000000..4cda79cde --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/delete-document.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "<TRANSACTION_ID>", // transactionId (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/documentsdb/delete-documents.md b/examples/2.3.x/server-kotlin/java/documentsdb/delete-documents.md new file mode 100644 index 000000000..38acb98c3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/delete-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/documentsdb/delete-index.md b/examples/2.3.x/server-kotlin/java/documentsdb/delete-index.md new file mode 100644 index 000000000..be51fb948 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/delete-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/delete-transaction.md b/examples/2.3.x/server-kotlin/java/documentsdb/delete-transaction.md new file mode 100644 index 000000000..e7f4252de --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/delete-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteTransaction( + "<TRANSACTION_ID>", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/delete.md b/examples/2.3.x/server-kotlin/java/documentsdb/delete.md new file mode 100644 index 000000000..31c3dd8a1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/get-collection.md b/examples/2.3.x/server-kotlin/java/documentsdb/get-collection.md new file mode 100644 index 000000000..8622d6c86 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/get-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/get-document.md b/examples/2.3.x/server-kotlin/java/documentsdb/get-document.md new file mode 100644 index 000000000..0e75f98a5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/get-document.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/documentsdb/get-index.md b/examples/2.3.x/server-kotlin/java/documentsdb/get-index.md new file mode 100644 index 000000000..8484c92fb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/get-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/get-replicas.md b/examples/2.3.x/server-kotlin/java/documentsdb/get-replicas.md new file mode 100644 index 000000000..0224c189d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/get-replicas.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getReplicas( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/get-status.md b/examples/2.3.x/server-kotlin/java/documentsdb/get-status.md new file mode 100644 index 000000000..99bce5749 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/get-status.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getStatus( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/get-transaction.md b/examples/2.3.x/server-kotlin/java/documentsdb/get-transaction.md new file mode 100644 index 000000000..e377bf081 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/get-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getTransaction( + "<TRANSACTION_ID>", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/get.md b/examples/2.3.x/server-kotlin/java/documentsdb/get.md new file mode 100644 index 000000000..6aba5489b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..9b3082fc7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/increment-document-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.incrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "<ATTRIBUTE>", // attribute + 1, // value (optional) + 100, // max (optional) + "<TRANSACTION_ID>", // transactionId (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/documentsdb/list-collections.md b/examples/2.3.x/server-kotlin/java/documentsdb/list-collections.md new file mode 100644 index 000000000..bca8249ea --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-collections.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listCollections( + "<DATABASE_ID>", // databaseId + 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/documentsdb/list-documents.md b/examples/2.3.x/server-kotlin/java/documentsdb/list-documents.md new file mode 100644 index 000000000..8cbcd8aaf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-documents.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/list-indexes.md b/examples/2.3.x/server-kotlin/java/documentsdb/list-indexes.md new file mode 100644 index 000000000..9544488ae --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-indexes.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listIndexes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/list-operations.md b/examples/2.3.x/server-kotlin/java/documentsdb/list-operations.md new file mode 100644 index 000000000..b2b20ec98 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-operations.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listOperations( + "<DATABASE_ID>", // databaseId + "queued", // status (optional) + 1, // limit (optional) + 0, // offset (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/documentsdb/list-specifications.md b/examples/2.3.x/server-kotlin/java/documentsdb/list-specifications.md new file mode 100644 index 000000000..21a5a2910 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-specifications.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +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 + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` 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 new file mode 100644 index 000000000..cc56f53e8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-transactions.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listTransactions( + List.of(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/list.md b/examples/2.3.x/server-kotlin/java/documentsdb/list.md new file mode 100644 index 000000000..8b9314893 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.list( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/update-collection.md b/examples/2.3.x/server-kotlin/java/documentsdb/update-collection.md new file mode 100644 index 000000000..2e29fd3d5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/update-collection.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + false, // purge (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/update-document.md b/examples/2.3.x/server-kotlin/java/documentsdb/update-document.md new file mode 100644 index 000000000..c1332928d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/update-document.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/update-documents.md b/examples/2.3.x/server-kotlin/java/documentsdb/update-documents.md new file mode 100644 index 000000000..8b96274cb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/update-documents.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + Map.of("a", "b"), // data (optional) + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/documentsdb/update-transaction.md b/examples/2.3.x/server-kotlin/java/documentsdb/update-transaction.md new file mode 100644 index 000000000..17cd8f27b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/update-transaction.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateTransaction( + "<TRANSACTION_ID>", // transactionId + false, // commit (optional) + false, // rollback (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/update.md b/examples/2.3.x/server-kotlin/java/documentsdb/update.md new file mode 100644 index 000000000..9e4115325 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/update.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + "serverless", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (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/documentsdb/upsert-document.md b/examples/2.3.x/server-kotlin/java/documentsdb/upsert-document.md new file mode 100644 index 000000000..2c20c630a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/upsert-document.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.upsertDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..97582524b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/documentsdb/upsert-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.upsertDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // documents + "<TRANSACTION_ID>", // transactionId (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/domains/create-preset-google-workspace.md b/examples/2.3.x/server-kotlin/java/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..e514f9b48 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-preset-google-workspace.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createPresetGoogleWorkspace( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/create-preset-i-cloud.md b/examples/2.3.x/server-kotlin/java/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..475c55347 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-preset-i-cloud.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createPresetICloud( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/create-preset-mailgun.md b/examples/2.3.x/server-kotlin/java/domains/create-preset-mailgun.md new file mode 100644 index 000000000..113671883 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-preset-mailgun.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createPresetMailgun( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/create-preset-outlook.md b/examples/2.3.x/server-kotlin/java/domains/create-preset-outlook.md new file mode 100644 index 000000000..d8c43078f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-preset-outlook.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createPresetOutlook( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/create-preset-proton-mail.md b/examples/2.3.x/server-kotlin/java/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..adb1ba0eb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-preset-proton-mail.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createPresetProtonMail( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/create-preset-zoho.md b/examples/2.3.x/server-kotlin/java/domains/create-preset-zoho.md new file mode 100644 index 000000000..d3b5f95d9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-preset-zoho.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createPresetZoho( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..13c81cd60 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-a.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordA( + "<DOMAIN_ID>", // domainId + "", // name + "", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/create-record-aaaa.md b/examples/2.3.x/server-kotlin/java/domains/create-record-aaaa.md new file mode 100644 index 000000000..36762ae43 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-aaaa.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordAAAA( + "<DOMAIN_ID>", // domainId + "", // name + "", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/create-record-alias.md b/examples/2.3.x/server-kotlin/java/domains/create-record-alias.md new file mode 100644 index 000000000..a9a41bfc7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-alias.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordAlias( + "<DOMAIN_ID>", // domainId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/create-record-caa.md b/examples/2.3.x/server-kotlin/java/domains/create-record-caa.md new file mode 100644 index 000000000..d8df0f89e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-caa.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordCAA( + "<DOMAIN_ID>", // domainId + "", // name + "", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/create-record-cname.md b/examples/2.3.x/server-kotlin/java/domains/create-record-cname.md new file mode 100644 index 000000000..157681188 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-cname.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordCNAME( + "<DOMAIN_ID>", // domainId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/create-record-https.md b/examples/2.3.x/server-kotlin/java/domains/create-record-https.md new file mode 100644 index 000000000..e8bd7b963 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-https.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordHTTPS( + "<DOMAIN_ID>", // domainId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/create-record-mx.md b/examples/2.3.x/server-kotlin/java/domains/create-record-mx.md new file mode 100644 index 000000000..beb99ac6f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-mx.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordMX( + "<DOMAIN_ID>", // domainId + "", // name + "<VALUE>", // value + 1, // ttl + 0, // priority + "<COMMENT>", // comment (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/domains/create-record-ns.md b/examples/2.3.x/server-kotlin/java/domains/create-record-ns.md new file mode 100644 index 000000000..e4513db25 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-ns.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordNS( + "<DOMAIN_ID>", // domainId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/create-record-srv.md b/examples/2.3.x/server-kotlin/java/domains/create-record-srv.md new file mode 100644 index 000000000..3abf748aa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-srv.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordSRV( + "<DOMAIN_ID>", // domainId + "", // name + "<VALUE>", // value + 1, // ttl + 0, // priority + 0, // weight + 0, // port + "<COMMENT>", // comment (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/domains/create-record-txt.md b/examples/2.3.x/server-kotlin/java/domains/create-record-txt.md new file mode 100644 index 000000000..73d543104 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-txt.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.createRecordTXT( + "<DOMAIN_ID>", // domainId + "", // name + 1, // ttl + "<VALUE>", // value (optional) + "<COMMENT>", // comment (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/domains/create.md b/examples/2.3.x/server-kotlin/java/domains/create.md new file mode 100644 index 000000000..3d922e1ae --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/create.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.create( + "<TEAM_ID>", // teamId + "example.com", // domain + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/delete-record.md b/examples/2.3.x/server-kotlin/java/domains/delete-record.md new file mode 100644 index 000000000..836e8e9b7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/delete-record.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.deleteRecord( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/delete.md b/examples/2.3.x/server-kotlin/java/domains/delete.md new file mode 100644 index 000000000..ba77f5f0b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.delete( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get-preset-google-workspace.md b/examples/2.3.x/server-kotlin/java/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..de86636a1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-preset-google-workspace.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getPresetGoogleWorkspace( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get-preset-i-cloud.md b/examples/2.3.x/server-kotlin/java/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..e0da47362 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-preset-i-cloud.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getPresetICloud( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get-preset-mailgun.md b/examples/2.3.x/server-kotlin/java/domains/get-preset-mailgun.md new file mode 100644 index 000000000..536b984aa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-preset-mailgun.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getPresetMailgun( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get-preset-outlook.md b/examples/2.3.x/server-kotlin/java/domains/get-preset-outlook.md new file mode 100644 index 000000000..4600d4331 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-preset-outlook.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getPresetOutlook( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get-preset-proton-mail.md b/examples/2.3.x/server-kotlin/java/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..e165c1e74 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-preset-proton-mail.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getPresetProtonMail( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get-preset-zoho.md b/examples/2.3.x/server-kotlin/java/domains/get-preset-zoho.md new file mode 100644 index 000000000..f3528e3b0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-preset-zoho.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getPresetZoho( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..41ef166b9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-price.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; +import io.appwrite.enums.DomainRegistrationType; + +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 + +Domains domains = new Domains(client); + +domains.getPrice( + "example.com", // domain + 0, // periodYears (optional) + DomainRegistrationType.NEW, // registrationType (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/domains/get-record.md b/examples/2.3.x/server-kotlin/java/domains/get-record.md new file mode 100644 index 000000000..361713fed --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-record.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getRecord( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get-transfer-status.md b/examples/2.3.x/server-kotlin/java/domains/get-transfer-status.md new file mode 100644 index 000000000..d7a4e41e6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-transfer-status.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getTransferStatus( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get-zone.md b/examples/2.3.x/server-kotlin/java/domains/get-zone.md new file mode 100644 index 000000000..fafbfdbec --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get-zone.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.getZone( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/get.md b/examples/2.3.x/server-kotlin/java/domains/get.md new file mode 100644 index 000000000..5d0f92033 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.get( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..d5b3eeba3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/list-prices.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; +import io.appwrite.enums.DomainRegistrationType; + +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 + +Domains domains = new Domains(client); + +domains.listPrices( + List.of(), // domains + 0, // periodYears (optional) + DomainRegistrationType.NEW, // registrationType (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/domains/list-records.md b/examples/2.3.x/server-kotlin/java/domains/list-records.md new file mode 100644 index 000000000..36da86443 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/list-records.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.listRecords( + "<DOMAIN_ID>", // domainId + List.of(), // queries (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/domains/list.md b/examples/2.3.x/server-kotlin/java/domains/list.md new file mode 100644 index 000000000..545c582e0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/list.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.list( + List.of(), // queries (optional) + "<SEARCH>", // search (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/domains/update-nameservers.md b/examples/2.3.x/server-kotlin/java/domains/update-nameservers.md new file mode 100644 index 000000000..0dfd5b9ff --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-nameservers.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateNameservers( + "<DOMAIN_ID>", // domainId + List.of(), // nameservers (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/domains/update-record-a.md b/examples/2.3.x/server-kotlin/java/domains/update-record-a.md new file mode 100644 index 000000000..a5f6582e3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-a.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordA( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/update-record-aaaa.md b/examples/2.3.x/server-kotlin/java/domains/update-record-aaaa.md new file mode 100644 index 000000000..35c9920bd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-aaaa.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordAAAA( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/update-record-alias.md b/examples/2.3.x/server-kotlin/java/domains/update-record-alias.md new file mode 100644 index 000000000..61c4b2ba8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-alias.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordAlias( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/update-record-caa.md b/examples/2.3.x/server-kotlin/java/domains/update-record-caa.md new file mode 100644 index 000000000..42abda737 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-caa.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordCAA( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/update-record-cname.md b/examples/2.3.x/server-kotlin/java/domains/update-record-cname.md new file mode 100644 index 000000000..aa25f8b37 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-cname.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordCNAME( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/update-record-https.md b/examples/2.3.x/server-kotlin/java/domains/update-record-https.md new file mode 100644 index 000000000..e5ef1feb8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-https.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordHTTPS( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/update-record-mx.md b/examples/2.3.x/server-kotlin/java/domains/update-record-mx.md new file mode 100644 index 000000000..30294b7cd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-mx.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordMX( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "<VALUE>", // value + 1, // ttl + 0, // priority + "<COMMENT>", // comment (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/domains/update-record-ns.md b/examples/2.3.x/server-kotlin/java/domains/update-record-ns.md new file mode 100644 index 000000000..f7ab6c3df --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-ns.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordNS( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/update-record-srv.md b/examples/2.3.x/server-kotlin/java/domains/update-record-srv.md new file mode 100644 index 000000000..050374932 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-srv.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordSRV( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "<VALUE>", // value + 1, // ttl + 0, // priority + 0, // weight + 0, // port + "<COMMENT>", // comment (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/domains/update-record-txt.md b/examples/2.3.x/server-kotlin/java/domains/update-record-txt.md new file mode 100644 index 000000000..f46042fdf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-txt.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateRecordTXT( + "<DOMAIN_ID>", // domainId + "<RECORD_ID>", // recordId + "", // name + "<VALUE>", // value + 1, // ttl + "<COMMENT>", // comment (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/domains/update-team.md b/examples/2.3.x/server-kotlin/java/domains/update-team.md new file mode 100644 index 000000000..29da0fe3e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-team.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateTeam( + "<DOMAIN_ID>", // domainId + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/update-zone.md b/examples/2.3.x/server-kotlin/java/domains/update-zone.md new file mode 100644 index 000000000..fd020de3d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/update-zone.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.updateZone( + "<DOMAIN_ID>", // domainId + "<CONTENT>", // content + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/domains/verify-nameservers.md b/examples/2.3.x/server-kotlin/java/domains/verify-nameservers.md new file mode 100644 index 000000000..a5625e5ec --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/domains/verify-nameservers.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Domains; + +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 + +Domains domains = new Domains(client); + +domains.verifyNameservers( + "<DOMAIN_ID>", // domainId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..92d9ee998 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/embeddings/create-text-embeddings.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Embeddings; +import io.appwrite.enums.EmbeddingModel; + +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 + +Embeddings embeddings = new Embeddings(client); + +embeddings.createTextEmbeddings( + List.of(), // texts + EmbeddingModel.NOMIC_EMBED_TEXT, // model (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/create-deployment.md b/examples/2.3.x/server-kotlin/java/functions/create-deployment.md new file mode 100644 index 000000000..9a56935a8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/create-deployment.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.createDeployment( + "<FUNCTION_ID>", // functionId + InputFile.fromPath("file.png"), // code + false, // activate + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (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/functions/create-duplicate-deployment.md b/examples/2.3.x/server-kotlin/java/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..afb33a908 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/create-duplicate-deployment.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.createDuplicateDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + "<BUILD_ID>", // buildId (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/functions/create-execution.md b/examples/2.3.x/server-kotlin/java/functions/create-execution.md new file mode 100644 index 000000000..222761eb6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/create-execution.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.ExecutionMethod; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.createExecution( + "<FUNCTION_ID>", // functionId + "<BODY>", // body (optional) + false, // async (optional) + "<PATH>", // path (optional) + ExecutionMethod.GET, // method (optional) + Map.of("a", "b"), // headers (optional) + "<SCHEDULED_AT>", // scheduledAt (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/functions/create-template-deployment.md b/examples/2.3.x/server-kotlin/java/functions/create-template-deployment.md new file mode 100644 index 000000000..1059cd5e3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/create-template-deployment.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.TemplateReferenceType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createTemplateDeployment( + "<FUNCTION_ID>", // functionId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + TemplateReferenceType.COMMIT, // type + "<REFERENCE>", // reference + false, // activate (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/functions/create-variable.md b/examples/2.3.x/server-kotlin/java/functions/create-variable.md new file mode 100644 index 000000000..d3e41c10a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/create-variable.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.createVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value + false, // 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/functions/create-vcs-deployment.md b/examples/2.3.x/server-kotlin/java/functions/create-vcs-deployment.md new file mode 100644 index 000000000..94bf9dfd0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/create-vcs-deployment.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.VCSReferenceType; + +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 + +Functions functions = new Functions(client); + +functions.createVcsDeployment( + "<FUNCTION_ID>", // functionId + VCSReferenceType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (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/functions/create.md b/examples/2.3.x/server-kotlin/java/functions/create.md new file mode 100644 index 000000000..a02365dc6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/create.md @@ -0,0 +1,48 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.Runtime; +import io.appwrite.enums.ProjectKeyScopes; + +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 + +Functions functions = new Functions(client); + +functions.create( + "<FUNCTION_ID>", // functionId + "<NAME>", // name + Runtime.NODE_14_5, // runtime + List.of("any"), // execute (optional) + List.of(), // events (optional) + "0 0 * * *", // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + List.of(ProjectKeyScopes.PROJECT_READ), // scopes (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + List.of(), // providerBranches (optional) + List.of(), // providerPaths (optional) + "s-1vcpu-512mb", // buildSpecification (optional) + "s-1vcpu-512mb", // runtimeSpecification (optional) + 0, // deploymentRetention (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/functions/delete-deployment.md b/examples/2.3.x/server-kotlin/java/functions/delete-deployment.md new file mode 100644 index 000000000..a7244cdbc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/delete-deployment.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.deleteDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/delete-execution.md b/examples/2.3.x/server-kotlin/java/functions/delete-execution.md new file mode 100644 index 000000000..43b556a93 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/delete-execution.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.deleteExecution( + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/delete-variable.md b/examples/2.3.x/server-kotlin/java/functions/delete-variable.md new file mode 100644 index 000000000..7298bb1a3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/delete-variable.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.deleteVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/delete.md b/examples/2.3.x/server-kotlin/java/functions/delete.md new file mode 100644 index 000000000..fabcb1a7e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.delete( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/get-deployment-download.md b/examples/2.3.x/server-kotlin/java/functions/get-deployment-download.md new file mode 100644 index 000000000..ea9e5d886 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/get-deployment-download.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.DeploymentDownloadType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getDeploymentDownload( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + "<TOKEN>", // token (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/functions/get-deployment.md b/examples/2.3.x/server-kotlin/java/functions/get-deployment.md new file mode 100644 index 000000000..a6a96d142 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/get-deployment.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.getDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/get-execution.md b/examples/2.3.x/server-kotlin/java/functions/get-execution.md new file mode 100644 index 000000000..bfaabe7aa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/get-execution.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.getExecution( + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/get-variable.md b/examples/2.3.x/server-kotlin/java/functions/get-variable.md new file mode 100644 index 000000000..e2ff42ee5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/get-variable.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.getVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/get.md b/examples/2.3.x/server-kotlin/java/functions/get.md new file mode 100644 index 000000000..fb3dc8d2d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.get( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/list-deployments.md b/examples/2.3.x/server-kotlin/java/functions/list-deployments.md new file mode 100644 index 000000000..4e0de978b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/list-deployments.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.listDeployments( + "<FUNCTION_ID>", // functionId + 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/functions/list-executions.md b/examples/2.3.x/server-kotlin/java/functions/list-executions.md new file mode 100644 index 000000000..b7ab9efb0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/list-executions.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.listExecutions( + "<FUNCTION_ID>", // functionId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/list-runtimes.md b/examples/2.3.x/server-kotlin/java/functions/list-runtimes.md new file mode 100644 index 000000000..0a4a240c8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/list-runtimes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.listRuntimes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..7a6c7f51c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/list-specifications.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.listSpecifications( + "runtimes", // type (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/functions/list-variables.md b/examples/2.3.x/server-kotlin/java/functions/list-variables.md new file mode 100644 index 000000000..4766fca54 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/list-variables.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.listVariables( + "<FUNCTION_ID>", // functionId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/list.md b/examples/2.3.x/server-kotlin/java/functions/list.md new file mode 100644 index 000000000..b7eab3e2f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.list( + 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/functions/update-deployment-status.md b/examples/2.3.x/server-kotlin/java/functions/update-deployment-status.md new file mode 100644 index 000000000..920ce4a0f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/update-deployment-status.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.updateDeploymentStatus( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/update-function-deployment.md b/examples/2.3.x/server-kotlin/java/functions/update-function-deployment.md new file mode 100644 index 000000000..363c23ab8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/update-function-deployment.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.updateFunctionDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/functions/update-variable.md b/examples/2.3.x/server-kotlin/java/functions/update-variable.md new file mode 100644 index 000000000..fa4518f65 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/update-variable.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +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 + +Functions functions = new Functions(client); + +functions.updateVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + "<KEY>", // key (optional) + "<VALUE>", // value (optional) + false, // 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/functions/update.md b/examples/2.3.x/server-kotlin/java/functions/update.md new file mode 100644 index 000000000..30bb95586 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/functions/update.md @@ -0,0 +1,48 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.Runtime; +import io.appwrite.enums.ProjectKeyScopes; + +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 + +Functions functions = new Functions(client); + +functions.update( + "<FUNCTION_ID>", // functionId + "<NAME>", // name + Runtime.NODE_14_5, // runtime (optional) + List.of("any"), // execute (optional) + List.of(), // events (optional) + "0 0 * * *", // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + List.of(ProjectKeyScopes.PROJECT_READ), // scopes (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + List.of(), // providerBranches (optional) + List.of(), // providerPaths (optional) + "s-1vcpu-512mb", // buildSpecification (optional) + "s-1vcpu-512mb", // runtimeSpecification (optional) + 0, // deploymentRetention (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/graphql/mutation.md b/examples/2.3.x/server-kotlin/java/graphql/mutation.md new file mode 100644 index 000000000..1f327de50 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/graphql/mutation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +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 + +Graphql graphql = new Graphql(client); + +graphql.mutation( + Map.of("a", "b"), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/graphql/query.md b/examples/2.3.x/server-kotlin/java/graphql/query.md new file mode 100644 index 000000000..29ea821d6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/graphql/query.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +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 + +Graphql graphql = new Graphql(client); + +graphql.query( + Map.of("a", "b"), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/locale/get.md b/examples/2.3.x/server-kotlin/java/locale/get.md new file mode 100644 index 000000000..ce0599ebf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/locale/get.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +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 + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` 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 new file mode 100644 index 000000000..25555499b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/locale/list-codes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +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 + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..f7098f332 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/locale/list-continents.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +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 + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..b312639fc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/locale/list-countries-eu.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +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 + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..aed72e0ff --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/locale/list-countries-phones.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +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 + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..8eef04d63 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/locale/list-countries.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +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 + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..fc4ee4d9d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/locale/list-currencies.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +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 + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + 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 new file mode 100644 index 000000000..44d101564 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/locale/list-languages.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +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 + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/create-apns-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-apns-provider.md new file mode 100644 index 000000000..134c5c96d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-apns-provider.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createAPNSProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) + false, // sandbox (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/messaging/create-appwrite-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..d60e304d7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-appwrite-provider.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createAppwriteProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + false, // enabled (optional) + 0, // qos (optional) + 0, // expiry (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/messaging/create-email.md b/examples/2.3.x/server-kotlin/java/messaging/create-email.md new file mode 100644 index 000000000..0d94e91a5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-email.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createEmail( + "<MESSAGE_ID>", // messageId + "<SUBJECT>", // subject + "<CONTENT>", // content + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (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) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/create-fcm-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-fcm-provider.md new file mode 100644 index 000000000..6cd9e9ffc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-fcm-provider.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createFCMProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + Map.of("a", "b"), // serviceAccountJSON (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/messaging/create-mailgun-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..4ab015302 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-mailgun-provider.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createMailgunProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "example.com", // domain (optional) + false, // isEuRegion (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (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/messaging/create-msg-91-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..2af08cf05 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-msg-91-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createMsg91Provider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (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/messaging/create-push.md b/examples/2.3.x/server-kotlin/java/messaging/create-push.md new file mode 100644 index 000000000..9caac2d47 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-push.md @@ -0,0 +1,44 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; +import io.appwrite.enums.MessagePriority; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createPush( + "<MESSAGE_ID>", // messageId + "<TITLE>", // title (optional) + "<BODY>", // body (optional) + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (optional) + Map.of("a", "b"), // data (optional) + "<ACTION>", // action (optional) + "<ID1:ID2>", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 1, // 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) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/create-resend-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-resend-provider.md new file mode 100644 index 000000000..516ba4e2e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-resend-provider.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createResendProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (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/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..ecb1e1bde --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-sendgrid-provider.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createSendgridProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (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/messaging/create-ses-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-ses-provider.md new file mode 100644 index 000000000..c8864661b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-ses-provider.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createSesProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<ACCESS_KEY>", // accessKey (optional) + "<SECRET_KEY>", // secretKey (optional) + "<REGION>", // region (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (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/messaging/create-sms.md b/examples/2.3.x/server-kotlin/java/messaging/create-sms.md new file mode 100644 index 000000000..530bb29ca --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-sms.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createSMS( + "<MESSAGE_ID>", // messageId + "<CONTENT>", // content + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (optional) + false, // draft (optional) + "2020-10-15T06:38:00.000+00:00", // scheduledAt (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/messaging/create-smtp-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-smtp-provider.md new file mode 100644 index 000000000..2b0046bc4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-smtp-provider.md @@ -0,0 +1,39 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; +import io.appwrite.enums.SmtpEncryption; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSMTPProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<HOST>", // host + 587, // port (optional) + "<USERNAME>", // username (optional) + "password", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (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/messaging/create-subscriber.md b/examples/2.3.x/server-kotlin/java/messaging/create-subscriber.md new file mode 100644 index 000000000..39480c0c0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-subscriber.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +messaging.createSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/create-telesign-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-telesign-provider.md new file mode 100644 index 000000000..87b9e1fcd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-telesign-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createTelesignProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (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/messaging/create-textmagic-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..2599ed5d3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-textmagic-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createTextmagicProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (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/messaging/create-topic.md b/examples/2.3.x/server-kotlin/java/messaging/create-topic.md new file mode 100644 index 000000000..5a1e5f2f5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-topic.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createTopic( + "<TOPIC_ID>", // topicId + "<NAME>", // name + List.of("any"), // subscribe (optional) + 0, // qos (optional) + 0, // expiry (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/messaging/create-twilio-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-twilio-provider.md new file mode 100644 index 000000000..488f8aa8f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-twilio-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createTwilioProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<FROM>", // from (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (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/messaging/create-vonage-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-vonage-provider.md new file mode 100644 index 000000000..ac269038c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/create-vonage-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.createVonageProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (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/messaging/delete-provider.md b/examples/2.3.x/server-kotlin/java/messaging/delete-provider.md new file mode 100644 index 000000000..0136e9dc1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/delete-provider.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.deleteProvider( + "<PROVIDER_ID>", // providerId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/delete-subscriber.md b/examples/2.3.x/server-kotlin/java/messaging/delete-subscriber.md new file mode 100644 index 000000000..265a70ba7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/delete-subscriber.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +messaging.deleteSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/delete-topic.md b/examples/2.3.x/server-kotlin/java/messaging/delete-topic.md new file mode 100644 index 000000000..aee64733c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/delete-topic.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.deleteTopic( + "<TOPIC_ID>", // topicId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/delete.md b/examples/2.3.x/server-kotlin/java/messaging/delete.md new file mode 100644 index 000000000..7585a4867 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.delete( + "<MESSAGE_ID>", // messageId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/get-message.md b/examples/2.3.x/server-kotlin/java/messaging/get-message.md new file mode 100644 index 000000000..846e881e4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/get-message.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.getMessage( + "<MESSAGE_ID>", // messageId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/get-provider.md b/examples/2.3.x/server-kotlin/java/messaging/get-provider.md new file mode 100644 index 000000000..4d68108b3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/get-provider.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.getProvider( + "<PROVIDER_ID>", // providerId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/get-subscriber.md b/examples/2.3.x/server-kotlin/java/messaging/get-subscriber.md new file mode 100644 index 000000000..01137147b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/get-subscriber.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.getSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/get-topic.md b/examples/2.3.x/server-kotlin/java/messaging/get-topic.md new file mode 100644 index 000000000..d1e9693a6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/get-topic.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.getTopic( + "<TOPIC_ID>", // topicId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/list-messages.md b/examples/2.3.x/server-kotlin/java/messaging/list-messages.md new file mode 100644 index 000000000..060d166ad --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/list-messages.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.listMessages( + 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/messaging/list-providers.md b/examples/2.3.x/server-kotlin/java/messaging/list-providers.md new file mode 100644 index 000000000..40abdc4e4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/list-providers.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.listProviders( + 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/messaging/list-subscribers.md b/examples/2.3.x/server-kotlin/java/messaging/list-subscribers.md new file mode 100644 index 000000000..e7eb27c8c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/list-subscribers.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.listSubscribers( + "<TOPIC_ID>", // topicId + 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/messaging/list-targets.md b/examples/2.3.x/server-kotlin/java/messaging/list-targets.md new file mode 100644 index 000000000..f40902d32 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/list-targets.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.listTargets( + "<MESSAGE_ID>", // messageId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/list-topics.md b/examples/2.3.x/server-kotlin/java/messaging/list-topics.md new file mode 100644 index 000000000..de91ffdba --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/list-topics.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.listTopics( + 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/messaging/update-apns-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-apns-provider.md new file mode 100644 index 000000000..daebea076 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-apns-provider.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateAPNSProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) + false, // sandbox (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/messaging/update-appwrite-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..10cc9e55f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-appwrite-provider.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateAppwriteProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + 0, // qos (optional) + 0, // expiry (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/messaging/update-email.md b/examples/2.3.x/server-kotlin/java/messaging/update-email.md new file mode 100644 index 000000000..71d82db5b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-email.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateEmail( + "<MESSAGE_ID>", // messageId + 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) + "email@example.com", // replyToEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "2020-10-15T06:38:00.000+00:00", // scheduledAt (optional) + List.of(), // attachments (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/messaging/update-fcm-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-fcm-provider.md new file mode 100644 index 000000000..1b9f694c9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-fcm-provider.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateFCMProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + Map.of("a", "b"), // serviceAccountJSON (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/messaging/update-mailgun-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..329a8587a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-mailgun-provider.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateMailgunProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<API_KEY>", // apiKey (optional) + "example.com", // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (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/messaging/update-msg-91-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..c25e7e3ce --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-msg-91-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateMsg91Provider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (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/messaging/update-push.md b/examples/2.3.x/server-kotlin/java/messaging/update-push.md new file mode 100644 index 000000000..263dfaab1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-push.md @@ -0,0 +1,44 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; +import io.appwrite.enums.MessagePriority; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updatePush( + "<MESSAGE_ID>", // messageId + 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) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 1, // 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) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/update-resend-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-resend-provider.md new file mode 100644 index 000000000..16b61b7bc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-resend-provider.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateResendProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (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/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..bb90a433c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-sendgrid-provider.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateSendgridProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (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/messaging/update-ses-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-ses-provider.md new file mode 100644 index 000000000..0d0fc5c01 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-ses-provider.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateSesProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<ACCESS_KEY>", // accessKey (optional) + "<SECRET_KEY>", // secretKey (optional) + "<REGION>", // region (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (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/messaging/update-sms.md b/examples/2.3.x/server-kotlin/java/messaging/update-sms.md new file mode 100644 index 000000000..808be650a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-sms.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateSMS( + "<MESSAGE_ID>", // messageId + 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) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..70a017c9b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-smtp-provider.md @@ -0,0 +1,39 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; +import io.appwrite.enums.SmtpEncryption; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSMTPProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<HOST>", // host (optional) + 1, // port (optional) + "<USERNAME>", // username (optional) + "password", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (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/messaging/update-telesign-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-telesign-provider.md new file mode 100644 index 000000000..fef04fe0b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-telesign-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateTelesignProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (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/messaging/update-textmagic-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..0068564cf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-textmagic-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateTextmagicProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (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/messaging/update-topic.md b/examples/2.3.x/server-kotlin/java/messaging/update-topic.md new file mode 100644 index 000000000..88a30e0cf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-topic.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateTopic( + "<TOPIC_ID>", // topicId + "<NAME>", // name (optional) + List.of("any"), // subscribe (optional) + 0, // qos (optional) + 0, // expiry (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/messaging/update-twilio-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-twilio-provider.md new file mode 100644 index 000000000..36e44fa22 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-twilio-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateTwilioProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) + "<FROM>", // from (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/messaging/update-vonage-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-vonage-provider.md new file mode 100644 index 000000000..549bcce2e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/messaging/update-vonage-provider.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +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 + +Messaging messaging = new Messaging(client); + +messaging.updateVonageProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) + "<FROM>", // from (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/mongo/create-backup-policy.md b/examples/2.3.x/server-kotlin/java/mongo/create-backup-policy.md new file mode 100644 index 000000000..0ef94ad13 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/create-backup-policy.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.createBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + "<NAME>", // name + "", // schedule + 1, // retention + "full", // type (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/mongo/create-backup.md b/examples/2.3.x/server-kotlin/java/mongo/create-backup.md new file mode 100644 index 000000000..e83d63446 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/create-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.createBackup( + "<DATABASE_ID>", // databaseId + "full", // type (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/mongo/create-branch.md b/examples/2.3.x/server-kotlin/java/mongo/create-branch.md new file mode 100644 index 000000000..122dec847 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/create-branch.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.createBranch( + "<DATABASE_ID>", // databaseId + "<BRANCH_ID>", // branchId (optional) + 300, // ttl (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/mongo/create-failover.md b/examples/2.3.x/server-kotlin/java/mongo/create-failover.md new file mode 100644 index 000000000..fc8950574 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/create-failover.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.createFailover( + "<DATABASE_ID>", // databaseId + "<TARGET_REPLICA_ID>", // targetReplicaId (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/mongo/create-migration.md b/examples/2.3.x/server-kotlin/java/mongo/create-migration.md new file mode 100644 index 000000000..221f49f3e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/create-migration.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.createMigration( + "<DATABASE_ID>", // databaseId + "shared", // targetType + "<SPECIFICATION>", // specification (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/mongo/create-restoration.md b/examples/2.3.x/server-kotlin/java/mongo/create-restoration.md new file mode 100644 index 000000000..ee73decf1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/create-restoration.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.createRestoration( + "<DATABASE_ID>", // databaseId + "backup", // type (optional) + "<BACKUP_ID>", // backupId (optional) + "<TARGET_DATABASE_ID>", // targetDatabaseId (optional) + "2020-10-15T06:38:00.000+00:00", // targetTime (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/mongo/create-upgrade.md b/examples/2.3.x/server-kotlin/java/mongo/create-upgrade.md new file mode 100644 index 000000000..c96de3a6b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/create-upgrade.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.createUpgrade( + "<DATABASE_ID>", // databaseId + "<TARGET_VERSION>", // targetVersion + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/create.md b/examples/2.3.x/server-kotlin/java/mongo/create.md new file mode 100644 index 000000000..fda3da697 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/create.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + "17", // version (optional) + "<SPECIFICATION>", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (optional) + 60, // networkIdleTimeoutSeconds (optional) + List.of(), // networkIPAllowlist (optional) + 5, // idleTimeoutMinutes (optional) + false, // pitr (optional) + 1, // pitrRetentionDays (optional) + false, // storageAutoscaling (optional) + 50, // storageAutoscalingThresholdPercent (optional) + 0, // storageAutoscalingMaxGb (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/mongo/delete-backup-policy.md b/examples/2.3.x/server-kotlin/java/mongo/delete-backup-policy.md new file mode 100644 index 000000000..143c12b89 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/delete-backup-policy.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.deleteBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/delete-backup.md b/examples/2.3.x/server-kotlin/java/mongo/delete-backup.md new file mode 100644 index 000000000..8b391c27a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/delete-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.deleteBackup( + "<DATABASE_ID>", // databaseId + "<BACKUP_ID>", // backupId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/delete-branch.md b/examples/2.3.x/server-kotlin/java/mongo/delete-branch.md new file mode 100644 index 000000000..a9206df01 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/delete-branch.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.deleteBranch( + "<DATABASE_ID>", // databaseId + "<BRANCH_ID>", // branchId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/delete.md b/examples/2.3.x/server-kotlin/java/mongo/delete.md new file mode 100644 index 000000000..bd164225e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/get-backup-policy.md b/examples/2.3.x/server-kotlin/java/mongo/get-backup-policy.md new file mode 100644 index 000000000..2c5c12bc0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/get-backup-policy.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.getBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/get-backup.md b/examples/2.3.x/server-kotlin/java/mongo/get-backup.md new file mode 100644 index 000000000..d95801d7c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/get-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.getBackup( + "<DATABASE_ID>", // databaseId + "<BACKUP_ID>", // backupId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/get-pitr.md b/examples/2.3.x/server-kotlin/java/mongo/get-pitr.md new file mode 100644 index 000000000..b7017ffdd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/get-pitr.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.getPitr( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/get-replicas.md b/examples/2.3.x/server-kotlin/java/mongo/get-replicas.md new file mode 100644 index 000000000..fb998cb50 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/get-replicas.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.getReplicas( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/get-restoration.md b/examples/2.3.x/server-kotlin/java/mongo/get-restoration.md new file mode 100644 index 000000000..04f07d5ee --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/get-restoration.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.getRestoration( + "<DATABASE_ID>", // databaseId + "<RESTORATION_ID>", // restorationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/get-status.md b/examples/2.3.x/server-kotlin/java/mongo/get-status.md new file mode 100644 index 000000000..cff3ba7d8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/get-status.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.getStatus( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/get.md b/examples/2.3.x/server-kotlin/java/mongo/get.md new file mode 100644 index 000000000..adb3022c5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/list-backup-policies.md b/examples/2.3.x/server-kotlin/java/mongo/list-backup-policies.md new file mode 100644 index 000000000..032948b1f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/list-backup-policies.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.listBackupPolicies( + "<DATABASE_ID>", // databaseId + List.of(), // queries (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/mongo/list-backups.md b/examples/2.3.x/server-kotlin/java/mongo/list-backups.md new file mode 100644 index 000000000..5da453011 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/list-backups.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.listBackups( + "<DATABASE_ID>", // databaseId + List.of(), // queries (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/mongo/list-branches.md b/examples/2.3.x/server-kotlin/java/mongo/list-branches.md new file mode 100644 index 000000000..9560ee339 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/list-branches.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.listBranches( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..a54f416fc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/list-operations.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.listOperations( + "<DATABASE_ID>", // databaseId + "queued", // status (optional) + 1, // limit (optional) + 0, // offset (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/mongo/list-restorations.md b/examples/2.3.x/server-kotlin/java/mongo/list-restorations.md new file mode 100644 index 000000000..1b714093e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/list-restorations.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.listRestorations( + "<DATABASE_ID>", // databaseId + "pending", // status (optional) + "backup", // type (optional) + 1, // limit (optional) + 0, // offset (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/mongo/list-specifications.md b/examples/2.3.x/server-kotlin/java/mongo/list-specifications.md new file mode 100644 index 000000000..d364f858c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/list-specifications.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/list.md b/examples/2.3.x/server-kotlin/java/mongo/list.md new file mode 100644 index 000000000..4f2351ce1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/list.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.list( + List.of(), // queries (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/mongo/update-backup-policy.md b/examples/2.3.x/server-kotlin/java/mongo/update-backup-policy.md new file mode 100644 index 000000000..976f4f077 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/update-backup-policy.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.updateBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + "<NAME>", // name (optional) + "", // schedule (optional) + 1, // retention (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/mongo/update-backup-storage.md b/examples/2.3.x/server-kotlin/java/mongo/update-backup-storage.md new file mode 100644 index 000000000..1b054dc47 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/update-backup-storage.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.updateBackupStorage( + "<DATABASE_ID>", // databaseId + "s3", // provider + "<BUCKET>", // bucket + "<ACCESS_KEY>", // accessKey + "<SECRET_KEY>", // secretKey + "<REGION>", // region (optional) + "<PREFIX>", // prefix (optional) + "<ENDPOINT>", // endpoint (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/mongo/update-credentials.md b/examples/2.3.x/server-kotlin/java/mongo/update-credentials.md new file mode 100644 index 000000000..81cf1104c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/update-credentials.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.updateCredentials( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..fd3ea6a7b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/update-maintenance.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.updateMaintenance( + "<DATABASE_ID>", // databaseId + "sun", // day + 0, // hourUtc + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mongo/update.md b/examples/2.3.x/server-kotlin/java/mongo/update.md new file mode 100644 index 000000000..e5bb32e2a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mongo/update.md @@ -0,0 +1,45 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mongo; + +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 + +Mongo mongo = new Mongo(client); + +mongo.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name (optional) + "ready", // status (optional) + "<SPECIFICATION>", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (optional) + 60, // networkIdleTimeoutSeconds (optional) + List.of(), // networkIPAllowlist (optional) + 5, // idleTimeoutMinutes (optional) + false, // pitr (optional) + 1, // pitrRetentionDays (optional) + false, // storageAutoscaling (optional) + 50, // storageAutoscalingThresholdPercent (optional) + 0, // storageAutoscalingMaxGb (optional) + 0, // metricsTraceSampleRate (optional) + 0, // metricsSlowQueryLogThresholdMs (optional) + false, // sqlApiEnabled (optional) + List.of(), // sqlApiAllowedStatements (optional) + 1, // sqlApiMaxRows (optional) + 1024, // sqlApiMaxBytes (optional) + 1, // sqlApiTimeoutSeconds (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/mysql/create-backup-policy.md b/examples/2.3.x/server-kotlin/java/mysql/create-backup-policy.md new file mode 100644 index 000000000..c419db167 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create-backup-policy.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.createBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + "<NAME>", // name + "", // schedule + 1, // retention + "full", // type (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/mysql/create-backup.md b/examples/2.3.x/server-kotlin/java/mysql/create-backup.md new file mode 100644 index 000000000..1dea079a1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.createBackup( + "<DATABASE_ID>", // databaseId + "full", // type (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/mysql/create-branch.md b/examples/2.3.x/server-kotlin/java/mysql/create-branch.md new file mode 100644 index 000000000..5b8798941 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create-branch.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.createBranch( + "<DATABASE_ID>", // databaseId + "<BRANCH_ID>", // branchId (optional) + 300, // ttl (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/mysql/create-execution.md b/examples/2.3.x/server-kotlin/java/mysql/create-execution.md new file mode 100644 index 000000000..ecf9d48c8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create-execution.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.createExecution( + "<DATABASE_ID>", // databaseId + "<SQL>", // sql + Map.of("a", "b"), // bindings (optional) + 1, // timeoutSeconds (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/mysql/create-failover.md b/examples/2.3.x/server-kotlin/java/mysql/create-failover.md new file mode 100644 index 000000000..daf6e3f91 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create-failover.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.createFailover( + "<DATABASE_ID>", // databaseId + "<TARGET_REPLICA_ID>", // targetReplicaId (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/mysql/create-migration.md b/examples/2.3.x/server-kotlin/java/mysql/create-migration.md new file mode 100644 index 000000000..e69ed2608 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create-migration.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.createMigration( + "<DATABASE_ID>", // databaseId + "shared", // targetType + "<SPECIFICATION>", // specification (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/mysql/create-restoration.md b/examples/2.3.x/server-kotlin/java/mysql/create-restoration.md new file mode 100644 index 000000000..347ecfd0f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create-restoration.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.createRestoration( + "<DATABASE_ID>", // databaseId + "backup", // type (optional) + "<BACKUP_ID>", // backupId (optional) + "<TARGET_DATABASE_ID>", // targetDatabaseId (optional) + "2020-10-15T06:38:00.000+00:00", // targetTime (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/mysql/create-upgrade.md b/examples/2.3.x/server-kotlin/java/mysql/create-upgrade.md new file mode 100644 index 000000000..1fd2dce7b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create-upgrade.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.createUpgrade( + "<DATABASE_ID>", // databaseId + "<TARGET_VERSION>", // targetVersion + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/create.md b/examples/2.3.x/server-kotlin/java/mysql/create.md new file mode 100644 index 000000000..9017b6c9b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/create.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + "17", // version (optional) + "<SPECIFICATION>", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (optional) + 60, // networkIdleTimeoutSeconds (optional) + List.of(), // networkIPAllowlist (optional) + 5, // idleTimeoutMinutes (optional) + false, // pitr (optional) + 1, // pitrRetentionDays (optional) + false, // storageAutoscaling (optional) + 50, // storageAutoscalingThresholdPercent (optional) + 0, // storageAutoscalingMaxGb (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/mysql/delete-backup-policy.md b/examples/2.3.x/server-kotlin/java/mysql/delete-backup-policy.md new file mode 100644 index 000000000..8b91d21e8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/delete-backup-policy.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.deleteBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/delete-backup.md b/examples/2.3.x/server-kotlin/java/mysql/delete-backup.md new file mode 100644 index 000000000..fdb4274e8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/delete-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.deleteBackup( + "<DATABASE_ID>", // databaseId + "<BACKUP_ID>", // backupId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/delete-branch.md b/examples/2.3.x/server-kotlin/java/mysql/delete-branch.md new file mode 100644 index 000000000..c173490ed --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/delete-branch.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.deleteBranch( + "<DATABASE_ID>", // databaseId + "<BRANCH_ID>", // branchId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/delete.md b/examples/2.3.x/server-kotlin/java/mysql/delete.md new file mode 100644 index 000000000..63c0066ec --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/get-backup-policy.md b/examples/2.3.x/server-kotlin/java/mysql/get-backup-policy.md new file mode 100644 index 000000000..a5fc971aa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/get-backup-policy.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.getBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/get-backup.md b/examples/2.3.x/server-kotlin/java/mysql/get-backup.md new file mode 100644 index 000000000..84158f68f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/get-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.getBackup( + "<DATABASE_ID>", // databaseId + "<BACKUP_ID>", // backupId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/get-pitr.md b/examples/2.3.x/server-kotlin/java/mysql/get-pitr.md new file mode 100644 index 000000000..ebeccdd10 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/get-pitr.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.getPitr( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/get-pooler.md b/examples/2.3.x/server-kotlin/java/mysql/get-pooler.md new file mode 100644 index 000000000..6c1ed2e61 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/get-pooler.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.getPooler( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/get-replicas.md b/examples/2.3.x/server-kotlin/java/mysql/get-replicas.md new file mode 100644 index 000000000..09f19f5d0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/get-replicas.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.getReplicas( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/get-restoration.md b/examples/2.3.x/server-kotlin/java/mysql/get-restoration.md new file mode 100644 index 000000000..bae25046b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/get-restoration.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.getRestoration( + "<DATABASE_ID>", // databaseId + "<RESTORATION_ID>", // restorationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/get-status.md b/examples/2.3.x/server-kotlin/java/mysql/get-status.md new file mode 100644 index 000000000..cfc5e2e61 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/get-status.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.getStatus( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/get.md b/examples/2.3.x/server-kotlin/java/mysql/get.md new file mode 100644 index 000000000..4ee57e4d8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/list-backup-policies.md b/examples/2.3.x/server-kotlin/java/mysql/list-backup-policies.md new file mode 100644 index 000000000..fc3c8d6b6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/list-backup-policies.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.listBackupPolicies( + "<DATABASE_ID>", // databaseId + List.of(), // queries (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/mysql/list-backups.md b/examples/2.3.x/server-kotlin/java/mysql/list-backups.md new file mode 100644 index 000000000..df2ec47e9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/list-backups.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.listBackups( + "<DATABASE_ID>", // databaseId + List.of(), // queries (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/mysql/list-branches.md b/examples/2.3.x/server-kotlin/java/mysql/list-branches.md new file mode 100644 index 000000000..549e079ce --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/list-branches.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.listBranches( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..199611a9a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/list-operations.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.listOperations( + "<DATABASE_ID>", // databaseId + "queued", // status (optional) + 1, // limit (optional) + 0, // offset (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/mysql/list-restorations.md b/examples/2.3.x/server-kotlin/java/mysql/list-restorations.md new file mode 100644 index 000000000..6f852b7cd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/list-restorations.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.listRestorations( + "<DATABASE_ID>", // databaseId + "pending", // status (optional) + "backup", // type (optional) + 1, // limit (optional) + 0, // offset (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/mysql/list-specifications.md b/examples/2.3.x/server-kotlin/java/mysql/list-specifications.md new file mode 100644 index 000000000..2d0c3cb52 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/list-specifications.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/mysql/list.md b/examples/2.3.x/server-kotlin/java/mysql/list.md new file mode 100644 index 000000000..015fec4bb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/list.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.list( + List.of(), // queries (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/mysql/update-backup-policy.md b/examples/2.3.x/server-kotlin/java/mysql/update-backup-policy.md new file mode 100644 index 000000000..6496629a2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/update-backup-policy.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.updateBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + "<NAME>", // name (optional) + "", // schedule (optional) + 1, // retention (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/mysql/update-backup-storage.md b/examples/2.3.x/server-kotlin/java/mysql/update-backup-storage.md new file mode 100644 index 000000000..6f76b9cc2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/update-backup-storage.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.updateBackupStorage( + "<DATABASE_ID>", // databaseId + "s3", // provider + "<BUCKET>", // bucket + "<ACCESS_KEY>", // accessKey + "<SECRET_KEY>", // secretKey + "<REGION>", // region (optional) + "<PREFIX>", // prefix (optional) + "<ENDPOINT>", // endpoint (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/mysql/update-credentials.md b/examples/2.3.x/server-kotlin/java/mysql/update-credentials.md new file mode 100644 index 000000000..e0e745fdb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/update-credentials.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.updateCredentials( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..a1fdc41ff --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/update-maintenance.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.updateMaintenance( + "<DATABASE_ID>", // databaseId + "sun", // day + 0, // hourUtc + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..1eaf09c02 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/update-pooler.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.updatePooler( + "<DATABASE_ID>", // databaseId + "transaction", // mode (optional) + 10, // maxConnections (optional) + 1, // defaultPoolSize (optional) + false, // readWriteSplitting (optional) + "<POOLER_CPU_REQUEST>", // poolerCpuRequest (optional) + "<POOLER_CPU_LIMIT>", // poolerCpuLimit (optional) + "<POOLER_MEMORY_REQUEST>", // poolerMemoryRequest (optional) + "<POOLER_MEMORY_LIMIT>", // poolerMemoryLimit (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/mysql/update.md b/examples/2.3.x/server-kotlin/java/mysql/update.md new file mode 100644 index 000000000..32a2b48e2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/mysql/update.md @@ -0,0 +1,45 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Mysql; + +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 + +Mysql mysql = new Mysql(client); + +mysql.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name (optional) + "ready", // status (optional) + "<SPECIFICATION>", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (optional) + 60, // networkIdleTimeoutSeconds (optional) + List.of(), // networkIPAllowlist (optional) + 5, // idleTimeoutMinutes (optional) + false, // pitr (optional) + 1, // pitrRetentionDays (optional) + false, // storageAutoscaling (optional) + 50, // storageAutoscalingThresholdPercent (optional) + 0, // storageAutoscalingMaxGb (optional) + 0, // metricsTraceSampleRate (optional) + 0, // metricsSlowQueryLogThresholdMs (optional) + false, // sqlApiEnabled (optional) + List.of(), // sqlApiAllowedStatements (optional) + 1, // sqlApiMaxRows (optional) + 1024, // sqlApiMaxBytes (optional) + 1, // sqlApiTimeoutSeconds (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/approve.md b/examples/2.3.x/server-kotlin/java/oauth2/approve.md new file mode 100644 index 000000000..853e4731c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/approve.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.approve( + "<GRANT_ID>", // grant_id + "<AUTHORIZATION_DETAILS>", // authorization_details (optional) + "<SCOPE>", // scope (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/authorize-post.md b/examples/2.3.x/server-kotlin/java/oauth2/authorize-post.md new file mode 100644 index 000000000..2818bca17 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/authorize-post.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.authorizePost( + "<CLIENT_ID>", // client_id (optional) + "https://example.com", // redirect_uri (optional) + "", // response_type (optional) + "<SCOPE>", // scope (optional) + "<STATE>", // state (optional) + "<NONCE>", // nonce (optional) + "<CODE_CHALLENGE>", // code_challenge (optional) + "s256", // code_challenge_method (optional) + "<PROMPT>", // prompt (optional) + 0, // max_age (optional) + "<AUTHORIZATION_DETAILS>", // authorization_details (optional) + "", // resource (optional) + "<AUDIENCE>", // audience (optional) + "<REQUEST_URI>", // request_uri (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/authorize.md b/examples/2.3.x/server-kotlin/java/oauth2/authorize.md new file mode 100644 index 000000000..4c43fc45c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/authorize.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.authorize( + "<CLIENT_ID>", // client_id (optional) + "https://example.com", // redirect_uri (optional) + "", // response_type (optional) + "<SCOPE>", // scope (optional) + "<STATE>", // state (optional) + "<NONCE>", // nonce (optional) + "<CODE_CHALLENGE>", // code_challenge (optional) + "s256", // code_challenge_method (optional) + "<PROMPT>", // prompt (optional) + 0, // max_age (optional) + "<AUTHORIZATION_DETAILS>", // authorization_details (optional) + "", // resource (optional) + "<AUDIENCE>", // audience (optional) + "<REQUEST_URI>", // request_uri (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/create-device-authorization.md b/examples/2.3.x/server-kotlin/java/oauth2/create-device-authorization.md new file mode 100644 index 000000000..616fa537a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/create-device-authorization.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createDeviceAuthorization( + "<CLIENT_ID>", // client_id (optional) + "<SCOPE>", // scope (optional) + "<AUTHORIZATION_DETAILS>", // authorization_details (optional) + "", // resource (optional) + "<AUDIENCE>", // audience (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/create-grant.md b/examples/2.3.x/server-kotlin/java/oauth2/create-grant.md new file mode 100644 index 000000000..52586282a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/create-grant.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createGrant( + "<USER_CODE>", // user_code + 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/create-par.md b/examples/2.3.x/server-kotlin/java/oauth2/create-par.md new file mode 100644 index 000000000..4e26ea3ed --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/create-par.md @@ -0,0 +1,37 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createPAR( + "<CLIENT_ID>", // client_id + "https://example.com", // redirect_uri + "code", // response_type + "<SCOPE>", // scope (optional) + "<STATE>", // state (optional) + "<NONCE>", // nonce (optional) + "<CODE_CHALLENGE>", // code_challenge (optional) + "s256", // code_challenge_method (optional) + "<PROMPT>", // prompt (optional) + 0, // max_age (optional) + "<AUTHORIZATION_DETAILS>", // authorization_details (optional) + "", // resource (optional) + "<AUDIENCE>", // audience (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/create-token.md b/examples/2.3.x/server-kotlin/java/oauth2/create-token.md new file mode 100644 index 000000000..c84721adc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/create-token.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createToken( + "<GRANT_TYPE>", // 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) + "https://example.com", // redirect_uri (optional) + "", // resource (optional) + "<AUDIENCE>", // audience (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/get-grant.md b/examples/2.3.x/server-kotlin/java/oauth2/get-grant.md new file mode 100644 index 000000000..317717b8e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/get-grant.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.getGrant( + "<GRANT_ID>", // grant_id + 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 new file mode 100644 index 000000000..80ff8c445 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/list-organizations.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.listOrganizations( + 1, // limit (optional) + 0, // offset (optional) + "<SEARCH>", // search (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-projects.md b/examples/2.3.x/server-kotlin/java/oauth2/list-projects.md new file mode 100644 index 000000000..6f712d3d1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/list-projects.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.listProjects( + 1, // limit (optional) + 0, // offset (optional) + "<SEARCH>", // search (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/reject.md b/examples/2.3.x/server-kotlin/java/oauth2/reject.md new file mode 100644 index 000000000..47bc5e34d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/reject.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.reject( + "<GRANT_ID>", // grant_id + 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/revoke.md b/examples/2.3.x/server-kotlin/java/oauth2/revoke.md new file mode 100644 index 000000000..183037248 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/revoke.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.revoke( + "<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/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-kotlin/java/organization/create-ephemeral-project-key.md new file mode 100644 index 000000000..8530b4eca --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/create-ephemeral-project-key.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; +import io.appwrite.enums.ProjectKeyScopes; + +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 + +Organization organization = new Organization(client); + +organization.createEphemeralProjectKey( + "<PROJECT_ID>", // projectId + List.of(ProjectKeyScopes.PROJECT_READ), // scopes + 600, // duration + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/create-installation.md b/examples/2.3.x/server-kotlin/java/organization/create-installation.md new file mode 100644 index 000000000..de3e8f5fd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/create-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.createInstallation( + "<APP_ID>", // appId + "<AUTHORIZATION_DETAILS>", // authorizationDetails (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/organization/create-membership.md b/examples/2.3.x/server-kotlin/java/organization/create-membership.md new file mode 100644 index 000000000..9ab66c569 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/create-membership.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +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 + +Organization organization = new Organization(client); + +organization.createMembership( + List.of(), // roles + "email@example.com", // email (optional) + "<USER_ID>", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "<NAME>", // name (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/organization/create-project.md b/examples/2.3.x/server-kotlin/java/organization/create-project.md new file mode 100644 index 000000000..7a8180ea4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/create-project.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; +import io.appwrite.enums.Region; + +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 + +Organization organization = new Organization(client); + +organization.createProject( + "<PROJECT_ID>", // projectId + "<NAME>", // name + Region.FRA, // region (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/organization/delete-installation.md b/examples/2.3.x/server-kotlin/java/organization/delete-installation.md new file mode 100644 index 000000000..e0c33feb1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/delete-installation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.deleteInstallation( + "<INSTALLATION_ID>", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/delete-membership.md b/examples/2.3.x/server-kotlin/java/organization/delete-membership.md new file mode 100644 index 000000000..9f95bd467 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/delete-membership.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.deleteMembership( + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/delete-project-key.md b/examples/2.3.x/server-kotlin/java/organization/delete-project-key.md new file mode 100644 index 000000000..04bc459c1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/delete-project-key.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.deleteProjectKey( + "<PROJECT_ID>", // projectId + "<KEY_ID>", // keyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/delete-project.md b/examples/2.3.x/server-kotlin/java/organization/delete-project.md new file mode 100644 index 000000000..fd4595ad9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/delete-project.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.deleteProject( + "<PROJECT_ID>", // projectId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/delete.md b/examples/2.3.x/server-kotlin/java/organization/delete.md new file mode 100644 index 000000000..30561c853 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/delete.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +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 + +Organization organization = new Organization(client); + +organization.delete(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/get-installation.md b/examples/2.3.x/server-kotlin/java/organization/get-installation.md new file mode 100644 index 000000000..223b2498c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/get-installation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.getInstallation( + "<INSTALLATION_ID>", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/get-membership.md b/examples/2.3.x/server-kotlin/java/organization/get-membership.md new file mode 100644 index 000000000..3f87b5fbe --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/get-membership.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.getMembership( + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/get-project-key.md b/examples/2.3.x/server-kotlin/java/organization/get-project-key.md new file mode 100644 index 000000000..438f858c0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/get-project-key.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.getProjectKey( + "<PROJECT_ID>", // projectId + "<KEY_ID>", // keyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/get-project.md b/examples/2.3.x/server-kotlin/java/organization/get-project.md new file mode 100644 index 000000000..f291153a5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/get-project.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.getProject( + "<PROJECT_ID>", // projectId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/get.md b/examples/2.3.x/server-kotlin/java/organization/get.md new file mode 100644 index 000000000..a7aa3d402 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/get.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +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 + +Organization organization = new Organization(client); + +organization.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/list-installations.md b/examples/2.3.x/server-kotlin/java/organization/list-installations.md new file mode 100644 index 000000000..26f9c49d3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/list-installations.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.listInstallations( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/list-memberships.md b/examples/2.3.x/server-kotlin/java/organization/list-memberships.md new file mode 100644 index 000000000..f988ac1d3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/list-memberships.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +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 + +Organization organization = new Organization(client); + +organization.listMemberships( + 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/organization/list-project-keys.md b/examples/2.3.x/server-kotlin/java/organization/list-project-keys.md new file mode 100644 index 000000000..9f9b2f7f5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/list-project-keys.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +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 + +Organization organization = new Organization(client); + +organization.listProjectKeys( + "<PROJECT_ID>", // projectId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/list-projects.md b/examples/2.3.x/server-kotlin/java/organization/list-projects.md new file mode 100644 index 000000000..ee6e14afc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/list-projects.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +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 + +Organization organization = new Organization(client); + +organization.listProjects( + 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/organization/update-installation.md b/examples/2.3.x/server-kotlin/java/organization/update-installation.md new file mode 100644 index 000000000..d8a704473 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/update-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.updateInstallation( + "<INSTALLATION_ID>", // installationId + "<AUTHORIZATION_DETAILS>", // authorizationDetails (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/organization/update-membership.md b/examples/2.3.x/server-kotlin/java/organization/update-membership.md new file mode 100644 index 000000000..5096b889a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/update-membership.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.updateMembership( + "<MEMBERSHIP_ID>", // membershipId + List.of(), // roles + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..30ad4c649 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/update-project-key.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; +import io.appwrite.enums.ProjectKeyScopes; + +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 + +Organization organization = new Organization(client); + +organization.updateProjectKey( + "<PROJECT_ID>", // projectId + "<KEY_ID>", // keyId + "<NAME>", // name + List.of(ProjectKeyScopes.PROJECT_READ), // scopes + "2020-10-15T06:38:00.000+00:00", // expire (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/organization/update-project.md b/examples/2.3.x/server-kotlin/java/organization/update-project.md new file mode 100644 index 000000000..b39fe3917 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/update-project.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.updateProject( + "<PROJECT_ID>", // projectId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/organization/update.md b/examples/2.3.x/server-kotlin/java/organization/update.md new file mode 100644 index 000000000..60db9f16c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/organization/update.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Organization organization = new Organization(client); + +organization.update( + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..fb9715a41 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-backup-policy.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + "<NAME>", // name + "", // schedule + 1, // retention + "full", // type (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/postgresql/create-backup.md b/examples/2.3.x/server-kotlin/java/postgresql/create-backup.md new file mode 100644 index 000000000..fa71621ba --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createBackup( + "<DATABASE_ID>", // databaseId + "full", // type (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/postgresql/create-branch.md b/examples/2.3.x/server-kotlin/java/postgresql/create-branch.md new file mode 100644 index 000000000..0c8fb8372 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-branch.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createBranch( + "<DATABASE_ID>", // databaseId + "<BRANCH_ID>", // branchId (optional) + 300, // ttl (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/postgresql/create-execution.md b/examples/2.3.x/server-kotlin/java/postgresql/create-execution.md new file mode 100644 index 000000000..4ea6a48b5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-execution.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createExecution( + "<DATABASE_ID>", // databaseId + "<SQL>", // sql + Map.of("a", "b"), // bindings (optional) + 1, // timeoutSeconds (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/postgresql/create-extension.md b/examples/2.3.x/server-kotlin/java/postgresql/create-extension.md new file mode 100644 index 000000000..f6a3e9278 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-extension.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createExtension( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/create-failover.md b/examples/2.3.x/server-kotlin/java/postgresql/create-failover.md new file mode 100644 index 000000000..79eef6c8e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-failover.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createFailover( + "<DATABASE_ID>", // databaseId + "<TARGET_REPLICA_ID>", // targetReplicaId (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/postgresql/create-migration.md b/examples/2.3.x/server-kotlin/java/postgresql/create-migration.md new file mode 100644 index 000000000..34d5da448 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-migration.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createMigration( + "<DATABASE_ID>", // databaseId + "shared", // targetType + "<SPECIFICATION>", // specification (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/postgresql/create-restoration.md b/examples/2.3.x/server-kotlin/java/postgresql/create-restoration.md new file mode 100644 index 000000000..25ec71984 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-restoration.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createRestoration( + "<DATABASE_ID>", // databaseId + "backup", // type (optional) + "<BACKUP_ID>", // backupId (optional) + "<TARGET_DATABASE_ID>", // targetDatabaseId (optional) + "2020-10-15T06:38:00.000+00:00", // targetTime (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/postgresql/create-upgrade.md b/examples/2.3.x/server-kotlin/java/postgresql/create-upgrade.md new file mode 100644 index 000000000..53d39d566 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-upgrade.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.createUpgrade( + "<DATABASE_ID>", // databaseId + "<TARGET_VERSION>", // targetVersion + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/create.md b/examples/2.3.x/server-kotlin/java/postgresql/create.md new file mode 100644 index 000000000..4bc32d31c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/create.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + "17", // version (optional) + "<SPECIFICATION>", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (optional) + 60, // networkIdleTimeoutSeconds (optional) + List.of(), // networkIPAllowlist (optional) + 5, // idleTimeoutMinutes (optional) + false, // pitr (optional) + 1, // pitrRetentionDays (optional) + false, // storageAutoscaling (optional) + 50, // storageAutoscalingThresholdPercent (optional) + 0, // storageAutoscalingMaxGb (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/postgresql/delete-backup-policy.md b/examples/2.3.x/server-kotlin/java/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..453a6f421 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/delete-backup-policy.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.deleteBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/delete-backup.md b/examples/2.3.x/server-kotlin/java/postgresql/delete-backup.md new file mode 100644 index 000000000..73ca3f79c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/delete-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.deleteBackup( + "<DATABASE_ID>", // databaseId + "<BACKUP_ID>", // backupId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/delete-branch.md b/examples/2.3.x/server-kotlin/java/postgresql/delete-branch.md new file mode 100644 index 000000000..f1c4333e3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/delete-branch.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.deleteBranch( + "<DATABASE_ID>", // databaseId + "<BRANCH_ID>", // branchId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/delete-extension.md b/examples/2.3.x/server-kotlin/java/postgresql/delete-extension.md new file mode 100644 index 000000000..5ac144263 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/delete-extension.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.deleteExtension( + "<DATABASE_ID>", // databaseId + "<EXTENSION_NAME>", // extensionName + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/delete.md b/examples/2.3.x/server-kotlin/java/postgresql/delete.md new file mode 100644 index 000000000..435336905 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/get-backup-policy.md b/examples/2.3.x/server-kotlin/java/postgresql/get-backup-policy.md new file mode 100644 index 000000000..229a446bc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/get-backup-policy.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.getBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/get-backup.md b/examples/2.3.x/server-kotlin/java/postgresql/get-backup.md new file mode 100644 index 000000000..58eb4d528 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/get-backup.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.getBackup( + "<DATABASE_ID>", // databaseId + "<BACKUP_ID>", // backupId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/get-pitr.md b/examples/2.3.x/server-kotlin/java/postgresql/get-pitr.md new file mode 100644 index 000000000..590c74e49 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/get-pitr.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.getPitr( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/get-pooler.md b/examples/2.3.x/server-kotlin/java/postgresql/get-pooler.md new file mode 100644 index 000000000..12187e5a0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/get-pooler.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.getPooler( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/get-replicas.md b/examples/2.3.x/server-kotlin/java/postgresql/get-replicas.md new file mode 100644 index 000000000..3013ddde3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/get-replicas.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.getReplicas( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/get-restoration.md b/examples/2.3.x/server-kotlin/java/postgresql/get-restoration.md new file mode 100644 index 000000000..4f988080f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/get-restoration.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.getRestoration( + "<DATABASE_ID>", // databaseId + "<RESTORATION_ID>", // restorationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/get-status.md b/examples/2.3.x/server-kotlin/java/postgresql/get-status.md new file mode 100644 index 000000000..e3bdd0746 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/get-status.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.getStatus( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/get.md b/examples/2.3.x/server-kotlin/java/postgresql/get.md new file mode 100644 index 000000000..7ef907d56 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/list-backup-policies.md b/examples/2.3.x/server-kotlin/java/postgresql/list-backup-policies.md new file mode 100644 index 000000000..07ad47c59 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-backup-policies.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.listBackupPolicies( + "<DATABASE_ID>", // databaseId + List.of(), // queries (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/postgresql/list-backups.md b/examples/2.3.x/server-kotlin/java/postgresql/list-backups.md new file mode 100644 index 000000000..0059a2bde --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-backups.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.listBackups( + "<DATABASE_ID>", // databaseId + List.of(), // queries (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/postgresql/list-branches.md b/examples/2.3.x/server-kotlin/java/postgresql/list-branches.md new file mode 100644 index 000000000..0bbc59496 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-branches.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.listBranches( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/list-extensions.md b/examples/2.3.x/server-kotlin/java/postgresql/list-extensions.md new file mode 100644 index 000000000..4996c3ed8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-extensions.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.listExtensions( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..3018a960b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-operations.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.listOperations( + "<DATABASE_ID>", // databaseId + "queued", // status (optional) + 1, // limit (optional) + 0, // offset (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/postgresql/list-restorations.md b/examples/2.3.x/server-kotlin/java/postgresql/list-restorations.md new file mode 100644 index 000000000..151f1dc94 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-restorations.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.listRestorations( + "<DATABASE_ID>", // databaseId + "pending", // status (optional) + "backup", // type (optional) + 1, // limit (optional) + 0, // offset (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/postgresql/list-specifications.md b/examples/2.3.x/server-kotlin/java/postgresql/list-specifications.md new file mode 100644 index 000000000..f36aa9943 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-specifications.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/postgresql/list.md b/examples/2.3.x/server-kotlin/java/postgresql/list.md new file mode 100644 index 000000000..b97b904c7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/list.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.list( + List.of(), // queries (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/postgresql/update-backup-policy.md b/examples/2.3.x/server-kotlin/java/postgresql/update-backup-policy.md new file mode 100644 index 000000000..fd21de689 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/update-backup-policy.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.updateBackupPolicy( + "<DATABASE_ID>", // databaseId + "<POLICY_ID>", // policyId + "<NAME>", // name (optional) + "", // schedule (optional) + 1, // retention (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/postgresql/update-backup-storage.md b/examples/2.3.x/server-kotlin/java/postgresql/update-backup-storage.md new file mode 100644 index 000000000..1b9752f6e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/update-backup-storage.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.updateBackupStorage( + "<DATABASE_ID>", // databaseId + "s3", // provider + "<BUCKET>", // bucket + "<ACCESS_KEY>", // accessKey + "<SECRET_KEY>", // secretKey + "<REGION>", // region (optional) + "<PREFIX>", // prefix (optional) + "<ENDPOINT>", // endpoint (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/postgresql/update-credentials.md b/examples/2.3.x/server-kotlin/java/postgresql/update-credentials.md new file mode 100644 index 000000000..b67ccac42 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/update-credentials.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.updateCredentials( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..471d0e278 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/update-maintenance.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.updateMaintenance( + "<DATABASE_ID>", // databaseId + "sun", // day + 0, // hourUtc + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..35fbadec9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/update-pooler.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.updatePooler( + "<DATABASE_ID>", // databaseId + "transaction", // mode (optional) + 10, // maxConnections (optional) + 1, // defaultPoolSize (optional) + false, // readWriteSplitting (optional) + "<POOLER_CPU_REQUEST>", // poolerCpuRequest (optional) + "<POOLER_CPU_LIMIT>", // poolerCpuLimit (optional) + "<POOLER_MEMORY_REQUEST>", // poolerMemoryRequest (optional) + "<POOLER_MEMORY_LIMIT>", // poolerMemoryLimit (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/postgresql/update.md b/examples/2.3.x/server-kotlin/java/postgresql/update.md new file mode 100644 index 000000000..a7b35cd64 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/postgresql/update.md @@ -0,0 +1,45 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Postgresql; + +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 + +Postgresql postgresql = new Postgresql(client); + +postgresql.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name (optional) + "ready", // status (optional) + "<SPECIFICATION>", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (optional) + 60, // networkIdleTimeoutSeconds (optional) + List.of(), // networkIPAllowlist (optional) + 5, // idleTimeoutMinutes (optional) + false, // pitr (optional) + 1, // pitrRetentionDays (optional) + false, // storageAutoscaling (optional) + 50, // storageAutoscalingThresholdPercent (optional) + 0, // storageAutoscalingMaxGb (optional) + 0, // metricsTraceSampleRate (optional) + 0, // metricsSlowQueryLogThresholdMs (optional) + false, // sqlApiEnabled (optional) + List.of(), // sqlApiAllowedStatements (optional) + 1, // sqlApiMaxRows (optional) + 1024, // sqlApiMaxBytes (optional) + 1, // sqlApiTimeoutSeconds (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/presences/delete.md b/examples/2.3.x/server-kotlin/java/presences/delete.md new file mode 100644 index 000000000..5c797c21a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/presences/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Presences; + +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 + +Presences presences = new Presences(client); + +presences.delete( + "<PRESENCE_ID>", // presenceId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/presences/get.md b/examples/2.3.x/server-kotlin/java/presences/get.md new file mode 100644 index 000000000..17868cec8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/presences/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Presences; + +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 + +Presences presences = new Presences(client); + +presences.get( + "<PRESENCE_ID>", // presenceId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/presences/list.md b/examples/2.3.x/server-kotlin/java/presences/list.md new file mode 100644 index 000000000..b43741d29 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/presences/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Presences; + +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 + +Presences presences = new Presences(client); + +presences.list( + List.of(), // queries (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/presences/update.md b/examples/2.3.x/server-kotlin/java/presences/update.md new file mode 100644 index 000000000..57cce92e2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/presences/update.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Presences; + +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 + +Presences presences = new Presences(client); + +presences.update( + "<PRESENCE_ID>", // presenceId + "<USER_ID>", // userId + "<STATUS>", // status (optional) + "2020-10-15T06:38:00.000+00:00", // expiresAt (optional) + Map.of("a", "b"), // metadata (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + false, // purge (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/presences/upsert.md b/examples/2.3.x/server-kotlin/java/presences/upsert.md new file mode 100644 index 000000000..df15d7080 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/presences/upsert.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Presences; + +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 + +Presences presences = new Presences(client); + +presences.upsert( + "<PRESENCE_ID>", // presenceId + "<USER_ID>", // userId + "<STATUS>", // status + List.of(Permission.read(Role.any())), // permissions (optional) + "2020-10-15T06:38:00.000+00:00", // expiresAt (optional) + Map.of("a", "b"), // metadata (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/create-android-platform.md b/examples/2.3.x/server-kotlin/java/project/create-android-platform.md new file mode 100644 index 000000000..61281f1c5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-android-platform.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.createAndroidPlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "<APPLICATION_ID>", // applicationId + 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/create-apple-platform.md b/examples/2.3.x/server-kotlin/java/project/create-apple-platform.md new file mode 100644 index 000000000..1e60e28ca --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-apple-platform.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.createApplePlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "<BUNDLE_IDENTIFIER>", // bundleIdentifier + 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/create-ephemeral-key.md b/examples/2.3.x/server-kotlin/java/project/create-ephemeral-key.md new file mode 100644 index 000000000..545e16d25 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-ephemeral-key.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectKeyScopes; + +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.createEphemeralKey( + List.of(ProjectKeyScopes.PROJECT_READ), // scopes + 600, // duration + 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/create-linux-platform.md b/examples/2.3.x/server-kotlin/java/project/create-linux-platform.md new file mode 100644 index 000000000..0b3355b31 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-linux-platform.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.createLinuxPlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "<PACKAGE_NAME>", // packageName + 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/create-mock-phone.md b/examples/2.3.x/server-kotlin/java/project/create-mock-phone.md new file mode 100644 index 000000000..44acac492 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-mock-phone.md @@ -0,0 +1,26 @@ +```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.createMockPhone( + "+12065550100", // number + "<OTP>", // otp + 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/create-smtp-test.md b/examples/2.3.x/server-kotlin/java/project/create-smtp-test.md new file mode 100644 index 000000000..e6a700663 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-smtp-test.md @@ -0,0 +1,25 @@ +```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.createSMTPTest( + List.of(), // emails + 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/create-variable.md b/examples/2.3.x/server-kotlin/java/project/create-variable.md new file mode 100644 index 000000000..62d7a4741 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-variable.md @@ -0,0 +1,28 @@ +```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.createVariable( + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value + false, // 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/project/create-web-platform.md b/examples/2.3.x/server-kotlin/java/project/create-web-platform.md new file mode 100644 index 000000000..efd4399cc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-web-platform.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.createWebPlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "app.example.com", // hostname + 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/create-windows-platform.md b/examples/2.3.x/server-kotlin/java/project/create-windows-platform.md new file mode 100644 index 000000000..a38b79e43 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/create-windows-platform.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.createWindowsPlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "<PACKAGE_IDENTIFIER_NAME>", // packageIdentifierName + 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/delete-key.md b/examples/2.3.x/server-kotlin/java/project/delete-key.md new file mode 100644 index 000000000..e0104face --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/delete-key.md @@ -0,0 +1,25 @@ +```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.deleteKey( + "<KEY_ID>", // keyId + 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/delete-mock-phone.md b/examples/2.3.x/server-kotlin/java/project/delete-mock-phone.md new file mode 100644 index 000000000..45bab07db --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/delete-mock-phone.md @@ -0,0 +1,25 @@ +```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.deleteMockPhone( + "+12065550100", // number + 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/delete-platform.md b/examples/2.3.x/server-kotlin/java/project/delete-platform.md new file mode 100644 index 000000000..93b15c9a3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/delete-platform.md @@ -0,0 +1,25 @@ +```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.deletePlatform( + "<PLATFORM_ID>", // platformId + 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/delete-variable.md b/examples/2.3.x/server-kotlin/java/project/delete-variable.md new file mode 100644 index 000000000..98ff61de2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/delete-variable.md @@ -0,0 +1,25 @@ +```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.deleteVariable( + "<VARIABLE_ID>", // variableId + 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/delete.md b/examples/2.3.x/server-kotlin/java/project/delete.md new file mode 100644 index 000000000..14b750998 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/delete.md @@ -0,0 +1,21 @@ +```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.delete(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/get-email-template.md b/examples/2.3.x/server-kotlin/java/project/get-email-template.md new file mode 100644 index 000000000..ee1e3811f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/get-email-template.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectEmailTemplateId; +import io.appwrite.enums.ProjectEmailTemplateLocale; + +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.getEmailTemplate( + ProjectEmailTemplateId.VERIFICATION, // templateId + ProjectEmailTemplateLocale.AF, // locale (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/get-key.md b/examples/2.3.x/server-kotlin/java/project/get-key.md new file mode 100644 index 000000000..23021b3f1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/get-key.md @@ -0,0 +1,25 @@ +```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.getKey( + "<KEY_ID>", // keyId + 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/get-mock-phone.md b/examples/2.3.x/server-kotlin/java/project/get-mock-phone.md new file mode 100644 index 000000000..3c7c98478 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/get-mock-phone.md @@ -0,0 +1,25 @@ +```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.getMockPhone( + "+12065550100", // number + 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/get-o-auth-2-provider.md b/examples/2.3.x/server-kotlin/java/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..cf3f9636d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/get-o-auth-2-provider.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuthProviderId; + +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.getOAuth2Provider( + ProjectOAuthProviderId.AMAZON, // providerId + 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/get-platform.md b/examples/2.3.x/server-kotlin/java/project/get-platform.md new file mode 100644 index 000000000..5eef86970 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/get-platform.md @@ -0,0 +1,25 @@ +```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.getPlatform( + "<PLATFORM_ID>", // platformId + 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/get-policy.md b/examples/2.3.x/server-kotlin/java/project/get-policy.md new file mode 100644 index 000000000..9252383f0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/get-policy.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectPolicyId; + +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.getPolicy( + ProjectPolicyId.PASSWORD_DICTIONARY, // policyId + 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/get-variable.md b/examples/2.3.x/server-kotlin/java/project/get-variable.md new file mode 100644 index 000000000..f922e278b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/get-variable.md @@ -0,0 +1,25 @@ +```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.getVariable( + "<VARIABLE_ID>", // variableId + 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/get.md b/examples/2.3.x/server-kotlin/java/project/get.md new file mode 100644 index 000000000..125c5bf5e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/get.md @@ -0,0 +1,21 @@ +```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.get(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/list-email-templates.md b/examples/2.3.x/server-kotlin/java/project/list-email-templates.md new file mode 100644 index 000000000..98fb6835f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/list-email-templates.md @@ -0,0 +1,26 @@ +```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.listEmailTemplates( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/project/list-keys.md b/examples/2.3.x/server-kotlin/java/project/list-keys.md new file mode 100644 index 000000000..30dfcccd3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/list-keys.md @@ -0,0 +1,26 @@ +```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.listKeys( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/project/list-mock-phones.md b/examples/2.3.x/server-kotlin/java/project/list-mock-phones.md new file mode 100644 index 000000000..9bcdde7aa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/list-mock-phones.md @@ -0,0 +1,26 @@ +```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.listMockPhones( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/project/list-o-auth-2-providers.md b/examples/2.3.x/server-kotlin/java/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..f68278a4b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/list-o-auth-2-providers.md @@ -0,0 +1,26 @@ +```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.listOAuth2Providers( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/project/list-platforms.md b/examples/2.3.x/server-kotlin/java/project/list-platforms.md new file mode 100644 index 000000000..6287ee5b2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/list-platforms.md @@ -0,0 +1,26 @@ +```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.listPlatforms( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/project/list-policies.md b/examples/2.3.x/server-kotlin/java/project/list-policies.md new file mode 100644 index 000000000..91757f4e3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/list-policies.md @@ -0,0 +1,26 @@ +```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.listPolicies( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/project/list-variables.md b/examples/2.3.x/server-kotlin/java/project/list-variables.md new file mode 100644 index 000000000..bfcfbd696 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/list-variables.md @@ -0,0 +1,26 @@ +```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.listVariables( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/project/update-android-platform.md b/examples/2.3.x/server-kotlin/java/project/update-android-platform.md new file mode 100644 index 000000000..96a6dc211 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-android-platform.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.updateAndroidPlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "<APPLICATION_ID>", // applicationId + 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-apple-platform.md b/examples/2.3.x/server-kotlin/java/project/update-apple-platform.md new file mode 100644 index 000000000..85c140326 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-apple-platform.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.updateApplePlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "<BUNDLE_IDENTIFIER>", // bundleIdentifier + 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-auth-method.md b/examples/2.3.x/server-kotlin/java/project/update-auth-method.md new file mode 100644 index 000000000..cc05ab051 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-auth-method.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectAuthMethodId; + +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.updateAuthMethod( + ProjectAuthMethodId.EMAIL_PASSWORD, // methodId + false, // enabled + 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-deny-aliased-email-policy.md b/examples/2.3.x/server-kotlin/java/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..407172c60 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-deny-aliased-email-policy.md @@ -0,0 +1,25 @@ +```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.updateDenyAliasedEmailPolicy( + false, // enabled + 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-deny-corporate-email-policy.md b/examples/2.3.x/server-kotlin/java/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..0f361336f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-deny-corporate-email-policy.md @@ -0,0 +1,25 @@ +```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.updateDenyCorporateEmailPolicy( + false, // enabled + 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-deny-disposable-email-policy.md b/examples/2.3.x/server-kotlin/java/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..8e5593975 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-deny-disposable-email-policy.md @@ -0,0 +1,25 @@ +```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.updateDenyDisposableEmailPolicy( + false, // enabled + 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-deny-free-email-policy.md b/examples/2.3.x/server-kotlin/java/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..412328bd5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-deny-free-email-policy.md @@ -0,0 +1,25 @@ +```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.updateDenyFreeEmailPolicy( + false, // enabled + 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-email-template.md b/examples/2.3.x/server-kotlin/java/project/update-email-template.md new file mode 100644 index 000000000..b0b2302f5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-email-template.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectEmailTemplateId; +import io.appwrite.enums.ProjectEmailTemplateLocale; + +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.updateEmailTemplate( + ProjectEmailTemplateId.VERIFICATION, // templateId + ProjectEmailTemplateLocale.AF, // locale (optional) + "<SUBJECT>", // subject (optional) + "<MESSAGE>", // message (optional) + "<SENDER_NAME>", // senderName (optional) + "email@example.com", // senderEmail (optional) + "email@example.com", // replyToEmail (optional) + "<REPLY_TO_NAME>", // replyToName (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-key.md b/examples/2.3.x/server-kotlin/java/project/update-key.md new file mode 100644 index 000000000..4fa79bbbb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-key.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectKeyScopes; + +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.updateKey( + "<KEY_ID>", // keyId + "<NAME>", // name + List.of(ProjectKeyScopes.PROJECT_READ), // scopes + "2020-10-15T06:38:00.000+00:00", // expire (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-labels.md b/examples/2.3.x/server-kotlin/java/project/update-labels.md new file mode 100644 index 000000000..c8c9e1bce --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-labels.md @@ -0,0 +1,25 @@ +```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.updateLabels( + List.of(), // labels + 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-linux-platform.md b/examples/2.3.x/server-kotlin/java/project/update-linux-platform.md new file mode 100644 index 000000000..589ed969f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-linux-platform.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.updateLinuxPlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "<PACKAGE_NAME>", // packageName + 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-membership-privacy-policy.md b/examples/2.3.x/server-kotlin/java/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..04f9daab6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-membership-privacy-policy.md @@ -0,0 +1,30 @@ +```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.updateMembershipPrivacyPolicy( + false, // userId (optional) + false, // userEmail (optional) + false, // userPhone (optional) + false, // userName (optional) + false, // userMFA (optional) + false, // userAccessedAt (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-mfa-factors-policy.md b/examples/2.3.x/server-kotlin/java/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..24b35d06c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-mfa-factors-policy.md @@ -0,0 +1,28 @@ +```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.updateMFAFactorsPolicy( + false, // totp (optional) + false, // email (optional) + false, // phone (optional) + false, // custom (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-mock-phone.md b/examples/2.3.x/server-kotlin/java/project/update-mock-phone.md new file mode 100644 index 000000000..adc75fb9c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-mock-phone.md @@ -0,0 +1,26 @@ +```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.updateMockPhone( + "+12065550100", // number + "<OTP>", // otp + 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-amazon.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..b58b0114b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-amazon.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.updateOAuth2Amazon( + "<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-apple.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..73fc58672 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-apple.md @@ -0,0 +1,31 @@ +```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.updateOAuth2Apple( + "<SERVICE_ID>", // serviceId (optional) + "<KEY_ID>", // keyId (optional) + "<TEAM_ID>", // teamId (optional) + "<P8_FILE>", // p8File (optional) + List.of(), // nativeClientIds (optional) + false, // enabled (optional) + false, // nativeEnabled (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-appwrite.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..d54371801 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-appwrite.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.updateOAuth2Appwrite( + "<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-auth-0.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..c14a8ef5f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-auth-0.md @@ -0,0 +1,28 @@ +```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.updateOAuth2Auth0( + "<CLIENT_ID>", // clientId (optional) + "<CLIENT_SECRET>", // clientSecret (optional) + "<ENDPOINT>", // endpoint (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-authentik.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..cfbe273a5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-authentik.md @@ -0,0 +1,28 @@ +```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.updateOAuth2Authentik( + "<CLIENT_ID>", // clientId (optional) + "<CLIENT_SECRET>", // clientSecret (optional) + "<ENDPOINT>", // endpoint (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-autodesk.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..605750d31 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-autodesk.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.updateOAuth2Autodesk( + "<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-bitbucket.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..6fe51fd80 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-bitbucket.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.updateOAuth2Bitbucket( + "<KEY>", // key (optional) + "<SECRET>", // secret (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-bitly.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..a3c14ddc9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-bitly.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.updateOAuth2Bitly( + "<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-box.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-box.md new file mode 100644 index 000000000..03418f17e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-box.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.updateOAuth2Box( + "<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-cloudflare.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..49893a007 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-cloudflare.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.updateOAuth2Cloudflare( + "<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-dailymotion.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..0db1d9a05 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-dailymotion.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.updateOAuth2Dailymotion( + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (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-discord.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-discord.md new file mode 100644 index 000000000..82139314b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-discord.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.updateOAuth2Discord( + "<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-disqus.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..d29dc872a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-disqus.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.updateOAuth2Disqus( + "<PUBLIC_KEY>", // publicKey (optional) + "<SECRET_KEY>", // secretKey (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-dropbox.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..0545a5817 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-dropbox.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.updateOAuth2Dropbox( + "<APP_KEY>", // appKey (optional) + "<APP_SECRET>", // appSecret (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-etsy.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..9e64828ae --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-etsy.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.updateOAuth2Etsy( + "<KEY_STRING>", // keyString (optional) + "<SHARED_SECRET>", // sharedSecret (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-facebook.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..abfc06375 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-facebook.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.updateOAuth2Facebook( + "<APP_ID>", // appId (optional) + "<APP_SECRET>", // appSecret (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-figma.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..df58f04bc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-figma.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.updateOAuth2Figma( + "<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-fusion-auth.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..ae251db37 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,28 @@ +```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.updateOAuth2FusionAuth( + "<CLIENT_ID>", // clientId (optional) + "<CLIENT_SECRET>", // clientSecret (optional) + "<ENDPOINT>", // endpoint (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-git-hub.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-git-hub.md new file mode 100644 index 000000000..e795770a5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-git-hub.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.updateOAuth2GitHub( + "<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-gitlab.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..f61e79736 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-gitlab.md @@ -0,0 +1,28 @@ +```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.updateOAuth2Gitlab( + "<APPLICATION_ID>", // applicationId (optional) + "<SECRET>", // secret (optional) + "https://example.com", // endpoint (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-google.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-google.md new file mode 100644 index 000000000..4a782df03 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-google.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2GooglePrompt; + +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.updateOAuth2Google( + "<CLIENT_ID>", // clientId (optional) + "<CLIENT_SECRET>", // clientSecret (optional) + List.of(ProjectOAuth2GooglePrompt.NONE), // prompt (optional) + List.of(), // nativeClientIds (optional) + false, // enabled (optional) + false, // nativeEnabled (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-hugging-face.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..6716eb50f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-hugging-face.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.updateOAuth2HuggingFace( + "<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-kakao.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..da93f607b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-kakao.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.updateOAuth2Kakao( + "<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-keycloak.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..bf5e16f70 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-keycloak.md @@ -0,0 +1,29 @@ +```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.updateOAuth2Keycloak( + "<CLIENT_ID>", // clientId (optional) + "<CLIENT_SECRET>", // clientSecret (optional) + "<ENDPOINT>", // endpoint (optional) + "<REALM_NAME>", // realmName (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-kick.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..9c771b89f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-kick.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.updateOAuth2Kick( + "<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-linkedin.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..4f7db46a2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-linkedin.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.updateOAuth2Linkedin( + "<CLIENT_ID>", // clientId (optional) + "<PRIMARY_CLIENT_SECRET>", // primaryClientSecret (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-microsoft.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-microsoft.md new file mode 100644 index 000000000..801cc7c8a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-microsoft.md @@ -0,0 +1,28 @@ +```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.updateOAuth2Microsoft( + "<APPLICATION_ID>", // applicationId (optional) + "<APPLICATION_SECRET>", // applicationSecret (optional) + "<TENANT>", // tenant (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-notion.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..6f898dbe9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-notion.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.updateOAuth2Notion( + "<OAUTH_CLIENT_ID>", // oauthClientId (optional) + "<OAUTH_CLIENT_SECRET>", // oauthClientSecret (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-oidc.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..033173877 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-oidc.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2OidcPrompt; + +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.updateOAuth2Oidc( + "<CLIENT_ID>", // clientId (optional) + "<CLIENT_SECRET>", // clientSecret (optional) + "https://example.com", // wellKnownURL (optional) + "https://example.com", // authorizationURL (optional) + "https://example.com", // tokenURL (optional) + "https://example.com", // userInfoURL (optional) + List.of(ProjectOAuth2OidcPrompt.NONE), // prompt (optional) + 0, // maxAge (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-okta.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-okta.md new file mode 100644 index 000000000..588894314 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-okta.md @@ -0,0 +1,29 @@ +```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.updateOAuth2Okta( + "<CLIENT_ID>", // clientId (optional) + "<CLIENT_SECRET>", // clientSecret (optional) + "example.com", // domain (optional) + "<AUTHORIZATION_SERVER_ID>", // authorizationServerId (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-paypal-sandbox.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..2e1b8a5d2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-paypal-sandbox.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.updateOAuth2PaypalSandbox( + "<CLIENT_ID>", // clientId (optional) + "<SECRET_KEY>", // secretKey (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-paypal.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..6169ad05a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-paypal.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.updateOAuth2Paypal( + "<CLIENT_ID>", // clientId (optional) + "<SECRET_KEY>", // secretKey (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-podio.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..40da7cabd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-podio.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.updateOAuth2Podio( + "<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-resend.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..dca02bcd5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-resend.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.updateOAuth2Resend( + "<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-salesforce.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..e6aa570af --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-salesforce.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.updateOAuth2Salesforce( + "<CUSTOMER_KEY>", // customerKey (optional) + "<CUSTOMER_SECRET>", // customerSecret (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-server.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-server.md new file mode 100644 index 000000000..df21916b6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-server.md @@ -0,0 +1,40 @@ +```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.updateOAuth2Server( + false, // enabled + "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) + false, // confidentialPkce (optional) + "https://example.com", // verificationUrl (optional) + 6, // userCodeLength (optional) + "numeric", // userCodeFormat (optional) + 60, // deviceCodeDuration (optional) + List.of(), // defaultScopes (optional) + List.of(), // installationScopes (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-slack.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..c62f48bca --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-slack.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.updateOAuth2Slack( + "<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-spotify.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..85eef6a3a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-spotify.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.updateOAuth2Spotify( + "<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-stripe.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..c6c8a7357 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-stripe.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.updateOAuth2Stripe( + "<CLIENT_ID>", // clientId (optional) + "<API_SECRET_KEY>", // apiSecretKey (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-tik-tok.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..e372e0644 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-tik-tok.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.updateOAuth2TikTok( + "<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-tradeshift-sandbox.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..ca9f55c03 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-tradeshift-sandbox.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.updateOAuth2TradeshiftSandbox( + "<OAUTH2_CLIENT_ID>", // oauth2ClientId (optional) + "<OAUTH2_CLIENT_SECRET>", // oauth2ClientSecret (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-tradeshift.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..9ab62a476 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-tradeshift.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.updateOAuth2Tradeshift( + "<OAUTH2_CLIENT_ID>", // oauth2ClientId (optional) + "<OAUTH2_CLIENT_SECRET>", // oauth2ClientSecret (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-twitch.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..4bc43d006 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-twitch.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.updateOAuth2Twitch( + "<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-word-press.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..06a9745a7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-word-press.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.updateOAuth2WordPress( + "<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-yahoo.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..db93ec6e7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-yahoo.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.updateOAuth2Yahoo( + "<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-yandex.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..cf4c4500e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-yandex.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.updateOAuth2Yandex( + "<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 new file mode 100644 index 000000000..c8c5e1362 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-zoho.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.updateOAuth2Zoho( + "<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-zoom.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..b809dc018 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-zoom.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.updateOAuth2Zoom( + "<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-2x.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2x.md new file mode 100644 index 000000000..d59ea9806 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2x.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.updateOAuth2X( + "<CUSTOMER_KEY>", // customerKey (optional) + "<SECRET_KEY>", // secretKey (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-password-dictionary-policy.md b/examples/2.3.x/server-kotlin/java/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..27879b99e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-password-dictionary-policy.md @@ -0,0 +1,25 @@ +```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.updatePasswordDictionaryPolicy( + false, // enabled + 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-password-history-policy.md b/examples/2.3.x/server-kotlin/java/project/update-password-history-policy.md new file mode 100644 index 000000000..e873c7f8f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-password-history-policy.md @@ -0,0 +1,25 @@ +```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.updatePasswordHistoryPolicy( + 1, // total + 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-password-personal-data-policy.md b/examples/2.3.x/server-kotlin/java/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..15c277ebd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-password-personal-data-policy.md @@ -0,0 +1,25 @@ +```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.updatePasswordPersonalDataPolicy( + false, // enabled + 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-password-pwned-policy.md b/examples/2.3.x/server-kotlin/java/project/update-password-pwned-policy.md new file mode 100644 index 000000000..2b360ed4c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-password-pwned-policy.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.updatePasswordPwnedPolicy( + false, // enabled (optional) + false, // sessions (optional) + false, // users (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-password-strength-policy.md b/examples/2.3.x/server-kotlin/java/project/update-password-strength-policy.md new file mode 100644 index 000000000..a147d52d8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-password-strength-policy.md @@ -0,0 +1,29 @@ +```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.updatePasswordStrengthPolicy( + 8, // min (optional) + false, // uppercase (optional) + false, // lowercase (optional) + false, // number (optional) + false, // symbols (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-protocol.md b/examples/2.3.x/server-kotlin/java/project/update-protocol.md new file mode 100644 index 000000000..0ef3ace0a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-protocol.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectProtocolId; + +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.updateProtocol( + ProjectProtocolId.REST, // protocolId + false, // enabled + 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-service.md b/examples/2.3.x/server-kotlin/java/project/update-service.md new file mode 100644 index 000000000..663fdd04b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-service.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectServiceId; + +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.updateService( + ProjectServiceId.ACCOUNT, // serviceId + false, // enabled + 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-session-alert-policy.md b/examples/2.3.x/server-kotlin/java/project/update-session-alert-policy.md new file mode 100644 index 000000000..6e7418e18 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-session-alert-policy.md @@ -0,0 +1,25 @@ +```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.updateSessionAlertPolicy( + false, // enabled + 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-session-duration-policy.md b/examples/2.3.x/server-kotlin/java/project/update-session-duration-policy.md new file mode 100644 index 000000000..47c3f3be3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-session-duration-policy.md @@ -0,0 +1,25 @@ +```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.updateSessionDurationPolicy( + 60, // duration + 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-session-invalidation-policy.md b/examples/2.3.x/server-kotlin/java/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..4a8efa7c7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-session-invalidation-policy.md @@ -0,0 +1,25 @@ +```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.updateSessionInvalidationPolicy( + false, // enabled + 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-session-limit-policy.md b/examples/2.3.x/server-kotlin/java/project/update-session-limit-policy.md new file mode 100644 index 000000000..13204c06c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-session-limit-policy.md @@ -0,0 +1,25 @@ +```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.updateSessionLimitPolicy( + 1, // total + 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-smtp.md b/examples/2.3.x/server-kotlin/java/project/update-smtp.md new file mode 100644 index 000000000..04a01b711 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-smtp.md @@ -0,0 +1,35 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; +import io.appwrite.enums.ProjectSMTPSecure; + +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.updateSMTP( + "example.com", // host (optional) + 587, // port (optional) + "<USERNAME>", // username (optional) + "password", // password (optional) + "email@example.com", // senderEmail (optional) + "<SENDER_NAME>", // senderName (optional) + "email@example.com", // replyToEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + ProjectSMTPSecure.TLS, // secure (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-user-limit-policy.md b/examples/2.3.x/server-kotlin/java/project/update-user-limit-policy.md new file mode 100644 index 000000000..4e0a99343 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-user-limit-policy.md @@ -0,0 +1,25 @@ +```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.updateUserLimitPolicy( + 0, // total + 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-variable.md b/examples/2.3.x/server-kotlin/java/project/update-variable.md new file mode 100644 index 000000000..19e7d88c1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-variable.md @@ -0,0 +1,28 @@ +```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.updateVariable( + "<VARIABLE_ID>", // variableId + "<KEY>", // key (optional) + "<VALUE>", // value (optional) + false, // 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/project/update-web-platform.md b/examples/2.3.x/server-kotlin/java/project/update-web-platform.md new file mode 100644 index 000000000..8de452f59 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-web-platform.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.updateWebPlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "app.example.com", // hostname + 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-windows-platform.md b/examples/2.3.x/server-kotlin/java/project/update-windows-platform.md new file mode 100644 index 000000000..c7fa06e39 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-windows-platform.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.updateWindowsPlatform( + "<PLATFORM_ID>", // platformId + "<NAME>", // name + "<PACKAGE_IDENTIFIER_NAME>", // packageIdentifierName + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/proxy/create-api-rule.md b/examples/2.3.x/server-kotlin/java/proxy/create-api-rule.md new file mode 100644 index 000000000..6b9413c3c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/create-api-rule.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; + +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 + +Proxy proxy = new Proxy(client); + +proxy.createAPIRule( + "example.com", // domain + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/proxy/create-function-rule.md b/examples/2.3.x/server-kotlin/java/proxy/create-function-rule.md new file mode 100644 index 000000000..9c2e8d755 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/create-function-rule.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; + +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 + +Proxy proxy = new Proxy(client); + +proxy.createFunctionRule( + "example.com", // domain + "<FUNCTION_ID>", // functionId + "<BRANCH>", // branch (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/proxy/create-invalidation.md b/examples/2.3.x/server-kotlin/java/proxy/create-invalidation.md new file mode 100644 index 000000000..aa1a0478f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/create-invalidation.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; +import io.appwrite.enums.InvalidationType; + +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 + +Proxy proxy = new Proxy(client); + +proxy.createInvalidation( + "example.com", // domain + InvalidationType.TAG, // type + "<REFERENCE>", // reference (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/proxy/create-redirect-rule.md b/examples/2.3.x/server-kotlin/java/proxy/create-redirect-rule.md new file mode 100644 index 000000000..1841e3752 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/create-redirect-rule.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; +import io.appwrite.enums.StatusCode; +import io.appwrite.enums.ProxyResourceType; + +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 + +Proxy proxy = new Proxy(client); + +proxy.createRedirectRule( + "example.com", // domain + "https://example.com", // url + StatusCode.MOVEDPERMANENTLY, // statusCode + "<RESOURCE_ID>", // resourceId + ProxyResourceType.SITE, // resourceType + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/proxy/create-site-rule.md b/examples/2.3.x/server-kotlin/java/proxy/create-site-rule.md new file mode 100644 index 000000000..c4add803c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/create-site-rule.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; + +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 + +Proxy proxy = new Proxy(client); + +proxy.createSiteRule( + "example.com", // domain + "<SITE_ID>", // siteId + "<BRANCH>", // branch (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/proxy/delete-rule.md b/examples/2.3.x/server-kotlin/java/proxy/delete-rule.md new file mode 100644 index 000000000..26d79f09d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/delete-rule.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; + +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 + +Proxy proxy = new Proxy(client); + +proxy.deleteRule( + "<RULE_ID>", // ruleId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/proxy/get-rule.md b/examples/2.3.x/server-kotlin/java/proxy/get-rule.md new file mode 100644 index 000000000..ecb354fac --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/get-rule.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; + +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 + +Proxy proxy = new Proxy(client); + +proxy.getRule( + "<RULE_ID>", // ruleId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/proxy/list-rules.md b/examples/2.3.x/server-kotlin/java/proxy/list-rules.md new file mode 100644 index 000000000..3936ed5f7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/list-rules.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; + +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 + +Proxy proxy = new Proxy(client); + +proxy.listRules( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/proxy/update-rule-status.md b/examples/2.3.x/server-kotlin/java/proxy/update-rule-status.md new file mode 100644 index 000000000..c4c530893 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/proxy/update-rule-status.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Proxy; + +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 + +Proxy proxy = new Proxy(client); + +proxy.updateRuleStatus( + "<RULE_ID>", // ruleId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/create-deployment.md b/examples/2.3.x/server-kotlin/java/sites/create-deployment.md new file mode 100644 index 000000000..1301c3415 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/create-deployment.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.createDeployment( + "<SITE_ID>", // siteId + InputFile.fromPath("file.png"), // code + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + false, // activate (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/sites/create-duplicate-deployment.md b/examples/2.3.x/server-kotlin/java/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..06d41d2dc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/create-duplicate-deployment.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.createDuplicateDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/create-template-deployment.md b/examples/2.3.x/server-kotlin/java/sites/create-template-deployment.md new file mode 100644 index 000000000..13077648d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/create-template-deployment.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.TemplateReferenceType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createTemplateDeployment( + "<SITE_ID>", // siteId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + TemplateReferenceType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (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/sites/create-variable.md b/examples/2.3.x/server-kotlin/java/sites/create-variable.md new file mode 100644 index 000000000..e7748b8c5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/create-variable.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.createVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value + false, // 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/sites/create-vcs-deployment.md b/examples/2.3.x/server-kotlin/java/sites/create-vcs-deployment.md new file mode 100644 index 000000000..529fab34d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/create-vcs-deployment.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.VCSReferenceType; + +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 + +Sites sites = new Sites(client); + +sites.createVcsDeployment( + "<SITE_ID>", // siteId + VCSReferenceType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (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/sites/create.md b/examples/2.3.x/server-kotlin/java/sites/create.md new file mode 100644 index 000000000..fb154d30a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/create.md @@ -0,0 +1,52 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; +import io.appwrite.enums.BuildRuntime; +import io.appwrite.enums.Adapter; +import io.appwrite.enums.ProjectKeyScopes; + +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 + +Sites sites = new Sites(client); + +sites.create( + "<SITE_ID>", // siteId + "<NAME>", // name + Framework.ANALOG, // framework + BuildRuntime.NODE_14_5, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<START_COMMAND>", // startCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + Adapter.STATIC, // adapter (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + List.of(), // providerBranches (optional) + List.of(), // providerPaths (optional) + "s-1vcpu-512mb", // buildSpecification (optional) + "s-1vcpu-512mb", // runtimeSpecification (optional) + 0, // deploymentRetention (optional) + List.of(ProjectKeyScopes.PROJECT_READ), // scopes (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/sites/delete-deployment.md b/examples/2.3.x/server-kotlin/java/sites/delete-deployment.md new file mode 100644 index 000000000..90d36bf3e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/delete-deployment.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.deleteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/delete-log.md b/examples/2.3.x/server-kotlin/java/sites/delete-log.md new file mode 100644 index 000000000..af696c141 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/delete-log.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.deleteLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/delete-variable.md b/examples/2.3.x/server-kotlin/java/sites/delete-variable.md new file mode 100644 index 000000000..b63a81c01 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/delete-variable.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.deleteVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/delete.md b/examples/2.3.x/server-kotlin/java/sites/delete.md new file mode 100644 index 000000000..48bfbe267 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.delete( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/get-deployment-download.md b/examples/2.3.x/server-kotlin/java/sites/get-deployment-download.md new file mode 100644 index 000000000..fa756dee2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/get-deployment-download.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.DeploymentDownloadType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeploymentDownload( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + "<TOKEN>", // token (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/sites/get-deployment.md b/examples/2.3.x/server-kotlin/java/sites/get-deployment.md new file mode 100644 index 000000000..26565abce --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/get-deployment.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.getDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/get-log.md b/examples/2.3.x/server-kotlin/java/sites/get-log.md new file mode 100644 index 000000000..290e82251 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/get-log.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.getLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/get-variable.md b/examples/2.3.x/server-kotlin/java/sites/get-variable.md new file mode 100644 index 000000000..c5ac3890e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/get-variable.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.getVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/get.md b/examples/2.3.x/server-kotlin/java/sites/get.md new file mode 100644 index 000000000..55d6ed33e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.get( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/list-deployments.md b/examples/2.3.x/server-kotlin/java/sites/list-deployments.md new file mode 100644 index 000000000..650bd7bb1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/list-deployments.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.listDeployments( + "<SITE_ID>", // siteId + 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/sites/list-frameworks.md b/examples/2.3.x/server-kotlin/java/sites/list-frameworks.md new file mode 100644 index 000000000..6192bf29f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/list-frameworks.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.listFrameworks(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/list-logs.md b/examples/2.3.x/server-kotlin/java/sites/list-logs.md new file mode 100644 index 000000000..437ebf5e8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/list-logs.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.listLogs( + "<SITE_ID>", // siteId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/list-specifications.md b/examples/2.3.x/server-kotlin/java/sites/list-specifications.md new file mode 100644 index 000000000..f9a8fe994 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/list-specifications.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.listSpecifications( + "runtimes", // type (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/sites/list-variables.md b/examples/2.3.x/server-kotlin/java/sites/list-variables.md new file mode 100644 index 000000000..16c3e36f7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/list-variables.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.listVariables( + "<SITE_ID>", // siteId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/list.md b/examples/2.3.x/server-kotlin/java/sites/list.md new file mode 100644 index 000000000..5d53afd41 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.list( + 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/sites/update-deployment-status.md b/examples/2.3.x/server-kotlin/java/sites/update-deployment-status.md new file mode 100644 index 000000000..627cfcc20 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/update-deployment-status.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.updateDeploymentStatus( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/update-site-deployment.md b/examples/2.3.x/server-kotlin/java/sites/update-site-deployment.md new file mode 100644 index 000000000..8c60b7778 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/update-site-deployment.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.updateSiteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/sites/update-variable.md b/examples/2.3.x/server-kotlin/java/sites/update-variable.md new file mode 100644 index 000000000..ec016d77f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/update-variable.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +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 + +Sites sites = new Sites(client); + +sites.updateVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + "<KEY>", // key (optional) + "<VALUE>", // value (optional) + false, // 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/sites/update.md b/examples/2.3.x/server-kotlin/java/sites/update.md new file mode 100644 index 000000000..d87f47a1a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/sites/update.md @@ -0,0 +1,52 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; +import io.appwrite.enums.BuildRuntime; +import io.appwrite.enums.Adapter; +import io.appwrite.enums.ProjectKeyScopes; + +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 + +Sites sites = new Sites(client); + +sites.update( + "<SITE_ID>", // siteId + "<NAME>", // name + Framework.ANALOG, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<START_COMMAND>", // startCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + BuildRuntime.NODE_14_5, // buildRuntime (optional) + Adapter.STATIC, // adapter (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + List.of(), // providerBranches (optional) + List.of(), // providerPaths (optional) + "s-1vcpu-512mb", // buildSpecification (optional) + "s-1vcpu-512mb", // runtimeSpecification (optional) + 0, // deploymentRetention (optional) + List.of(ProjectKeyScopes.PROJECT_READ), // scopes (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/storage/create-bucket.md b/examples/2.3.x/server-kotlin/java/storage/create-bucket.md new file mode 100644 index 000000000..7a15d3264 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/create-bucket.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Storage; +import io.appwrite.enums.Compression; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.createBucket( + "<BUCKET_ID>", // bucketId + "<NAME>", // name + List.of(Permission.read(Role.any())), // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + List.of(), // allowedFileExtensions (optional) + Compression.NONE, // compression (optional) + false, // encryption (optional) + false, // antivirus (optional) + false, // transformations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/storage/create-file.md b/examples/2.3.x/server-kotlin/java/storage/create-file.md new file mode 100644 index 000000000..40fc823ef --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/create-file.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.createFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + InputFile.fromPath("file.png"), // file + List.of(Permission.read(Role.any())), // permissions (optional) + "photos/2026", // folder (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/storage/delete-bucket.md b/examples/2.3.x/server-kotlin/java/storage/delete-bucket.md new file mode 100644 index 000000000..175c65ef6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/delete-bucket.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +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 + +Storage storage = new Storage(client); + +storage.deleteBucket( + "<BUCKET_ID>", // bucketId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/storage/delete-file.md b/examples/2.3.x/server-kotlin/java/storage/delete-file.md new file mode 100644 index 000000000..dc3e279e2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/delete-file.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +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 + +Storage storage = new Storage(client); + +storage.deleteFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/storage/get-bucket.md b/examples/2.3.x/server-kotlin/java/storage/get-bucket.md new file mode 100644 index 000000000..fb6c59519 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/get-bucket.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +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 + +Storage storage = new Storage(client); + +storage.getBucket( + "<BUCKET_ID>", // bucketId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/storage/get-file-download.md b/examples/2.3.x/server-kotlin/java/storage/get-file-download.md new file mode 100644 index 000000000..9fa4df864 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/get-file-download.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +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 + +Storage storage = new Storage(client); + +storage.getFileDownload( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<TOKEN>", // token (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/storage/get-file-preview.md b/examples/2.3.x/server-kotlin/java/storage/get-file-preview.md new file mode 100644 index 000000000..45be19a5a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/get-file-preview.md @@ -0,0 +1,40 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; +import io.appwrite.enums.ImageGravity; +import io.appwrite.enums.ImageFormat; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFilePreview( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.AUTO, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + "FFFFFF", // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + "FFFFFF", // background (optional) + ImageFormat.JPG, // output (optional) + "<TOKEN>", // token (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/storage/get-file-view.md b/examples/2.3.x/server-kotlin/java/storage/get-file-view.md new file mode 100644 index 000000000..106884f0d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/get-file-view.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +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 + +Storage storage = new Storage(client); + +storage.getFileView( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<TOKEN>", // token (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/storage/get-file.md b/examples/2.3.x/server-kotlin/java/storage/get-file.md new file mode 100644 index 000000000..85c95162f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/get-file.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +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 + +Storage storage = new Storage(client); + +storage.getFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/storage/list-buckets.md b/examples/2.3.x/server-kotlin/java/storage/list-buckets.md new file mode 100644 index 000000000..85ca001a8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/list-buckets.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +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 + +Storage storage = new Storage(client); + +storage.listBuckets( + 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/storage/list-files.md b/examples/2.3.x/server-kotlin/java/storage/list-files.md new file mode 100644 index 000000000..35334b5c1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/list-files.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +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 + +Storage storage = new Storage(client); + +storage.listFiles( + "<BUCKET_ID>", // bucketId + 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/storage/update-bucket.md b/examples/2.3.x/server-kotlin/java/storage/update-bucket.md new file mode 100644 index 000000000..7f94346da --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/update-bucket.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Storage; +import io.appwrite.enums.Compression; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.updateBucket( + "<BUCKET_ID>", // bucketId + "<NAME>", // name + List.of(Permission.read(Role.any())), // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + List.of(), // allowedFileExtensions (optional) + Compression.NONE, // compression (optional) + false, // encryption (optional) + false, // antivirus (optional) + false, // transformations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/storage/update-file.md b/examples/2.3.x/server-kotlin/java/storage/update-file.md new file mode 100644 index 000000000..7692b1ed6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/storage/update-file.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.updateFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<NAME>", // name (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/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 new file mode 100644 index 000000000..3be25e2bd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-big-int-column.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createBigIntColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + 0, // min (optional) + 1000000, // max (optional) + 0, // default (optional) + false, // array (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/tablesdb/create-boolean-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..9ba8769d3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-boolean-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + false, // default (optional) + false, // array (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/tablesdb/create-cutover.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-cutover.md new file mode 100644 index 000000000..499408cb7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-cutover.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createCutover( + "<DATABASE_ID>", // databaseId + "<MIGRATION_ID>", // migrationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-datetime-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..a32beda3b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-datetime-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "2020-10-15T06:38:00.000+00:00", // default (optional) + false, // array (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/tablesdb/create-email-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-email-column.md new file mode 100644 index 000000000..4aa73caef --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-email-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "email@example.com", // default (optional) + false, // array (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/tablesdb/create-enum-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-enum-column.md new file mode 100644 index 000000000..e63b8ab54 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-enum-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + List.of("active", "inactive"), // elements + false, // required + "active", // default (optional) + false, // array (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/tablesdb/create-failover.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-failover.md new file mode 100644 index 000000000..9fb6fa095 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-failover.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createFailover( + "<DATABASE_ID>", // databaseId + "<TARGET_REPLICA_ID>", // targetReplicaId (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/tablesdb/create-float-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-float-column.md new file mode 100644 index 000000000..5067f5cf6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-float-column.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + 0, // min (optional) + 100, // max (optional) + 10.5, // default (optional) + false, // array (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/tablesdb/create-index.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-index.md new file mode 100644 index 000000000..0eb20835e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-index.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; +import io.appwrite.enums.TablesDBIndexType; +import io.appwrite.enums.OrderBy; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + TablesDBIndexType.KEY, // type + List.of(), // columns + List.of(OrderBy.ASC), // orders (optional) + List.of(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-integer-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-integer-column.md new file mode 100644 index 000000000..dd879b3bf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-integer-column.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + 0, // min (optional) + 100, // max (optional) + 10, // default (optional) + false, // array (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/tablesdb/create-ip-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-ip-column.md new file mode 100644 index 000000000..2f142a791 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-ip-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "192.0.2.0", // default (optional) + false, // array (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/tablesdb/create-line-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-line-column.md new file mode 100644 index 000000000..dfc8f874c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-line-column.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createLineColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-longtext-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..6a325d1cc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-longtext-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createLongtextColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..c408c2441 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-mediumtext-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createMediumtextColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/tablesdb/create-migration.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-migration.md new file mode 100644 index 000000000..d89d81ddd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-migration.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createMigration( + "<DATABASE_ID>", // databaseId + "s-1vcpu-1gb", // specification + false, // autoCutover (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/tablesdb/create-operations.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-operations.md new file mode 100644 index 000000000..066590410 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-operations.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createOperations( + "<TRANSACTION_ID>", // transactionId + List.of(Map.of( + "action", "create", + "databaseId", "<DATABASE_ID>", + "tableId", "<TABLE_ID>", + "rowId", "<ROW_ID>", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-point-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-point-column.md new file mode 100644 index 000000000..e7197d041 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-point-column.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createPointColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + List.of(1, 2), // default (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/tablesdb/create-polygon-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..7a062560a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-polygon-column.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createPolygonColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-relationship-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..c8c6c2048 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-relationship-column.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; +import io.appwrite.enums.RelationshipType; +import io.appwrite.enums.RelationMutate; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<RELATED_TABLE_ID>", // relatedTableId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "<KEY>", // key (optional) + "<TWO_WAY_KEY>", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (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/tablesdb/create-row.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-row.md new file mode 100644 index 000000000..c3193a422 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-row.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.TablesDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (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/tablesdb/create-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-rows.md new file mode 100644 index 000000000..1e16a4dfd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-rows.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + List.of(), // rows + "<TRANSACTION_ID>", // transactionId (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/tablesdb/create-string-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-string-column.md new file mode 100644 index 000000000..e396357a4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-string-column.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + 1, // size + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/tablesdb/create-table.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-table.md new file mode 100644 index 000000000..079ff5de0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-table.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + List.of(Permission.read(Role.any())), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + List.of(), // columns (optional) + List.of(), // indexes (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/tablesdb/create-text-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-text-column.md new file mode 100644 index 000000000..acb041947 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-text-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createTextColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/tablesdb/create-transaction.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-transaction.md new file mode 100644 index 000000000..d66c22005 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createTransaction( + 60, // ttl (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/tablesdb/create-url-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-url-column.md new file mode 100644 index 000000000..57c75e113 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-url-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "https://example.com", // default (optional) + false, // array (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/tablesdb/create-varchar-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..7f8ecfa11 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-varchar-column.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.createVarcharColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + 1, // size + false, // required + "Hello World", // default (optional) + false, // array (optional) + false, // encrypt (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/tablesdb/create.md b/examples/2.3.x/server-kotlin/java/tablesdb/create.md new file mode 100644 index 000000000..aa47e87d1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + "serverless", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (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/tablesdb/decrement-row-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..b74427365 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/decrement-row-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.decrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "<COLUMN>", // column + 1, // value (optional) + 0, // min (optional) + "<TRANSACTION_ID>", // transactionId (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/tablesdb/delete-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete-column.md new file mode 100644 index 000000000..4880cca9a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete-column.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/delete-index.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete-index.md new file mode 100644 index 000000000..f434d9de5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/delete-migration.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete-migration.md new file mode 100644 index 000000000..f2179517d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete-migration.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteMigration( + "<DATABASE_ID>", // databaseId + "<MIGRATION_ID>", // migrationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/delete-row.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete-row.md new file mode 100644 index 000000000..800e4f799 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete-row.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "<TRANSACTION_ID>", // transactionId (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/tablesdb/delete-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete-rows.md new file mode 100644 index 000000000..f12aaa368 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete-rows.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/tablesdb/delete-table.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete-table.md new file mode 100644 index 000000000..b98290803 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete-table.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/delete-transaction.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete-transaction.md new file mode 100644 index 000000000..8a0a6507a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.deleteTransaction( + "<TRANSACTION_ID>", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/delete.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete.md new file mode 100644 index 000000000..e66bb111c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/get-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/get-column.md new file mode 100644 index 000000000..3a8e2b97e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get-column.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/get-index.md b/examples/2.3.x/server-kotlin/java/tablesdb/get-index.md new file mode 100644 index 000000000..91c38b98d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/get-migration.md b/examples/2.3.x/server-kotlin/java/tablesdb/get-migration.md new file mode 100644 index 000000000..21a66164f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get-migration.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getMigration( + "<DATABASE_ID>", // databaseId + "<MIGRATION_ID>", // migrationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/get-replicas.md b/examples/2.3.x/server-kotlin/java/tablesdb/get-replicas.md new file mode 100644 index 000000000..75591e6d6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get-replicas.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getReplicas( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/get-row.md b/examples/2.3.x/server-kotlin/java/tablesdb/get-row.md new file mode 100644 index 000000000..c424eb247 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get-row.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/tablesdb/get-status.md b/examples/2.3.x/server-kotlin/java/tablesdb/get-status.md new file mode 100644 index 000000000..7963c4df8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get-status.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getStatus( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/get-table.md b/examples/2.3.x/server-kotlin/java/tablesdb/get-table.md new file mode 100644 index 000000000..839e7b5af --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get-table.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/get-transaction.md b/examples/2.3.x/server-kotlin/java/tablesdb/get-transaction.md new file mode 100644 index 000000000..b4d22183b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.getTransaction( + "<TRANSACTION_ID>", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/get.md b/examples/2.3.x/server-kotlin/java/tablesdb/get.md new file mode 100644 index 000000000..1593fce94 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..3112170a2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/increment-row-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.incrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "<COLUMN>", // column + 1, // value (optional) + 100, // max (optional) + "<TRANSACTION_ID>", // transactionId (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/tablesdb/list-columns.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-columns.md new file mode 100644 index 000000000..6a997d81f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-columns.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listColumns( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/list-indexes.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-indexes.md new file mode 100644 index 000000000..abe669b52 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-indexes.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listIndexes( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/list-migrations.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-migrations.md new file mode 100644 index 000000000..bff29472d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-migrations.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listMigrations( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..a0f4745af --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-operations.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listOperations( + "<DATABASE_ID>", // databaseId + "queued", // status (optional) + 1, // limit (optional) + 0, // offset (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/tablesdb/list-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-rows.md new file mode 100644 index 000000000..174b4255b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-rows.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/list-specifications.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-specifications.md new file mode 100644 index 000000000..6bd2c56af --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-specifications.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/list-tables.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-tables.md new file mode 100644 index 000000000..37c046318 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-tables.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listTables( + "<DATABASE_ID>", // databaseId + 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/tablesdb/list-transactions.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-transactions.md new file mode 100644 index 000000000..38ae582b1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-transactions.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.listTransactions( + List.of(), // queries (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/tablesdb/list.md b/examples/2.3.x/server-kotlin/java/tablesdb/list.md new file mode 100644 index 000000000..39ca54429 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.list( + 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/tablesdb/update-big-int-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..decd80da2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-big-int-column.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateBigIntColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + 0, // default + 0, // min (optional) + 1000000, // max (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update-boolean-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..995635642 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-boolean-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + false, // default + "<NEW_KEY>", // newKey (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/tablesdb/update-datetime-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..46f902b1f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-datetime-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "2020-10-15T06:38:00.000+00:00", // default + "<NEW_KEY>", // newKey (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/tablesdb/update-email-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-email-column.md new file mode 100644 index 000000000..288d44e04 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-email-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "email@example.com", // default + "<NEW_KEY>", // newKey (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/tablesdb/update-enum-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-enum-column.md new file mode 100644 index 000000000..da6e7e814 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-enum-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + List.of("active", "inactive"), // elements + false, // required + "active", // default + "<NEW_KEY>", // newKey (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/tablesdb/update-float-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-float-column.md new file mode 100644 index 000000000..edc988a5d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-float-column.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + 10.5, // default + 0, // min (optional) + 100, // max (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update-integer-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-integer-column.md new file mode 100644 index 000000000..84380679f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-integer-column.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + 10, // default + 0, // min (optional) + 100, // max (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update-ip-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-ip-column.md new file mode 100644 index 000000000..eabe7e417 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-ip-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "192.0.2.0", // default + "<NEW_KEY>", // newKey (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/tablesdb/update-line-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-line-column.md new file mode 100644 index 000000000..ac33ec893 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-line-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateLineColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update-longtext-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..d0b11583a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-longtext-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateLongtextColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "Hello World", // default + "<NEW_KEY>", // newKey (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/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..fccd0e6ba --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-mediumtext-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateMediumtextColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "Hello World", // default + "<NEW_KEY>", // newKey (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/tablesdb/update-point-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-point-column.md new file mode 100644 index 000000000..db21cbccc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-point-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updatePointColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + List.of(1, 2), // default (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update-polygon-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..21985c5fa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-polygon-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updatePolygonColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update-relationship-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..ad7eef91d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-relationship-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; +import io.appwrite.enums.RelationMutate; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + RelationMutate.CASCADE, // onDelete (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update-row.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-row.md new file mode 100644 index 000000000..e22abdfbd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-row.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.TablesDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 33, + "isAdmin", false + ), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (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/tablesdb/update-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-rows.md new file mode 100644 index 000000000..cc954291d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-rows.md @@ -0,0 +1,35 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 33, + "isAdmin", false + ), // data (optional) + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/tablesdb/update-string-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-string-column.md new file mode 100644 index 000000000..5478b4289 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-string-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "Hello World", // default + 1, // size (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update-table.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-table.md new file mode 100644 index 000000000..21120b77e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-table.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + false, // purge (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/update-text-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-text-column.md new file mode 100644 index 000000000..2364fe0b0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-text-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateTextColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "Hello World", // default + "<NEW_KEY>", // newKey (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/tablesdb/update-transaction.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-transaction.md new file mode 100644 index 000000000..91790210a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-transaction.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateTransaction( + "<TRANSACTION_ID>", // transactionId + false, // commit (optional) + false, // rollback (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/update-url-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-url-column.md new file mode 100644 index 000000000..e73705cde --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-url-column.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "https://example.com", // default + "<NEW_KEY>", // newKey (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/tablesdb/update-varchar-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..d1e44b5ad --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-varchar-column.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.updateVarcharColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<KEY>", // key + false, // required + "Hello World", // default + 1, // size (optional) + "<NEW_KEY>", // newKey (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/tablesdb/update.md b/examples/2.3.x/server-kotlin/java/tablesdb/update.md new file mode 100644 index 000000000..f341fee98 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name (optional) + false, // enabled (optional) + "serverless", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (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/tablesdb/upsert-row.md b/examples/2.3.x/server-kotlin/java/tablesdb/upsert-row.md new file mode 100644 index 000000000..faa683694 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/upsert-row.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.TablesDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 33, + "isAdmin", false + ), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (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/tablesdb/upsert-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/upsert-rows.md new file mode 100644 index 000000000..1c46abfe7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tablesdb/upsert-rows.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDB; + +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 + +TablesDB tablesDB = new TablesDB(client); + +tablesDB.upsertRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + List.of(), // rows + "<TRANSACTION_ID>", // transactionId (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/teams/create-installation.md b/examples/2.3.x/server-kotlin/java/teams/create-installation.md new file mode 100644 index 000000000..6ea9fa931 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/create-installation.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.createInstallation( + "<TEAM_ID>", // teamId + "<APP_ID>", // appId + "<AUTHORIZATION_DETAILS>", // authorizationDetails (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/teams/create-membership.md b/examples/2.3.x/server-kotlin/java/teams/create-membership.md new file mode 100644 index 000000000..52cf1043d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/create-membership.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +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 + +Teams teams = new Teams(client); + +teams.createMembership( + "<TEAM_ID>", // teamId + List.of(), // roles + "email@example.com", // email (optional) + "<USER_ID>", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "<NAME>", // name (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/teams/create.md b/examples/2.3.x/server-kotlin/java/teams/create.md new file mode 100644 index 000000000..d2d921bf8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/create.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.create( + "<TEAM_ID>", // teamId + "<NAME>", // name + List.of(), // roles (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/teams/delete-installation.md b/examples/2.3.x/server-kotlin/java/teams/delete-installation.md new file mode 100644 index 000000000..e1b475943 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/delete-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.deleteInstallation( + "<TEAM_ID>", // teamId + "<INSTALLATION_ID>", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/delete-membership.md b/examples/2.3.x/server-kotlin/java/teams/delete-membership.md new file mode 100644 index 000000000..9a8d609b8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/delete-membership.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.deleteMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/delete.md b/examples/2.3.x/server-kotlin/java/teams/delete.md new file mode 100644 index 000000000..a96e78ee7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +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 + +Teams teams = new Teams(client); + +teams.delete( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/get-installation.md b/examples/2.3.x/server-kotlin/java/teams/get-installation.md new file mode 100644 index 000000000..f8659ce9b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/get-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getInstallation( + "<TEAM_ID>", // teamId + "<INSTALLATION_ID>", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/get-membership.md b/examples/2.3.x/server-kotlin/java/teams/get-membership.md new file mode 100644 index 000000000..0ebfec907 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/get-membership.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/get-prefs.md b/examples/2.3.x/server-kotlin/java/teams/get-prefs.md new file mode 100644 index 000000000..8a4846f00 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/get-prefs.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +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 + +Teams teams = new Teams(client); + +teams.getPrefs( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/get.md b/examples/2.3.x/server-kotlin/java/teams/get.md new file mode 100644 index 000000000..8fc7fc6e1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +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 + +Teams teams = new Teams(client); + +teams.get( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/list-installations.md b/examples/2.3.x/server-kotlin/java/teams/list-installations.md new file mode 100644 index 000000000..3340fec5a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/list-installations.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.listInstallations( + "<TEAM_ID>", // teamId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/list-memberships.md b/examples/2.3.x/server-kotlin/java/teams/list-memberships.md new file mode 100644 index 000000000..348ffd834 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/list-memberships.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +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 + +Teams teams = new Teams(client); + +teams.listMemberships( + "<TEAM_ID>", // teamId + 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/teams/list.md b/examples/2.3.x/server-kotlin/java/teams/list.md new file mode 100644 index 000000000..0f0827d65 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.list( + 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/teams/update-installation.md b/examples/2.3.x/server-kotlin/java/teams/update-installation.md new file mode 100644 index 000000000..7c57b7c43 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/update-installation.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateInstallation( + "<TEAM_ID>", // teamId + "<INSTALLATION_ID>", // installationId + "<AUTHORIZATION_DETAILS>", // authorizationDetails (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/teams/update-membership-status.md b/examples/2.3.x/server-kotlin/java/teams/update-membership-status.md new file mode 100644 index 000000000..bb82703d9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/update-membership-status.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +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 + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..97034ae32 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/update-membership.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + List.of(), // roles + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/update-name.md b/examples/2.3.x/server-kotlin/java/teams/update-name.md new file mode 100644 index 000000000..7ee251487 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/update-name.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateName( + "<TEAM_ID>", // teamId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/teams/update-prefs.md b/examples/2.3.x/server-kotlin/java/teams/update-prefs.md new file mode 100644 index 000000000..7f7be4c77 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/teams/update-prefs.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updatePrefs( + "<TEAM_ID>", // teamId + Map.of("a", "b"), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tokens/create-file-token.md b/examples/2.3.x/server-kotlin/java/tokens/create-file-token.md new file mode 100644 index 000000000..fae86d2b6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tokens/create-file-token.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +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 + +Tokens tokens = new Tokens(client); + +tokens.createFileToken( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "2020-10-15T06:38:00.000+00:00", // expire (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/tokens/delete.md b/examples/2.3.x/server-kotlin/java/tokens/delete.md new file mode 100644 index 000000000..06c8478a2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tokens/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +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 + +Tokens tokens = new Tokens(client); + +tokens.delete( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tokens/get.md b/examples/2.3.x/server-kotlin/java/tokens/get.md new file mode 100644 index 000000000..584a37e44 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tokens/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +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 + +Tokens tokens = new Tokens(client); + +tokens.get( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tokens/list.md b/examples/2.3.x/server-kotlin/java/tokens/list.md new file mode 100644 index 000000000..fdda4490f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tokens/list.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +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 + +Tokens tokens = new Tokens(client); + +tokens.list( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/tokens/update.md b/examples/2.3.x/server-kotlin/java/tokens/update.md new file mode 100644 index 000000000..033cbc5b9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/tokens/update.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +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 + +Tokens tokens = new Tokens(client); + +tokens.update( + "<TOKEN_ID>", // tokenId + "2020-10-15T06:38:00.000+00:00", // expire (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/users/create-argon-2-user.md b/examples/2.3.x/server-kotlin/java/users/create-argon-2-user.md new file mode 100644 index 000000000..50fbb283c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-argon-2-user.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createArgon2User( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (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/users/create-bcrypt-user.md b/examples/2.3.x/server-kotlin/java/users/create-bcrypt-user.md new file mode 100644 index 000000000..0963995e8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-bcrypt-user.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createBcryptUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (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/users/create-jwt.md b/examples/2.3.x/server-kotlin/java/users/create-jwt.md new file mode 100644 index 000000000..0c88f2030 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-jwt.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createJWT( + "<USER_ID>", // userId + "recent()", // sessionId (optional) + 0, // duration (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/users/create-md-5-user.md b/examples/2.3.x/server-kotlin/java/users/create-md-5-user.md new file mode 100644 index 000000000..840ba29ab --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-md-5-user.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createMD5User( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (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/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/java/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..5715b9b17 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createMFARecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/create-ph-pass-user.md b/examples/2.3.x/server-kotlin/java/users/create-ph-pass-user.md new file mode 100644 index 000000000..fd9f5f5ba --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-ph-pass-user.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createPHPassUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (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/users/create-scrypt-modified-user.md b/examples/2.3.x/server-kotlin/java/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..892e49ffb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-scrypt-modified-user.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createScryptModifiedUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + "<PASSWORD_SALT_SEPARATOR>", // passwordSaltSeparator + "<PASSWORD_SIGNER_KEY>", // passwordSignerKey + "<NAME>", // name (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/users/create-scrypt-user.md b/examples/2.3.x/server-kotlin/java/users/create-scrypt-user.md new file mode 100644 index 000000000..817264a99 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-scrypt-user.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createScryptUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + 8, // passwordCpu + 65536, // passwordMemory + 1, // passwordParallel + 64, // passwordLength + "<NAME>", // name (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/users/create-session.md b/examples/2.3.x/server-kotlin/java/users/create-session.md new file mode 100644 index 000000000..e5c77e421 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-session.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createSession( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/create-sha-user.md b/examples/2.3.x/server-kotlin/java/users/create-sha-user.md new file mode 100644 index 000000000..d60caa756 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-sha-user.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.PasswordHash; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createSHAUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + PasswordHash.SHA1, // passwordVersion (optional) + "<NAME>", // name (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/users/create-target.md b/examples/2.3.x/server-kotlin/java/users/create-target.md new file mode 100644 index 000000000..8a953ebb6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-target.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.MessagingProviderType; + +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 + +Users users = new Users(client); + +users.createTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + MessagingProviderType.EMAIL, // providerType + "<IDENTIFIER>", // identifier + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (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/users/create-token.md b/examples/2.3.x/server-kotlin/java/users/create-token.md new file mode 100644 index 000000000..fccdf6bae --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create-token.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.createToken( + "<USER_ID>", // userId + 4, // length (optional) + 60, // expire (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/users/create.md b/examples/2.3.x/server-kotlin/java/users/create.md new file mode 100644 index 000000000..760849ab1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/create.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.create( + "<USER_ID>", // userId + "email@example.com", // email (optional) + "+12065550100", // phone (optional) + "password", // password (optional) + "<NAME>", // name (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/users/delete-identity.md b/examples/2.3.x/server-kotlin/java/users/delete-identity.md new file mode 100644 index 000000000..f27e3af6c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/delete-identity.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.deleteIdentity( + "<IDENTITY_ID>", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/delete-mfa-authenticator.md b/examples/2.3.x/server-kotlin/java/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..cdf8ec03e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/delete-mfa-authenticator.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.AuthenticatorType; + +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 + +Users users = new Users(client); + +users.deleteMFAAuthenticator( + "<USER_ID>", // userId + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/delete-session.md b/examples/2.3.x/server-kotlin/java/users/delete-session.md new file mode 100644 index 000000000..8b39eb11b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/delete-session.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.deleteSession( + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/delete-sessions.md b/examples/2.3.x/server-kotlin/java/users/delete-sessions.md new file mode 100644 index 000000000..01b63b4c6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/delete-sessions.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.deleteSessions( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/delete-target.md b/examples/2.3.x/server-kotlin/java/users/delete-target.md new file mode 100644 index 000000000..f222ec65c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/delete-target.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.deleteTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/delete.md b/examples/2.3.x/server-kotlin/java/users/delete.md new file mode 100644 index 000000000..00dfd2370 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.delete( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/get-mfa-challenge.md b/examples/2.3.x/server-kotlin/java/users/get-mfa-challenge.md new file mode 100644 index 000000000..46baf423e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/get-mfa-challenge.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.getMFAChallenge( + "<USER_ID>", // userId + "<CHALLENGE_ID>", // challengeId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/java/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..28a433ff8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/get-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.getMFARecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/get-prefs.md b/examples/2.3.x/server-kotlin/java/users/get-prefs.md new file mode 100644 index 000000000..405f03317 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/get-prefs.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.getPrefs( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/get-target.md b/examples/2.3.x/server-kotlin/java/users/get-target.md new file mode 100644 index 000000000..f103524d1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/get-target.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.getTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/get.md b/examples/2.3.x/server-kotlin/java/users/get.md new file mode 100644 index 000000000..d72e78caf --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.get( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/list-identities.md b/examples/2.3.x/server-kotlin/java/users/list-identities.md new file mode 100644 index 000000000..505ac56bd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/list-identities.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.listIdentities( + 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/users/list-memberships.md b/examples/2.3.x/server-kotlin/java/users/list-memberships.md new file mode 100644 index 000000000..0beeb6a6d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/list-memberships.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.listMemberships( + "<USER_ID>", // userId + 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/users/list-mfa-factors.md b/examples/2.3.x/server-kotlin/java/users/list-mfa-factors.md new file mode 100644 index 000000000..fc273e134 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/list-mfa-factors.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.listMFAFactors( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/list-sessions.md b/examples/2.3.x/server-kotlin/java/users/list-sessions.md new file mode 100644 index 000000000..5c9d66c28 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/list-sessions.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.listSessions( + "<USER_ID>", // userId + 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/users/list-targets.md b/examples/2.3.x/server-kotlin/java/users/list-targets.md new file mode 100644 index 000000000..c531484dd --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/list-targets.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.listTargets( + "<USER_ID>", // userId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/list.md b/examples/2.3.x/server-kotlin/java/users/list.md new file mode 100644 index 000000000..78bd24e61 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.list( + 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/users/update-email-verification.md b/examples/2.3.x/server-kotlin/java/users/update-email-verification.md new file mode 100644 index 000000000..c0b3b3149 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-email-verification.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateEmailVerification( + "<USER_ID>", // userId + false, // emailVerification + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-email.md b/examples/2.3.x/server-kotlin/java/users/update-email.md new file mode 100644 index 000000000..8d343ce22 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-email.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateEmail( + "<USER_ID>", // userId + "email@example.com", // email + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-impersonator.md b/examples/2.3.x/server-kotlin/java/users/update-impersonator.md new file mode 100644 index 000000000..879e4361f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-impersonator.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateImpersonator( + "<USER_ID>", // userId + false, // impersonator + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..ae52debaa --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-labels.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateLabels( + "<USER_ID>", // userId + List.of(), // labels + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/java/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..a0b9d1b02 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateMFARecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-mfa.md b/examples/2.3.x/server-kotlin/java/users/update-mfa.md new file mode 100644 index 000000000..b7a5e337d --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-mfa.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateMFA( + "<USER_ID>", // userId + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-name.md b/examples/2.3.x/server-kotlin/java/users/update-name.md new file mode 100644 index 000000000..0de8d5db9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-name.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateName( + "<USER_ID>", // userId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-password.md b/examples/2.3.x/server-kotlin/java/users/update-password.md new file mode 100644 index 000000000..41924f0b4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-password.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updatePassword( + "<USER_ID>", // userId + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-phone-verification.md b/examples/2.3.x/server-kotlin/java/users/update-phone-verification.md new file mode 100644 index 000000000..b11e744fc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-phone-verification.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updatePhoneVerification( + "<USER_ID>", // userId + false, // phoneVerification + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-phone.md b/examples/2.3.x/server-kotlin/java/users/update-phone.md new file mode 100644 index 000000000..2eee18334 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-phone.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updatePhone( + "<USER_ID>", // userId + "+12065550100", // number + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-prefs.md b/examples/2.3.x/server-kotlin/java/users/update-prefs.md new file mode 100644 index 000000000..ff2a6c118 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-prefs.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updatePrefs( + "<USER_ID>", // userId + Map.of("a", "b"), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-status.md b/examples/2.3.x/server-kotlin/java/users/update-status.md new file mode 100644 index 000000000..6ff97e198 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-status.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateStatus( + "<USER_ID>", // userId + false, // status + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/users/update-target.md b/examples/2.3.x/server-kotlin/java/users/update-target.md new file mode 100644 index 000000000..c9335828a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/users/update-target.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +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 + +Users users = new Users(client); + +users.updateTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + "<IDENTIFIER>", // identifier (optional) + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (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/vectorsdb/create-collection.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-collection.md new file mode 100644 index 000000000..d3dc60bee --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-collection.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + 1, // dimension + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-document.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-document.md new file mode 100644 index 000000000..c68016786 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-document.md @@ -0,0 +1,37 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +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 + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of( + "embeddings", List.of(0.12, -0.55, 0.88, 1.02), + "metadata", Map.of( + "key", "value" + ) + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (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/vectorsdb/create-documents.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-documents.md new file mode 100644 index 000000000..09628cb30 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // documents + "<TRANSACTION_ID>", // transactionId (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/vectorsdb/create-failover.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-failover.md new file mode 100644 index 000000000..52ccf047b --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-failover.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createFailover( + "<DATABASE_ID>", // databaseId + "<TARGET_REPLICA_ID>", // targetReplicaId (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/vectorsdb/create-index.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-index.md new file mode 100644 index 000000000..8934428c4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-index.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; +import io.appwrite.enums.VectorsDBIndexType; +import io.appwrite.enums.OrderBy; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + VectorsDBIndexType.HNSW_EUCLIDEAN, // type + List.of(), // attributes + List.of(OrderBy.ASC), // orders (optional) + List.of(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-operations.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-operations.md new file mode 100644 index 000000000..bc2f85e7c --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-operations.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createOperations( + "<TRANSACTION_ID>", // transactionId + List.of(Map.of( + "action", "create", + "databaseId", "<DATABASE_ID>", + "collectionId", "<COLLECTION_ID>", + "documentId", "<DOCUMENT_ID>", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-query.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-query.md new file mode 100644 index 000000000..21ca0cebb --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-query.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createQuery( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-transaction.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-transaction.md new file mode 100644 index 000000000..c855284b3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createTransaction( + 60, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create.md new file mode 100644 index 000000000..433f6f08e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + "serverless", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (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/vectorsdb/delete-collection.md b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-collection.md new file mode 100644 index 000000000..c0d9eecbe --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/delete-document.md b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-document.md new file mode 100644 index 000000000..9ab5e5719 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-document.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "<TRANSACTION_ID>", // transactionId (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/vectorsdb/delete-documents.md b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-documents.md new file mode 100644 index 000000000..31a425a4e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/vectorsdb/delete-index.md b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-index.md new file mode 100644 index 000000000..af9d7c88e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/delete-transaction.md b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..b71ee2a71 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteTransaction( + "<TRANSACTION_ID>", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/delete.md b/examples/2.3.x/server-kotlin/java/vectorsdb/delete.md new file mode 100644 index 000000000..821dacff3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/get-collection.md b/examples/2.3.x/server-kotlin/java/vectorsdb/get-collection.md new file mode 100644 index 000000000..b158bd890 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/get-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/get-document.md b/examples/2.3.x/server-kotlin/java/vectorsdb/get-document.md new file mode 100644 index 000000000..8a048ca83 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/get-document.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/vectorsdb/get-index.md b/examples/2.3.x/server-kotlin/java/vectorsdb/get-index.md new file mode 100644 index 000000000..cc27b70b0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/get-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<KEY>", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/get-replicas.md b/examples/2.3.x/server-kotlin/java/vectorsdb/get-replicas.md new file mode 100644 index 000000000..4b30b1c46 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/get-replicas.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getReplicas( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/get-status.md b/examples/2.3.x/server-kotlin/java/vectorsdb/get-status.md new file mode 100644 index 000000000..9ba79ca2a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/get-status.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getStatus( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/get-transaction.md b/examples/2.3.x/server-kotlin/java/vectorsdb/get-transaction.md new file mode 100644 index 000000000..8996a5661 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/get-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getTransaction( + "<TRANSACTION_ID>", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/get.md b/examples/2.3.x/server-kotlin/java/vectorsdb/get.md new file mode 100644 index 000000000..47c549450 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/list-collections.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list-collections.md new file mode 100644 index 000000000..39b35d590 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-collections.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listCollections( + "<DATABASE_ID>", // databaseId + 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/vectorsdb/list-documents.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list-documents.md new file mode 100644 index 000000000..857d79677 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-documents.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/list-indexes.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list-indexes.md new file mode 100644 index 000000000..40b4dbc37 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-indexes.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listIndexes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/list-operations.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list-operations.md new file mode 100644 index 000000000..de53b2740 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-operations.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listOperations( + "<DATABASE_ID>", // databaseId + "queued", // status (optional) + 1, // limit (optional) + 0, // offset (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/vectorsdb/list-specifications.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list-specifications.md new file mode 100644 index 000000000..4e2ed6e4f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-specifications.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +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 + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` 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 new file mode 100644 index 000000000..6b0890a63 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-transactions.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listTransactions( + List.of(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/list.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list.md new file mode 100644 index 000000000..dac5547a3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.list( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/update-collection.md b/examples/2.3.x/server-kotlin/java/vectorsdb/update-collection.md new file mode 100644 index 000000000..9359c8086 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/update-collection.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + 1, // dimension (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/update-document.md b/examples/2.3.x/server-kotlin/java/vectorsdb/update-document.md new file mode 100644 index 000000000..1800ff492 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/update-document.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/update-documents.md b/examples/2.3.x/server-kotlin/java/vectorsdb/update-documents.md new file mode 100644 index 000000000..820cbe572 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/update-documents.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + Map.of("a", "b"), // data (optional) + List.of(), // queries (optional) + "<TRANSACTION_ID>", // transactionId (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/vectorsdb/update-transaction.md b/examples/2.3.x/server-kotlin/java/vectorsdb/update-transaction.md new file mode 100644 index 000000000..6d648df95 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/update-transaction.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateTransaction( + "<TRANSACTION_ID>", // transactionId + false, // commit (optional) + false, // rollback (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/update.md b/examples/2.3.x/server-kotlin/java/vectorsdb/update.md new file mode 100644 index 000000000..01d23bdf9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/update.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + "serverless", // specification (optional) + 0, // replicas (optional) + "async", // syncMode (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/vectorsdb/upsert-document.md b/examples/2.3.x/server-kotlin/java/vectorsdb/upsert-document.md new file mode 100644 index 000000000..cdefe6371 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/upsert-document.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.upsertDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "<TRANSACTION_ID>", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` 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 new file mode 100644 index 000000000..6371a0cb5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/upsert-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.upsertDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + List.of(), // documents + "<TRANSACTION_ID>", // transactionId (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/webhooks/create.md b/examples/2.3.x/server-kotlin/java/webhooks/create.md new file mode 100644 index 000000000..9759465e8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/webhooks/create.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Webhooks; + +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 + +Webhooks webhooks = new Webhooks(client); + +webhooks.create( + "<WEBHOOK_ID>", // webhookId + "https://example.com/webhook", // url + "<NAME>", // name + List.of(), // events + false, // enabled (optional) + false, // tls (optional) + "<AUTH_USERNAME>", // authUsername (optional) + "password", // authPassword (optional) + "<SECRET>", // 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/webhooks/delete.md b/examples/2.3.x/server-kotlin/java/webhooks/delete.md new file mode 100644 index 000000000..21c530473 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/webhooks/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Webhooks; + +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 + +Webhooks webhooks = new Webhooks(client); + +webhooks.delete( + "<WEBHOOK_ID>", // webhookId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/webhooks/get.md b/examples/2.3.x/server-kotlin/java/webhooks/get.md new file mode 100644 index 000000000..07ed7714e --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/webhooks/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Webhooks; + +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 + +Webhooks webhooks = new Webhooks(client); + +webhooks.get( + "<WEBHOOK_ID>", // webhookId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/webhooks/list.md b/examples/2.3.x/server-kotlin/java/webhooks/list.md new file mode 100644 index 000000000..22e3d32d0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/webhooks/list.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Webhooks; + +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 + +Webhooks webhooks = new Webhooks(client); + +webhooks.list( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/webhooks/update-secret.md b/examples/2.3.x/server-kotlin/java/webhooks/update-secret.md new file mode 100644 index 000000000..eb18d8710 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/webhooks/update-secret.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Webhooks; + +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 + +Webhooks webhooks = new Webhooks(client); + +webhooks.updateSecret( + "<WEBHOOK_ID>", // webhookId + "<SECRET>", // 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/webhooks/update.md b/examples/2.3.x/server-kotlin/java/webhooks/update.md new file mode 100644 index 000000000..5c7f85f83 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/webhooks/update.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Webhooks; + +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 + +Webhooks webhooks = new Webhooks(client); + +webhooks.update( + "<WEBHOOK_ID>", // webhookId + "<NAME>", // name + "https://example.com/webhook", // url + List.of(), // events + false, // enabled (optional) + false, // tls (optional) + "<AUTH_USERNAME>", // authUsername (optional) + "password", // authPassword (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-anonymous-session.md b/examples/2.3.x/server-kotlin/kotlin/account/create-anonymous-session.md new file mode 100644 index 000000000..68a9fd8cb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-anonymous-session.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createAnonymousSession() +``` 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 new file mode 100644 index 000000000..a1cea8ff9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-email-password-session.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createEmailPasswordSession( + email = "email@example.com", + password = "password" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-email-token.md b/examples/2.3.x/server-kotlin/kotlin/account/create-email-token.md new file mode 100644 index 000000000..dcca57a7d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-email-token.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createEmailToken( + userId = "<USER_ID>", + email = "email@example.com", + phrase = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-email-verification-otp.md b/examples/2.3.x/server-kotlin/kotlin/account/create-email-verification-otp.md new file mode 100644 index 000000000..f00f2d331 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-email-verification-otp.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createEmailVerificationOTP( + phrase = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-email-verification.md b/examples/2.3.x/server-kotlin/kotlin/account/create-email-verification.md new file mode 100644 index 000000000..1e35db8b2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-email-verification.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createEmailVerification( + url = "https://example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-id-token-session.md b/examples/2.3.x/server-kotlin/kotlin/account/create-id-token-session.md new file mode 100644 index 000000000..a466217f7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-id-token-session.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.IdTokenProvider + +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 account = Account(client) + +val response = account.createIdTokenSession( + provider = IdTokenProvider.APPLE, + idToken = "<ID_TOKEN>", + nonce = "<NONCE>", // optional + accessToken = "<ACCESS_TOKEN>", // optional + accessTokenExpiry = 0, // optional + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-magic-url-token.md b/examples/2.3.x/server-kotlin/kotlin/account/create-magic-url-token.md new file mode 100644 index 000000000..16a0a9ef4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-magic-url-token.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createMagicURLToken( + userId = "<USER_ID>", + email = "email@example.com", + url = "https://example.com", // optional + phrase = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-authenticator.md b/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-authenticator.md new file mode 100644 index 000000000..51b69b1cb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-authenticator.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +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 account = Account(client) + +val response = account.createMFAAuthenticator( + type = AuthenticatorType.TOTP +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-challenge.md b/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-challenge.md new file mode 100644 index 000000000..664be4aff --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-challenge.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +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 account = Account(client) + +val response = account.createMFAChallenge( + factor = AuthenticationFactor.EMAIL +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..30dcdb745 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createMFARecoveryCodes() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-o-auth-2-token.md b/examples/2.3.x/server-kotlin/kotlin/account/create-o-auth-2-token.md new file mode 100644 index 000000000..bc993687d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-o-auth-2-token.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +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 account = Account(client) + +account.createOAuth2Token( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // optional + failure = "https://example.com", // optional + scopes = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-phone-token.md b/examples/2.3.x/server-kotlin/kotlin/account/create-phone-token.md new file mode 100644 index 000000000..c4f4075a7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-phone-token.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createPhoneToken( + userId = "<USER_ID>", + phone = "+12065550100" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-phone-verification.md b/examples/2.3.x/server-kotlin/kotlin/account/create-phone-verification.md new file mode 100644 index 000000000..991862fa4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-phone-verification.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createPhoneVerification() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-recovery-otp.md b/examples/2.3.x/server-kotlin/kotlin/account/create-recovery-otp.md new file mode 100644 index 000000000..541fd1db1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-recovery-otp.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createRecoveryOTP( + email = "email@example.com", + phrase = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-recovery.md b/examples/2.3.x/server-kotlin/kotlin/account/create-recovery.md new file mode 100644 index 000000000..826fb6363 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-recovery.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createRecovery( + email = "email@example.com", + url = "https://example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-session.md b/examples/2.3.x/server-kotlin/kotlin/account/create-session.md new file mode 100644 index 000000000..fac50ff4d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-session.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-verification.md b/examples/2.3.x/server-kotlin/kotlin/account/create-verification.md new file mode 100644 index 000000000..6b01e27b6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-verification.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.createVerification( + url = "https://example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create.md b/examples/2.3.x/server-kotlin/kotlin/account/create.md new file mode 100644 index 000000000..2cd564dd6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/create.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.create( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/delete-consent-token.md b/examples/2.3.x/server-kotlin/kotlin/account/delete-consent-token.md new file mode 100644 index 000000000..1e77790cd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/delete-consent-token.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.deleteConsentToken( + consentId = "<CONSENT_ID>", + tokenId = "<TOKEN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/delete-consent.md b/examples/2.3.x/server-kotlin/kotlin/account/delete-consent.md new file mode 100644 index 000000000..8f80855c4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/delete-consent.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.deleteConsent( + consentId = "<CONSENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/delete-identity.md b/examples/2.3.x/server-kotlin/kotlin/account/delete-identity.md new file mode 100644 index 000000000..528a225bd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/delete-identity.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.deleteIdentity( + identityId = "<IDENTITY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md b/examples/2.3.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..231b312ba --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +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 account = Account(client) + +val response = account.deleteMFAAuthenticator( + type = AuthenticatorType.TOTP +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/delete-session.md b/examples/2.3.x/server-kotlin/kotlin/account/delete-session.md new file mode 100644 index 000000000..aabb48c1e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/delete-session.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.deleteSession( + sessionId = "<SESSION_ID>" +) +``` 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 new file mode 100644 index 000000000..5232e675e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/delete-sessions.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.deleteSessions() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/get-consent-token.md b/examples/2.3.x/server-kotlin/kotlin/account/get-consent-token.md new file mode 100644 index 000000000..b545c9a4d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/get-consent-token.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.getConsentToken( + consentId = "<CONSENT_ID>", + tokenId = "<TOKEN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/get-consent.md b/examples/2.3.x/server-kotlin/kotlin/account/get-consent.md new file mode 100644 index 000000000..0dce6a83b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/get-consent.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.getConsent( + consentId = "<CONSENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..04ff7a4ca --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.getMFARecoveryCodes() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/get-prefs.md b/examples/2.3.x/server-kotlin/kotlin/account/get-prefs.md new file mode 100644 index 000000000..51e682ee8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/get-prefs.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.getPrefs() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/get-session.md b/examples/2.3.x/server-kotlin/kotlin/account/get-session.md new file mode 100644 index 000000000..7311e5c15 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/get-session.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.getSession( + sessionId = "<SESSION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/get.md b/examples/2.3.x/server-kotlin/kotlin/account/get.md new file mode 100644 index 000000000..b8d2078ff --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/get.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.get() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/list-consent-tokens.md b/examples/2.3.x/server-kotlin/kotlin/account/list-consent-tokens.md new file mode 100644 index 000000000..520963f3c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/list-consent-tokens.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.listConsentTokens( + consentId = "<CONSENT_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/list-consents.md b/examples/2.3.x/server-kotlin/kotlin/account/list-consents.md new file mode 100644 index 000000000..ea1fdea76 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/list-consents.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.listConsents( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/list-identities.md b/examples/2.3.x/server-kotlin/kotlin/account/list-identities.md new file mode 100644 index 000000000..612e06951 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/list-identities.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.listIdentities( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/list-mfa-factors.md b/examples/2.3.x/server-kotlin/kotlin/account/list-mfa-factors.md new file mode 100644 index 000000000..95c2ffde2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/list-mfa-factors.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.listMFAFactors() +``` 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 new file mode 100644 index 000000000..120766637 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/list-sessions.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.listSessions() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-email-verification-otp.md b/examples/2.3.x/server-kotlin/kotlin/account/update-email-verification-otp.md new file mode 100644 index 000000000..b4691e422 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-email-verification-otp.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateEmailVerificationOTP( + userId = "<USER_ID>", + secret = "<SECRET>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-email-verification.md b/examples/2.3.x/server-kotlin/kotlin/account/update-email-verification.md new file mode 100644 index 000000000..e36908d2a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-email-verification.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateEmailVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-email.md b/examples/2.3.x/server-kotlin/kotlin/account/update-email.md new file mode 100644 index 000000000..6319d8084 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-email.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateEmail( + email = "email@example.com", + password = "password" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-magic-url-session.md b/examples/2.3.x/server-kotlin/kotlin/account/update-magic-url-session.md new file mode 100644 index 000000000..7a9524008 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-magic-url-session.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateMagicURLSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-authenticator.md b/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-authenticator.md new file mode 100644 index 000000000..cba56459b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-authenticator.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +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 account = Account(client) + +val response = account.updateMFAAuthenticator( + type = AuthenticatorType.TOTP, + otp = "<OTP>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-challenge.md b/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-challenge.md new file mode 100644 index 000000000..f0d8e6a03 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-challenge.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateMFAChallenge( + challengeId = "<CHALLENGE_ID>", + otp = "<OTP>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..4563b3bbf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateMFARecoveryCodes() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-mfa.md b/examples/2.3.x/server-kotlin/kotlin/account/update-mfa.md new file mode 100644 index 000000000..7a1a74d59 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-mfa.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateMFA( + mfa = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-name.md b/examples/2.3.x/server-kotlin/kotlin/account/update-name.md new file mode 100644 index 000000000..6fc7f1cd4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-name.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateName( + name = "<NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-password.md b/examples/2.3.x/server-kotlin/kotlin/account/update-password.md new file mode 100644 index 000000000..8d2fab101 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-password.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updatePassword( + password = "password", + oldPassword = "password" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-phone-session.md b/examples/2.3.x/server-kotlin/kotlin/account/update-phone-session.md new file mode 100644 index 000000000..368d77ab4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-phone-session.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updatePhoneSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-phone-verification.md b/examples/2.3.x/server-kotlin/kotlin/account/update-phone-verification.md new file mode 100644 index 000000000..22c05c0be --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-phone-verification.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updatePhoneVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-phone.md b/examples/2.3.x/server-kotlin/kotlin/account/update-phone.md new file mode 100644 index 000000000..a3be3c875 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-phone.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updatePhone( + phone = "+12065550100", + password = "password" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-prefs.md b/examples/2.3.x/server-kotlin/kotlin/account/update-prefs.md new file mode 100644 index 000000000..87740321c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-prefs.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updatePrefs( + prefs = mapOf( + "language" to "en", + "timezone" to "UTC", + "darkTheme" to true + ) +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-recovery-otp.md b/examples/2.3.x/server-kotlin/kotlin/account/update-recovery-otp.md new file mode 100644 index 000000000..4f2186bc5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-recovery-otp.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateRecoveryOTP( + userId = "<USER_ID>", + secret = "<SECRET>", + password = "password" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-recovery.md b/examples/2.3.x/server-kotlin/kotlin/account/update-recovery.md new file mode 100644 index 000000000..4b1869c61 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-recovery.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateRecovery( + userId = "<USER_ID>", + secret = "<SECRET>", + password = "password" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-session.md b/examples/2.3.x/server-kotlin/kotlin/account/update-session.md new file mode 100644 index 000000000..bc85529d4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-session.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateSession( + sessionId = "<SESSION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-status.md b/examples/2.3.x/server-kotlin/kotlin/account/update-status.md new file mode 100644 index 000000000..19e6496c0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-status.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateStatus() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/update-verification.md b/examples/2.3.x/server-kotlin/kotlin/account/update-verification.md new file mode 100644 index 000000000..f19aaa6c3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/account/update-verification.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +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 account = Account(client) + +val response = account.updateVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/activities/get-event.md b/examples/2.3.x/server-kotlin/kotlin/activities/get-event.md new file mode 100644 index 000000000..4bb742bee --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/activities/get-event.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Activities + +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 activities = Activities(client) + +val response = activities.getEvent( + eventId = "<EVENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/activities/list-events.md b/examples/2.3.x/server-kotlin/kotlin/activities/list-events.md new file mode 100644 index 000000000..b6d7922df --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/activities/list-events.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Activities + +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 activities = Activities(client) + +val response = activities.listEvents( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/advisor/delete-report.md b/examples/2.3.x/server-kotlin/kotlin/advisor/delete-report.md new file mode 100644 index 000000000..bc77810fe --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/advisor/delete-report.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Advisor + +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 advisor = Advisor(client) + +val response = advisor.deleteReport( + reportId = "<REPORT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/advisor/get-insight.md b/examples/2.3.x/server-kotlin/kotlin/advisor/get-insight.md new file mode 100644 index 000000000..44ea4391e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/advisor/get-insight.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Advisor + +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 advisor = Advisor(client) + +val response = advisor.getInsight( + reportId = "<REPORT_ID>", + insightId = "<INSIGHT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/advisor/get-report.md b/examples/2.3.x/server-kotlin/kotlin/advisor/get-report.md new file mode 100644 index 000000000..b32c0cd6d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/advisor/get-report.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Advisor + +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 advisor = Advisor(client) + +val response = advisor.getReport( + reportId = "<REPORT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/advisor/list-insights.md b/examples/2.3.x/server-kotlin/kotlin/advisor/list-insights.md new file mode 100644 index 000000000..b5cd6cf2e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/advisor/list-insights.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Advisor + +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 advisor = Advisor(client) + +val response = advisor.listInsights( + reportId = "<REPORT_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/advisor/list-reports.md b/examples/2.3.x/server-kotlin/kotlin/advisor/list-reports.md new file mode 100644 index 000000000..815eaf325 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/advisor/list-reports.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Advisor + +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 advisor = Advisor(client) + +val response = advisor.listReports( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/create-installation-token.md b/examples/2.3.x/server-kotlin/kotlin/apps/create-installation-token.md new file mode 100644 index 000000000..f4be48061 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/create-installation-token.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.createInstallationToken( + appId = "<APP_ID>", + installationId = "<INSTALLATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/create-key.md b/examples/2.3.x/server-kotlin/kotlin/apps/create-key.md new file mode 100644 index 000000000..442ffa6ab --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/create-key.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.createKey( + appId = "<APP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/create-secret.md b/examples/2.3.x/server-kotlin/kotlin/apps/create-secret.md new file mode 100644 index 000000000..e659ed7df --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/create-secret.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.createSecret( + appId = "<APP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/create.md b/examples/2.3.x/server-kotlin/kotlin/apps/create.md new file mode 100644 index 000000000..dfdf0d645 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/create.md @@ -0,0 +1,34 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.create( + appId = "<APP_ID>", + name = "<NAME>", + redirectUris = listOf(), + description = "<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 = "<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 = "<TEAM_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/delete-installation.md b/examples/2.3.x/server-kotlin/kotlin/apps/delete-installation.md new file mode 100644 index 000000000..55ad9e5e1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/delete-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.deleteInstallation( + appId = "<APP_ID>", + installationId = "<INSTALLATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/delete-key.md b/examples/2.3.x/server-kotlin/kotlin/apps/delete-key.md new file mode 100644 index 000000000..0bb018453 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/delete-key.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.deleteKey( + appId = "<APP_ID>", + keyId = "<KEY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/delete-secret.md b/examples/2.3.x/server-kotlin/kotlin/apps/delete-secret.md new file mode 100644 index 000000000..2b7b38e0b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/delete-secret.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.deleteSecret( + appId = "<APP_ID>", + secretId = "<SECRET_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/delete-tokens.md b/examples/2.3.x/server-kotlin/kotlin/apps/delete-tokens.md new file mode 100644 index 000000000..2cfde5f6f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/delete-tokens.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.deleteTokens( + appId = "<APP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/delete.md b/examples/2.3.x/server-kotlin/kotlin/apps/delete.md new file mode 100644 index 000000000..ba61ac1f1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.delete( + appId = "<APP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/get-installation.md b/examples/2.3.x/server-kotlin/kotlin/apps/get-installation.md new file mode 100644 index 000000000..d6a70e810 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/get-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.getInstallation( + appId = "<APP_ID>", + installationId = "<INSTALLATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/get-key.md b/examples/2.3.x/server-kotlin/kotlin/apps/get-key.md new file mode 100644 index 000000000..51190c1bd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/get-key.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.getKey( + appId = "<APP_ID>", + keyId = "<KEY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/get-secret.md b/examples/2.3.x/server-kotlin/kotlin/apps/get-secret.md new file mode 100644 index 000000000..4788eb7b0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/get-secret.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.getSecret( + appId = "<APP_ID>", + secretId = "<SECRET_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/get.md b/examples/2.3.x/server-kotlin/kotlin/apps/get.md new file mode 100644 index 000000000..b146e1d6c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.get( + appId = "<APP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/list-installation-scopes.md b/examples/2.3.x/server-kotlin/kotlin/apps/list-installation-scopes.md new file mode 100644 index 000000000..348cc20cb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/list-installation-scopes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listInstallationScopes() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/list-installations.md b/examples/2.3.x/server-kotlin/kotlin/apps/list-installations.md new file mode 100644 index 000000000..07ec43555 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/list-installations.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listInstallations( + appId = "<APP_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/list-keys.md b/examples/2.3.x/server-kotlin/kotlin/apps/list-keys.md new file mode 100644 index 000000000..7ebf665b0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/list-keys.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listKeys( + appId = "<APP_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-kotlin/kotlin/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..8c755786a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/list-o-auth-2-scopes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listOAuth2Scopes() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/list-secrets.md b/examples/2.3.x/server-kotlin/kotlin/apps/list-secrets.md new file mode 100644 index 000000000..bfb979b07 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/list-secrets.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listSecrets( + appId = "<APP_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/list.md b/examples/2.3.x/server-kotlin/kotlin/apps/list.md new file mode 100644 index 000000000..c6861c7ab --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/list.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.list( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/update-labels.md b/examples/2.3.x/server-kotlin/kotlin/apps/update-labels.md new file mode 100644 index 000000000..3aecf9b2a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/update-labels.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val apps = Apps(client) + +val response = apps.updateLabels( + appId = "<APP_ID>", + labels = listOf() +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/update-team.md b/examples/2.3.x/server-kotlin/kotlin/apps/update-team.md new file mode 100644 index 000000000..0992a5012 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/update-team.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.updateTeam( + appId = "<APP_ID>", + teamId = "<TEAM_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/apps/update.md b/examples/2.3.x/server-kotlin/kotlin/apps/update.md new file mode 100644 index 000000000..c57ae1861 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/apps/update.md @@ -0,0 +1,35 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.update( + appId = "<APP_ID>", + name = "<NAME>", + description = "<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 = "<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/server-kotlin/kotlin/avatars/get-browser.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-browser.md new file mode 100644 index 000000000..2565bd7cf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-browser.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Browser + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = Browser.AVANT_BROWSER, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/get-credit-card.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-credit-card.md new file mode 100644 index 000000000..08ce6f06c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-credit-card.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.CreditCard + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/get-favicon.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-favicon.md new file mode 100644 index 000000000..b19ad3ffc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-favicon.md @@ -0,0 +1,16 @@ +```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 result = avatars.getFavicon( + url = "https://example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/get-flag.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-flag.md new file mode 100644 index 000000000..3f411c337 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-flag.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Flag + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = Flag.AFGHANISTAN, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/get-image.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-image.md new file mode 100644 index 000000000..5efffd328 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-image.md @@ -0,0 +1,18 @@ +```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 result = avatars.getImage( + url = "https://example.com", + width = 0, // optional + height = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/get-initials.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-initials.md new file mode 100644 index 000000000..32e7c4ffb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-initials.md @@ -0,0 +1,19 @@ +```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 result = avatars.getInitials( + name = "<NAME>", // optional + width = 0, // optional + height = 0, // optional + background = "FFFFFF" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/get-photo.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-photo.md new file mode 100644 index 000000000..6cd21327b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-photo.md @@ -0,0 +1,23 @@ +```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 result = avatars.getPhoto( + width = 0, // optional + height = 0, // optional + quality = 0, // optional + output = "png", // optional + rating = "g", // optional + userId = "current()", // optional + emailHash = "<EMAIL_HASH>", // optional + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/get-qr.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-qr.md new file mode 100644 index 000000000..e9419fef5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-qr.md @@ -0,0 +1,19 @@ +```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 result = avatars.getQR( + text = "<TEXT>", + size = 1, // optional + margin = 0, // optional + download = false // optional +) +``` 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 new file mode 100644 index 000000000..ea26656a8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-screenshot.md @@ -0,0 +1,42 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.BrowserTheme +import io.appwrite.enums.Timezone +import io.appwrite.enums.BrowserPermission +import io.appwrite.enums.ImageFormat + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getScreenshot( + url = "https://example.com", + headers = mapOf( + "Authorization" to "Bearer token123", + "X-Custom-Header" to "value" + ), // optional + viewportWidth = 1920, // optional + viewportHeight = 1080, // optional + scale = 2, // 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 + locale = "en-US", // optional + timezone = Timezone.AFRICA_ABIDJAN, // optional + latitude = 37.7749, // optional + longitude = -122.4194, // optional + accuracy = 100, // optional + touch = true, // optional + permissions = listOf(BrowserPermission.GEOLOCATION, BrowserPermission.NOTIFICATIONS), // optional + sleep = 3, // optional + width = 800, // optional + height = 600, // optional + quality = 85, // optional + output = ImageFormat.JPEG // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/create-archive.md b/examples/2.3.x/server-kotlin/kotlin/backups/create-archive.md new file mode 100644 index 000000000..dae911b20 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/create-archive.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups +import io.appwrite.enums.BackupServices + +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 backups = Backups(client) + +val response = backups.createArchive( + services = listOf(BackupServices.DATABASES), + resourceId = "<RESOURCE_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/create-policy.md b/examples/2.3.x/server-kotlin/kotlin/backups/create-policy.md new file mode 100644 index 000000000..21133d094 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/create-policy.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups +import io.appwrite.enums.BackupServices + +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 backups = Backups(client) + +val response = backups.createPolicy( + policyId = "<POLICY_ID>", + services = listOf(BackupServices.DATABASES), + retention = 1, + schedule = "", + name = "<NAME>", // optional + resourceId = "<RESOURCE_ID>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/create-restoration.md b/examples/2.3.x/server-kotlin/kotlin/backups/create-restoration.md new file mode 100644 index 000000000..852c9d00e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/create-restoration.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups +import io.appwrite.enums.BackupServices + +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 backups = Backups(client) + +val response = backups.createRestoration( + archiveId = "<ARCHIVE_ID>", + services = listOf(BackupServices.DATABASES), + newResourceId = "<NEW_RESOURCE_ID>", // optional + newResourceName = "<NEW_RESOURCE_NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/delete-archive.md b/examples/2.3.x/server-kotlin/kotlin/backups/delete-archive.md new file mode 100644 index 000000000..deb19d02c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/delete-archive.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.deleteArchive( + archiveId = "<ARCHIVE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/delete-policy.md b/examples/2.3.x/server-kotlin/kotlin/backups/delete-policy.md new file mode 100644 index 000000000..c5ab29e0d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/delete-policy.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.deletePolicy( + policyId = "<POLICY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/get-archive.md b/examples/2.3.x/server-kotlin/kotlin/backups/get-archive.md new file mode 100644 index 000000000..84574f3bd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/get-archive.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.getArchive( + archiveId = "<ARCHIVE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/get-policy.md b/examples/2.3.x/server-kotlin/kotlin/backups/get-policy.md new file mode 100644 index 000000000..8d11217b1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/get-policy.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.getPolicy( + policyId = "<POLICY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/get-restoration.md b/examples/2.3.x/server-kotlin/kotlin/backups/get-restoration.md new file mode 100644 index 000000000..1ad395d54 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/get-restoration.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.getRestoration( + restorationId = "<RESTORATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/list-archives.md b/examples/2.3.x/server-kotlin/kotlin/backups/list-archives.md new file mode 100644 index 000000000..0459f6830 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/list-archives.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.listArchives( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/list-policies.md b/examples/2.3.x/server-kotlin/kotlin/backups/list-policies.md new file mode 100644 index 000000000..1cfac1028 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/list-policies.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.listPolicies( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/list-restorations.md b/examples/2.3.x/server-kotlin/kotlin/backups/list-restorations.md new file mode 100644 index 000000000..df4646f8e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/list-restorations.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.listRestorations( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/backups/update-policy.md b/examples/2.3.x/server-kotlin/kotlin/backups/update-policy.md new file mode 100644 index 000000000..367a2546b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/backups/update-policy.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Backups + +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 backups = Backups(client) + +val response = backups.updatePolicy( + policyId = "<POLICY_ID>", + name = "<NAME>", // optional + retention = 1, // optional + schedule = "", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-big-int-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-big-int-attribute.md new file mode 100644 index 000000000..be3879861 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-big-int-attribute.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createBigIntAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + min = 0, // optional + max = 1000000, // optional + default = 0, // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-boolean-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-boolean-attribute.md new file mode 100644 index 000000000..622db99d1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-boolean-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createBooleanAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = false, // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-collection.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-collection.md new file mode 100644 index 000000000..9dbc8696f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-collection.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.Permission +import io.appwrite.Role + +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 databases = Databases(client) + +val response = databases.createCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf(Permission.read(Role.any())), // optional + documentSecurity = false, // optional + enabled = false, // optional + attributes = listOf(), // optional + indexes = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-datetime-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-datetime-attribute.md new file mode 100644 index 000000000..56fbed55d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-datetime-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createDatetimeAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "2020-10-15T06:38:00.000+00:00", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-document.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-document.md new file mode 100644 index 000000000..f0cb24e9a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-document.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.Permission +import io.appwrite.Role + +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 databases = Databases(client) + +val response = databases.createDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` 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 new file mode 100644 index 000000000..a0f32b6c3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf(), + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-email-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-email-attribute.md new file mode 100644 index 000000000..cfa4557d5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-email-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createEmailAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "email@example.com", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-enum-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-enum-attribute.md new file mode 100644 index 000000000..e1e52ba11 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-enum-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createEnumAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + elements = listOf("active", "inactive"), + required = false, + default = "active", // optional + array = false // 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 new file mode 100644 index 000000000..2476449b9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-float-attribute.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createFloatAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + min = 0, // optional + max = 100, // 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 new file mode 100644 index 000000000..4dd7197c3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-index.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.DatabasesIndexType +import io.appwrite.enums.OrderBy + +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 databases = Databases(client) + +val response = databases.createIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + type = DatabasesIndexType.KEY, + attributes = listOf(), + orders = listOf(OrderBy.ASC), // optional + lengths = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-integer-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-integer-attribute.md new file mode 100644 index 000000000..db177ae30 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-integer-attribute.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createIntegerAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + min = 0, // optional + max = 100, // optional + default = 10, // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-ip-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-ip-attribute.md new file mode 100644 index 000000000..48a394aa1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-ip-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createIpAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "192.0.2.0", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-line-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-line-attribute.md new file mode 100644 index 000000000..e902d8683 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-line-attribute.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createLineAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6)) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-longtext-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-longtext-attribute.md new file mode 100644 index 000000000..6fc1960a4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-longtext-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createLongtextAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..07e7ec97f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-mediumtext-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createMediumtextAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-operations.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-operations.md new file mode 100644 index 000000000..5c414afd1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-operations.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createOperations( + transactionId = "<TRANSACTION_ID>", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "<DATABASE_ID>", + "collectionId" to "<COLLECTION_ID>", + "documentId" to "<DOCUMENT_ID>", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-point-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-point-attribute.md new file mode 100644 index 000000000..824326ad9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-point-attribute.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createPointAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = listOf(1, 2) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-polygon-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-polygon-attribute.md new file mode 100644 index 000000000..3f117c375 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-polygon-attribute.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createPolygonAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = listOf(listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6), listOf(1, 2))) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-relationship-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-relationship-attribute.md new file mode 100644 index 000000000..1542d5b5a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-relationship-attribute.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.RelationshipType +import io.appwrite.enums.RelationMutate + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createRelationshipAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + relatedCollectionId = "<RELATED_COLLECTION_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "<KEY>", // optional + twoWayKey = "<TWO_WAY_KEY>", // optional + onDelete = RelationMutate.CASCADE // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-string-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-string-attribute.md new file mode 100644 index 000000000..3f1133a80 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-string-attribute.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createStringAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + size = 1, + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-text-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-text-attribute.md new file mode 100644 index 000000000..339fad968 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-text-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createTextAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-transaction.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-transaction.md new file mode 100644 index 000000000..affea1ade --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createTransaction( + ttl = 60 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-url-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-url-attribute.md new file mode 100644 index 000000000..159dcbae5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-url-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createUrlAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "https://example.com", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-varchar-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-varchar-attribute.md new file mode 100644 index 000000000..9dcd201ee --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-varchar-attribute.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.createVarcharAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + size = 1, + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create.md b/examples/2.3.x/server-kotlin/kotlin/databases/create.md new file mode 100644 index 000000000..84b42af29 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // 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 new file mode 100644 index 000000000..fca8286ea --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.decrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "<ATTRIBUTE>", + value = 1, // optional + min = 0, // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/delete-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/delete-attribute.md new file mode 100644 index 000000000..3f916e318 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/delete-attribute.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.deleteAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/delete-collection.md b/examples/2.3.x/server-kotlin/kotlin/databases/delete-collection.md new file mode 100644 index 000000000..fcb70adf3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/delete-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.deleteCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/delete-document.md b/examples/2.3.x/server-kotlin/kotlin/databases/delete-document.md new file mode 100644 index 000000000..42e196e05 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/delete-document.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.deleteDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + 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 new file mode 100644 index 000000000..43baf47bc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/delete-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.deleteDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/delete-index.md b/examples/2.3.x/server-kotlin/kotlin/databases/delete-index.md new file mode 100644 index 000000000..51cdeb6d4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/delete-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.deleteIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/delete-transaction.md b/examples/2.3.x/server-kotlin/kotlin/databases/delete-transaction.md new file mode 100644 index 000000000..20425d68b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/delete-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.deleteTransaction( + transactionId = "<TRANSACTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/delete.md b/examples/2.3.x/server-kotlin/kotlin/databases/delete.md new file mode 100644 index 000000000..bee3ffc18 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.delete( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/get-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/get-attribute.md new file mode 100644 index 000000000..735bec1b2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/get-attribute.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.getAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/get-collection.md b/examples/2.3.x/server-kotlin/kotlin/databases/get-collection.md new file mode 100644 index 000000000..374a96653 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/get-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.getCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/get-document.md b/examples/2.3.x/server-kotlin/kotlin/databases/get-document.md new file mode 100644 index 000000000..b7f492c1f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/get-document.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.getDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/get-index.md b/examples/2.3.x/server-kotlin/kotlin/databases/get-index.md new file mode 100644 index 000000000..5e5765ad4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/get-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.getIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/get-transaction.md b/examples/2.3.x/server-kotlin/kotlin/databases/get-transaction.md new file mode 100644 index 000000000..f4b58289e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/get-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.getTransaction( + transactionId = "<TRANSACTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/get.md b/examples/2.3.x/server-kotlin/kotlin/databases/get.md new file mode 100644 index 000000000..53f3359c0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.get( + databaseId = "<DATABASE_ID>" +) +``` 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 new file mode 100644 index 000000000..4d0ffb2a9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/increment-document-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.incrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "<ATTRIBUTE>", + value = 1, // optional + max = 100, // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/list-attributes.md b/examples/2.3.x/server-kotlin/kotlin/databases/list-attributes.md new file mode 100644 index 000000000..51b330a33 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/list-attributes.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.listAttributes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/list-collections.md b/examples/2.3.x/server-kotlin/kotlin/databases/list-collections.md new file mode 100644 index 000000000..85dd1298e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/list-collections.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.listCollections( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/list-documents.md b/examples/2.3.x/server-kotlin/kotlin/databases/list-documents.md new file mode 100644 index 000000000..26e60e6ff --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/list-documents.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.listDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>", // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/list-indexes.md b/examples/2.3.x/server-kotlin/kotlin/databases/list-indexes.md new file mode 100644 index 000000000..d91e4b2db --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/list-indexes.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.listIndexes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + total = false // 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 new file mode 100644 index 000000000..1195069e1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/list-transactions.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.listTransactions( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/list.md b/examples/2.3.x/server-kotlin/kotlin/databases/list.md new file mode 100644 index 000000000..f869a96f9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.list( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-big-int-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-big-int-attribute.md new file mode 100644 index 000000000..f0c67c649 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-big-int-attribute.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateBigIntAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = 0, + min = 0, // optional + max = 1000000, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-boolean-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-boolean-attribute.md new file mode 100644 index 000000000..6bd5e384c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-boolean-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateBooleanAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = false, + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-collection.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-collection.md new file mode 100644 index 000000000..f383054c0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-collection.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.Permission +import io.appwrite.Role + +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 databases = Databases(client) + +val response = databases.updateCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", // optional + permissions = listOf(Permission.read(Role.any())), // optional + documentSecurity = false, // optional + enabled = false, // optional + purge = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-datetime-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-datetime-attribute.md new file mode 100644 index 000000000..d0eff7e1c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-datetime-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateDatetimeAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "2020-10-15T06:38:00.000+00:00", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-document.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-document.md new file mode 100644 index 000000000..15cebaa2c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-document.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.Permission +import io.appwrite.Role + +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 databases = Databases(client) + +val response = databases.updateDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 33, + "isAdmin" to false + ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-documents.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-documents.md new file mode 100644 index 000000000..bed508885 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-documents.md @@ -0,0 +1,26 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 33, + "isAdmin" to false + ), // optional + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-email-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-email-attribute.md new file mode 100644 index 000000000..1a644541e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-email-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateEmailAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "email@example.com", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-enum-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-enum-attribute.md new file mode 100644 index 000000000..eb05deca5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-enum-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateEnumAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + elements = listOf("active", "inactive"), + required = false, + default = "active", + newKey = "<NEW_KEY>" // 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 new file mode 100644 index 000000000..d0049003c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-float-attribute.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateFloatAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = 10.5, + min = 0, // optional + max = 100, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-integer-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-integer-attribute.md new file mode 100644 index 000000000..7ec1ccbe5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-integer-attribute.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateIntegerAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = 10, + min = 0, // optional + max = 100, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-ip-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-ip-attribute.md new file mode 100644 index 000000000..e0255a08b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-ip-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateIpAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "192.0.2.0", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-line-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-line-attribute.md new file mode 100644 index 000000000..528178ca7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-line-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateLineAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6)), // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-longtext-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-longtext-attribute.md new file mode 100644 index 000000000..2fa49ff80 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-longtext-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateLongtextAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..cd188faa3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-mediumtext-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateMediumtextAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-point-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-point-attribute.md new file mode 100644 index 000000000..31ada757f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-point-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updatePointAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = listOf(1, 2), // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-polygon-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-polygon-attribute.md new file mode 100644 index 000000000..0f0d0ed19 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-polygon-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updatePolygonAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = listOf(listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6), listOf(1, 2))), // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-relationship-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-relationship-attribute.md new file mode 100644 index 000000000..c6529458b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-relationship-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.RelationMutate + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateRelationshipAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + onDelete = RelationMutate.CASCADE, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-string-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-string-attribute.md new file mode 100644 index 000000000..97b5fe3b0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-string-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateStringAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + size = 1, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-text-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-text-attribute.md new file mode 100644 index 000000000..7ba5d3adb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-text-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateTextAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-transaction.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-transaction.md new file mode 100644 index 000000000..d59a11057 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-transaction.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateTransaction( + transactionId = "<TRANSACTION_ID>", + commit = false, // optional + rollback = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-url-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-url-attribute.md new file mode 100644 index 000000000..6890bf5e2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-url-attribute.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateUrlAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "https://example.com", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-varchar-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-varchar-attribute.md new file mode 100644 index 000000000..4b0d4549b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-varchar-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.updateVarcharAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + size = 1, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update.md b/examples/2.3.x/server-kotlin/kotlin/databases/update.md new file mode 100644 index 000000000..5adc8a013 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/upsert-document.md b/examples/2.3.x/server-kotlin/kotlin/databases/upsert-document.md new file mode 100644 index 000000000..5f1caef25 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/upsert-document.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.Permission +import io.appwrite.Role + +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 databases = Databases(client) + +val response = databases.upsertDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..a9e673c20 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/databases/upsert-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +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 databases = Databases(client) + +val response = databases.upsertDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf(), + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-collection.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-collection.md new file mode 100644 index 000000000..29974f2de --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-collection.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf(Permission.read(Role.any())), // optional + documentSecurity = false, // optional + enabled = false, // optional + attributes = listOf(), // optional + indexes = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-document.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-document.md new file mode 100644 index 000000000..dc0bfa9ae --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-document.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), + permissions = listOf(Permission.read(Role.any())), // optional + 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 new file mode 100644 index 000000000..b6f084798 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf(), + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-failover.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-failover.md new file mode 100644 index 000000000..39dd8b2e4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-failover.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createFailover( + databaseId = "<DATABASE_ID>", + targetReplicaId = "<TARGET_REPLICA_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 new file mode 100644 index 000000000..df6fdb523 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-index.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.enums.DocumentsDBIndexType +import io.appwrite.enums.OrderBy + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + type = DocumentsDBIndexType.KEY, + attributes = listOf(), + orders = listOf(OrderBy.ASC), // optional + lengths = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-operations.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-operations.md new file mode 100644 index 000000000..851b65ced --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createOperations( + transactionId = "<TRANSACTION_ID>", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "<DATABASE_ID>", + "collectionId" to "<COLLECTION_ID>", + "documentId" to "<DOCUMENT_ID>", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-transaction.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-transaction.md new file mode 100644 index 000000000..b695e5326 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createTransaction( + ttl = 60 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create.md new file mode 100644 index 000000000..7366852d0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false, // optional + specification = "serverless", // optional + replicas = 0, // optional + syncMode = "async" // 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 new file mode 100644 index 000000000..c4668ec55 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.decrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "<ATTRIBUTE>", + value = 1, // optional + min = 0, // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-collection.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-collection.md new file mode 100644 index 000000000..9f57b1889 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-document.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-document.md new file mode 100644 index 000000000..36624b6c9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-document.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + 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 new file mode 100644 index 000000000..9a5397c07 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-index.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-index.md new file mode 100644 index 000000000..e567127f2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-transaction.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-transaction.md new file mode 100644 index 000000000..3adfb9a67 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteTransaction( + transactionId = "<TRANSACTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete.md new file mode 100644 index 000000000..63ef123f8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.delete( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-collection.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-collection.md new file mode 100644 index 000000000..aee65b9b7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-document.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-document.md new file mode 100644 index 000000000..eb2aad88f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-document.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-index.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-index.md new file mode 100644 index 000000000..2630f3e4c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-replicas.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-replicas.md new file mode 100644 index 000000000..2aeff4a48 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-replicas.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getReplicas( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-status.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-status.md new file mode 100644 index 000000000..7e1bd9691 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-status.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getStatus( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-transaction.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-transaction.md new file mode 100644 index 000000000..7ac55d4bd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getTransaction( + transactionId = "<TRANSACTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/get.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get.md new file mode 100644 index 000000000..aa2405569 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.get( + databaseId = "<DATABASE_ID>" +) +``` 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 new file mode 100644 index 000000000..bfc586033 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/increment-document-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.incrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "<ATTRIBUTE>", + value = 1, // optional + max = 100, // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-collections.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-collections.md new file mode 100644 index 000000000..0240c1dac --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-collections.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listCollections( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-documents.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-documents.md new file mode 100644 index 000000000..d1c688f25 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-documents.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>", // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-indexes.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-indexes.md new file mode 100644 index 000000000..b83909ec5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-indexes.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listIndexes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-operations.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-operations.md new file mode 100644 index 000000000..40a104329 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-operations.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listOperations( + databaseId = "<DATABASE_ID>", + status = "queued", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-specifications.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-specifications.md new file mode 100644 index 000000000..7b2f1eef8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-specifications.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +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 documentsDB = DocumentsDB(client) + +val response = documentsDB.listSpecifications() +``` 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 new file mode 100644 index 000000000..00967cc24 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-transactions.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listTransactions( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/list.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list.md new file mode 100644 index 000000000..83f1798f8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.list( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-collection.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-collection.md new file mode 100644 index 000000000..4c873b96d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-collection.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.updateCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf(Permission.read(Role.any())), // optional + documentSecurity = false, // optional + enabled = false, // optional + purge = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-document.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-document.md new file mode 100644 index 000000000..e7bdba5fc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-document.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.updateDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-documents.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-documents.md new file mode 100644 index 000000000..175b6eec2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-documents.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.updateDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-transaction.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-transaction.md new file mode 100644 index 000000000..99ace754e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update-transaction.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.updateTransaction( + transactionId = "<TRANSACTION_ID>", + commit = false, // optional + rollback = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/update.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update.md new file mode 100644 index 000000000..0fdbc6d91 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/update.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false, // optional + specification = "serverless", // optional + replicas = 0, // optional + syncMode = "async" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/upsert-document.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/upsert-document.md new file mode 100644 index 000000000..6b31df066 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/upsert-document.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.upsertDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..abf463385 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/upsert-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.upsertDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf(), + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-google-workspace.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..539693e8f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-google-workspace.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createPresetGoogleWorkspace( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-i-cloud.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..9560699d7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-i-cloud.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createPresetICloud( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-mailgun.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-mailgun.md new file mode 100644 index 000000000..f6007b481 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-mailgun.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createPresetMailgun( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-outlook.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-outlook.md new file mode 100644 index 000000000..f48c75534 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-outlook.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createPresetOutlook( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-proton-mail.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..78f90c571 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-proton-mail.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createPresetProtonMail( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-zoho.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-zoho.md new file mode 100644 index 000000000..10e0a557c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-preset-zoho.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createPresetZoho( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-a.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-a.md new file mode 100644 index 000000000..8b7214dc1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-a.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordA( + domainId = "<DOMAIN_ID>", + name = "", + value = "", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-aaaa.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-aaaa.md new file mode 100644 index 000000000..fececf849 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-aaaa.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordAAAA( + domainId = "<DOMAIN_ID>", + name = "", + value = "", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-alias.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-alias.md new file mode 100644 index 000000000..78d2052f7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-alias.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordAlias( + domainId = "<DOMAIN_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-caa.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-caa.md new file mode 100644 index 000000000..df33e483e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-caa.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordCAA( + domainId = "<DOMAIN_ID>", + name = "", + value = "", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-cname.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-cname.md new file mode 100644 index 000000000..64c69f557 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-cname.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordCNAME( + domainId = "<DOMAIN_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-https.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-https.md new file mode 100644 index 000000000..c2b806ff3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-https.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordHTTPS( + domainId = "<DOMAIN_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-mx.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-mx.md new file mode 100644 index 000000000..3f3ebca16 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-mx.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordMX( + domainId = "<DOMAIN_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + priority = 0, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-ns.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-ns.md new file mode 100644 index 000000000..d0aa9059c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-ns.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordNS( + domainId = "<DOMAIN_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-srv.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-srv.md new file mode 100644 index 000000000..7a93c2447 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-srv.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordSRV( + domainId = "<DOMAIN_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + priority = 0, + weight = 0, + port = 0, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create-record-txt.md b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-txt.md new file mode 100644 index 000000000..bb86a6c65 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create-record-txt.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.createRecordTXT( + domainId = "<DOMAIN_ID>", + name = "", + ttl = 1, + value = "<VALUE>", // optional + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/create.md b/examples/2.3.x/server-kotlin/kotlin/domains/create.md new file mode 100644 index 000000000..b7ce26bca --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/create.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.create( + teamId = "<TEAM_ID>", + domain = "example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/delete-record.md b/examples/2.3.x/server-kotlin/kotlin/domains/delete-record.md new file mode 100644 index 000000000..8c6fc52af --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/delete-record.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.deleteRecord( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/delete.md b/examples/2.3.x/server-kotlin/kotlin/domains/delete.md new file mode 100644 index 000000000..5e030a65a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.delete( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-google-workspace.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..8e03f2a88 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-google-workspace.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getPresetGoogleWorkspace( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-i-cloud.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..f7a5db89b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-i-cloud.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getPresetICloud( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-mailgun.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-mailgun.md new file mode 100644 index 000000000..913bfee94 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-mailgun.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getPresetMailgun( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-outlook.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-outlook.md new file mode 100644 index 000000000..f490ae21c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-outlook.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getPresetOutlook( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-proton-mail.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..ed1ab276b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-proton-mail.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getPresetProtonMail( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-zoho.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-zoho.md new file mode 100644 index 000000000..5d250cbb5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-preset-zoho.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getPresetZoho( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-price.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-price.md new file mode 100644 index 000000000..cfa7bef41 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-price.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains +import io.appwrite.enums.DomainRegistrationType + +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 domains = Domains(client) + +val response = domains.getPrice( + domain = "example.com", + periodYears = 0, // optional + registrationType = DomainRegistrationType.NEW // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-record.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-record.md new file mode 100644 index 000000000..403f4db2d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-record.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getRecord( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-transfer-status.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-transfer-status.md new file mode 100644 index 000000000..cb686f58a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-transfer-status.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getTransferStatus( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get-zone.md b/examples/2.3.x/server-kotlin/kotlin/domains/get-zone.md new file mode 100644 index 000000000..125e69751 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get-zone.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.getZone( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/get.md b/examples/2.3.x/server-kotlin/kotlin/domains/get.md new file mode 100644 index 000000000..f10935eaf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.get( + domainId = "<DOMAIN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/list-prices.md b/examples/2.3.x/server-kotlin/kotlin/domains/list-prices.md new file mode 100644 index 000000000..cb4626c84 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/list-prices.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains +import io.appwrite.enums.DomainRegistrationType + +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 domains = Domains(client) + +val response = domains.listPrices( + domains = listOf(), + periodYears = 0, // optional + registrationType = DomainRegistrationType.NEW // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/list-records.md b/examples/2.3.x/server-kotlin/kotlin/domains/list-records.md new file mode 100644 index 000000000..bb4780743 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/list-records.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.listRecords( + domainId = "<DOMAIN_ID>", + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/list.md b/examples/2.3.x/server-kotlin/kotlin/domains/list.md new file mode 100644 index 000000000..e6d69b028 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/list.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-nameservers.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-nameservers.md new file mode 100644 index 000000000..6c714e0a8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-nameservers.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateNameservers( + domainId = "<DOMAIN_ID>", + nameservers = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-a.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-a.md new file mode 100644 index 000000000..26879ae1b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-a.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordA( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-aaaa.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-aaaa.md new file mode 100644 index 000000000..e0e35cf55 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-aaaa.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordAAAA( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-alias.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-alias.md new file mode 100644 index 000000000..0e04ca4a4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-alias.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordAlias( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-caa.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-caa.md new file mode 100644 index 000000000..828f87cb3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-caa.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordCAA( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-cname.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-cname.md new file mode 100644 index 000000000..238eb925a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-cname.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordCNAME( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-https.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-https.md new file mode 100644 index 000000000..c3524d127 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-https.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordHTTPS( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-mx.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-mx.md new file mode 100644 index 000000000..293eb577a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-mx.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordMX( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + priority = 0, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-ns.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-ns.md new file mode 100644 index 000000000..f9ec49962 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-ns.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordNS( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-srv.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-srv.md new file mode 100644 index 000000000..ee0478b44 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-srv.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordSRV( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + priority = 0, + weight = 0, + port = 0, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-record-txt.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-txt.md new file mode 100644 index 000000000..4385bb21b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-record-txt.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateRecordTXT( + domainId = "<DOMAIN_ID>", + recordId = "<RECORD_ID>", + name = "", + value = "<VALUE>", + ttl = 1, + comment = "<COMMENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-team.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-team.md new file mode 100644 index 000000000..43b3f4d93 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-team.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateTeam( + domainId = "<DOMAIN_ID>", + teamId = "<TEAM_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/update-zone.md b/examples/2.3.x/server-kotlin/kotlin/domains/update-zone.md new file mode 100644 index 000000000..0e6b6fe8f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/update-zone.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.updateZone( + domainId = "<DOMAIN_ID>", + content = "<CONTENT>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/domains/verify-nameservers.md b/examples/2.3.x/server-kotlin/kotlin/domains/verify-nameservers.md new file mode 100644 index 000000000..2cf99ef0c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/domains/verify-nameservers.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Domains + +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 domains = Domains(client) + +val response = domains.verifyNameservers( + domainId = "<DOMAIN_ID>" +) +``` 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 new file mode 100644 index 000000000..6d0b3c1ca --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/embeddings/create-text-embeddings.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Embeddings +import io.appwrite.enums.EmbeddingModel + +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 embeddings = Embeddings(client) + +val response = embeddings.createTextEmbeddings( + texts = listOf(), + model = EmbeddingModel.NOMIC_EMBED_TEXT // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/create-deployment.md b/examples/2.3.x/server-kotlin/kotlin/functions/create-deployment.md new file mode 100644 index 000000000..3fe1a24f6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/create-deployment.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.createDeployment( + functionId = "<FUNCTION_ID>", + code = InputFile.fromPath("file.png"), + activate = false, + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md b/examples/2.3.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..4fda762a9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.createDuplicateDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + buildId = "<BUILD_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/create-execution.md b/examples/2.3.x/server-kotlin/kotlin/functions/create-execution.md new file mode 100644 index 000000000..1bae93d37 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/create-execution.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.ExecutionMethod + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.createExecution( + functionId = "<FUNCTION_ID>", + body = "<BODY>", // optional + async = false, // optional + path = "<PATH>", // optional + method = ExecutionMethod.GET, // optional + headers = mapOf( "a" to "b" ), // optional + scheduledAt = "<SCHEDULED_AT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/create-template-deployment.md b/examples/2.3.x/server-kotlin/kotlin/functions/create-template-deployment.md new file mode 100644 index 000000000..ebc28411b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/create-template-deployment.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.TemplateReferenceType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createTemplateDeployment( + functionId = "<FUNCTION_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + type = TemplateReferenceType.COMMIT, + reference = "<REFERENCE>", + activate = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/create-variable.md b/examples/2.3.x/server-kotlin/kotlin/functions/create-variable.md new file mode 100644 index 000000000..28c8ef7f9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/create-variable.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.createVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/create-vcs-deployment.md b/examples/2.3.x/server-kotlin/kotlin/functions/create-vcs-deployment.md new file mode 100644 index 000000000..143083c6c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/create-vcs-deployment.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.VCSReferenceType + +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 functions = Functions(client) + +val response = functions.createVcsDeployment( + functionId = "<FUNCTION_ID>", + type = VCSReferenceType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/create.md b/examples/2.3.x/server-kotlin/kotlin/functions/create.md new file mode 100644 index 000000000..5c05100e7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/create.md @@ -0,0 +1,39 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.Runtime +import io.appwrite.enums.ProjectKeyScopes + +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 functions = Functions(client) + +val response = functions.create( + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = Runtime.NODE_14_5, + execute = listOf("any"), // optional + events = listOf(), // optional + schedule = "0 0 * * *", // optional + timeout = 1, // optional + enabled = false, // optional + logging = false, // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional + scopes = listOf(ProjectKeyScopes.PROJECT_READ), // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches = listOf(), // optional + providerPaths = listOf(), // optional + buildSpecification = "s-1vcpu-512mb", // optional + runtimeSpecification = "s-1vcpu-512mb", // optional + deploymentRetention = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/delete-deployment.md b/examples/2.3.x/server-kotlin/kotlin/functions/delete-deployment.md new file mode 100644 index 000000000..d3129ad60 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/delete-deployment.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.deleteDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/delete-execution.md b/examples/2.3.x/server-kotlin/kotlin/functions/delete-execution.md new file mode 100644 index 000000000..82e132b07 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/delete-execution.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.deleteExecution( + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/delete-variable.md b/examples/2.3.x/server-kotlin/kotlin/functions/delete-variable.md new file mode 100644 index 000000000..803f5af18 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/delete-variable.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.deleteVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/delete.md b/examples/2.3.x/server-kotlin/kotlin/functions/delete.md new file mode 100644 index 000000000..5970fbb24 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.delete( + functionId = "<FUNCTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/get-deployment-download.md b/examples/2.3.x/server-kotlin/kotlin/functions/get-deployment-download.md new file mode 100644 index 000000000..bf7c03f1d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/get-deployment-download.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.DeploymentDownloadType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val result = functions.getDeploymentDownload( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = DeploymentDownloadType.SOURCE, // optional + token = "<TOKEN>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/get-deployment.md b/examples/2.3.x/server-kotlin/kotlin/functions/get-deployment.md new file mode 100644 index 000000000..c8fd70766 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/get-deployment.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.getDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/get-execution.md b/examples/2.3.x/server-kotlin/kotlin/functions/get-execution.md new file mode 100644 index 000000000..38e313815 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/get-execution.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.getExecution( + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/get-variable.md b/examples/2.3.x/server-kotlin/kotlin/functions/get-variable.md new file mode 100644 index 000000000..09b9fd1fa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/get-variable.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.getVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/get.md b/examples/2.3.x/server-kotlin/kotlin/functions/get.md new file mode 100644 index 000000000..035dc3b87 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.get( + functionId = "<FUNCTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/list-deployments.md b/examples/2.3.x/server-kotlin/kotlin/functions/list-deployments.md new file mode 100644 index 000000000..950e60480 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/list-deployments.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.listDeployments( + functionId = "<FUNCTION_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/list-executions.md b/examples/2.3.x/server-kotlin/kotlin/functions/list-executions.md new file mode 100644 index 000000000..42b23a261 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/list-executions.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.listExecutions( + functionId = "<FUNCTION_ID>", + queries = listOf(), // optional + total = false // 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 new file mode 100644 index 000000000..b32e73bf0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/list-runtimes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.listRuntimes() +``` 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 new file mode 100644 index 000000000..516eeb856 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/list-specifications.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.listSpecifications( + type = "runtimes" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/list-variables.md b/examples/2.3.x/server-kotlin/kotlin/functions/list-variables.md new file mode 100644 index 000000000..e7f0e55a0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/list-variables.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.listVariables( + functionId = "<FUNCTION_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/list.md b/examples/2.3.x/server-kotlin/kotlin/functions/list.md new file mode 100644 index 000000000..a76143269 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.list( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/update-deployment-status.md b/examples/2.3.x/server-kotlin/kotlin/functions/update-deployment-status.md new file mode 100644 index 000000000..acbb9bcd3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/update-deployment-status.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.updateDeploymentStatus( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/update-function-deployment.md b/examples/2.3.x/server-kotlin/kotlin/functions/update-function-deployment.md new file mode 100644 index 000000000..a94335067 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/update-function-deployment.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.updateFunctionDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/update-variable.md b/examples/2.3.x/server-kotlin/kotlin/functions/update-variable.md new file mode 100644 index 000000000..9085015fa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/update-variable.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +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 functions = Functions(client) + +val response = functions.updateVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", // optional + value = "<VALUE>", // optional + secret = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/update.md b/examples/2.3.x/server-kotlin/kotlin/functions/update.md new file mode 100644 index 000000000..a7acbe65a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/functions/update.md @@ -0,0 +1,39 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.Runtime +import io.appwrite.enums.ProjectKeyScopes + +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 functions = Functions(client) + +val response = functions.update( + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = Runtime.NODE_14_5, // optional + execute = listOf("any"), // optional + events = listOf(), // optional + schedule = "0 0 * * *", // optional + timeout = 1, // optional + enabled = false, // optional + logging = false, // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional + scopes = listOf(ProjectKeyScopes.PROJECT_READ), // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches = listOf(), // optional + providerPaths = listOf(), // optional + buildSpecification = "s-1vcpu-512mb", // optional + runtimeSpecification = "s-1vcpu-512mb", // optional + deploymentRetention = 0 // 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 new file mode 100644 index 000000000..3ec94a5d4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/graphql/mutation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +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 graphql = Graphql(client) + +val response = graphql.mutation( + query = mapOf( "a" to "b" ) +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/graphql/query.md b/examples/2.3.x/server-kotlin/kotlin/graphql/query.md new file mode 100644 index 000000000..e22d508b3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/graphql/query.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +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 graphql = Graphql(client) + +val response = graphql.query( + query = mapOf( "a" to "b" ) +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/locale/get.md b/examples/2.3.x/server-kotlin/kotlin/locale/get.md new file mode 100644 index 000000000..aa14e4501 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/locale/get.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +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 locale = Locale(client) + +val response = locale.get() +``` 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 new file mode 100644 index 000000000..d7d323e4f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-codes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +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 locale = Locale(client) + +val response = locale.listCodes() +``` 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 new file mode 100644 index 000000000..84fd76bcf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-continents.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +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 locale = Locale(client) + +val response = locale.listContinents() +``` 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 new file mode 100644 index 000000000..4fbcee6c1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-eu.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +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 locale = Locale(client) + +val response = locale.listCountriesEU() +``` 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 new file mode 100644 index 000000000..02c56bbcc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-phones.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +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 locale = Locale(client) + +val response = locale.listCountriesPhones() +``` 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 new file mode 100644 index 000000000..441e130e5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +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 locale = Locale(client) + +val response = locale.listCountries() +``` 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 new file mode 100644 index 000000000..c68d676a5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-currencies.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +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 locale = Locale(client) + +val response = locale.listCurrencies() +``` 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 new file mode 100644 index 000000000..307d0b796 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-languages.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +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 locale = Locale(client) + +val response = locale.listLanguages() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-apns-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-apns-provider.md new file mode 100644 index 000000000..e9d80cad2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-apns-provider.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createAPNSProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional + sandbox = false, // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-appwrite-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..55f541796 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-appwrite-provider.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createAppwriteProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + enabled = false, // optional + qos = 0, // optional + expiry = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-email.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-email.md new file mode 100644 index 000000000..f82b776d1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-email.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createEmail( + messageId = "<MESSAGE_ID>", + subject = "<SUBJECT>", + content = "<CONTENT>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + cc = listOf(), // optional + bcc = listOf(), // optional + attachments = listOf(), // 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 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-fcm-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-fcm-provider.md new file mode 100644 index 000000000..495b9ac67 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-fcm-provider.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createFCMProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + serviceAccountJSON = mapOf( "a" to "b" ), // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..94aa9a54b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createMailgunProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + domain = "example.com", // optional + isEuRegion = false, // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-msg-91-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..a80004b80 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-msg-91-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createMsg91Provider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>", // optional + enabled = 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 new file mode 100644 index 000000000..500478d68 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-push.md @@ -0,0 +1,35 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging +import io.appwrite.enums.MessagePriority + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createPush( + messageId = "<MESSAGE_ID>", + title = "<TITLE>", // optional + body = "<BODY>", // optional + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + data = mapOf( "a" to "b" ), // optional + action = "<ACTION>", // optional + image = "<ID1:ID2>", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 1, // optional + draft = false, // optional + scheduledAt = "2020-10-15T06:38:00.000+00:00", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = MessagePriority.NORMAL // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-resend-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-resend-provider.md new file mode 100644 index 000000000..313bbb705 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-resend-provider.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createResendProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..05b263bbb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createSendgridProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-ses-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-ses-provider.md new file mode 100644 index 000000000..47f54967f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-ses-provider.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createSesProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + accessKey = "<ACCESS_KEY>", // optional + secretKey = "<SECRET_KEY>", // optional + region = "<REGION>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-sms.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-sms.md new file mode 100644 index 000000000..124b2a501 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-sms.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createSMS( + messageId = "<MESSAGE_ID>", + content = "<CONTENT>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + draft = false, // optional + scheduledAt = "2020-10-15T06:38:00.000+00:00" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-smtp-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-smtp-provider.md new file mode 100644 index 000000000..635a566af --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-smtp-provider.md @@ -0,0 +1,30 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging +import io.appwrite.enums.SmtpEncryption + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSMTPProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + host = "<HOST>", + port = 587, // optional + username = "<USERNAME>", // optional + password = "password", // optional + encryption = SmtpEncryption.NONE, // optional + autoTLS = false, // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-subscriber.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-subscriber.md new file mode 100644 index 000000000..8b72a8133 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-subscriber.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val messaging = Messaging(client) + +val response = messaging.createSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>", + targetId = "<TARGET_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-telesign-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-telesign-provider.md new file mode 100644 index 000000000..585fddeb3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-telesign-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createTelesignProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..d9290bb27 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createTextmagicProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-topic.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-topic.md new file mode 100644 index 000000000..1f7d4d58b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-topic.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createTopic( + topicId = "<TOPIC_ID>", + name = "<NAME>", + subscribe = listOf("any"), // optional + qos = 0, // optional + expiry = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-twilio-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-twilio-provider.md new file mode 100644 index 000000000..20169c380 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-twilio-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createTwilioProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "<FROM>", // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-vonage-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-vonage-provider.md new file mode 100644 index 000000000..d4b8b3dcc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-vonage-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.createVonageProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/delete-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/delete-provider.md new file mode 100644 index 000000000..82875d674 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/delete-provider.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.deleteProvider( + providerId = "<PROVIDER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/delete-subscriber.md b/examples/2.3.x/server-kotlin/kotlin/messaging/delete-subscriber.md new file mode 100644 index 000000000..d475b5b41 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/delete-subscriber.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val messaging = Messaging(client) + +val response = messaging.deleteSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/delete-topic.md b/examples/2.3.x/server-kotlin/kotlin/messaging/delete-topic.md new file mode 100644 index 000000000..46407e82b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/delete-topic.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.deleteTopic( + topicId = "<TOPIC_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/delete.md b/examples/2.3.x/server-kotlin/kotlin/messaging/delete.md new file mode 100644 index 000000000..25a5cfb43 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.delete( + messageId = "<MESSAGE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/get-message.md b/examples/2.3.x/server-kotlin/kotlin/messaging/get-message.md new file mode 100644 index 000000000..9e9254f58 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/get-message.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.getMessage( + messageId = "<MESSAGE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/get-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/get-provider.md new file mode 100644 index 000000000..a318451d6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/get-provider.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.getProvider( + providerId = "<PROVIDER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/get-subscriber.md b/examples/2.3.x/server-kotlin/kotlin/messaging/get-subscriber.md new file mode 100644 index 000000000..ef49cf15f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/get-subscriber.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.getSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/get-topic.md b/examples/2.3.x/server-kotlin/kotlin/messaging/get-topic.md new file mode 100644 index 000000000..1a5738f8e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/get-topic.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.getTopic( + topicId = "<TOPIC_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/list-messages.md b/examples/2.3.x/server-kotlin/kotlin/messaging/list-messages.md new file mode 100644 index 000000000..cbf689e23 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/list-messages.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.listMessages( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/list-providers.md b/examples/2.3.x/server-kotlin/kotlin/messaging/list-providers.md new file mode 100644 index 000000000..27c875d41 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/list-providers.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.listProviders( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/list-subscribers.md b/examples/2.3.x/server-kotlin/kotlin/messaging/list-subscribers.md new file mode 100644 index 000000000..8ae76791f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/list-subscribers.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.listSubscribers( + topicId = "<TOPIC_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/list-targets.md b/examples/2.3.x/server-kotlin/kotlin/messaging/list-targets.md new file mode 100644 index 000000000..e6ff5faaa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/list-targets.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.listTargets( + messageId = "<MESSAGE_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/list-topics.md b/examples/2.3.x/server-kotlin/kotlin/messaging/list-topics.md new file mode 100644 index 000000000..23cae83dd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/list-topics.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.listTopics( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-apns-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-apns-provider.md new file mode 100644 index 000000000..2d8812910 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-apns-provider.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateAPNSProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional + sandbox = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-appwrite-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..5826e0e6d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-appwrite-provider.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateAppwriteProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + qos = 0, // optional + expiry = 0 // 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 new file mode 100644 index 000000000..de4c73476 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-email.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateEmail( + messageId = "<MESSAGE_ID>", + 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 + replyToEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + scheduledAt = "2020-10-15T06:38:00.000+00:00", // optional + attachments = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-fcm-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-fcm-provider.md new file mode 100644 index 000000000..2d5e52573 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-fcm-provider.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateFCMProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + serviceAccountJSON = mapOf( "a" to "b" ) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..5d6bb2416 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateMailgunProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + apiKey = "<API_KEY>", // optional + domain = "example.com", // optional + isEuRegion = false, // optional + enabled = false, // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-msg-91-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..f4901b70a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-msg-91-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateMsg91Provider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>" // 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 new file mode 100644 index 000000000..9d9f24e6b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-push.md @@ -0,0 +1,35 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging +import io.appwrite.enums.MessagePriority + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updatePush( + messageId = "<MESSAGE_ID>", + 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 + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 1, // optional + draft = false, // optional + scheduledAt = "2020-10-15T06:38:00.000+00:00", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = MessagePriority.NORMAL // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-resend-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-resend-provider.md new file mode 100644 index 000000000..c16fa845e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-resend-provider.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateResendProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..2d82d6a86 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateSendgridProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-ses-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-ses-provider.md new file mode 100644 index 000000000..097b15e80 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-ses-provider.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateSesProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + accessKey = "<ACCESS_KEY>", // optional + secretKey = "<SECRET_KEY>", // optional + region = "<REGION>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // 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 new file mode 100644 index 000000000..aa53bf147 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-sms.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateSMS( + messageId = "<MESSAGE_ID>", + 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/messaging/update-smtp-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-smtp-provider.md new file mode 100644 index 000000000..581a95763 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-smtp-provider.md @@ -0,0 +1,30 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging +import io.appwrite.enums.SmtpEncryption + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSMTPProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + host = "<HOST>", // optional + port = 1, // optional + username = "<USERNAME>", // optional + password = "password", // optional + encryption = SmtpEncryption.NONE, // optional + autoTLS = false, // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-telesign-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-telesign-provider.md new file mode 100644 index 000000000..f2cb5b251 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-telesign-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateTelesignProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..1640c79d5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateTextmagicProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-topic.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-topic.md new file mode 100644 index 000000000..7ce3fc41c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-topic.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateTopic( + topicId = "<TOPIC_ID>", + name = "<NAME>", // optional + subscribe = listOf("any"), // optional + qos = 0, // optional + expiry = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-twilio-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-twilio-provider.md new file mode 100644 index 000000000..b60901a90 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-twilio-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateTwilioProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + from = "<FROM>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-vonage-provider.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-vonage-provider.md new file mode 100644 index 000000000..8458a7b43 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-vonage-provider.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +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 messaging = Messaging(client) + +val response = messaging.updateVonageProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + from = "<FROM>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/create-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/mongo/create-backup-policy.md new file mode 100644 index 000000000..2fcb6e147 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/create-backup-policy.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.createBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>", + name = "<NAME>", + schedule = "", + retention = 1, + type = "full", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/create-backup.md b/examples/2.3.x/server-kotlin/kotlin/mongo/create-backup.md new file mode 100644 index 000000000..66e3db8c8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/create-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.createBackup( + databaseId = "<DATABASE_ID>", + type = "full" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/create-branch.md b/examples/2.3.x/server-kotlin/kotlin/mongo/create-branch.md new file mode 100644 index 000000000..824cfd256 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/create-branch.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.createBranch( + databaseId = "<DATABASE_ID>", + branchId = "<BRANCH_ID>", // optional + ttl = 300 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/create-failover.md b/examples/2.3.x/server-kotlin/kotlin/mongo/create-failover.md new file mode 100644 index 000000000..a4628e12c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/create-failover.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.createFailover( + databaseId = "<DATABASE_ID>", + targetReplicaId = "<TARGET_REPLICA_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/create-migration.md b/examples/2.3.x/server-kotlin/kotlin/mongo/create-migration.md new file mode 100644 index 000000000..36979bfeb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/create-migration.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.createMigration( + databaseId = "<DATABASE_ID>", + targetType = "shared", + specification = "<SPECIFICATION>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/create-restoration.md b/examples/2.3.x/server-kotlin/kotlin/mongo/create-restoration.md new file mode 100644 index 000000000..e508c819e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/create-restoration.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.createRestoration( + databaseId = "<DATABASE_ID>", + type = "backup", // optional + backupId = "<BACKUP_ID>", // optional + targetDatabaseId = "<TARGET_DATABASE_ID>", // optional + targetTime = "2020-10-15T06:38:00.000+00:00" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/create-upgrade.md b/examples/2.3.x/server-kotlin/kotlin/mongo/create-upgrade.md new file mode 100644 index 000000000..ced18055c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/create-upgrade.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.createUpgrade( + databaseId = "<DATABASE_ID>", + targetVersion = "<TARGET_VERSION>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/create.md b/examples/2.3.x/server-kotlin/kotlin/mongo/create.md new file mode 100644 index 000000000..40fbbbbf7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/create.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + version = "17", // optional + specification = "<SPECIFICATION>", // optional + replicas = 0, // optional + syncMode = "async", // optional + networkIdleTimeoutSeconds = 60, // optional + networkIPAllowlist = listOf(), // optional + idleTimeoutMinutes = 5, // optional + pitr = false, // optional + pitrRetentionDays = 1, // optional + storageAutoscaling = false, // optional + storageAutoscalingThresholdPercent = 50, // optional + storageAutoscalingMaxGb = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/delete-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/mongo/delete-backup-policy.md new file mode 100644 index 000000000..8c2a80b3d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/delete-backup-policy.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.deleteBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/delete-backup.md b/examples/2.3.x/server-kotlin/kotlin/mongo/delete-backup.md new file mode 100644 index 000000000..bf3984d18 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/delete-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.deleteBackup( + databaseId = "<DATABASE_ID>", + backupId = "<BACKUP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/delete-branch.md b/examples/2.3.x/server-kotlin/kotlin/mongo/delete-branch.md new file mode 100644 index 000000000..80fb1f506 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/delete-branch.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.deleteBranch( + databaseId = "<DATABASE_ID>", + branchId = "<BRANCH_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/delete.md b/examples/2.3.x/server-kotlin/kotlin/mongo/delete.md new file mode 100644 index 000000000..b8f2404ed --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.delete( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/get-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/mongo/get-backup-policy.md new file mode 100644 index 000000000..9934bab72 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/get-backup-policy.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.getBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/get-backup.md b/examples/2.3.x/server-kotlin/kotlin/mongo/get-backup.md new file mode 100644 index 000000000..aab892c8d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/get-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.getBackup( + databaseId = "<DATABASE_ID>", + backupId = "<BACKUP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/get-pitr.md b/examples/2.3.x/server-kotlin/kotlin/mongo/get-pitr.md new file mode 100644 index 000000000..9b56d4297 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/get-pitr.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.getPitr( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/get-replicas.md b/examples/2.3.x/server-kotlin/kotlin/mongo/get-replicas.md new file mode 100644 index 000000000..995bbcd16 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/get-replicas.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.getReplicas( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/get-restoration.md b/examples/2.3.x/server-kotlin/kotlin/mongo/get-restoration.md new file mode 100644 index 000000000..67864c44b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/get-restoration.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.getRestoration( + databaseId = "<DATABASE_ID>", + restorationId = "<RESTORATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/get-status.md b/examples/2.3.x/server-kotlin/kotlin/mongo/get-status.md new file mode 100644 index 000000000..cd79cb0b5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/get-status.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.getStatus( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/get.md b/examples/2.3.x/server-kotlin/kotlin/mongo/get.md new file mode 100644 index 000000000..d038bc6f7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.get( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/list-backup-policies.md b/examples/2.3.x/server-kotlin/kotlin/mongo/list-backup-policies.md new file mode 100644 index 000000000..117c379ec --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/list-backup-policies.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.listBackupPolicies( + databaseId = "<DATABASE_ID>", + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/list-backups.md b/examples/2.3.x/server-kotlin/kotlin/mongo/list-backups.md new file mode 100644 index 000000000..8ff5db29a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/list-backups.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.listBackups( + databaseId = "<DATABASE_ID>", + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/list-branches.md b/examples/2.3.x/server-kotlin/kotlin/mongo/list-branches.md new file mode 100644 index 000000000..4fa44f754 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/list-branches.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.listBranches( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/list-operations.md b/examples/2.3.x/server-kotlin/kotlin/mongo/list-operations.md new file mode 100644 index 000000000..64bd5ca65 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/list-operations.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.listOperations( + databaseId = "<DATABASE_ID>", + status = "queued", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/list-restorations.md b/examples/2.3.x/server-kotlin/kotlin/mongo/list-restorations.md new file mode 100644 index 000000000..712901545 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/list-restorations.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.listRestorations( + databaseId = "<DATABASE_ID>", + status = "pending", // optional + type = "backup", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/list-specifications.md b/examples/2.3.x/server-kotlin/kotlin/mongo/list-specifications.md new file mode 100644 index 000000000..81eeb5334 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/list-specifications.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.listSpecifications() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/list.md b/examples/2.3.x/server-kotlin/kotlin/mongo/list.md new file mode 100644 index 000000000..05dfb5848 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/list.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.list( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/update-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/mongo/update-backup-policy.md new file mode 100644 index 000000000..e78695afe --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/update-backup-policy.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.updateBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>", + name = "<NAME>", // optional + schedule = "", // optional + retention = 1, // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/update-backup-storage.md b/examples/2.3.x/server-kotlin/kotlin/mongo/update-backup-storage.md new file mode 100644 index 000000000..efea893e3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/update-backup-storage.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.updateBackupStorage( + databaseId = "<DATABASE_ID>", + provider = "s3", + bucket = "<BUCKET>", + accessKey = "<ACCESS_KEY>", + secretKey = "<SECRET_KEY>", + region = "<REGION>", // optional + prefix = "<PREFIX>", // optional + endpoint = "<ENDPOINT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/update-credentials.md b/examples/2.3.x/server-kotlin/kotlin/mongo/update-credentials.md new file mode 100644 index 000000000..68e2d0b00 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/update-credentials.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.updateCredentials( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/update-maintenance.md b/examples/2.3.x/server-kotlin/kotlin/mongo/update-maintenance.md new file mode 100644 index 000000000..4afabcc95 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/update-maintenance.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.updateMaintenance( + databaseId = "<DATABASE_ID>", + day = "sun", + hourUtc = 0 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/update.md b/examples/2.3.x/server-kotlin/kotlin/mongo/update.md new file mode 100644 index 000000000..3089cd928 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/update.md @@ -0,0 +1,36 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mongo + +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 mongo = Mongo(client) + +val response = mongo.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", // optional + status = "ready", // optional + specification = "<SPECIFICATION>", // optional + replicas = 0, // optional + syncMode = "async", // optional + networkIdleTimeoutSeconds = 60, // optional + networkIPAllowlist = listOf(), // optional + idleTimeoutMinutes = 5, // optional + pitr = false, // optional + pitrRetentionDays = 1, // optional + storageAutoscaling = false, // optional + storageAutoscalingThresholdPercent = 50, // optional + storageAutoscalingMaxGb = 0, // optional + metricsTraceSampleRate = 0, // optional + metricsSlowQueryLogThresholdMs = 0, // optional + sqlApiEnabled = false, // optional + sqlApiAllowedStatements = listOf(), // optional + sqlApiMaxRows = 1, // optional + sqlApiMaxBytes = 1024, // optional + sqlApiTimeoutSeconds = 1 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create-backup-policy.md new file mode 100644 index 000000000..b7afc9aab --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create-backup-policy.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.createBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>", + name = "<NAME>", + schedule = "", + retention = 1, + type = "full", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create-backup.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create-backup.md new file mode 100644 index 000000000..9aa93e9a2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.createBackup( + databaseId = "<DATABASE_ID>", + type = "full" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create-branch.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create-branch.md new file mode 100644 index 000000000..1d3394927 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create-branch.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.createBranch( + databaseId = "<DATABASE_ID>", + branchId = "<BRANCH_ID>", // optional + ttl = 300 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create-execution.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create-execution.md new file mode 100644 index 000000000..fd5e8872d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create-execution.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.createExecution( + databaseId = "<DATABASE_ID>", + sql = "<SQL>", + bindings = mapOf( "a" to "b" ), // optional + timeoutSeconds = 1 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create-failover.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create-failover.md new file mode 100644 index 000000000..81ba8490c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create-failover.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.createFailover( + databaseId = "<DATABASE_ID>", + targetReplicaId = "<TARGET_REPLICA_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create-migration.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create-migration.md new file mode 100644 index 000000000..3c15edb44 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create-migration.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.createMigration( + databaseId = "<DATABASE_ID>", + targetType = "shared", + specification = "<SPECIFICATION>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create-restoration.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create-restoration.md new file mode 100644 index 000000000..f9e379ede --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create-restoration.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.createRestoration( + databaseId = "<DATABASE_ID>", + type = "backup", // optional + backupId = "<BACKUP_ID>", // optional + targetDatabaseId = "<TARGET_DATABASE_ID>", // optional + targetTime = "2020-10-15T06:38:00.000+00:00" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create-upgrade.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create-upgrade.md new file mode 100644 index 000000000..8cf5263d1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create-upgrade.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.createUpgrade( + databaseId = "<DATABASE_ID>", + targetVersion = "<TARGET_VERSION>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/create.md b/examples/2.3.x/server-kotlin/kotlin/mysql/create.md new file mode 100644 index 000000000..7e3c6baa5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/create.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + version = "17", // optional + specification = "<SPECIFICATION>", // optional + replicas = 0, // optional + syncMode = "async", // optional + networkIdleTimeoutSeconds = 60, // optional + networkIPAllowlist = listOf(), // optional + idleTimeoutMinutes = 5, // optional + pitr = false, // optional + pitrRetentionDays = 1, // optional + storageAutoscaling = false, // optional + storageAutoscalingThresholdPercent = 50, // optional + storageAutoscalingMaxGb = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/delete-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/mysql/delete-backup-policy.md new file mode 100644 index 000000000..14eadb39a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/delete-backup-policy.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.deleteBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/delete-backup.md b/examples/2.3.x/server-kotlin/kotlin/mysql/delete-backup.md new file mode 100644 index 000000000..90b34fce6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/delete-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.deleteBackup( + databaseId = "<DATABASE_ID>", + backupId = "<BACKUP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/delete-branch.md b/examples/2.3.x/server-kotlin/kotlin/mysql/delete-branch.md new file mode 100644 index 000000000..816cf21ad --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/delete-branch.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.deleteBranch( + databaseId = "<DATABASE_ID>", + branchId = "<BRANCH_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/delete.md b/examples/2.3.x/server-kotlin/kotlin/mysql/delete.md new file mode 100644 index 000000000..740568a0b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.delete( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/get-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/mysql/get-backup-policy.md new file mode 100644 index 000000000..8cbd9784d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/get-backup-policy.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.getBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/get-backup.md b/examples/2.3.x/server-kotlin/kotlin/mysql/get-backup.md new file mode 100644 index 000000000..5260983dd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/get-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.getBackup( + databaseId = "<DATABASE_ID>", + backupId = "<BACKUP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/get-pitr.md b/examples/2.3.x/server-kotlin/kotlin/mysql/get-pitr.md new file mode 100644 index 000000000..56e024e7c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/get-pitr.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.getPitr( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/get-pooler.md b/examples/2.3.x/server-kotlin/kotlin/mysql/get-pooler.md new file mode 100644 index 000000000..81de84f9e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/get-pooler.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.getPooler( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/get-replicas.md b/examples/2.3.x/server-kotlin/kotlin/mysql/get-replicas.md new file mode 100644 index 000000000..ec08edcf4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/get-replicas.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.getReplicas( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/get-restoration.md b/examples/2.3.x/server-kotlin/kotlin/mysql/get-restoration.md new file mode 100644 index 000000000..37c0d3166 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/get-restoration.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.getRestoration( + databaseId = "<DATABASE_ID>", + restorationId = "<RESTORATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/get-status.md b/examples/2.3.x/server-kotlin/kotlin/mysql/get-status.md new file mode 100644 index 000000000..46f9491aa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/get-status.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.getStatus( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/get.md b/examples/2.3.x/server-kotlin/kotlin/mysql/get.md new file mode 100644 index 000000000..662415fd3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.get( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/list-backup-policies.md b/examples/2.3.x/server-kotlin/kotlin/mysql/list-backup-policies.md new file mode 100644 index 000000000..2db73d1da --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/list-backup-policies.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.listBackupPolicies( + databaseId = "<DATABASE_ID>", + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/list-backups.md b/examples/2.3.x/server-kotlin/kotlin/mysql/list-backups.md new file mode 100644 index 000000000..0e4b5b0ff --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/list-backups.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.listBackups( + databaseId = "<DATABASE_ID>", + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/list-branches.md b/examples/2.3.x/server-kotlin/kotlin/mysql/list-branches.md new file mode 100644 index 000000000..c24d211e4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/list-branches.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.listBranches( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/list-operations.md b/examples/2.3.x/server-kotlin/kotlin/mysql/list-operations.md new file mode 100644 index 000000000..9ee8acc7a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/list-operations.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.listOperations( + databaseId = "<DATABASE_ID>", + status = "queued", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/list-restorations.md b/examples/2.3.x/server-kotlin/kotlin/mysql/list-restorations.md new file mode 100644 index 000000000..dd6592902 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/list-restorations.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.listRestorations( + databaseId = "<DATABASE_ID>", + status = "pending", // optional + type = "backup", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/list-specifications.md b/examples/2.3.x/server-kotlin/kotlin/mysql/list-specifications.md new file mode 100644 index 000000000..8ba31c20c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/list-specifications.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.listSpecifications() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/list.md b/examples/2.3.x/server-kotlin/kotlin/mysql/list.md new file mode 100644 index 000000000..b0195e149 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/list.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.list( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/update-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/mysql/update-backup-policy.md new file mode 100644 index 000000000..b2cd9ed0a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/update-backup-policy.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.updateBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>", + name = "<NAME>", // optional + schedule = "", // optional + retention = 1, // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/update-backup-storage.md b/examples/2.3.x/server-kotlin/kotlin/mysql/update-backup-storage.md new file mode 100644 index 000000000..034803c32 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/update-backup-storage.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.updateBackupStorage( + databaseId = "<DATABASE_ID>", + provider = "s3", + bucket = "<BUCKET>", + accessKey = "<ACCESS_KEY>", + secretKey = "<SECRET_KEY>", + region = "<REGION>", // optional + prefix = "<PREFIX>", // optional + endpoint = "<ENDPOINT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/update-credentials.md b/examples/2.3.x/server-kotlin/kotlin/mysql/update-credentials.md new file mode 100644 index 000000000..4c13ca64a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/update-credentials.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.updateCredentials( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/update-maintenance.md b/examples/2.3.x/server-kotlin/kotlin/mysql/update-maintenance.md new file mode 100644 index 000000000..41013bae0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/update-maintenance.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.updateMaintenance( + databaseId = "<DATABASE_ID>", + day = "sun", + hourUtc = 0 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/update-pooler.md b/examples/2.3.x/server-kotlin/kotlin/mysql/update-pooler.md new file mode 100644 index 000000000..bf9739b49 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/update-pooler.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.updatePooler( + databaseId = "<DATABASE_ID>", + mode = "transaction", // optional + maxConnections = 10, // optional + defaultPoolSize = 1, // optional + readWriteSplitting = false, // optional + poolerCpuRequest = "<POOLER_CPU_REQUEST>", // optional + poolerCpuLimit = "<POOLER_CPU_LIMIT>", // optional + poolerMemoryRequest = "<POOLER_MEMORY_REQUEST>", // optional + poolerMemoryLimit = "<POOLER_MEMORY_LIMIT>" // 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 new file mode 100644 index 000000000..1b38deedf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/update.md @@ -0,0 +1,36 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Mysql + +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 mysql = Mysql(client) + +val response = mysql.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", // optional + status = "ready", // optional + specification = "<SPECIFICATION>", // optional + replicas = 0, // optional + syncMode = "async", // optional + networkIdleTimeoutSeconds = 60, // optional + networkIPAllowlist = listOf(), // optional + idleTimeoutMinutes = 5, // optional + pitr = false, // optional + pitrRetentionDays = 1, // optional + storageAutoscaling = false, // optional + storageAutoscalingThresholdPercent = 50, // optional + storageAutoscalingMaxGb = 0, // optional + metricsTraceSampleRate = 0, // optional + metricsSlowQueryLogThresholdMs = 0, // optional + sqlApiEnabled = false, // optional + sqlApiAllowedStatements = listOf(), // optional + sqlApiMaxRows = 1, // optional + sqlApiMaxBytes = 1024, // optional + sqlApiTimeoutSeconds = 1 // 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 new file mode 100644 index 000000000..7cde17080 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/approve.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.approve( + grant_id = "<GRANT_ID>", + authorization_details = "<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 new file mode 100644 index 000000000..103466bca --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize-post.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.authorizePost( + client_id = "<CLIENT_ID>", // optional + redirect_uri = "https://example.com", // optional + response_type = "", // optional + scope = "<SCOPE>", // optional + state = "<STATE>", // optional + nonce = "<NONCE>", // optional + code_challenge = "<CODE_CHALLENGE>", // optional + code_challenge_method = "s256", // optional + prompt = "<PROMPT>", // optional + max_age = 0, // optional + authorization_details = "<AUTHORIZATION_DETAILS>", // optional + resource = "", // optional + audience = "<AUDIENCE>", // optional + request_uri = "<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 new file mode 100644 index 000000000..839bf24a2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.authorize( + client_id = "<CLIENT_ID>", // optional + redirect_uri = "https://example.com", // optional + response_type = "", // optional + scope = "<SCOPE>", // optional + state = "<STATE>", // optional + nonce = "<NONCE>", // optional + code_challenge = "<CODE_CHALLENGE>", // optional + code_challenge_method = "s256", // optional + prompt = "<PROMPT>", // optional + max_age = 0, // optional + authorization_details = "<AUTHORIZATION_DETAILS>", // optional + resource = "", // optional + audience = "<AUDIENCE>", // optional + request_uri = "<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 new file mode 100644 index 000000000..60b7fa0d9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-device-authorization.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.createDeviceAuthorization( + client_id = "<CLIENT_ID>", // optional + scope = "<SCOPE>", // optional + authorization_details = "<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 new file mode 100644 index 000000000..1fe13388d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-grant.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.createGrant( + user_code = "<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 new file mode 100644 index 000000000..8d9789e1c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-par.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.createPAR( + client_id = "<CLIENT_ID>", + redirect_uri = "https://example.com", + response_type = "code", + scope = "<SCOPE>", // optional + state = "<STATE>", // optional + nonce = "<NONCE>", // optional + code_challenge = "<CODE_CHALLENGE>", // optional + code_challenge_method = "s256", // optional + prompt = "<PROMPT>", // optional + max_age = 0, // optional + authorization_details = "<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 new file mode 100644 index 000000000..6541e3aa2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-token.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.createToken( + grant_type = "<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 + 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 new file mode 100644 index 000000000..a4ef6641a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/get-grant.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.getGrant( + grant_id = "<GRANT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/list-organizations.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/list-organizations.md new file mode 100644 index 000000000..90558b30a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/list-organizations.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.listOrganizations( + limit = 1, // optional + offset = 0, // optional + search = "<SEARCH>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/list-projects.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/list-projects.md new file mode 100644 index 000000000..9517945e1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/list-projects.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.listProjects( + limit = 1, // optional + offset = 0, // optional + search = "<SEARCH>" // 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 new file mode 100644 index 000000000..88532e607 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/reject.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val oauth2 = Oauth2(client) + +val response = oauth2.reject( + grant_id = "<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 new file mode 100644 index 000000000..9d298a4ac --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/revoke.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +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 +) +``` 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 new file mode 100644 index 000000000..df053ca63 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/create-ephemeral-project-key.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization +import io.appwrite.enums.ProjectKeyScopes + +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 organization = Organization(client) + +val response = organization.createEphemeralProjectKey( + projectId = "<PROJECT_ID>", + scopes = listOf(ProjectKeyScopes.PROJECT_READ), + duration = 600 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/create-installation.md b/examples/2.3.x/server-kotlin/kotlin/organization/create-installation.md new file mode 100644 index 000000000..8c7664b7a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/create-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.createInstallation( + appId = "<APP_ID>", + authorizationDetails = "<AUTHORIZATION_DETAILS>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/create-membership.md b/examples/2.3.x/server-kotlin/kotlin/organization/create-membership.md new file mode 100644 index 000000000..0632606c0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/create-membership.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +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 organization = Organization(client) + +val response = organization.createMembership( + roles = listOf(), + email = "email@example.com", // optional + userId = "<USER_ID>", // optional + phone = "+12065550100", // optional + url = "https://example.com", // optional + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/create-project.md b/examples/2.3.x/server-kotlin/kotlin/organization/create-project.md new file mode 100644 index 000000000..2337ecef8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/create-project.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization +import io.appwrite.enums.Region + +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 organization = Organization(client) + +val response = organization.createProject( + projectId = "<PROJECT_ID>", + name = "<NAME>", + region = Region.FRA // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/delete-installation.md b/examples/2.3.x/server-kotlin/kotlin/organization/delete-installation.md new file mode 100644 index 000000000..aaa08b0e7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/delete-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.deleteInstallation( + installationId = "<INSTALLATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/delete-membership.md b/examples/2.3.x/server-kotlin/kotlin/organization/delete-membership.md new file mode 100644 index 000000000..36b18fcaa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/delete-membership.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.deleteMembership( + membershipId = "<MEMBERSHIP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/delete-project-key.md b/examples/2.3.x/server-kotlin/kotlin/organization/delete-project-key.md new file mode 100644 index 000000000..4e5f07232 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/delete-project-key.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.deleteProjectKey( + projectId = "<PROJECT_ID>", + keyId = "<KEY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/delete-project.md b/examples/2.3.x/server-kotlin/kotlin/organization/delete-project.md new file mode 100644 index 000000000..5f4b96520 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/delete-project.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.deleteProject( + projectId = "<PROJECT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/delete.md b/examples/2.3.x/server-kotlin/kotlin/organization/delete.md new file mode 100644 index 000000000..760970432 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/delete.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +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 organization = Organization(client) + +val response = organization.delete() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/get-installation.md b/examples/2.3.x/server-kotlin/kotlin/organization/get-installation.md new file mode 100644 index 000000000..f75319997 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/get-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.getInstallation( + installationId = "<INSTALLATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/get-membership.md b/examples/2.3.x/server-kotlin/kotlin/organization/get-membership.md new file mode 100644 index 000000000..9c3628713 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/get-membership.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.getMembership( + membershipId = "<MEMBERSHIP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/get-project-key.md b/examples/2.3.x/server-kotlin/kotlin/organization/get-project-key.md new file mode 100644 index 000000000..f13dfc748 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/get-project-key.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.getProjectKey( + projectId = "<PROJECT_ID>", + keyId = "<KEY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/get-project.md b/examples/2.3.x/server-kotlin/kotlin/organization/get-project.md new file mode 100644 index 000000000..a6611776a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/get-project.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.getProject( + projectId = "<PROJECT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/get.md b/examples/2.3.x/server-kotlin/kotlin/organization/get.md new file mode 100644 index 000000000..b3a47d597 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/get.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +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 organization = Organization(client) + +val response = organization.get() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/list-installations.md b/examples/2.3.x/server-kotlin/kotlin/organization/list-installations.md new file mode 100644 index 000000000..e8d79bb66 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/list-installations.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.listInstallations( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/list-memberships.md b/examples/2.3.x/server-kotlin/kotlin/organization/list-memberships.md new file mode 100644 index 000000000..c5c959ccb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/list-memberships.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +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 organization = Organization(client) + +val response = organization.listMemberships( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/list-project-keys.md b/examples/2.3.x/server-kotlin/kotlin/organization/list-project-keys.md new file mode 100644 index 000000000..4cf114892 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/list-project-keys.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +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 organization = Organization(client) + +val response = organization.listProjectKeys( + projectId = "<PROJECT_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/list-projects.md b/examples/2.3.x/server-kotlin/kotlin/organization/list-projects.md new file mode 100644 index 000000000..2433900c7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/list-projects.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +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 organization = Organization(client) + +val response = organization.listProjects( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/update-installation.md b/examples/2.3.x/server-kotlin/kotlin/organization/update-installation.md new file mode 100644 index 000000000..86dfb7d02 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/update-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.updateInstallation( + installationId = "<INSTALLATION_ID>", + authorizationDetails = "<AUTHORIZATION_DETAILS>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/update-membership.md b/examples/2.3.x/server-kotlin/kotlin/organization/update-membership.md new file mode 100644 index 000000000..035c82c1e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/update-membership.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.updateMembership( + membershipId = "<MEMBERSHIP_ID>", + roles = listOf() +) +``` 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 new file mode 100644 index 000000000..81c930dc9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/update-project-key.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization +import io.appwrite.enums.ProjectKeyScopes + +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 organization = Organization(client) + +val response = organization.updateProjectKey( + projectId = "<PROJECT_ID>", + keyId = "<KEY_ID>", + name = "<NAME>", + scopes = listOf(ProjectKeyScopes.PROJECT_READ), + expire = "2020-10-15T06:38:00.000+00:00" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/update-project.md b/examples/2.3.x/server-kotlin/kotlin/organization/update-project.md new file mode 100644 index 000000000..74b935314 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/update-project.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.updateProject( + projectId = "<PROJECT_ID>", + name = "<NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/update.md b/examples/2.3.x/server-kotlin/kotlin/organization/update.md new file mode 100644 index 000000000..fcda4819b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/organization/update.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val organization = Organization(client) + +val response = organization.update( + name = "<NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-backup-policy.md new file mode 100644 index 000000000..8245437ea --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-backup-policy.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>", + name = "<NAME>", + schedule = "", + retention = 1, + type = "full", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-backup.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-backup.md new file mode 100644 index 000000000..98c4cf9c5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createBackup( + databaseId = "<DATABASE_ID>", + type = "full" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-branch.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-branch.md new file mode 100644 index 000000000..cdffe24a7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-branch.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createBranch( + databaseId = "<DATABASE_ID>", + branchId = "<BRANCH_ID>", // optional + ttl = 300 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-execution.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-execution.md new file mode 100644 index 000000000..cd47a43f0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-execution.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createExecution( + databaseId = "<DATABASE_ID>", + sql = "<SQL>", + bindings = mapOf( "a" to "b" ), // optional + timeoutSeconds = 1 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-extension.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-extension.md new file mode 100644 index 000000000..28a215454 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-extension.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createExtension( + databaseId = "<DATABASE_ID>", + name = "<NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-failover.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-failover.md new file mode 100644 index 000000000..4aac77235 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-failover.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createFailover( + databaseId = "<DATABASE_ID>", + targetReplicaId = "<TARGET_REPLICA_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-migration.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-migration.md new file mode 100644 index 000000000..9d1e8c40f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-migration.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createMigration( + databaseId = "<DATABASE_ID>", + targetType = "shared", + specification = "<SPECIFICATION>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-restoration.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-restoration.md new file mode 100644 index 000000000..55d96b63d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-restoration.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createRestoration( + databaseId = "<DATABASE_ID>", + type = "backup", // optional + backupId = "<BACKUP_ID>", // optional + targetDatabaseId = "<TARGET_DATABASE_ID>", // optional + targetTime = "2020-10-15T06:38:00.000+00:00" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create-upgrade.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-upgrade.md new file mode 100644 index 000000000..59f7dd4d3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create-upgrade.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.createUpgrade( + databaseId = "<DATABASE_ID>", + targetVersion = "<TARGET_VERSION>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/create.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/create.md new file mode 100644 index 000000000..9ebe9f793 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/create.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + version = "17", // optional + specification = "<SPECIFICATION>", // optional + replicas = 0, // optional + syncMode = "async", // optional + networkIdleTimeoutSeconds = 60, // optional + networkIPAllowlist = listOf(), // optional + idleTimeoutMinutes = 5, // optional + pitr = false, // optional + pitrRetentionDays = 1, // optional + storageAutoscaling = false, // optional + storageAutoscalingThresholdPercent = 50, // optional + storageAutoscalingMaxGb = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..b96283917 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-backup-policy.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.deleteBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-backup.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-backup.md new file mode 100644 index 000000000..956619b8e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.deleteBackup( + databaseId = "<DATABASE_ID>", + backupId = "<BACKUP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-branch.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-branch.md new file mode 100644 index 000000000..cac84a957 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-branch.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.deleteBranch( + databaseId = "<DATABASE_ID>", + branchId = "<BRANCH_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-extension.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-extension.md new file mode 100644 index 000000000..f3176306f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete-extension.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.deleteExtension( + databaseId = "<DATABASE_ID>", + extensionName = "<EXTENSION_NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/delete.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete.md new file mode 100644 index 000000000..178468239 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.delete( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/get-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-backup-policy.md new file mode 100644 index 000000000..1bb955084 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-backup-policy.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.getBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/get-backup.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-backup.md new file mode 100644 index 000000000..ab2d3bf2e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-backup.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.getBackup( + databaseId = "<DATABASE_ID>", + backupId = "<BACKUP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/get-pitr.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-pitr.md new file mode 100644 index 000000000..2048a4593 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-pitr.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.getPitr( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/get-pooler.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-pooler.md new file mode 100644 index 000000000..a585448cd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-pooler.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.getPooler( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/get-replicas.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-replicas.md new file mode 100644 index 000000000..5738ce936 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-replicas.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.getReplicas( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/get-restoration.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-restoration.md new file mode 100644 index 000000000..d07a6d997 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-restoration.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.getRestoration( + databaseId = "<DATABASE_ID>", + restorationId = "<RESTORATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/get-status.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-status.md new file mode 100644 index 000000000..cce563986 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/get-status.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.getStatus( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/get.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/get.md new file mode 100644 index 000000000..d77ab0faa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.get( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/list-backup-policies.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-backup-policies.md new file mode 100644 index 000000000..130b586df --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-backup-policies.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.listBackupPolicies( + databaseId = "<DATABASE_ID>", + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/list-backups.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-backups.md new file mode 100644 index 000000000..c4b23e93f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-backups.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.listBackups( + databaseId = "<DATABASE_ID>", + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/list-branches.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-branches.md new file mode 100644 index 000000000..b5d200d65 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-branches.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.listBranches( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/list-extensions.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-extensions.md new file mode 100644 index 000000000..da8ea4752 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-extensions.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.listExtensions( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/list-operations.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-operations.md new file mode 100644 index 000000000..d260f0c59 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-operations.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.listOperations( + databaseId = "<DATABASE_ID>", + status = "queued", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/list-restorations.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-restorations.md new file mode 100644 index 000000000..20ebad0ee --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-restorations.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.listRestorations( + databaseId = "<DATABASE_ID>", + status = "pending", // optional + type = "backup", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/list-specifications.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-specifications.md new file mode 100644 index 000000000..a188912d2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/list-specifications.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.listSpecifications() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/list.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/list.md new file mode 100644 index 000000000..460cd794a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/list.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.list( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/update-backup-policy.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-backup-policy.md new file mode 100644 index 000000000..daffc64bf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-backup-policy.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.updateBackupPolicy( + databaseId = "<DATABASE_ID>", + policyId = "<POLICY_ID>", + name = "<NAME>", // optional + schedule = "", // optional + retention = 1, // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/update-backup-storage.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-backup-storage.md new file mode 100644 index 000000000..8fc93b233 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-backup-storage.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.updateBackupStorage( + databaseId = "<DATABASE_ID>", + provider = "s3", + bucket = "<BUCKET>", + accessKey = "<ACCESS_KEY>", + secretKey = "<SECRET_KEY>", + region = "<REGION>", // optional + prefix = "<PREFIX>", // optional + endpoint = "<ENDPOINT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/update-credentials.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-credentials.md new file mode 100644 index 000000000..2260b4253 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-credentials.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.updateCredentials( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/update-maintenance.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-maintenance.md new file mode 100644 index 000000000..65422803e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-maintenance.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.updateMaintenance( + databaseId = "<DATABASE_ID>", + day = "sun", + hourUtc = 0 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/update-pooler.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-pooler.md new file mode 100644 index 000000000..25d4feec4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/update-pooler.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.updatePooler( + databaseId = "<DATABASE_ID>", + mode = "transaction", // optional + maxConnections = 10, // optional + defaultPoolSize = 1, // optional + readWriteSplitting = false, // optional + poolerCpuRequest = "<POOLER_CPU_REQUEST>", // optional + poolerCpuLimit = "<POOLER_CPU_LIMIT>", // optional + poolerMemoryRequest = "<POOLER_MEMORY_REQUEST>", // optional + poolerMemoryLimit = "<POOLER_MEMORY_LIMIT>" // 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 new file mode 100644 index 000000000..3c3f1da54 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/update.md @@ -0,0 +1,36 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Postgresql + +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 postgresql = Postgresql(client) + +val response = postgresql.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", // optional + status = "ready", // optional + specification = "<SPECIFICATION>", // optional + replicas = 0, // optional + syncMode = "async", // optional + networkIdleTimeoutSeconds = 60, // optional + networkIPAllowlist = listOf(), // optional + idleTimeoutMinutes = 5, // optional + pitr = false, // optional + pitrRetentionDays = 1, // optional + storageAutoscaling = false, // optional + storageAutoscalingThresholdPercent = 50, // optional + storageAutoscalingMaxGb = 0, // optional + metricsTraceSampleRate = 0, // optional + metricsSlowQueryLogThresholdMs = 0, // optional + sqlApiEnabled = false, // optional + sqlApiAllowedStatements = listOf(), // optional + sqlApiMaxRows = 1, // optional + sqlApiMaxBytes = 1024, // optional + sqlApiTimeoutSeconds = 1 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/presences/delete.md b/examples/2.3.x/server-kotlin/kotlin/presences/delete.md new file mode 100644 index 000000000..f19489f26 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/presences/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences + +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 presences = Presences(client) + +val response = presences.delete( + presenceId = "<PRESENCE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/presences/get.md b/examples/2.3.x/server-kotlin/kotlin/presences/get.md new file mode 100644 index 000000000..bf1529539 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/presences/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences + +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 presences = Presences(client) + +val response = presences.get( + presenceId = "<PRESENCE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/presences/list.md b/examples/2.3.x/server-kotlin/kotlin/presences/list.md new file mode 100644 index 000000000..3426a0a29 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/presences/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences + +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 presences = Presences(client) + +val response = presences.list( + queries = listOf(), // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/presences/update.md b/examples/2.3.x/server-kotlin/kotlin/presences/update.md new file mode 100644 index 000000000..2089c6441 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/presences/update.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences +import io.appwrite.Permission +import io.appwrite.Role + +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 presences = Presences(client) + +val response = presences.update( + presenceId = "<PRESENCE_ID>", + userId = "<USER_ID>", + status = "<STATUS>", // optional + expiresAt = "2020-10-15T06:38:00.000+00:00", // optional + metadata = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + purge = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/presences/upsert.md b/examples/2.3.x/server-kotlin/kotlin/presences/upsert.md new file mode 100644 index 000000000..39d0c859b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/presences/upsert.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences +import io.appwrite.Permission +import io.appwrite.Role + +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 presences = Presences(client) + +val response = presences.upsert( + presenceId = "<PRESENCE_ID>", + userId = "<USER_ID>", + status = "<STATUS>", + permissions = listOf(Permission.read(Role.any())), // optional + expiresAt = "2020-10-15T06:38:00.000+00:00", // optional + metadata = mapOf( "a" to "b" ) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-android-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/create-android-platform.md new file mode 100644 index 000000000..9b2d64fbc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-android-platform.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.createAndroidPlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + applicationId = "<APPLICATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-apple-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/create-apple-platform.md new file mode 100644 index 000000000..2ab03170a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-apple-platform.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.createApplePlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + bundleIdentifier = "<BUNDLE_IDENTIFIER>" +) +``` 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 new file mode 100644 index 000000000..b29f4b406 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-ephemeral-key.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectKeyScopes + +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.createEphemeralKey( + scopes = listOf(ProjectKeyScopes.PROJECT_READ), + duration = 600 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-linux-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/create-linux-platform.md new file mode 100644 index 000000000..0443dfbe4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-linux-platform.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.createLinuxPlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + packageName = "<PACKAGE_NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-mock-phone.md b/examples/2.3.x/server-kotlin/kotlin/project/create-mock-phone.md new file mode 100644 index 000000000..e8babf68c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-mock-phone.md @@ -0,0 +1,17 @@ +```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.createMockPhone( + number = "+12065550100", + otp = "<OTP>" +) +``` 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 new file mode 100644 index 000000000..b457518ec --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-smtp-test.md @@ -0,0 +1,16 @@ +```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.createSMTPTest( + emails = listOf() +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-variable.md b/examples/2.3.x/server-kotlin/kotlin/project/create-variable.md new file mode 100644 index 000000000..e61e1baad --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-variable.md @@ -0,0 +1,19 @@ +```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.createVariable( + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-web-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/create-web-platform.md new file mode 100644 index 000000000..309e6a2fb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-web-platform.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.createWebPlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + hostname = "app.example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-windows-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/create-windows-platform.md new file mode 100644 index 000000000..648851dcc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-windows-platform.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.createWindowsPlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + packageIdentifierName = "<PACKAGE_IDENTIFIER_NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/delete-key.md b/examples/2.3.x/server-kotlin/kotlin/project/delete-key.md new file mode 100644 index 000000000..0141ae95f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/delete-key.md @@ -0,0 +1,16 @@ +```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.deleteKey( + keyId = "<KEY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/delete-mock-phone.md b/examples/2.3.x/server-kotlin/kotlin/project/delete-mock-phone.md new file mode 100644 index 000000000..963fbc981 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/delete-mock-phone.md @@ -0,0 +1,16 @@ +```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.deleteMockPhone( + number = "+12065550100" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/delete-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/delete-platform.md new file mode 100644 index 000000000..7b3a91230 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/delete-platform.md @@ -0,0 +1,16 @@ +```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.deletePlatform( + platformId = "<PLATFORM_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/delete-variable.md b/examples/2.3.x/server-kotlin/kotlin/project/delete-variable.md new file mode 100644 index 000000000..674d805dc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/delete-variable.md @@ -0,0 +1,16 @@ +```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.deleteVariable( + variableId = "<VARIABLE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/delete.md b/examples/2.3.x/server-kotlin/kotlin/project/delete.md new file mode 100644 index 000000000..29668a25c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/delete.md @@ -0,0 +1,14 @@ +```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.delete() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/get-email-template.md b/examples/2.3.x/server-kotlin/kotlin/project/get-email-template.md new file mode 100644 index 000000000..afb83fb05 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/get-email-template.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectEmailTemplateId +import io.appwrite.enums.ProjectEmailTemplateLocale + +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.getEmailTemplate( + templateId = ProjectEmailTemplateId.VERIFICATION, + locale = ProjectEmailTemplateLocale.AF // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/get-key.md b/examples/2.3.x/server-kotlin/kotlin/project/get-key.md new file mode 100644 index 000000000..20c00451a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/get-key.md @@ -0,0 +1,16 @@ +```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.getKey( + keyId = "<KEY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/get-mock-phone.md b/examples/2.3.x/server-kotlin/kotlin/project/get-mock-phone.md new file mode 100644 index 000000000..3051539db --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/get-mock-phone.md @@ -0,0 +1,16 @@ +```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.getMockPhone( + number = "+12065550100" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/get-o-auth-2-provider.md b/examples/2.3.x/server-kotlin/kotlin/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..7a41003d7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/get-o-auth-2-provider.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuthProviderId + +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.getOAuth2Provider( + providerId = ProjectOAuthProviderId.AMAZON +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/get-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/get-platform.md new file mode 100644 index 000000000..d436d7306 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/get-platform.md @@ -0,0 +1,16 @@ +```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.getPlatform( + platformId = "<PLATFORM_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/get-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/get-policy.md new file mode 100644 index 000000000..62b5dcd54 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/get-policy.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectPolicyId + +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.getPolicy( + policyId = ProjectPolicyId.PASSWORD_DICTIONARY +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/get-variable.md b/examples/2.3.x/server-kotlin/kotlin/project/get-variable.md new file mode 100644 index 000000000..59dea6483 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/get-variable.md @@ -0,0 +1,16 @@ +```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.getVariable( + variableId = "<VARIABLE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/get.md b/examples/2.3.x/server-kotlin/kotlin/project/get.md new file mode 100644 index 000000000..c910566a6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/get.md @@ -0,0 +1,14 @@ +```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.get() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/list-email-templates.md b/examples/2.3.x/server-kotlin/kotlin/project/list-email-templates.md new file mode 100644 index 000000000..f1ced3985 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/list-email-templates.md @@ -0,0 +1,17 @@ +```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.listEmailTemplates( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/list-keys.md b/examples/2.3.x/server-kotlin/kotlin/project/list-keys.md new file mode 100644 index 000000000..d1e4ebf86 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/list-keys.md @@ -0,0 +1,17 @@ +```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.listKeys( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/list-mock-phones.md b/examples/2.3.x/server-kotlin/kotlin/project/list-mock-phones.md new file mode 100644 index 000000000..6ac56a26d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/list-mock-phones.md @@ -0,0 +1,17 @@ +```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.listMockPhones( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/list-o-auth-2-providers.md b/examples/2.3.x/server-kotlin/kotlin/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..de6e25adc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/list-o-auth-2-providers.md @@ -0,0 +1,17 @@ +```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.listOAuth2Providers( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/list-platforms.md b/examples/2.3.x/server-kotlin/kotlin/project/list-platforms.md new file mode 100644 index 000000000..04f5cbf86 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/list-platforms.md @@ -0,0 +1,17 @@ +```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.listPlatforms( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/list-policies.md b/examples/2.3.x/server-kotlin/kotlin/project/list-policies.md new file mode 100644 index 000000000..bfad4f513 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/list-policies.md @@ -0,0 +1,17 @@ +```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.listPolicies( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/list-variables.md b/examples/2.3.x/server-kotlin/kotlin/project/list-variables.md new file mode 100644 index 000000000..d455a1536 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/list-variables.md @@ -0,0 +1,17 @@ +```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.listVariables( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-android-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/update-android-platform.md new file mode 100644 index 000000000..ae25a8c5e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-android-platform.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.updateAndroidPlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + applicationId = "<APPLICATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-apple-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/update-apple-platform.md new file mode 100644 index 000000000..c299acb9f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-apple-platform.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.updateApplePlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + bundleIdentifier = "<BUNDLE_IDENTIFIER>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-auth-method.md b/examples/2.3.x/server-kotlin/kotlin/project/update-auth-method.md new file mode 100644 index 000000000..0761cf5a6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-auth-method.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectAuthMethodId + +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.updateAuthMethod( + methodId = ProjectAuthMethodId.EMAIL_PASSWORD, + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..93cc56667 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-deny-aliased-email-policy.md @@ -0,0 +1,16 @@ +```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.updateDenyAliasedEmailPolicy( + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..2d8496901 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-deny-corporate-email-policy.md @@ -0,0 +1,16 @@ +```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.updateDenyCorporateEmailPolicy( + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..34f84c0e1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-deny-disposable-email-policy.md @@ -0,0 +1,16 @@ +```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.updateDenyDisposableEmailPolicy( + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-deny-free-email-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..9c9cbc5b6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-deny-free-email-policy.md @@ -0,0 +1,16 @@ +```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.updateDenyFreeEmailPolicy( + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-email-template.md b/examples/2.3.x/server-kotlin/kotlin/project/update-email-template.md new file mode 100644 index 000000000..211ac14c2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-email-template.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectEmailTemplateId +import io.appwrite.enums.ProjectEmailTemplateLocale + +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.updateEmailTemplate( + templateId = ProjectEmailTemplateId.VERIFICATION, + locale = ProjectEmailTemplateLocale.AF, // optional + subject = "<SUBJECT>", // optional + message = "<MESSAGE>", // optional + senderName = "<SENDER_NAME>", // optional + senderEmail = "email@example.com", // optional + replyToEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>" // optional +) +``` 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 new file mode 100644 index 000000000..714a20e20 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-key.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectKeyScopes + +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.updateKey( + keyId = "<KEY_ID>", + name = "<NAME>", + scopes = listOf(ProjectKeyScopes.PROJECT_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 new file mode 100644 index 000000000..fd68ba524 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-labels.md @@ -0,0 +1,16 @@ +```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.updateLabels( + labels = listOf() +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-linux-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/update-linux-platform.md new file mode 100644 index 000000000..8ddd08496 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-linux-platform.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.updateLinuxPlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + packageName = "<PACKAGE_NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-membership-privacy-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..d3d90669b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-membership-privacy-policy.md @@ -0,0 +1,21 @@ +```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.updateMembershipPrivacyPolicy( + userId = false, // optional + userEmail = false, // optional + userPhone = false, // optional + userName = false, // optional + userMFA = false, // optional + userAccessedAt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-mfa-factors-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..85fb7580d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-mfa-factors-policy.md @@ -0,0 +1,19 @@ +```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.updateMFAFactorsPolicy( + totp = false, // optional + email = false, // optional + phone = false, // optional + custom = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-mock-phone.md b/examples/2.3.x/server-kotlin/kotlin/project/update-mock-phone.md new file mode 100644 index 000000000..54b132a33 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-mock-phone.md @@ -0,0 +1,17 @@ +```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.updateMockPhone( + number = "+12065550100", + otp = "<OTP>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..552ac2a0b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-amazon.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.updateOAuth2Amazon( + 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-apple.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..fffb2a389 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-apple.md @@ -0,0 +1,22 @@ +```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.updateOAuth2Apple( + serviceId = "<SERVICE_ID>", // optional + keyId = "<KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + p8File = "<P8_FILE>", // optional + nativeClientIds = listOf(), // optional + enabled = false, // optional + nativeEnabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..f3a47a0d2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-appwrite.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.updateOAuth2Appwrite( + 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-auth-0.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..da0419765 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-auth-0.md @@ -0,0 +1,19 @@ +```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.updateOAuth2Auth0( + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + endpoint = "<ENDPOINT>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..8c3b47d37 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-authentik.md @@ -0,0 +1,19 @@ +```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.updateOAuth2Authentik( + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + endpoint = "<ENDPOINT>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..7e0b6dfa3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-autodesk.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.updateOAuth2Autodesk( + 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-bitbucket.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..6a38d096f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-bitbucket.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.updateOAuth2Bitbucket( + key = "<KEY>", // optional + secret = "<SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..eb6e346ad --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-bitly.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.updateOAuth2Bitly( + 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-box.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-box.md new file mode 100644 index 000000000..b77a82cd5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-box.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.updateOAuth2Box( + 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-cloudflare.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..0d7e20d57 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-cloudflare.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.updateOAuth2Cloudflare( + 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-dailymotion.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..d45444122 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-dailymotion.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.updateOAuth2Dailymotion( + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // 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 new file mode 100644 index 000000000..a4d506b3f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-discord.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.updateOAuth2Discord( + 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-disqus.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..83f0d6904 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-disqus.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.updateOAuth2Disqus( + publicKey = "<PUBLIC_KEY>", // optional + secretKey = "<SECRET_KEY>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..0b36434ab --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-dropbox.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.updateOAuth2Dropbox( + appKey = "<APP_KEY>", // optional + appSecret = "<APP_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..edec5b5e3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-etsy.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.updateOAuth2Etsy( + keyString = "<KEY_STRING>", // optional + sharedSecret = "<SHARED_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..952151f25 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-facebook.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.updateOAuth2Facebook( + appId = "<APP_ID>", // optional + appSecret = "<APP_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-figma.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..fb305af6a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-figma.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.updateOAuth2Figma( + 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-fusion-auth.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..0db1694e2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,19 @@ +```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.updateOAuth2FusionAuth( + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + endpoint = "<ENDPOINT>", // 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 new file mode 100644 index 000000000..e4070b396 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-git-hub.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.updateOAuth2GitHub( + 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-gitlab.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..b7779c832 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-gitlab.md @@ -0,0 +1,19 @@ +```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.updateOAuth2Gitlab( + applicationId = "<APPLICATION_ID>", // optional + secret = "<SECRET>", // optional + endpoint = "https://example.com", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-google.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-google.md new file mode 100644 index 000000000..d574af048 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-google.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2GooglePrompt + +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.updateOAuth2Google( + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + prompt = listOf(ProjectOAuth2GooglePrompt.NONE), // optional + nativeClientIds = listOf(), // optional + enabled = false, // optional + nativeEnabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..afaa54359 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-hugging-face.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.updateOAuth2HuggingFace( + 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-kakao.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..364c9b5df --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kakao.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.updateOAuth2Kakao( + 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-keycloak.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..ac4012d7b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-keycloak.md @@ -0,0 +1,20 @@ +```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.updateOAuth2Keycloak( + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + endpoint = "<ENDPOINT>", // optional + realmName = "<REALM_NAME>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kick.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..1da5c8a09 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kick.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.updateOAuth2Kick( + 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-linkedin.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..99e404f4d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-linkedin.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.updateOAuth2Linkedin( + clientId = "<CLIENT_ID>", // optional + primaryClientSecret = "<PRIMARY_CLIENT_SECRET>", // 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 new file mode 100644 index 000000000..c44372a88 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-microsoft.md @@ -0,0 +1,19 @@ +```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.updateOAuth2Microsoft( + applicationId = "<APPLICATION_ID>", // optional + applicationSecret = "<APPLICATION_SECRET>", // optional + tenant = "<TENANT>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-notion.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..05dc95023 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-notion.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.updateOAuth2Notion( + oauthClientId = "<OAUTH_CLIENT_ID>", // optional + oauthClientSecret = "<OAUTH_CLIENT_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..e05e2bfad --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-oidc.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2OidcPrompt + +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.updateOAuth2Oidc( + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + wellKnownURL = "https://example.com", // optional + authorizationURL = "https://example.com", // optional + tokenURL = "https://example.com", // optional + userInfoURL = "https://example.com", // optional + prompt = listOf(ProjectOAuth2OidcPrompt.NONE), // optional + maxAge = 0, // 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 new file mode 100644 index 000000000..532079ae8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-okta.md @@ -0,0 +1,20 @@ +```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.updateOAuth2Okta( + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + domain = "example.com", // optional + authorizationServerId = "<AUTHORIZATION_SERVER_ID>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..bec13bde6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-paypal-sandbox.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.updateOAuth2PaypalSandbox( + clientId = "<CLIENT_ID>", // optional + secretKey = "<SECRET_KEY>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..7ceeaa6b4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-paypal.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.updateOAuth2Paypal( + clientId = "<CLIENT_ID>", // optional + secretKey = "<SECRET_KEY>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-podio.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..9cc859732 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-podio.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.updateOAuth2Podio( + 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-resend.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..c4e13e4e9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-resend.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.updateOAuth2Resend( + 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-salesforce.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..a8b1244b4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-salesforce.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.updateOAuth2Salesforce( + customerKey = "<CUSTOMER_KEY>", // optional + customerSecret = "<CUSTOMER_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-server.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-server.md new file mode 100644 index 000000000..fb8b204a3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-server.md @@ -0,0 +1,31 @@ +```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.updateOAuth2Server( + enabled = false, + authorizationUrl = "https://example.com", + scopes = listOf(), // optional + authorizationDetailsTypes = listOf(), // optional + accessTokenDuration = 60, // optional + refreshTokenDuration = 60, // optional + publicAccessTokenDuration = 60, // optional + publicRefreshTokenDuration = 60, // optional + installationAccessTokenDuration = 60, // optional + confidentialPkce = false, // optional + verificationUrl = "https://example.com", // optional + userCodeLength = 6, // optional + userCodeFormat = "numeric", // optional + deviceCodeDuration = 60, // optional + defaultScopes = listOf(), // optional + installationScopes = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-slack.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..358611030 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-slack.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.updateOAuth2Slack( + 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-spotify.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..c1431e483 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-spotify.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.updateOAuth2Spotify( + 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-stripe.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..bad2cc42a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-stripe.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.updateOAuth2Stripe( + clientId = "<CLIENT_ID>", // optional + apiSecretKey = "<API_SECRET_KEY>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..cd9fe340a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-tik-tok.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.updateOAuth2TikTok( + 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-tradeshift-sandbox.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..aec834f93 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-tradeshift-sandbox.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.updateOAuth2TradeshiftSandbox( + oauth2ClientId = "<OAUTH2_CLIENT_ID>", // optional + oauth2ClientSecret = "<OAUTH2_CLIENT_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..ac5b816a0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-tradeshift.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.updateOAuth2Tradeshift( + oauth2ClientId = "<OAUTH2_CLIENT_ID>", // optional + oauth2ClientSecret = "<OAUTH2_CLIENT_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..e8c1b957e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-twitch.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.updateOAuth2Twitch( + 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-word-press.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..6fbe200d6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-word-press.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.updateOAuth2WordPress( + 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-yahoo.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..c96e6fd7b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-yahoo.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.updateOAuth2Yahoo( + 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-yandex.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..a48d01942 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-yandex.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.updateOAuth2Yandex( + 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 new file mode 100644 index 000000000..98f72a65f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-zoho.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.updateOAuth2Zoho( + 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-zoom.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..c934edf05 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-zoom.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.updateOAuth2Zoom( + 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-2x.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2x.md new file mode 100644 index 000000000..ebcc4543a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2x.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.updateOAuth2X( + customerKey = "<CUSTOMER_KEY>", // optional + secretKey = "<SECRET_KEY>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-password-dictionary-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..672a89f0e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-password-dictionary-policy.md @@ -0,0 +1,16 @@ +```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.updatePasswordDictionaryPolicy( + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-password-history-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-password-history-policy.md new file mode 100644 index 000000000..6580d3e5d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-password-history-policy.md @@ -0,0 +1,16 @@ +```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.updatePasswordHistoryPolicy( + total = 1 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-password-personal-data-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..49b08f335 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-password-personal-data-policy.md @@ -0,0 +1,16 @@ +```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.updatePasswordPersonalDataPolicy( + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-password-pwned-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-password-pwned-policy.md new file mode 100644 index 000000000..b1c9efb58 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-password-pwned-policy.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.updatePasswordPwnedPolicy( + enabled = false, // optional + sessions = false, // optional + users = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-password-strength-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-password-strength-policy.md new file mode 100644 index 000000000..7f4019b17 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-password-strength-policy.md @@ -0,0 +1,20 @@ +```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.updatePasswordStrengthPolicy( + min = 8, // optional + uppercase = false, // optional + lowercase = false, // optional + number = false, // optional + symbols = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-protocol.md b/examples/2.3.x/server-kotlin/kotlin/project/update-protocol.md new file mode 100644 index 000000000..fe9533b27 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-protocol.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectProtocolId + +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.updateProtocol( + protocolId = ProjectProtocolId.REST, + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-service.md b/examples/2.3.x/server-kotlin/kotlin/project/update-service.md new file mode 100644 index 000000000..19943d7dd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-service.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectServiceId + +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.updateService( + serviceId = ProjectServiceId.ACCOUNT, + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-session-alert-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-session-alert-policy.md new file mode 100644 index 000000000..233999533 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-session-alert-policy.md @@ -0,0 +1,16 @@ +```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.updateSessionAlertPolicy( + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-session-duration-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-session-duration-policy.md new file mode 100644 index 000000000..9b69ee1b1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-session-duration-policy.md @@ -0,0 +1,16 @@ +```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.updateSessionDurationPolicy( + duration = 60 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-session-invalidation-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..c7f336e9d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-session-invalidation-policy.md @@ -0,0 +1,16 @@ +```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.updateSessionInvalidationPolicy( + enabled = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-session-limit-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-session-limit-policy.md new file mode 100644 index 000000000..56831a952 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-session-limit-policy.md @@ -0,0 +1,16 @@ +```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.updateSessionLimitPolicy( + total = 1 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-smtp.md b/examples/2.3.x/server-kotlin/kotlin/project/update-smtp.md new file mode 100644 index 000000000..7d043d009 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-smtp.md @@ -0,0 +1,26 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project +import io.appwrite.enums.ProjectSMTPSecure + +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.updateSMTP( + host = "example.com", // optional + port = 587, // optional + username = "<USERNAME>", // optional + password = "password", // optional + senderEmail = "email@example.com", // optional + senderName = "<SENDER_NAME>", // optional + replyToEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + secure = ProjectSMTPSecure.TLS, // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-user-limit-policy.md b/examples/2.3.x/server-kotlin/kotlin/project/update-user-limit-policy.md new file mode 100644 index 000000000..67d22ca08 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-user-limit-policy.md @@ -0,0 +1,16 @@ +```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.updateUserLimitPolicy( + total = 0 +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-variable.md b/examples/2.3.x/server-kotlin/kotlin/project/update-variable.md new file mode 100644 index 000000000..cc6b22e1a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-variable.md @@ -0,0 +1,19 @@ +```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.updateVariable( + variableId = "<VARIABLE_ID>", + key = "<KEY>", // optional + value = "<VALUE>", // optional + secret = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-web-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/update-web-platform.md new file mode 100644 index 000000000..923ba70e5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-web-platform.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.updateWebPlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + hostname = "app.example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-windows-platform.md b/examples/2.3.x/server-kotlin/kotlin/project/update-windows-platform.md new file mode 100644 index 000000000..a8e709218 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-windows-platform.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.updateWindowsPlatform( + platformId = "<PLATFORM_ID>", + name = "<NAME>", + packageIdentifierName = "<PACKAGE_IDENTIFIER_NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/create-api-rule.md b/examples/2.3.x/server-kotlin/kotlin/proxy/create-api-rule.md new file mode 100644 index 000000000..8440808f5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/create-api-rule.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy + +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 proxy = Proxy(client) + +val response = proxy.createAPIRule( + domain = "example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/create-function-rule.md b/examples/2.3.x/server-kotlin/kotlin/proxy/create-function-rule.md new file mode 100644 index 000000000..d7e610bfa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/create-function-rule.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy + +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 proxy = Proxy(client) + +val response = proxy.createFunctionRule( + domain = "example.com", + functionId = "<FUNCTION_ID>", + branch = "<BRANCH>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/create-invalidation.md b/examples/2.3.x/server-kotlin/kotlin/proxy/create-invalidation.md new file mode 100644 index 000000000..f2f156ddd --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/create-invalidation.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy +import io.appwrite.enums.InvalidationType + +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 proxy = Proxy(client) + +val response = proxy.createInvalidation( + domain = "example.com", + type = InvalidationType.TAG, + reference = "<REFERENCE>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/create-redirect-rule.md b/examples/2.3.x/server-kotlin/kotlin/proxy/create-redirect-rule.md new file mode 100644 index 000000000..48de0957c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/create-redirect-rule.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy +import io.appwrite.enums.StatusCode +import io.appwrite.enums.ProxyResourceType + +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 proxy = Proxy(client) + +val response = proxy.createRedirectRule( + domain = "example.com", + url = "https://example.com", + statusCode = StatusCode.MOVEDPERMANENTLY, + resourceId = "<RESOURCE_ID>", + resourceType = ProxyResourceType.SITE +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/create-site-rule.md b/examples/2.3.x/server-kotlin/kotlin/proxy/create-site-rule.md new file mode 100644 index 000000000..001b1201f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/create-site-rule.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy + +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 proxy = Proxy(client) + +val response = proxy.createSiteRule( + domain = "example.com", + siteId = "<SITE_ID>", + branch = "<BRANCH>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/delete-rule.md b/examples/2.3.x/server-kotlin/kotlin/proxy/delete-rule.md new file mode 100644 index 000000000..79035f3d4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/delete-rule.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy + +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 proxy = Proxy(client) + +val response = proxy.deleteRule( + ruleId = "<RULE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/get-rule.md b/examples/2.3.x/server-kotlin/kotlin/proxy/get-rule.md new file mode 100644 index 000000000..598bcb08c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/get-rule.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy + +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 proxy = Proxy(client) + +val response = proxy.getRule( + ruleId = "<RULE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/list-rules.md b/examples/2.3.x/server-kotlin/kotlin/proxy/list-rules.md new file mode 100644 index 000000000..1c77b7545 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/list-rules.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy + +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 proxy = Proxy(client) + +val response = proxy.listRules( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/proxy/update-rule-status.md b/examples/2.3.x/server-kotlin/kotlin/proxy/update-rule-status.md new file mode 100644 index 000000000..df40b2012 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/proxy/update-rule-status.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Proxy + +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 proxy = Proxy(client) + +val response = proxy.updateRuleStatus( + ruleId = "<RULE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/create-deployment.md b/examples/2.3.x/server-kotlin/kotlin/sites/create-deployment.md new file mode 100644 index 000000000..f9691190f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/create-deployment.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.createDeployment( + siteId = "<SITE_ID>", + code = InputFile.fromPath("file.png"), + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + activate = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md b/examples/2.3.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..0bbc1c117 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.createDuplicateDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/create-template-deployment.md b/examples/2.3.x/server-kotlin/kotlin/sites/create-template-deployment.md new file mode 100644 index 000000000..65515cc8c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/create-template-deployment.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.TemplateReferenceType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createTemplateDeployment( + siteId = "<SITE_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + type = TemplateReferenceType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/create-variable.md b/examples/2.3.x/server-kotlin/kotlin/sites/create-variable.md new file mode 100644 index 000000000..f3df9cf13 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/create-variable.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.createVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/create-vcs-deployment.md b/examples/2.3.x/server-kotlin/kotlin/sites/create-vcs-deployment.md new file mode 100644 index 000000000..9e7cd91ee --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/create-vcs-deployment.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.VCSReferenceType + +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 sites = Sites(client) + +val response = sites.createVcsDeployment( + siteId = "<SITE_ID>", + type = VCSReferenceType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/create.md b/examples/2.3.x/server-kotlin/kotlin/sites/create.md new file mode 100644 index 000000000..7c4102f55 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/create.md @@ -0,0 +1,43 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework +import io.appwrite.enums.BuildRuntime +import io.appwrite.enums.Adapter +import io.appwrite.enums.ProjectKeyScopes + +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 sites = Sites(client) + +val response = sites.create( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = Framework.ANALOG, + buildRuntime = BuildRuntime.NODE_14_5, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + startCommand = "<START_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + adapter = Adapter.STATIC, // optional + installationId = "<INSTALLATION_ID>", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches = listOf(), // optional + providerPaths = listOf(), // optional + buildSpecification = "s-1vcpu-512mb", // optional + runtimeSpecification = "s-1vcpu-512mb", // optional + deploymentRetention = 0, // optional + scopes = listOf(ProjectKeyScopes.PROJECT_READ) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/delete-deployment.md b/examples/2.3.x/server-kotlin/kotlin/sites/delete-deployment.md new file mode 100644 index 000000000..76400fc5d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/delete-deployment.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.deleteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/delete-log.md b/examples/2.3.x/server-kotlin/kotlin/sites/delete-log.md new file mode 100644 index 000000000..5a3714107 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/delete-log.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.deleteLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/delete-variable.md b/examples/2.3.x/server-kotlin/kotlin/sites/delete-variable.md new file mode 100644 index 000000000..4df5d2904 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/delete-variable.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.deleteVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/delete.md b/examples/2.3.x/server-kotlin/kotlin/sites/delete.md new file mode 100644 index 000000000..d1c5bbe44 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.delete( + siteId = "<SITE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/get-deployment-download.md b/examples/2.3.x/server-kotlin/kotlin/sites/get-deployment-download.md new file mode 100644 index 000000000..374e13764 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/get-deployment-download.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.DeploymentDownloadType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val result = sites.getDeploymentDownload( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = DeploymentDownloadType.SOURCE, // optional + token = "<TOKEN>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/get-deployment.md b/examples/2.3.x/server-kotlin/kotlin/sites/get-deployment.md new file mode 100644 index 000000000..f20cd5e70 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/get-deployment.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.getDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/get-log.md b/examples/2.3.x/server-kotlin/kotlin/sites/get-log.md new file mode 100644 index 000000000..57f352025 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/get-log.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.getLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/get-variable.md b/examples/2.3.x/server-kotlin/kotlin/sites/get-variable.md new file mode 100644 index 000000000..691e919f4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/get-variable.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.getVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/get.md b/examples/2.3.x/server-kotlin/kotlin/sites/get.md new file mode 100644 index 000000000..735b51967 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.get( + siteId = "<SITE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/list-deployments.md b/examples/2.3.x/server-kotlin/kotlin/sites/list-deployments.md new file mode 100644 index 000000000..cf092dbc2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/list-deployments.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.listDeployments( + siteId = "<SITE_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = 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 new file mode 100644 index 000000000..6c7aa92de --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/list-frameworks.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.listFrameworks() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/list-logs.md b/examples/2.3.x/server-kotlin/kotlin/sites/list-logs.md new file mode 100644 index 000000000..bfb8556b9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/list-logs.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.listLogs( + siteId = "<SITE_ID>", + queries = listOf(), // optional + 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 new file mode 100644 index 000000000..12d0e9c8f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/list-specifications.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.listSpecifications( + type = "runtimes" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/list-variables.md b/examples/2.3.x/server-kotlin/kotlin/sites/list-variables.md new file mode 100644 index 000000000..5ff7f7d95 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/list-variables.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.listVariables( + siteId = "<SITE_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/list.md b/examples/2.3.x/server-kotlin/kotlin/sites/list.md new file mode 100644 index 000000000..3b064979f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.list( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/update-deployment-status.md b/examples/2.3.x/server-kotlin/kotlin/sites/update-deployment-status.md new file mode 100644 index 000000000..c9727b374 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/update-deployment-status.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.updateDeploymentStatus( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/update-site-deployment.md b/examples/2.3.x/server-kotlin/kotlin/sites/update-site-deployment.md new file mode 100644 index 000000000..7f3da4237 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/update-site-deployment.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.updateSiteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/update-variable.md b/examples/2.3.x/server-kotlin/kotlin/sites/update-variable.md new file mode 100644 index 000000000..ed5e7179a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/update-variable.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +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 sites = Sites(client) + +val response = sites.updateVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", // optional + value = "<VALUE>", // optional + secret = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/update.md b/examples/2.3.x/server-kotlin/kotlin/sites/update.md new file mode 100644 index 000000000..8f885cf14 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/sites/update.md @@ -0,0 +1,43 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework +import io.appwrite.enums.BuildRuntime +import io.appwrite.enums.Adapter +import io.appwrite.enums.ProjectKeyScopes + +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 sites = Sites(client) + +val response = sites.update( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = Framework.ANALOG, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + startCommand = "<START_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + buildRuntime = BuildRuntime.NODE_14_5, // optional + adapter = Adapter.STATIC, // optional + fallbackFile = "<FALLBACK_FILE>", // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches = listOf(), // optional + providerPaths = listOf(), // optional + buildSpecification = "s-1vcpu-512mb", // optional + runtimeSpecification = "s-1vcpu-512mb", // optional + deploymentRetention = 0, // optional + scopes = listOf(ProjectKeyScopes.PROJECT_READ) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/create-bucket.md b/examples/2.3.x/server-kotlin/kotlin/storage/create-bucket.md new file mode 100644 index 000000000..a2f2be7af --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/create-bucket.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage +import io.appwrite.enums.Compression +import io.appwrite.Permission +import io.appwrite.Role + +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 storage = Storage(client) + +val response = storage.createBucket( + bucketId = "<BUCKET_ID>", + name = "<NAME>", + permissions = listOf(Permission.read(Role.any())), // optional + fileSecurity = false, // optional + enabled = false, // optional + maximumFileSize = 1, // optional + allowedFileExtensions = listOf(), // optional + compression = Compression.NONE, // optional + encryption = false, // optional + antivirus = false, // optional + transformations = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/create-file.md b/examples/2.3.x/server-kotlin/kotlin/storage/create-file.md new file mode 100644 index 000000000..dc0bc17fc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/create-file.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Storage +import io.appwrite.Permission +import io.appwrite.Role + +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 storage = Storage(client) + +val response = storage.createFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + file = InputFile.fromPath("file.png"), + permissions = listOf(Permission.read(Role.any())), // optional + folder = "photos/2026" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/delete-bucket.md b/examples/2.3.x/server-kotlin/kotlin/storage/delete-bucket.md new file mode 100644 index 000000000..a5f681c67 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/delete-bucket.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +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 storage = Storage(client) + +val response = storage.deleteBucket( + bucketId = "<BUCKET_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/delete-file.md b/examples/2.3.x/server-kotlin/kotlin/storage/delete-file.md new file mode 100644 index 000000000..8ba5a38cb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/delete-file.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +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 storage = Storage(client) + +val response = storage.deleteFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/get-bucket.md b/examples/2.3.x/server-kotlin/kotlin/storage/get-bucket.md new file mode 100644 index 000000000..b243bc3f7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/get-bucket.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +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 storage = Storage(client) + +val response = storage.getBucket( + bucketId = "<BUCKET_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/get-file-download.md b/examples/2.3.x/server-kotlin/kotlin/storage/get-file-download.md new file mode 100644 index 000000000..ed3198dde --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/get-file-download.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +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 storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + token = "<TOKEN>" // 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 new file mode 100644 index 000000000..a9df2c0cf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -0,0 +1,31 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage +import io.appwrite.enums.ImageGravity +import io.appwrite.enums.ImageFormat + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + width = 0, // optional + height = 0, // optional + gravity = ImageGravity.AUTO, // optional + quality = -1, // optional + borderWidth = 0, // optional + borderColor = "FFFFFF", // optional + borderRadius = 0, // optional + opacity = 0, // optional + rotation = -360, // optional + background = "FFFFFF", // optional + output = ImageFormat.JPG, // optional + token = "<TOKEN>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/get-file-view.md b/examples/2.3.x/server-kotlin/kotlin/storage/get-file-view.md new file mode 100644 index 000000000..141a8cd4f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/get-file-view.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +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 storage = Storage(client) + +val result = storage.getFileView( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + token = "<TOKEN>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/get-file.md b/examples/2.3.x/server-kotlin/kotlin/storage/get-file.md new file mode 100644 index 000000000..223075939 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/get-file.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +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 storage = Storage(client) + +val response = storage.getFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/list-buckets.md b/examples/2.3.x/server-kotlin/kotlin/storage/list-buckets.md new file mode 100644 index 000000000..94c0bb6a1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/list-buckets.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +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 storage = Storage(client) + +val response = storage.listBuckets( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/list-files.md b/examples/2.3.x/server-kotlin/kotlin/storage/list-files.md new file mode 100644 index 000000000..bc1e60aae --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/list-files.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +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 storage = Storage(client) + +val response = storage.listFiles( + bucketId = "<BUCKET_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/update-bucket.md b/examples/2.3.x/server-kotlin/kotlin/storage/update-bucket.md new file mode 100644 index 000000000..99e928c6c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/update-bucket.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage +import io.appwrite.enums.Compression +import io.appwrite.Permission +import io.appwrite.Role + +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 storage = Storage(client) + +val response = storage.updateBucket( + bucketId = "<BUCKET_ID>", + name = "<NAME>", + permissions = listOf(Permission.read(Role.any())), // optional + fileSecurity = false, // optional + enabled = false, // optional + maximumFileSize = 1, // optional + allowedFileExtensions = listOf(), // optional + compression = Compression.NONE, // optional + encryption = false, // optional + antivirus = false, // optional + transformations = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/update-file.md b/examples/2.3.x/server-kotlin/kotlin/storage/update-file.md new file mode 100644 index 000000000..8bcebadd7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/storage/update-file.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage +import io.appwrite.Permission +import io.appwrite.Role + +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 storage = Storage(client) + +val response = storage.updateFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + name = "<NAME>", // optional + permissions = listOf(Permission.read(Role.any())) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-big-int-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..66bb973af --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-big-int-column.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createBigIntColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + min = 0, // optional + max = 1000000, // optional + default = 0, // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-boolean-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..b04ddff3a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-boolean-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = false, // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-cutover.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-cutover.md new file mode 100644 index 000000000..f45763843 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-cutover.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createCutover( + databaseId = "<DATABASE_ID>", + migrationId = "<MIGRATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-datetime-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..40208f9b5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-datetime-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "2020-10-15T06:38:00.000+00:00", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-email-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-email-column.md new file mode 100644 index 000000000..2ae58ac3d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-email-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "email@example.com", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-enum-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-enum-column.md new file mode 100644 index 000000000..a8ed38176 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-enum-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + elements = listOf("active", "inactive"), + required = false, + default = "active", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-failover.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-failover.md new file mode 100644 index 000000000..142468959 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-failover.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createFailover( + databaseId = "<DATABASE_ID>", + targetReplicaId = "<TARGET_REPLICA_ID>" // 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 new file mode 100644 index 000000000..321b83c2c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-float-column.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + min = 0, // optional + max = 100, // 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 new file mode 100644 index 000000000..5364f58d1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-index.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.enums.TablesDBIndexType +import io.appwrite.enums.OrderBy + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + type = TablesDBIndexType.KEY, + columns = listOf(), + orders = listOf(OrderBy.ASC), // optional + lengths = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-integer-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-integer-column.md new file mode 100644 index 000000000..98dc8a19c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-integer-column.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + min = 0, // optional + max = 100, // optional + default = 10, // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-ip-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-ip-column.md new file mode 100644 index 000000000..759ad7aaf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-ip-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "192.0.2.0", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-line-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-line-column.md new file mode 100644 index 000000000..4f28769f9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-line-column.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createLineColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6)) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-longtext-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..fd6b58ac4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-longtext-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createLongtextColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..67e372ae3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-mediumtext-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createMediumtextColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-migration.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-migration.md new file mode 100644 index 000000000..05dbc0d1d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-migration.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createMigration( + databaseId = "<DATABASE_ID>", + specification = "s-1vcpu-1gb", + autoCutover = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-operations.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-operations.md new file mode 100644 index 000000000..d2c6f7a02 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-operations.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createOperations( + transactionId = "<TRANSACTION_ID>", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "<DATABASE_ID>", + "tableId" to "<TABLE_ID>", + "rowId" to "<ROW_ID>", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-point-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-point-column.md new file mode 100644 index 000000000..f48aa2c01 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-point-column.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createPointColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = listOf(1, 2) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-polygon-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..2d7478f8c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-polygon-column.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createPolygonColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = listOf(listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6), listOf(1, 2))) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-relationship-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..66f318eab --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-relationship-column.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.enums.RelationshipType +import io.appwrite.enums.RelationMutate + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDB = TablesDB(client) + +val response = tablesDB.createRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + relatedTableId = "<RELATED_TABLE_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "<KEY>", // optional + twoWayKey = "<TWO_WAY_KEY>", // optional + onDelete = RelationMutate.CASCADE // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-row.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-row.md new file mode 100644 index 000000000..4cd0dd06f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-row.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.Permission +import io.appwrite.Role + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..5cb02b780 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-rows.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf(), + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-string-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-string-column.md new file mode 100644 index 000000000..c7af9b773 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-string-column.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + size = 1, + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-table.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-table.md new file mode 100644 index 000000000..cdc00e204 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-table.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.Permission +import io.appwrite.Role + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf(Permission.read(Role.any())), // optional + rowSecurity = false, // optional + enabled = false, // optional + columns = listOf(), // optional + indexes = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-text-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-text-column.md new file mode 100644 index 000000000..5cee07d6b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-text-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createTextColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-transaction.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-transaction.md new file mode 100644 index 000000000..c7594185b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createTransaction( + ttl = 60 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-url-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-url-column.md new file mode 100644 index 000000000..3acd47c17 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-url-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "https://example.com", // optional + array = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-varchar-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..724c81dfa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-varchar-column.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.createVarcharColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + size = 1, + required = false, + default = "Hello World", // optional + array = false, // optional + encrypt = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create.md new file mode 100644 index 000000000..9885fc917 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false, // optional + specification = "serverless", // optional + replicas = 0, // optional + syncMode = "async" // 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 new file mode 100644 index 000000000..bba950a9d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.decrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "<COLUMN>", + value = 1, // optional + min = 0, // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-column.md new file mode 100644 index 000000000..cf8eed8f4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-column.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.deleteColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-index.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-index.md new file mode 100644 index 000000000..25e176e33 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.deleteIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-migration.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-migration.md new file mode 100644 index 000000000..721cb54e9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-migration.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.deleteMigration( + databaseId = "<DATABASE_ID>", + migrationId = "<MIGRATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-row.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-row.md new file mode 100644 index 000000000..e332db02f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-row.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + 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 new file mode 100644 index 000000000..00cd5abe0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-rows.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.deleteRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-table.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-table.md new file mode 100644 index 000000000..d83d92701 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-table.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.deleteTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-transaction.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-transaction.md new file mode 100644 index 000000000..8e8641bf7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.deleteTransaction( + transactionId = "<TRANSACTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete.md new file mode 100644 index 000000000..15035253a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.delete( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-column.md new file mode 100644 index 000000000..56550c9de --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-column.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.getColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-index.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-index.md new file mode 100644 index 000000000..e40b0c1b5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.getIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-migration.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-migration.md new file mode 100644 index 000000000..c550db440 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-migration.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.getMigration( + databaseId = "<DATABASE_ID>", + migrationId = "<MIGRATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-replicas.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-replicas.md new file mode 100644 index 000000000..ebac0f346 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-replicas.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.getReplicas( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-row.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-row.md new file mode 100644 index 000000000..18845e2a3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-row.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-status.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-status.md new file mode 100644 index 000000000..6107b2310 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-status.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.getStatus( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-table.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-table.md new file mode 100644 index 000000000..6595254a2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-table.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.getTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-transaction.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-transaction.md new file mode 100644 index 000000000..c478eb8e5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.getTransaction( + transactionId = "<TRANSACTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/get.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get.md new file mode 100644 index 000000000..9d9de009f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.get( + databaseId = "<DATABASE_ID>" +) +``` 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 new file mode 100644 index 000000000..ad4056d4d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/increment-row-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.incrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "<COLUMN>", + value = 1, // optional + max = 100, // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-columns.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-columns.md new file mode 100644 index 000000000..786773749 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-columns.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.listColumns( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-indexes.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-indexes.md new file mode 100644 index 000000000..edd5cbd2b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-indexes.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.listIndexes( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-migrations.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-migrations.md new file mode 100644 index 000000000..794d5c1ab --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-migrations.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.listMigrations( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-operations.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-operations.md new file mode 100644 index 000000000..640993382 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-operations.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.listOperations( + databaseId = "<DATABASE_ID>", + status = "queued", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-rows.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-rows.md new file mode 100644 index 000000000..c8b518d5d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-rows.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>", // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-specifications.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-specifications.md new file mode 100644 index 000000000..40c9a2187 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-specifications.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.listSpecifications() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-tables.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-tables.md new file mode 100644 index 000000000..a60bbfe93 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-tables.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.listTables( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // 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 new file mode 100644 index 000000000..52ebbefbb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-transactions.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.listTransactions( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list.md new file mode 100644 index 000000000..a5b2d1037 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.list( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-big-int-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..8a654a4e1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-big-int-column.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateBigIntColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = 0, + min = 0, // optional + max = 1000000, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-boolean-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..5c22769d0 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-boolean-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = false, + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-datetime-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..683e31187 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-datetime-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "2020-10-15T06:38:00.000+00:00", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-email-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-email-column.md new file mode 100644 index 000000000..787597557 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-email-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "email@example.com", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-enum-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-enum-column.md new file mode 100644 index 000000000..091bdc3c4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-enum-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + elements = listOf("active", "inactive"), + required = false, + default = "active", + newKey = "<NEW_KEY>" // 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 new file mode 100644 index 000000000..4d156e060 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-float-column.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = 10.5, + min = 0, // optional + max = 100, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-integer-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-integer-column.md new file mode 100644 index 000000000..ed2e6da7c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-integer-column.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = 10, + min = 0, // optional + max = 100, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-ip-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-ip-column.md new file mode 100644 index 000000000..c655997ad --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-ip-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "192.0.2.0", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-line-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-line-column.md new file mode 100644 index 000000000..2838853c8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-line-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateLineColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6)), // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-longtext-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..25ac20c29 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-longtext-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateLongtextColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..71b6e0a5d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-mediumtext-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateMediumtextColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-point-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-point-column.md new file mode 100644 index 000000000..29b9daa3f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-point-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updatePointColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = listOf(1, 2), // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-polygon-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..8f3d3973b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-polygon-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updatePolygonColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = listOf(listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6), listOf(1, 2))), // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-relationship-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..d8bbf94ca --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-relationship-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.enums.RelationMutate + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDB = TablesDB(client) + +val response = tablesDB.updateRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + onDelete = RelationMutate.CASCADE, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-row.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-row.md new file mode 100644 index 000000000..1ef355353 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-row.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.Permission +import io.appwrite.Role + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 33, + "isAdmin" to false + ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-rows.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-rows.md new file mode 100644 index 000000000..89eba7dfa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-rows.md @@ -0,0 +1,26 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 33, + "isAdmin" to false + ), // optional + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-string-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-string-column.md new file mode 100644 index 000000000..ca1b5b8e2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-string-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + size = 1, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-table.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-table.md new file mode 100644 index 000000000..db1db5b00 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-table.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.Permission +import io.appwrite.Role + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", // optional + permissions = listOf(Permission.read(Role.any())), // optional + rowSecurity = false, // optional + enabled = false, // optional + purge = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-text-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-text-column.md new file mode 100644 index 000000000..363625ea9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-text-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateTextColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-transaction.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-transaction.md new file mode 100644 index 000000000..1e452f4b3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-transaction.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateTransaction( + transactionId = "<TRANSACTION_ID>", + commit = false, // optional + rollback = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-url-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-url-column.md new file mode 100644 index 000000000..3e6db48f8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-url-column.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "https://example.com", + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-varchar-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..1fb7fe290 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-varchar-column.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.updateVarcharColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "<KEY>", + required = false, + default = "Hello World", + size = 1, // optional + newKey = "<NEW_KEY>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update.md new file mode 100644 index 000000000..2822cd4a5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", // optional + enabled = false, // optional + specification = "serverless", // optional + replicas = 0, // optional + syncMode = "async" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/upsert-row.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/upsert-row.md new file mode 100644 index 000000000..7ae1397e4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/upsert-row.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB +import io.appwrite.Permission +import io.appwrite.Role + +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 tablesDB = TablesDB(client) + +val response = tablesDB.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 33, + "isAdmin" to false + ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..5ee9beb6c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/upsert-rows.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDB + +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 tablesDB = TablesDB(client) + +val response = tablesDB.upsertRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf(), + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/create-installation.md b/examples/2.3.x/server-kotlin/kotlin/teams/create-installation.md new file mode 100644 index 000000000..29199db11 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/create-installation.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.createInstallation( + teamId = "<TEAM_ID>", + appId = "<APP_ID>", + authorizationDetails = "<AUTHORIZATION_DETAILS>" // 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 new file mode 100644 index 000000000..8a27e6ea2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/create-membership.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +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 teams = Teams(client) + +val response = teams.createMembership( + teamId = "<TEAM_ID>", + roles = listOf(), + email = "email@example.com", // optional + userId = "<USER_ID>", // optional + phone = "+12065550100", // optional + url = "https://example.com", // optional + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/create.md b/examples/2.3.x/server-kotlin/kotlin/teams/create.md new file mode 100644 index 000000000..f14fb19d4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/create.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.create( + teamId = "<TEAM_ID>", + name = "<NAME>", + roles = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/delete-installation.md b/examples/2.3.x/server-kotlin/kotlin/teams/delete-installation.md new file mode 100644 index 000000000..66fe4d7d7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/delete-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.deleteInstallation( + teamId = "<TEAM_ID>", + installationId = "<INSTALLATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/delete-membership.md b/examples/2.3.x/server-kotlin/kotlin/teams/delete-membership.md new file mode 100644 index 000000000..1291b5ddc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/delete-membership.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.deleteMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/delete.md b/examples/2.3.x/server-kotlin/kotlin/teams/delete.md new file mode 100644 index 000000000..d6b5389db --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +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 teams = Teams(client) + +val response = teams.delete( + teamId = "<TEAM_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/get-installation.md b/examples/2.3.x/server-kotlin/kotlin/teams/get-installation.md new file mode 100644 index 000000000..c8ffa0029 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/get-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getInstallation( + teamId = "<TEAM_ID>", + installationId = "<INSTALLATION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/get-membership.md b/examples/2.3.x/server-kotlin/kotlin/teams/get-membership.md new file mode 100644 index 000000000..e35179ee9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/get-membership.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/get-prefs.md b/examples/2.3.x/server-kotlin/kotlin/teams/get-prefs.md new file mode 100644 index 000000000..615a59d07 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/get-prefs.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +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 teams = Teams(client) + +val response = teams.getPrefs( + teamId = "<TEAM_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/get.md b/examples/2.3.x/server-kotlin/kotlin/teams/get.md new file mode 100644 index 000000000..d5dc888ae --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +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 teams = Teams(client) + +val response = teams.get( + teamId = "<TEAM_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/list-installations.md b/examples/2.3.x/server-kotlin/kotlin/teams/list-installations.md new file mode 100644 index 000000000..2dd540536 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/list-installations.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.listInstallations( + teamId = "<TEAM_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/list-memberships.md b/examples/2.3.x/server-kotlin/kotlin/teams/list-memberships.md new file mode 100644 index 000000000..762336d10 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/list-memberships.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +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 teams = Teams(client) + +val response = teams.listMemberships( + teamId = "<TEAM_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/list.md b/examples/2.3.x/server-kotlin/kotlin/teams/list.md new file mode 100644 index 000000000..bcb4c83a1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.list( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/update-installation.md b/examples/2.3.x/server-kotlin/kotlin/teams/update-installation.md new file mode 100644 index 000000000..024c866bb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/update-installation.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateInstallation( + teamId = "<TEAM_ID>", + installationId = "<INSTALLATION_ID>", + authorizationDetails = "<AUTHORIZATION_DETAILS>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/update-membership-status.md b/examples/2.3.x/server-kotlin/kotlin/teams/update-membership-status.md new file mode 100644 index 000000000..082004b8a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/update-membership-status.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +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 teams = Teams(client) + +val response = teams.updateMembershipStatus( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + userId = "<USER_ID>", + secret = "<SECRET>" +) +``` 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 new file mode 100644 index 000000000..51e01d69c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/update-membership.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + roles = listOf() +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/update-name.md b/examples/2.3.x/server-kotlin/kotlin/teams/update-name.md new file mode 100644 index 000000000..229bea6c8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/update-name.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateName( + teamId = "<TEAM_ID>", + name = "<NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/update-prefs.md b/examples/2.3.x/server-kotlin/kotlin/teams/update-prefs.md new file mode 100644 index 000000000..d9e68fa2c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/teams/update-prefs.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updatePrefs( + teamId = "<TEAM_ID>", + prefs = mapOf( "a" to "b" ) +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tokens/create-file-token.md b/examples/2.3.x/server-kotlin/kotlin/tokens/create-file-token.md new file mode 100644 index 000000000..7d831ce0f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tokens/create-file-token.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +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 tokens = Tokens(client) + +val response = 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-kotlin/kotlin/tokens/delete.md b/examples/2.3.x/server-kotlin/kotlin/tokens/delete.md new file mode 100644 index 000000000..25e4b19fa --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tokens/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +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 tokens = Tokens(client) + +val response = tokens.delete( + tokenId = "<TOKEN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tokens/get.md b/examples/2.3.x/server-kotlin/kotlin/tokens/get.md new file mode 100644 index 000000000..803030987 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tokens/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +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 tokens = Tokens(client) + +val response = tokens.get( + tokenId = "<TOKEN_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tokens/list.md b/examples/2.3.x/server-kotlin/kotlin/tokens/list.md new file mode 100644 index 000000000..39ffb7618 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tokens/list.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +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 tokens = Tokens(client) + +val response = tokens.list( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tokens/update.md b/examples/2.3.x/server-kotlin/kotlin/tokens/update.md new file mode 100644 index 000000000..4e7de71fc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/tokens/update.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +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 tokens = Tokens(client) + +val response = tokens.update( + tokenId = "<TOKEN_ID>", + expire = "2020-10-15T06:38:00.000+00:00" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-argon-2-user.md b/examples/2.3.x/server-kotlin/kotlin/users/create-argon-2-user.md new file mode 100644 index 000000000..ba0c2d0cb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-argon-2-user.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createArgon2User( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-bcrypt-user.md b/examples/2.3.x/server-kotlin/kotlin/users/create-bcrypt-user.md new file mode 100644 index 000000000..3a563f726 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-bcrypt-user.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createBcryptUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-jwt.md b/examples/2.3.x/server-kotlin/kotlin/users/create-jwt.md new file mode 100644 index 000000000..e4703d849 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-jwt.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createJWT( + userId = "<USER_ID>", + sessionId = "recent()", // optional + duration = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-md-5-user.md b/examples/2.3.x/server-kotlin/kotlin/users/create-md-5-user.md new file mode 100644 index 000000000..04e30b452 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-md-5-user.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createMD5User( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..385bb2ca2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createMFARecoveryCodes( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-ph-pass-user.md b/examples/2.3.x/server-kotlin/kotlin/users/create-ph-pass-user.md new file mode 100644 index 000000000..a62814dbc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-ph-pass-user.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createPHPassUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md b/examples/2.3.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..0b5fb50d2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createScryptModifiedUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordSaltSeparator = "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey = "<PASSWORD_SIGNER_KEY>", + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-scrypt-user.md b/examples/2.3.x/server-kotlin/kotlin/users/create-scrypt-user.md new file mode 100644 index 000000000..11846dda1 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-scrypt-user.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createScryptUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordCpu = 8, + passwordMemory = 65536, + passwordParallel = 1, + passwordLength = 64, + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-session.md b/examples/2.3.x/server-kotlin/kotlin/users/create-session.md new file mode 100644 index 000000000..9379a0102 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-session.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createSession( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-sha-user.md b/examples/2.3.x/server-kotlin/kotlin/users/create-sha-user.md new file mode 100644 index 000000000..91566c8c2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-sha-user.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.PasswordHash + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createSHAUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordVersion = PasswordHash.SHA1, // optional + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-target.md b/examples/2.3.x/server-kotlin/kotlin/users/create-target.md new file mode 100644 index 000000000..774120d55 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-target.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.MessagingProviderType + +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 users = Users(client) + +val response = users.createTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + providerType = MessagingProviderType.EMAIL, + identifier = "<IDENTIFIER>", + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create-token.md b/examples/2.3.x/server-kotlin/kotlin/users/create-token.md new file mode 100644 index 000000000..fedd9392f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create-token.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.createToken( + userId = "<USER_ID>", + length = 4, // optional + expire = 60 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/create.md b/examples/2.3.x/server-kotlin/kotlin/users/create.md new file mode 100644 index 000000000..f084a8c34 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/create.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.create( + userId = "<USER_ID>", + email = "email@example.com", // optional + phone = "+12065550100", // optional + password = "password", // optional + name = "<NAME>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/delete-identity.md b/examples/2.3.x/server-kotlin/kotlin/users/delete-identity.md new file mode 100644 index 000000000..1953d4efb --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/delete-identity.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.deleteIdentity( + identityId = "<IDENTITY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md b/examples/2.3.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..a8add4152 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.AuthenticatorType + +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 users = Users(client) + +val response = users.deleteMFAAuthenticator( + userId = "<USER_ID>", + type = AuthenticatorType.TOTP +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/delete-session.md b/examples/2.3.x/server-kotlin/kotlin/users/delete-session.md new file mode 100644 index 000000000..4d17c24ac --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/delete-session.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.deleteSession( + userId = "<USER_ID>", + sessionId = "<SESSION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/delete-sessions.md b/examples/2.3.x/server-kotlin/kotlin/users/delete-sessions.md new file mode 100644 index 000000000..843285f7f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/delete-sessions.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.deleteSessions( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/delete-target.md b/examples/2.3.x/server-kotlin/kotlin/users/delete-target.md new file mode 100644 index 000000000..650678a9a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/delete-target.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.deleteTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/delete.md b/examples/2.3.x/server-kotlin/kotlin/users/delete.md new file mode 100644 index 000000000..088727d03 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.delete( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/get-mfa-challenge.md b/examples/2.3.x/server-kotlin/kotlin/users/get-mfa-challenge.md new file mode 100644 index 000000000..ecae4b450 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/get-mfa-challenge.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.getMFAChallenge( + userId = "<USER_ID>", + challengeId = "<CHALLENGE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..1215a91b8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.getMFARecoveryCodes( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/get-prefs.md b/examples/2.3.x/server-kotlin/kotlin/users/get-prefs.md new file mode 100644 index 000000000..896c87084 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/get-prefs.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.getPrefs( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/get-target.md b/examples/2.3.x/server-kotlin/kotlin/users/get-target.md new file mode 100644 index 000000000..94e19177d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/get-target.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.getTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/get.md b/examples/2.3.x/server-kotlin/kotlin/users/get.md new file mode 100644 index 000000000..9d24b9834 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.get( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/list-identities.md b/examples/2.3.x/server-kotlin/kotlin/users/list-identities.md new file mode 100644 index 000000000..e745da3d2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/list-identities.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.listIdentities( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/list-memberships.md b/examples/2.3.x/server-kotlin/kotlin/users/list-memberships.md new file mode 100644 index 000000000..3d001fde4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/list-memberships.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.listMemberships( + userId = "<USER_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/list-mfa-factors.md b/examples/2.3.x/server-kotlin/kotlin/users/list-mfa-factors.md new file mode 100644 index 000000000..ee17cc096 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/list-mfa-factors.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.listMFAFactors( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/list-sessions.md b/examples/2.3.x/server-kotlin/kotlin/users/list-sessions.md new file mode 100644 index 000000000..05d002479 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/list-sessions.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.listSessions( + userId = "<USER_ID>", + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/list-targets.md b/examples/2.3.x/server-kotlin/kotlin/users/list-targets.md new file mode 100644 index 000000000..bb026ed8f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/list-targets.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.listTargets( + userId = "<USER_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/list.md b/examples/2.3.x/server-kotlin/kotlin/users/list.md new file mode 100644 index 000000000..4cc3195f2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.list( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-email-verification.md b/examples/2.3.x/server-kotlin/kotlin/users/update-email-verification.md new file mode 100644 index 000000000..f30e40159 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-email-verification.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateEmailVerification( + userId = "<USER_ID>", + emailVerification = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-email.md b/examples/2.3.x/server-kotlin/kotlin/users/update-email.md new file mode 100644 index 000000000..7642a957d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-email.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateEmail( + userId = "<USER_ID>", + email = "email@example.com" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-impersonator.md b/examples/2.3.x/server-kotlin/kotlin/users/update-impersonator.md new file mode 100644 index 000000000..58a8e6ef4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-impersonator.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateImpersonator( + userId = "<USER_ID>", + impersonator = false +) +``` 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 new file mode 100644 index 000000000..3d88c7aff --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-labels.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateLabels( + userId = "<USER_ID>", + labels = listOf() +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..642f1525a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateMFARecoveryCodes( + userId = "<USER_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-mfa.md b/examples/2.3.x/server-kotlin/kotlin/users/update-mfa.md new file mode 100644 index 000000000..1cde68adc --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-mfa.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateMFA( + userId = "<USER_ID>", + mfa = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-name.md b/examples/2.3.x/server-kotlin/kotlin/users/update-name.md new file mode 100644 index 000000000..beb53d55d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-name.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateName( + userId = "<USER_ID>", + name = "<NAME>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-password.md b/examples/2.3.x/server-kotlin/kotlin/users/update-password.md new file mode 100644 index 000000000..b0ed76a93 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-password.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updatePassword( + userId = "<USER_ID>", + password = "password" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-phone-verification.md b/examples/2.3.x/server-kotlin/kotlin/users/update-phone-verification.md new file mode 100644 index 000000000..f574b2623 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-phone-verification.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updatePhoneVerification( + userId = "<USER_ID>", + phoneVerification = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-phone.md b/examples/2.3.x/server-kotlin/kotlin/users/update-phone.md new file mode 100644 index 000000000..855a459da --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-phone.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updatePhone( + userId = "<USER_ID>", + number = "+12065550100" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-prefs.md b/examples/2.3.x/server-kotlin/kotlin/users/update-prefs.md new file mode 100644 index 000000000..8d610eb6e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-prefs.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updatePrefs( + userId = "<USER_ID>", + prefs = mapOf( "a" to "b" ) +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-status.md b/examples/2.3.x/server-kotlin/kotlin/users/update-status.md new file mode 100644 index 000000000..600bd6faf --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-status.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateStatus( + userId = "<USER_ID>", + status = false +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-target.md b/examples/2.3.x/server-kotlin/kotlin/users/update-target.md new file mode 100644 index 000000000..55f0f9732 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-target.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +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 users = Users(client) + +val response = users.updateTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + identifier = "<IDENTIFIER>", // optional + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional +) +``` 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 new file mode 100644 index 000000000..0cd1e4a51 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-collection.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + dimension = 1, + 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-document.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-document.md new file mode 100644 index 000000000..b931336e8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-document.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( + "embeddings" to listOf(0.12, -0.55, 0.88, 1.02), + "metadata" to mapOf( + "key" to "value" + ) + ), + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..3a79fd2db --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf(), + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-failover.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-failover.md new file mode 100644 index 000000000..717c5c150 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-failover.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createFailover( + databaseId = "<DATABASE_ID>", + targetReplicaId = "<TARGET_REPLICA_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 new file mode 100644 index 000000000..76e691162 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-index.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.enums.VectorsDBIndexType +import io.appwrite.enums.OrderBy + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>", + type = VectorsDBIndexType.HNSW_EUCLIDEAN, + attributes = listOf(), + 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 new file mode 100644 index 000000000..f6bc63626 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createOperations( + transactionId = "<TRANSACTION_ID>", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "<DATABASE_ID>", + "collectionId" to "<COLLECTION_ID>", + "documentId" to "<DOCUMENT_ID>", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )) // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-query.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-query.md new file mode 100644 index 000000000..c8ab0951e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-query.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createQuery( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>", // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-transaction.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-transaction.md new file mode 100644 index 000000000..b2430a18e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createTransaction( + ttl = 60 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create.md new file mode 100644 index 000000000..81a96a5ba --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false, // optional + specification = "serverless", // optional + replicas = 0, // optional + syncMode = "async" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-collection.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-collection.md new file mode 100644 index 000000000..4e929caca --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-document.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-document.md new file mode 100644 index 000000000..2fff745da --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-document.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + transactionId = "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..53ecd505d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-index.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-index.md new file mode 100644 index 000000000..229ee96d3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-transaction.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..f04bef21e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteTransaction( + transactionId = "<TRANSACTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete.md new file mode 100644 index 000000000..d4d480e5e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.delete( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-collection.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-collection.md new file mode 100644 index 000000000..68599a754 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-document.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-document.md new file mode 100644 index 000000000..9a2fb13f3 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-document.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-index.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-index.md new file mode 100644 index 000000000..6a0e1854f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "<KEY>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-replicas.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-replicas.md new file mode 100644 index 000000000..1ce975f4e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-replicas.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getReplicas( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-status.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-status.md new file mode 100644 index 000000000..d51f8b65d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-status.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getStatus( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-transaction.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-transaction.md new file mode 100644 index 000000000..9fee4491d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getTransaction( + transactionId = "<TRANSACTION_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get.md new file mode 100644 index 000000000..fc9d6bd9b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.get( + databaseId = "<DATABASE_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-collections.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-collections.md new file mode 100644 index 000000000..12250df74 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-collections.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listCollections( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-documents.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-documents.md new file mode 100644 index 000000000..ec74ab640 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-documents.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>", // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-indexes.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-indexes.md new file mode 100644 index 000000000..28f0fc003 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-indexes.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listIndexes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-operations.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-operations.md new file mode 100644 index 000000000..b773a0725 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-operations.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listOperations( + databaseId = "<DATABASE_ID>", + status = "queued", // optional + limit = 1, // optional + offset = 0 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-specifications.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-specifications.md new file mode 100644 index 000000000..d5914e6f2 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-specifications.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +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 vectorsDB = VectorsDB(client) + +val response = vectorsDB.listSpecifications() +``` 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 new file mode 100644 index 000000000..3801d18e7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-transactions.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listTransactions( + queries = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list.md new file mode 100644 index 000000000..fc4888e1b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.list( + 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 new file mode 100644 index 000000000..331c85c27 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-collection.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.updateCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + dimension = 1, // 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/update-document.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-document.md new file mode 100644 index 000000000..572575732 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-document.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.updateDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-documents.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-documents.md new file mode 100644 index 000000000..32aac30e7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-documents.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.updateDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf(), // optional + transactionId = "<TRANSACTION_ID>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-transaction.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-transaction.md new file mode 100644 index 000000000..5f34609f5 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-transaction.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.updateTransaction( + transactionId = "<TRANSACTION_ID>", + commit = false, // optional + rollback = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update.md new file mode 100644 index 000000000..22f7ba97c --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false, // optional + specification = "serverless", // optional + replicas = 0, // optional + syncMode = "async" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/upsert-document.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/upsert-document.md new file mode 100644 index 000000000..dd18e1d56 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/upsert-document.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.upsertDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..717222282 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/upsert-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.upsertDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf(), + 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 new file mode 100644 index 000000000..5de5b5593 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/webhooks/create.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Webhooks + +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 webhooks = Webhooks(client) + +val response = webhooks.create( + webhookId = "<WEBHOOK_ID>", + url = "https://example.com/webhook", + name = "<NAME>", + events = listOf(), + enabled = false, // optional + tls = false, // optional + authUsername = "<AUTH_USERNAME>", // optional + authPassword = "password", // optional + secret = "<SECRET>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/webhooks/delete.md b/examples/2.3.x/server-kotlin/kotlin/webhooks/delete.md new file mode 100644 index 000000000..6f381c2b6 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/webhooks/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Webhooks + +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 webhooks = Webhooks(client) + +val response = webhooks.delete( + webhookId = "<WEBHOOK_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/webhooks/get.md b/examples/2.3.x/server-kotlin/kotlin/webhooks/get.md new file mode 100644 index 000000000..1f82c0b2d --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/webhooks/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Webhooks + +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 webhooks = Webhooks(client) + +val response = webhooks.get( + webhookId = "<WEBHOOK_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/webhooks/list.md b/examples/2.3.x/server-kotlin/kotlin/webhooks/list.md new file mode 100644 index 000000000..f3f9f23d7 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/webhooks/list.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Webhooks + +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 webhooks = Webhooks(client) + +val response = webhooks.list( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/webhooks/update-secret.md b/examples/2.3.x/server-kotlin/kotlin/webhooks/update-secret.md new file mode 100644 index 000000000..08e58452a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/webhooks/update-secret.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Webhooks + +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 webhooks = Webhooks(client) + +val response = webhooks.updateSecret( + webhookId = "<WEBHOOK_ID>", + secret = "<SECRET>" // 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 new file mode 100644 index 000000000..daa1706a9 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/webhooks/update.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Webhooks + +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 webhooks = Webhooks(client) + +val response = webhooks.update( + webhookId = "<WEBHOOK_ID>", + name = "<NAME>", + url = "https://example.com/webhook", + events = listOf(), + enabled = false, // optional + tls = false, // optional + authUsername = "<AUTH_USERNAME>", // optional + authPassword = "password" // optional +) +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-anonymous-session.md b/examples/2.3.x/server-nodejs/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..036df9b94 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-anonymous-session.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 account = new sdk.Account(client); + +const result = await account.createAnonymousSession(); +``` 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 new file mode 100644 index 000000000..fcc1ff183 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-email-password-session.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-email-token.md b/examples/2.3.x/server-nodejs/examples/account/create-email-token.md new file mode 100644 index 000000000..639d3e184 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-email-token.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createEmailToken({ + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-nodejs/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..07f28610c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-email-verification-otp.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createEmailVerificationOTP({ + phrase: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-email-verification.md b/examples/2.3.x/server-nodejs/examples/account/create-email-verification.md new file mode 100644 index 000000000..15111f2f4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-email-verification.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createEmailVerification({ + url: 'https://example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-id-token-session.md b/examples/2.3.x/server-nodejs/examples/account/create-id-token-session.md new file mode 100644 index 000000000..39dcb8d32 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-id-token-session.md @@ -0,0 +1,19 @@ +```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 account = new sdk.Account(client); + +const result = await account.createIdTokenSession({ + provider: sdk.IdTokenProvider.Apple, + idToken: '<ID_TOKEN>', + nonce: '<NONCE>', // optional + accessToken: '<ACCESS_TOKEN>', // optional + accessTokenExpiry: 0, // optional + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-magic-url-token.md b/examples/2.3.x/server-nodejs/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..e1a850180 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-magic-url-token.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMagicURLToken({ + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-nodejs/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..7574207e0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-mfa-authenticator.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMFAAuthenticator({ + type: sdk.AuthenticatorType.Totp, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-nodejs/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..d3550e37c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-mfa-challenge.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMFAChallenge({ + factor: sdk.AuthenticationFactor.Email, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-nodejs/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..5e8e4021b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-mfa-recovery-codes.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 account = new sdk.Account(client); + +const result = await account.createMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-nodejs/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..40e1d1fbb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-o-auth-2-token.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createOAuth2Token({ + provider: sdk.OAuthProvider.Amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-phone-token.md b/examples/2.3.x/server-nodejs/examples/account/create-phone-token.md new file mode 100644 index 000000000..d40e003ad --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-phone-token.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.createPhoneToken({ + userId: '<USER_ID>', + phone: '+12065550100', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-phone-verification.md b/examples/2.3.x/server-nodejs/examples/account/create-phone-verification.md new file mode 100644 index 000000000..05708153e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-phone-verification.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 account = new sdk.Account(client); + +const result = await account.createPhoneVerification(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-recovery-otp.md b/examples/2.3.x/server-nodejs/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..6c5d53765 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-recovery-otp.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.createRecoveryOTP({ + email: 'email@example.com', + phrase: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-recovery.md b/examples/2.3.x/server-nodejs/examples/account/create-recovery.md new file mode 100644 index 000000000..9b6d8f3e3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-session.md b/examples/2.3.x/server-nodejs/examples/account/create-session.md new file mode 100644 index 000000000..75a2ee447 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-session.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.createSession({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create-verification.md b/examples/2.3.x/server-nodejs/examples/account/create-verification.md new file mode 100644 index 000000000..abe7084e0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create-verification.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createVerification({ + url: 'https://example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/create.md b/examples/2.3.x/server-nodejs/examples/account/create.md new file mode 100644 index 000000000..2c94473e0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/create.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.create({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/delete-consent-token.md b/examples/2.3.x/server-nodejs/examples/account/delete-consent-token.md new file mode 100644 index 000000000..5b776176f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/delete-consent-token.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.deleteConsentToken({ + consentId: '<CONSENT_ID>', + tokenId: '<TOKEN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/delete-consent.md b/examples/2.3.x/server-nodejs/examples/account/delete-consent.md new file mode 100644 index 000000000..3265e8fdc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/delete-consent.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteConsent({ + consentId: '<CONSENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/delete-identity.md b/examples/2.3.x/server-nodejs/examples/account/delete-identity.md new file mode 100644 index 000000000..050134cfe --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/delete-identity.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteIdentity({ + identityId: '<IDENTITY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-nodejs/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..b3e5156f8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/delete-mfa-authenticator.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteMFAAuthenticator({ + type: sdk.AuthenticatorType.Totp, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/delete-session.md b/examples/2.3.x/server-nodejs/examples/account/delete-session.md new file mode 100644 index 000000000..ed992d472 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/delete-session.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteSession({ + sessionId: '<SESSION_ID>', +}); +``` 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 new file mode 100644 index 000000000..912575cea --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/delete-sessions.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 account = new sdk.Account(client); + +const result = await account.deleteSessions(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/get-consent-token.md b/examples/2.3.x/server-nodejs/examples/account/get-consent-token.md new file mode 100644 index 000000000..f2b7e1efe --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/get-consent-token.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.getConsentToken({ + consentId: '<CONSENT_ID>', + tokenId: '<TOKEN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/get-consent.md b/examples/2.3.x/server-nodejs/examples/account/get-consent.md new file mode 100644 index 000000000..77e8e39ee --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/get-consent.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getConsent({ + consentId: '<CONSENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-nodejs/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..cb08fe7cd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/get-mfa-recovery-codes.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 account = new sdk.Account(client); + +const result = await account.getMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/get-prefs.md b/examples/2.3.x/server-nodejs/examples/account/get-prefs.md new file mode 100644 index 000000000..67edf19fa --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/get-prefs.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 account = new sdk.Account(client); + +const result = await account.getPrefs(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/get-session.md b/examples/2.3.x/server-nodejs/examples/account/get-session.md new file mode 100644 index 000000000..7ccfd7794 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/get-session.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getSession({ + sessionId: '<SESSION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/get.md b/examples/2.3.x/server-nodejs/examples/account/get.md new file mode 100644 index 000000000..e755aa46f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/get.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 account = new sdk.Account(client); + +const result = await account.get(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/list-consent-tokens.md b/examples/2.3.x/server-nodejs/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..0b12b44f3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/list-consent-tokens.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listConsentTokens({ + consentId: '<CONSENT_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/list-consents.md b/examples/2.3.x/server-nodejs/examples/account/list-consents.md new file mode 100644 index 000000000..755309334 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/list-consents.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.listConsents({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/list-identities.md b/examples/2.3.x/server-nodejs/examples/account/list-identities.md new file mode 100644 index 000000000..e538a49ed --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/list-identities.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.listIdentities({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/list-mfa-factors.md b/examples/2.3.x/server-nodejs/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..313621904 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/list-mfa-factors.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 account = new sdk.Account(client); + +const result = await account.listMFAFactors(); +``` 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 new file mode 100644 index 000000000..0bbd093e9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/list-sessions.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 account = new sdk.Account(client); + +const result = await account.listSessions(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-nodejs/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..82c8731b5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-email-verification-otp.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updateEmailVerificationOTP({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-email-verification.md b/examples/2.3.x/server-nodejs/examples/account/update-email-verification.md new file mode 100644 index 000000000..49f012f09 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-email-verification.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updateEmailVerification({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-email.md b/examples/2.3.x/server-nodejs/examples/account/update-email.md new file mode 100644 index 000000000..ed5188a89 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-email.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-magic-url-session.md b/examples/2.3.x/server-nodejs/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..790f69fcd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-magic-url-session.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updateMagicURLSession({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-nodejs/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..5f3edbebc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updateMFAAuthenticator({ + type: sdk.AuthenticatorType.Totp, + otp: '<OTP>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-nodejs/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..01defd1c4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updateMFAChallenge({ + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-nodejs/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..c893c231f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-mfa-recovery-codes.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 account = new sdk.Account(client); + +const result = await account.updateMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-mfa.md b/examples/2.3.x/server-nodejs/examples/account/update-mfa.md new file mode 100644 index 000000000..63fa217e8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-mfa.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMFA({ + mfa: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-name.md b/examples/2.3.x/server-nodejs/examples/account/update-name.md new file mode 100644 index 000000000..20bac30ac --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-name.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateName({ + name: '<NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-password.md b/examples/2.3.x/server-nodejs/examples/account/update-password.md new file mode 100644 index 000000000..cef8c6905 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-password.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updatePassword({ + password: 'password', + oldPassword: 'password', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-phone-session.md b/examples/2.3.x/server-nodejs/examples/account/update-phone-session.md new file mode 100644 index 000000000..5a2035e40 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-phone-session.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updatePhoneSession({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-phone-verification.md b/examples/2.3.x/server-nodejs/examples/account/update-phone-verification.md new file mode 100644 index 000000000..796cdfab7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updatePhoneVerification({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-phone.md b/examples/2.3.x/server-nodejs/examples/account/update-phone.md new file mode 100644 index 000000000..29158e3e6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-phone.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updatePhone({ + phone: '+12065550100', + password: 'password', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-prefs.md b/examples/2.3.x/server-nodejs/examples/account/update-prefs.md new file mode 100644 index 000000000..a4b167ffc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-prefs.md @@ -0,0 +1,18 @@ +```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 account = new sdk.Account(client); + +const result = await account.updatePrefs({ + prefs: { + language: 'en', + timezone: 'UTC', + darkTheme: true, + }, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-recovery-otp.md b/examples/2.3.x/server-nodejs/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..29af5163b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-recovery-otp.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateRecoveryOTP({ + userId: '<USER_ID>', + secret: '<SECRET>', + password: 'password', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-recovery.md b/examples/2.3.x/server-nodejs/examples/account/update-recovery.md new file mode 100644 index 000000000..a33078b8b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-recovery.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateRecovery({ + userId: '<USER_ID>', + secret: '<SECRET>', + password: 'password', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-session.md b/examples/2.3.x/server-nodejs/examples/account/update-session.md new file mode 100644 index 000000000..1e257276b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-session.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 + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateSession({ + sessionId: '<SESSION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-status.md b/examples/2.3.x/server-nodejs/examples/account/update-status.md new file mode 100644 index 000000000..ffb3f25e0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-status.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 account = new sdk.Account(client); + +const result = await account.updateStatus(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/account/update-verification.md b/examples/2.3.x/server-nodejs/examples/account/update-verification.md new file mode 100644 index 000000000..6a7336225 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/account/update-verification.md @@ -0,0 +1,15 @@ +```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 account = new sdk.Account(client); + +const result = await account.updateVerification({ + userId: '<USER_ID>', + secret: '<SECRET>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/activities/get-event.md b/examples/2.3.x/server-nodejs/examples/activities/get-event.md new file mode 100644 index 000000000..0cd3641a0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/activities/get-event.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 activities = new sdk.Activities(client); + +const result = await activities.getEvent({ + eventId: '<EVENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/activities/list-events.md b/examples/2.3.x/server-nodejs/examples/activities/list-events.md new file mode 100644 index 000000000..97f14e3fc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/activities/list-events.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 activities = new sdk.Activities(client); + +const result = await activities.listEvents({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/advisor/delete-report.md b/examples/2.3.x/server-nodejs/examples/advisor/delete-report.md new file mode 100644 index 000000000..16929bbb0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/advisor/delete-report.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 advisor = new sdk.Advisor(client); + +const result = await advisor.deleteReport({ + reportId: '<REPORT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/advisor/get-insight.md b/examples/2.3.x/server-nodejs/examples/advisor/get-insight.md new file mode 100644 index 000000000..882d5edea --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/advisor/get-insight.md @@ -0,0 +1,15 @@ +```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 advisor = new sdk.Advisor(client); + +const result = await advisor.getInsight({ + reportId: '<REPORT_ID>', + insightId: '<INSIGHT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/advisor/get-report.md b/examples/2.3.x/server-nodejs/examples/advisor/get-report.md new file mode 100644 index 000000000..a523bdc25 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/advisor/get-report.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 advisor = new sdk.Advisor(client); + +const result = await advisor.getReport({ + reportId: '<REPORT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/advisor/list-insights.md b/examples/2.3.x/server-nodejs/examples/advisor/list-insights.md new file mode 100644 index 000000000..6b1d5ea99 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/advisor/list-insights.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 advisor = new sdk.Advisor(client); + +const result = await advisor.listInsights({ + reportId: '<REPORT_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/advisor/list-reports.md b/examples/2.3.x/server-nodejs/examples/advisor/list-reports.md new file mode 100644 index 000000000..328570e33 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/advisor/list-reports.md @@ -0,0 +1,15 @@ +```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 advisor = new sdk.Advisor(client); + +const result = await advisor.listReports({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/create-installation-token.md b/examples/2.3.x/server-nodejs/examples/apps/create-installation-token.md new file mode 100644 index 000000000..dca0785c7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/create-installation-token.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.createInstallationToken({ + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/create-key.md b/examples/2.3.x/server-nodejs/examples/apps/create-key.md new file mode 100644 index 000000000..db5d4de6b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/create-key.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.createKey({ + appId: '<APP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/create-secret.md b/examples/2.3.x/server-nodejs/examples/apps/create-secret.md new file mode 100644 index 000000000..e5a77eaa8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/create-secret.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.createSecret({ + appId: '<APP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/create.md b/examples/2.3.x/server-nodejs/examples/apps/create.md new file mode 100644 index 000000000..613325ecb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/create.md @@ -0,0 +1,32 @@ +```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 apps = new sdk.Apps(client); + +const result = await apps.create({ + appId: '<APP_ID>', + name: '<NAME>', + redirectUris: [], + description: '<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: '<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: '<TEAM_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/delete-installation.md b/examples/2.3.x/server-nodejs/examples/apps/delete-installation.md new file mode 100644 index 000000000..ca3c47060 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/delete-installation.md @@ -0,0 +1,15 @@ +```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 apps = new sdk.Apps(client); + +const result = await apps.deleteInstallation({ + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/delete-key.md b/examples/2.3.x/server-nodejs/examples/apps/delete-key.md new file mode 100644 index 000000000..df1050d59 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/delete-key.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.deleteKey({ + appId: '<APP_ID>', + keyId: '<KEY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/delete-secret.md b/examples/2.3.x/server-nodejs/examples/apps/delete-secret.md new file mode 100644 index 000000000..0fca77d29 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/delete-secret.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.deleteSecret({ + appId: '<APP_ID>', + secretId: '<SECRET_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/delete-tokens.md b/examples/2.3.x/server-nodejs/examples/apps/delete-tokens.md new file mode 100644 index 000000000..e495a1d6e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/delete-tokens.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.deleteTokens({ + appId: '<APP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/delete.md b/examples/2.3.x/server-nodejs/examples/apps/delete.md new file mode 100644 index 000000000..366a2f573 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/delete.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 + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.delete({ + appId: '<APP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/get-installation.md b/examples/2.3.x/server-nodejs/examples/apps/get-installation.md new file mode 100644 index 000000000..fb2574707 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/get-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.getInstallation({ + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/get-key.md b/examples/2.3.x/server-nodejs/examples/apps/get-key.md new file mode 100644 index 000000000..f6adfab5b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/get-key.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.getKey({ + appId: '<APP_ID>', + keyId: '<KEY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/get-secret.md b/examples/2.3.x/server-nodejs/examples/apps/get-secret.md new file mode 100644 index 000000000..16e7b0e98 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/get-secret.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.getSecret({ + appId: '<APP_ID>', + secretId: '<SECRET_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/get.md b/examples/2.3.x/server-nodejs/examples/apps/get.md new file mode 100644 index 000000000..adb76398f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/get.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 + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.get({ + appId: '<APP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-nodejs/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..299d7b70e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/list-installation-scopes.md @@ -0,0 +1,12 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listInstallationScopes(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/list-installations.md b/examples/2.3.x/server-nodejs/examples/apps/list-installations.md new file mode 100644 index 000000000..885c5b51c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/list-installations.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listInstallations({ + appId: '<APP_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/list-keys.md b/examples/2.3.x/server-nodejs/examples/apps/list-keys.md new file mode 100644 index 000000000..ce9b27d72 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/list-keys.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listKeys({ + appId: '<APP_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-nodejs/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..6f9253959 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,12 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listOAuth2Scopes(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/list-secrets.md b/examples/2.3.x/server-nodejs/examples/apps/list-secrets.md new file mode 100644 index 000000000..47847537c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/list-secrets.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listSecrets({ + appId: '<APP_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/list.md b/examples/2.3.x/server-nodejs/examples/apps/list.md new file mode 100644 index 000000000..ed2c0b145 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/list.md @@ -0,0 +1,15 @@ +```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 apps = new sdk.Apps(client); + +const result = await apps.list({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/update-labels.md b/examples/2.3.x/server-nodejs/examples/apps/update-labels.md new file mode 100644 index 000000000..d0e3cf3e5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/update-labels.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const apps = new sdk.Apps(client); + +const result = await apps.updateLabels({ + appId: '<APP_ID>', + labels: [], +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/update-team.md b/examples/2.3.x/server-nodejs/examples/apps/update-team.md new file mode 100644 index 000000000..856e06be4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/update-team.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.updateTeam({ + appId: '<APP_ID>', + teamId: '<TEAM_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/apps/update.md b/examples/2.3.x/server-nodejs/examples/apps/update.md new file mode 100644 index 000000000..ac8b86aff --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/apps/update.md @@ -0,0 +1,33 @@ +```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 apps = new sdk.Apps(client); + +const result = await apps.update({ + appId: '<APP_ID>', + name: '<NAME>', + description: '<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: '<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/server-nodejs/examples/avatars/get-browser.md b/examples/2.3.x/server-nodejs/examples/avatars/get-browser.md new file mode 100644 index 000000000..be84bc599 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-browser.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 + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getBrowser({ + code: sdk.Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/get-credit-card.md b/examples/2.3.x/server-nodejs/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..86c270676 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-credit-card.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 + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getCreditCard({ + code: sdk.CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/get-favicon.md b/examples/2.3.x/server-nodejs/examples/avatars/get-favicon.md new file mode 100644 index 000000000..d9ba40928 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-favicon.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 + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getFavicon({ + url: 'https://example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/get-flag.md b/examples/2.3.x/server-nodejs/examples/avatars/get-flag.md new file mode 100644 index 000000000..bbf954bc4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-flag.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 + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getFlag({ + code: sdk.Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/get-image.md b/examples/2.3.x/server-nodejs/examples/avatars/get-image.md new file mode 100644 index 000000000..89b6c7331 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-image.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 + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getImage({ + url: 'https://example.com', + width: 0, // optional + height: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/get-initials.md b/examples/2.3.x/server-nodejs/examples/avatars/get-initials.md new file mode 100644 index 000000000..ee5650673 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-initials.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 + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getInitials({ + name: '<NAME>', // optional + width: 0, // optional + height: 0, // optional + background: 'FFFFFF', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/get-photo.md b/examples/2.3.x/server-nodejs/examples/avatars/get-photo.md new file mode 100644 index 000000000..8421fbb95 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-photo.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 + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getPhoto({ + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: 'png', // optional + rating: 'g', // optional + userId: 'current()', // optional + emailHash: '<EMAIL_HASH>', // optional + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/get-qr.md b/examples/2.3.x/server-nodejs/examples/avatars/get-qr.md new file mode 100644 index 000000000..791202ed7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-qr.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 + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getQR({ + text: '<TEXT>', + size: 1, // optional + margin: 0, // optional + download: false, // optional +}); +``` 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 new file mode 100644 index 000000000..708db1ca9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-screenshot.md @@ -0,0 +1,40 @@ +```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.getScreenshot({ + url: 'https://example.com', + headers: { + Authorization: 'Bearer token123', + 'X-Custom-Header': 'value', + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional + theme: sdk.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 + locale: 'en-US', // optional + timezone: sdk.Timezone.AfricaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [ + sdk.BrowserPermission.Geolocation, + sdk.BrowserPermission.Notifications, + ], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: sdk.ImageFormat.Jpeg, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/create-archive.md b/examples/2.3.x/server-nodejs/examples/backups/create-archive.md new file mode 100644 index 000000000..9a8d2a5f6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/create-archive.md @@ -0,0 +1,15 @@ +```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 backups = new sdk.Backups(client); + +const result = await backups.createArchive({ + services: [sdk.BackupServices.Databases], + resourceId: '<RESOURCE_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/create-policy.md b/examples/2.3.x/server-nodejs/examples/backups/create-policy.md new file mode 100644 index 000000000..46774bf22 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/create-policy.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 backups = new sdk.Backups(client); + +const result = await backups.createPolicy({ + policyId: '<POLICY_ID>', + services: [sdk.BackupServices.Databases], + retention: 1, + schedule: '', + name: '<NAME>', // optional + resourceId: '<RESOURCE_ID>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/create-restoration.md b/examples/2.3.x/server-nodejs/examples/backups/create-restoration.md new file mode 100644 index 000000000..40a4447da --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/create-restoration.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 backups = new sdk.Backups(client); + +const result = await backups.createRestoration({ + archiveId: '<ARCHIVE_ID>', + services: [sdk.BackupServices.Databases], + newResourceId: '<NEW_RESOURCE_ID>', // optional + newResourceName: '<NEW_RESOURCE_NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/delete-archive.md b/examples/2.3.x/server-nodejs/examples/backups/delete-archive.md new file mode 100644 index 000000000..babedbcec --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/delete-archive.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 backups = new sdk.Backups(client); + +const result = await backups.deleteArchive({ + archiveId: '<ARCHIVE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/delete-policy.md b/examples/2.3.x/server-nodejs/examples/backups/delete-policy.md new file mode 100644 index 000000000..69dd413ac --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/delete-policy.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 backups = new sdk.Backups(client); + +const result = await backups.deletePolicy({ + policyId: '<POLICY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/get-archive.md b/examples/2.3.x/server-nodejs/examples/backups/get-archive.md new file mode 100644 index 000000000..0e8c14444 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/get-archive.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 backups = new sdk.Backups(client); + +const result = await backups.getArchive({ + archiveId: '<ARCHIVE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/get-policy.md b/examples/2.3.x/server-nodejs/examples/backups/get-policy.md new file mode 100644 index 000000000..838e8d5b8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/get-policy.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 backups = new sdk.Backups(client); + +const result = await backups.getPolicy({ + policyId: '<POLICY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/get-restoration.md b/examples/2.3.x/server-nodejs/examples/backups/get-restoration.md new file mode 100644 index 000000000..37e1c6b7f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/get-restoration.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 backups = new sdk.Backups(client); + +const result = await backups.getRestoration({ + restorationId: '<RESTORATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/list-archives.md b/examples/2.3.x/server-nodejs/examples/backups/list-archives.md new file mode 100644 index 000000000..4e4ff600d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/list-archives.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 backups = new sdk.Backups(client); + +const result = await backups.listArchives({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/list-policies.md b/examples/2.3.x/server-nodejs/examples/backups/list-policies.md new file mode 100644 index 000000000..322024b42 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/list-policies.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 backups = new sdk.Backups(client); + +const result = await backups.listPolicies({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/list-restorations.md b/examples/2.3.x/server-nodejs/examples/backups/list-restorations.md new file mode 100644 index 000000000..5ea7e0a03 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/list-restorations.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 backups = new sdk.Backups(client); + +const result = await backups.listRestorations({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/backups/update-policy.md b/examples/2.3.x/server-nodejs/examples/backups/update-policy.md new file mode 100644 index 000000000..69af997c6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/backups/update-policy.md @@ -0,0 +1,18 @@ +```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 backups = new sdk.Backups(client); + +const result = await backups.updatePolicy({ + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + retention: 1, // optional + schedule: '', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..f52034eba --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-big-int-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createBigIntAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 1000000, // optional + xdefault: 0, // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..88aac3515 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createBooleanAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: false, // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-collection.md b/examples/2.3.x/server-nodejs/examples/databases/create-collection.md new file mode 100644 index 000000000..8eda4155d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-collection.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 databases = new sdk.Databases(client); + +const result = await databases.createCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..0a90cbc73 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: '2020-10-15T06:38:00.000+00:00', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-document.md b/examples/2.3.x/server-nodejs/examples/databases/create-document.md new file mode 100644 index 000000000..f9147dfad --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-document.md @@ -0,0 +1,25 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` 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 new file mode 100644 index 000000000..29f12043a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-documents.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 databases = new sdk.Databases(client); + +const result = await databases.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-email-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..0f2f7ac71 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createEmailAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'email@example.com', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..fddf585d7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-enum-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createEnumAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + elements: ['active', 'inactive'], + required: false, + xdefault: 'active', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-float-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..ebf6ef51e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-float-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + xdefault: 10.5, // optional + array: false, // 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 new file mode 100644 index 000000000..095bd46a8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-index.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 databases = new sdk.Databases(client); + +const result = await databases.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: sdk.DatabasesIndexType.Key, + attributes: [], + orders: [sdk.OrderBy.Asc], // optional + lengths: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..b9f565475 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-integer-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + xdefault: 10, // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..edcee6752 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: '192.0.2.0', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-line-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..01ae03eef --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-line-attribute.md @@ -0,0 +1,22 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createLineAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [1, 2], + [3, 4], + [5, 6], + ], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..6685fde8d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-longtext-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createLongtextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..ed950b4e0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-mediumtext-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createMediumtextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-operations.md b/examples/2.3.x/server-nodejs/examples/databases/create-operations.md new file mode 100644 index 000000000..42e518985 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-operations.md @@ -0,0 +1,25 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createOperations({ + transactionId: '<TRANSACTION_ID>', + operations: [ + { + action: 'create', + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-point-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..6825bfeb0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-point-attribute.md @@ -0,0 +1,18 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createPointAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [1, 2], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..c155e136a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-polygon-attribute.md @@ -0,0 +1,25 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createPolygonAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [ + [1, 2], + [3, 4], + [5, 6], + [1, 2], + ], + ], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..4d79cf457 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-relationship-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: sdk.RelationshipType.OneToOne, + twoWay: false, // optional + key: '<KEY>', // optional + twoWayKey: '<TWO_WAY_KEY>', // optional + onDelete: sdk.RelationMutate.Cascade, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-string-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..187afaf2e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-string-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createStringAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-text-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..3dec73cf0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-text-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createTextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-transaction.md b/examples/2.3.x/server-nodejs/examples/databases/create-transaction.md new file mode 100644 index 000000000..2ef16fcab --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-transaction.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 databases = new sdk.Databases(client); + +const result = await databases.createTransaction({ + ttl: 60, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-url-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..41c5db975 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.createUrlAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'https://example.com', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..ce55e847a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create-varchar-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.createVarcharAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create.md b/examples/2.3.x/server-nodejs/examples/databases/create.md new file mode 100644 index 000000000..ce42a134c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/create.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 databases = new sdk.Databases(client); + +const result = await databases.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..c48bf9b42 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/decrement-document-attribute.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 + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.decrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/delete-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/delete-attribute.md new file mode 100644 index 000000000..89ffcd84c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/delete-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.deleteAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/delete-collection.md b/examples/2.3.x/server-nodejs/examples/databases/delete-collection.md new file mode 100644 index 000000000..473e92ddd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/delete-document.md b/examples/2.3.x/server-nodejs/examples/databases/delete-document.md new file mode 100644 index 000000000..9ecdbbe92 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/delete-document.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 + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..682c0e7bc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/delete-documents.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 databases = new sdk.Databases(client); + +const result = await databases.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/delete-index.md b/examples/2.3.x/server-nodejs/examples/databases/delete-index.md new file mode 100644 index 000000000..861a842d5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/delete-index.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 databases = new sdk.Databases(client); + +const result = await databases.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/delete-transaction.md b/examples/2.3.x/server-nodejs/examples/databases/delete-transaction.md new file mode 100644 index 000000000..8868eb922 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/delete-transaction.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 databases = new sdk.Databases(client); + +const result = await databases.deleteTransaction({ + transactionId: '<TRANSACTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/delete.md b/examples/2.3.x/server-nodejs/examples/databases/delete.md new file mode 100644 index 000000000..101b2246c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/delete.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 databases = new sdk.Databases(client); + +const result = await databases.delete({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/get-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/get-attribute.md new file mode 100644 index 000000000..4cdaa8ae4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/get-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.getAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/get-collection.md b/examples/2.3.x/server-nodejs/examples/databases/get-collection.md new file mode 100644 index 000000000..ccfc0f093 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/get-collection.md @@ -0,0 +1,15 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/get-document.md b/examples/2.3.x/server-nodejs/examples/databases/get-document.md new file mode 100644 index 000000000..282552474 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/get-document.md @@ -0,0 +1,18 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/get-index.md b/examples/2.3.x/server-nodejs/examples/databases/get-index.md new file mode 100644 index 000000000..71872676f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/get-index.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 databases = new sdk.Databases(client); + +const result = await databases.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/get-transaction.md b/examples/2.3.x/server-nodejs/examples/databases/get-transaction.md new file mode 100644 index 000000000..0f4bbd45b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/get-transaction.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 databases = new sdk.Databases(client); + +const result = await databases.getTransaction({ + transactionId: '<TRANSACTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/get.md b/examples/2.3.x/server-nodejs/examples/databases/get.md new file mode 100644 index 000000000..6b5834e89 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/get.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 databases = new sdk.Databases(client); + +const result = await databases.get({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..3f5d7e70d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/increment-document-attribute.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 + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.incrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/list-attributes.md b/examples/2.3.x/server-nodejs/examples/databases/list-attributes.md new file mode 100644 index 000000000..5d9af70ed --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/list-attributes.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 databases = new sdk.Databases(client); + +const result = await databases.listAttributes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/list-collections.md b/examples/2.3.x/server-nodejs/examples/databases/list-collections.md new file mode 100644 index 000000000..595851023 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/list-collections.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 databases = new sdk.Databases(client); + +const result = await databases.listCollections({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/list-documents.md b/examples/2.3.x/server-nodejs/examples/databases/list-documents.md new file mode 100644 index 000000000..e395ef127 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/list-documents.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/list-indexes.md b/examples/2.3.x/server-nodejs/examples/databases/list-indexes.md new file mode 100644 index 000000000..0100d77f2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/list-indexes.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 databases = new sdk.Databases(client); + +const result = await databases.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false, // 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 new file mode 100644 index 000000000..c33568281 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/list-transactions.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 databases = new sdk.Databases(client); + +const result = await databases.listTransactions({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/list.md b/examples/2.3.x/server-nodejs/examples/databases/list.md new file mode 100644 index 000000000..b2a38dfa3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/list.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 databases = new sdk.Databases(client); + +const result = await databases.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..7603578d0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-big-int-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.updateBigIntAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 0, + min: 0, // optional + max: 1000000, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..5184217c9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateBooleanAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: false, + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-collection.md b/examples/2.3.x/server-nodejs/examples/databases/update-collection.md new file mode 100644 index 000000000..d33ce0b69 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-collection.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 databases = new sdk.Databases(client); + +const result = await databases.updateCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..f3bb80ead --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: '2020-10-15T06:38:00.000+00:00', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-document.md b/examples/2.3.x/server-nodejs/examples/databases/update-document.md new file mode 100644 index 000000000..703725527 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-document.md @@ -0,0 +1,25 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-documents.md b/examples/2.3.x/server-nodejs/examples/databases/update-documents.md new file mode 100644 index 000000000..b32cc8870 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-documents.md @@ -0,0 +1,24 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-email-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..69658e203 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateEmailAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'email@example.com', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..2463223fc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-enum-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.updateEnumAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + elements: ['active', 'inactive'], + required: false, + xdefault: 'active', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-float-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..63af3be95 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-float-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.updateFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 10.5, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..14a16a938 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-integer-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.updateIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 10, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..1ece66585 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: '192.0.2.0', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-line-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..bd3668998 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-line-attribute.md @@ -0,0 +1,23 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateLineAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [1, 2], + [3, 4], + [5, 6], + ], // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..97d3c28d9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-longtext-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateLongtextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..5398f7104 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateMediumtextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-point-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..1c64a2c82 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-point-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updatePointAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [1, 2], // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..9cff57789 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-polygon-attribute.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updatePolygonAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [ + [1, 2], + [3, 4], + [5, 6], + [1, 2], + ], + ], // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..50710f8ec --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + onDelete: sdk.RelationMutate.Cascade, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-string-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..75f269c46 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-string-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.updateStringAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-text-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..0075135e9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-text-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateTextAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-transaction.md b/examples/2.3.x/server-nodejs/examples/databases/update-transaction.md new file mode 100644 index 000000000..6d31e2e56 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-transaction.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 databases = new sdk.Databases(client); + +const result = await databases.updateTransaction({ + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-url-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..96c695341 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.updateUrlAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'https://example.com', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-nodejs/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..1a2ad8c14 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update-varchar-attribute.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 databases = new sdk.Databases(client); + +const result = await databases.updateVarcharAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/update.md b/examples/2.3.x/server-nodejs/examples/databases/update.md new file mode 100644 index 000000000..6ae2bc11e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/update.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 databases = new sdk.Databases(client); + +const result = await databases.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/upsert-document.md b/examples/2.3.x/server-nodejs/examples/databases/upsert-document.md new file mode 100644 index 000000000..580baf23c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/upsert-document.md @@ -0,0 +1,25 @@ +```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 databases = new sdk.Databases(client); + +const result = await databases.upsertDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..aa2535473 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/databases/upsert-documents.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 databases = new sdk.Databases(client); + +const result = await databases.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/create-collection.md b/examples/2.3.x/server-nodejs/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..5915ae971 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-collection.md @@ -0,0 +1,21 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/create-document.md b/examples/2.3.x/server-nodejs/examples/documentsdb/create-document.md new file mode 100644 index 000000000..96733e346 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-document.md @@ -0,0 +1,25 @@ +```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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + 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 new file mode 100644 index 000000000..298af8c6a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-documents.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 + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/create-failover.md b/examples/2.3.x/server-nodejs/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..a652719ab --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-failover.md @@ -0,0 +1,15 @@ +```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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_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 new file mode 100644 index 000000000..72e4669c1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-index.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: sdk.DocumentsDBIndexType.Key, + attributes: [], + orders: [sdk.OrderBy.Asc], // optional + lengths: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/create-operations.md b/examples/2.3.x/server-nodejs/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..c874aa338 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createOperations({ + transactionId: '<TRANSACTION_ID>', + operations: [ + { + action: 'create', + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-nodejs/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..241425f28 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createTransaction({ + ttl: 60, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/create.md b/examples/2.3.x/server-nodejs/examples/documentsdb/create.md new file mode 100644 index 000000000..cb0806b3e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create.md @@ -0,0 +1,19 @@ +```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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-nodejs/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..27f8bdf2e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.decrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..5ff38ef7b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-collection.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/delete-document.md b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..9fac5c0d5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-document.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..9bb214ee7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-documents.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/delete-index.md b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..f4c043541 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-index.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..f8144ced1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteTransaction({ + transactionId: '<TRANSACTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/delete.md b/examples/2.3.x/server-nodejs/examples/documentsdb/delete.md new file mode 100644 index 000000000..46b532dec --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/delete.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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.delete({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/get-collection.md b/examples/2.3.x/server-nodejs/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..dc68d3e51 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/get-collection.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/get-document.md b/examples/2.3.x/server-nodejs/examples/documentsdb/get-document.md new file mode 100644 index 000000000..9755fda2d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/get-document.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/get-index.md b/examples/2.3.x/server-nodejs/examples/documentsdb/get-index.md new file mode 100644 index 000000000..9faf529d4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/get-index.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-nodejs/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..eeda5ea1f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/get-replicas.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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getReplicas({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/get-status.md b/examples/2.3.x/server-nodejs/examples/documentsdb/get-status.md new file mode 100644 index 000000000..a40a487f2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/get-status.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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getStatus({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-nodejs/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..132bef360 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/get-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getTransaction({ + transactionId: '<TRANSACTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/get.md b/examples/2.3.x/server-nodejs/examples/documentsdb/get.md new file mode 100644 index 000000000..092bad498 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/get.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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.get({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-nodejs/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..11015d8ec --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.incrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/list-collections.md b/examples/2.3.x/server-nodejs/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..8d4bb1d29 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/list-collections.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listCollections({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/list-documents.md b/examples/2.3.x/server-nodejs/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..dde50aa3f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/list-documents.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-nodejs/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..32b0acaa4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/list-indexes.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/list-operations.md b/examples/2.3.x/server-nodejs/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..a9c67208a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/list-operations.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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-nodejs/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..3d6419d8d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listSpecifications(); +``` 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 new file mode 100644 index 000000000..8bc66d4b6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/list-transactions.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listTransactions({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/list.md b/examples/2.3.x/server-nodejs/examples/documentsdb/list.md new file mode 100644 index 000000000..9ff1cfe0d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/list.md @@ -0,0 +1,15 @@ +```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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.list({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/update-collection.md b/examples/2.3.x/server-nodejs/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..beb1cd3d3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/update-collection.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.updateCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/update-document.md b/examples/2.3.x/server-nodejs/examples/documentsdb/update-document.md new file mode 100644 index 000000000..7e9538bca --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/update-document.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.updateDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/update-documents.md b/examples/2.3.x/server-nodejs/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..bb5a46e65 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/update-documents.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-nodejs/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..5a1491733 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/update-transaction.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.updateTransaction({ + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/update.md b/examples/2.3.x/server-nodejs/examples/documentsdb/update.md new file mode 100644 index 000000000..1e3c22ab0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/update.md @@ -0,0 +1,19 @@ +```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 documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-nodejs/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..e9ffed17d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/upsert-document.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.upsertDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..23b522008 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/upsert-documents.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-nodejs/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..2387d379a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-preset-google-workspace.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 domains = new sdk.Domains(client); + +const result = await domains.createPresetGoogleWorkspace({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-nodejs/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..33e988375 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-preset-i-cloud.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 domains = new sdk.Domains(client); + +const result = await domains.createPresetICloud({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-nodejs/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..3879a8714 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-preset-mailgun.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 domains = new sdk.Domains(client); + +const result = await domains.createPresetMailgun({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-nodejs/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..5001f2afc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-preset-outlook.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 domains = new sdk.Domains(client); + +const result = await domains.createPresetOutlook({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-nodejs/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..3e7271cf7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-preset-proton-mail.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 domains = new sdk.Domains(client); + +const result = await domains.createPresetProtonMail({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-nodejs/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..d5c3a9d37 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-preset-zoho.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 domains = new sdk.Domains(client); + +const result = await domains.createPresetZoho({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-a.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-a.md new file mode 100644 index 000000000..79ea1b5a8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-a.md @@ -0,0 +1,18 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordA({ + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..67aac220d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-aaaa.md @@ -0,0 +1,18 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordAAAA({ + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-alias.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-alias.md new file mode 100644 index 000000000..c1212f81a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-alias.md @@ -0,0 +1,18 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordAlias({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-caa.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-caa.md new file mode 100644 index 000000000..4275ae405 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-caa.md @@ -0,0 +1,18 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordCAA({ + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-cname.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-cname.md new file mode 100644 index 000000000..6e56f1a4b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-cname.md @@ -0,0 +1,18 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordCNAME({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-https.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-https.md new file mode 100644 index 000000000..6bd9ed88c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-https.md @@ -0,0 +1,18 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordHTTPS({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-mx.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-mx.md new file mode 100644 index 000000000..dd2aabd90 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-mx.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordMX({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-ns.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-ns.md new file mode 100644 index 000000000..33d3c9698 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-ns.md @@ -0,0 +1,18 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordNS({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-srv.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-srv.md new file mode 100644 index 000000000..c1868c77d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-srv.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 domains = new sdk.Domains(client); + +const result = await domains.createRecordSRV({ + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create-record-txt.md b/examples/2.3.x/server-nodejs/examples/domains/create-record-txt.md new file mode 100644 index 000000000..8cd90560a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create-record-txt.md @@ -0,0 +1,18 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.createRecordTXT({ + domainId: '<DOMAIN_ID>', + name: '', + ttl: 1, + value: '<VALUE>', // optional + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/create.md b/examples/2.3.x/server-nodejs/examples/domains/create.md new file mode 100644 index 000000000..1f99aa754 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/create.md @@ -0,0 +1,15 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.create({ + teamId: '<TEAM_ID>', + domain: 'example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/delete-record.md b/examples/2.3.x/server-nodejs/examples/domains/delete-record.md new file mode 100644 index 000000000..86244ac3b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/delete-record.md @@ -0,0 +1,15 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.deleteRecord({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/delete.md b/examples/2.3.x/server-nodejs/examples/domains/delete.md new file mode 100644 index 000000000..94094fc0f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/delete.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 domains = new sdk.Domains(client); + +const result = await domains.delete({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-nodejs/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..c6fc12903 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-preset-google-workspace.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 domains = new sdk.Domains(client); + +const result = await domains.getPresetGoogleWorkspace({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-nodejs/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..354b5330d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-preset-i-cloud.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 domains = new sdk.Domains(client); + +const result = await domains.getPresetICloud({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-nodejs/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..fd12cb675 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-preset-mailgun.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 domains = new sdk.Domains(client); + +const result = await domains.getPresetMailgun({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-nodejs/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..ccfc1f4d0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-preset-outlook.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 domains = new sdk.Domains(client); + +const result = await domains.getPresetOutlook({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-nodejs/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..0861b0171 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-preset-proton-mail.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 domains = new sdk.Domains(client); + +const result = await domains.getPresetProtonMail({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-nodejs/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..7e02f27d2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-preset-zoho.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 domains = new sdk.Domains(client); + +const result = await domains.getPresetZoho({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-price.md b/examples/2.3.x/server-nodejs/examples/domains/get-price.md new file mode 100644 index 000000000..ff776755c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-price.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 domains = new sdk.Domains(client); + +const result = await domains.getPrice({ + domain: 'example.com', + periodYears: null, // optional + registrationType: sdk.DomainRegistrationType.New, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-record.md b/examples/2.3.x/server-nodejs/examples/domains/get-record.md new file mode 100644 index 000000000..79d55e83d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-record.md @@ -0,0 +1,15 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.getRecord({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-transfer-status.md b/examples/2.3.x/server-nodejs/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..288d6b96b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-transfer-status.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 domains = new sdk.Domains(client); + +const result = await domains.getTransferStatus({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get-zone.md b/examples/2.3.x/server-nodejs/examples/domains/get-zone.md new file mode 100644 index 000000000..f05ee2468 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get-zone.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 domains = new sdk.Domains(client); + +const result = await domains.getZone({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/get.md b/examples/2.3.x/server-nodejs/examples/domains/get.md new file mode 100644 index 000000000..3b73d8f8b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/get.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 domains = new sdk.Domains(client); + +const result = await domains.get({ + domainId: '<DOMAIN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/list-prices.md b/examples/2.3.x/server-nodejs/examples/domains/list-prices.md new file mode 100644 index 000000000..bcf35720c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/list-prices.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 domains = new sdk.Domains(client); + +const result = await domains.listPrices({ + domains: [], + periodYears: null, // optional + registrationType: sdk.DomainRegistrationType.New, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/list-records.md b/examples/2.3.x/server-nodejs/examples/domains/list-records.md new file mode 100644 index 000000000..5cbab5161 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/list-records.md @@ -0,0 +1,15 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.listRecords({ + domainId: '<DOMAIN_ID>', + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/list.md b/examples/2.3.x/server-nodejs/examples/domains/list.md new file mode 100644 index 000000000..8974554f0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/list.md @@ -0,0 +1,15 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.list({ + queries: [], // optional + search: '<SEARCH>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-nameservers.md b/examples/2.3.x/server-nodejs/examples/domains/update-nameservers.md new file mode 100644 index 000000000..0f13aa570 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-nameservers.md @@ -0,0 +1,15 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateNameservers({ + domainId: '<DOMAIN_ID>', + nameservers: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-a.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-a.md new file mode 100644 index 000000000..b7fe113ad --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-a.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordA({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..2fbd89a3f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-aaaa.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordAAAA({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-alias.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-alias.md new file mode 100644 index 000000000..9ecc5b0ca --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-alias.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordAlias({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-caa.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-caa.md new file mode 100644 index 000000000..3c2603064 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-caa.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordCAA({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-cname.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-cname.md new file mode 100644 index 000000000..ba8de6a2a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-cname.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordCNAME({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-https.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-https.md new file mode 100644 index 000000000..66ce4ac3c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-https.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordHTTPS({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-mx.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-mx.md new file mode 100644 index 000000000..5d4383ea7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-mx.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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordMX({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-ns.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-ns.md new file mode 100644 index 000000000..3317ce0ac --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-ns.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordNS({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-srv.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-srv.md new file mode 100644 index 000000000..d81b1a896 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-srv.md @@ -0,0 +1,22 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordSRV({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-record-txt.md b/examples/2.3.x/server-nodejs/examples/domains/update-record-txt.md new file mode 100644 index 000000000..8417f85bc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-record-txt.md @@ -0,0 +1,19 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateRecordTXT({ + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-team.md b/examples/2.3.x/server-nodejs/examples/domains/update-team.md new file mode 100644 index 000000000..8193b7f4b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-team.md @@ -0,0 +1,15 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateTeam({ + domainId: '<DOMAIN_ID>', + teamId: '<TEAM_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/update-zone.md b/examples/2.3.x/server-nodejs/examples/domains/update-zone.md new file mode 100644 index 000000000..e146266a3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/update-zone.md @@ -0,0 +1,15 @@ +```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 domains = new sdk.Domains(client); + +const result = await domains.updateZone({ + domainId: '<DOMAIN_ID>', + content: '<CONTENT>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/domains/verify-nameservers.md b/examples/2.3.x/server-nodejs/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..d6cd0e2c5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/domains/verify-nameservers.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 domains = new sdk.Domains(client); + +const result = await domains.verifyNameservers({ + domainId: '<DOMAIN_ID>', +}); +``` 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 new file mode 100644 index 000000000..537a44021 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,15 @@ +```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 embeddings = new sdk.Embeddings(client); + +const result = await embeddings.createTextEmbeddings({ + texts: [], + model: sdk.EmbeddingModel.NomicEmbedText, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/create-deployment.md b/examples/2.3.x/server-nodejs/examples/functions/create-deployment.md new file mode 100644 index 000000000..0a4baff1f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/create-deployment.md @@ -0,0 +1,19 @@ +```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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createDeployment({ + functionId: '<FUNCTION_ID>', + code: InputFile.fromPath('/path/to/file', 'filename'), + activate: false, + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-nodejs/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..179bb3792 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/create-duplicate-deployment.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 functions = new sdk.Functions(client); + +const result = await functions.createDuplicateDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/create-execution.md b/examples/2.3.x/server-nodejs/examples/functions/create-execution.md new file mode 100644 index 000000000..f5c5bc429 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/create-execution.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 + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.createExecution({ + functionId: '<FUNCTION_ID>', + body: '<BODY>', // optional + async: false, // optional + xpath: '<PATH>', // optional + method: sdk.ExecutionMethod.GET, // optional + headers: {}, // optional + scheduledAt: '<SCHEDULED_AT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/create-template-deployment.md b/examples/2.3.x/server-nodejs/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..a3e819f31 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/create-template-deployment.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 functions = new sdk.Functions(client); + +const result = await functions.createTemplateDeployment({ + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + type: sdk.TemplateReferenceType.Commit, + reference: '<REFERENCE>', + activate: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/create-variable.md b/examples/2.3.x/server-nodejs/examples/functions/create-variable.md new file mode 100644 index 000000000..e6ffd3d08 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/create-variable.md @@ -0,0 +1,18 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.createVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-nodejs/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..36672fa48 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/create-vcs-deployment.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 functions = new sdk.Functions(client); + +const result = await functions.createVcsDeployment({ + functionId: '<FUNCTION_ID>', + type: sdk.VCSReferenceType.Branch, + reference: '<REFERENCE>', + activate: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/create.md b/examples/2.3.x/server-nodejs/examples/functions/create.md new file mode 100644 index 000000000..7d6e855bf --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/create.md @@ -0,0 +1,35 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.create({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: sdk.Runtime.Node145, + execute: ['any'], // optional + events: [], // optional + schedule: '0 0 * * *', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [sdk.ProjectKeyScopes.ProjectRead], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/delete-deployment.md b/examples/2.3.x/server-nodejs/examples/functions/delete-deployment.md new file mode 100644 index 000000000..101508c9a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.deleteDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/delete-execution.md b/examples/2.3.x/server-nodejs/examples/functions/delete-execution.md new file mode 100644 index 000000000..bbbc60626 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.deleteExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/delete-variable.md b/examples/2.3.x/server-nodejs/examples/functions/delete-variable.md new file mode 100644 index 000000000..1882393af --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.deleteVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/delete.md b/examples/2.3.x/server-nodejs/examples/functions/delete.md new file mode 100644 index 000000000..b2259a16b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/delete.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 functions = new sdk.Functions(client); + +const result = await functions.delete({ + functionId: '<FUNCTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/get-deployment-download.md b/examples/2.3.x/server-nodejs/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..e85081a0f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/get-deployment-download.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 functions = new sdk.Functions(client); + +const result = await functions.getDeploymentDownload({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: sdk.DeploymentDownloadType.Source, // optional + token: '<TOKEN>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/get-deployment.md b/examples/2.3.x/server-nodejs/examples/functions/get-deployment.md new file mode 100644 index 000000000..c6b1b8822 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.getDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/get-execution.md b/examples/2.3.x/server-nodejs/examples/functions/get-execution.md new file mode 100644 index 000000000..dae7043aa --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.getExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/get-variable.md b/examples/2.3.x/server-nodejs/examples/functions/get-variable.md new file mode 100644 index 000000000..8f9f37e01 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.getVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/get.md b/examples/2.3.x/server-nodejs/examples/functions/get.md new file mode 100644 index 000000000..5eb892c44 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/get.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 functions = new sdk.Functions(client); + +const result = await functions.get({ + functionId: '<FUNCTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/list-deployments.md b/examples/2.3.x/server-nodejs/examples/functions/list-deployments.md new file mode 100644 index 000000000..966e5638e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/list-deployments.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 functions = new sdk.Functions(client); + +const result = await functions.listDeployments({ + functionId: '<FUNCTION_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/list-executions.md b/examples/2.3.x/server-nodejs/examples/functions/list-executions.md new file mode 100644 index 000000000..ad4ea3d89 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/list-executions.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 + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.listExecutions({ + functionId: '<FUNCTION_ID>', + queries: [], // optional + total: false, // 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 new file mode 100644 index 000000000..fdaefd3ae --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/list-runtimes.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listRuntimes(); +``` 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 new file mode 100644 index 000000000..f779206d4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/list-specifications.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 functions = new sdk.Functions(client); + +const result = await functions.listSpecifications({ + type: 'runtimes', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/list-variables.md b/examples/2.3.x/server-nodejs/examples/functions/list-variables.md new file mode 100644 index 000000000..e0f09516a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/list-variables.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 functions = new sdk.Functions(client); + +const result = await functions.listVariables({ + functionId: '<FUNCTION_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/list.md b/examples/2.3.x/server-nodejs/examples/functions/list.md new file mode 100644 index 000000000..db5204eb3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/list.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 functions = new sdk.Functions(client); + +const result = await functions.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/update-deployment-status.md b/examples/2.3.x/server-nodejs/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..acbdea42d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.updateDeploymentStatus({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/update-function-deployment.md b/examples/2.3.x/server-nodejs/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..fc183f8a3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.updateFunctionDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/update-variable.md b/examples/2.3.x/server-nodejs/examples/functions/update-variable.md new file mode 100644 index 000000000..61b96621b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.updateVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/update.md b/examples/2.3.x/server-nodejs/examples/functions/update.md new file mode 100644 index 000000000..2f299f28d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/functions/update.md @@ -0,0 +1,35 @@ +```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 functions = new sdk.Functions(client); + +const result = await functions.update({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: sdk.Runtime.Node145, // optional + execute: ['any'], // optional + events: [], // optional + schedule: '0 0 * * *', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [sdk.ProjectKeyScopes.ProjectRead], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // 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 new file mode 100644 index 000000000..cb60aa527 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/graphql/mutation.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 graphql = new sdk.Graphql(client); + +const result = await graphql.mutation({ + query: {}, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/graphql/query.md b/examples/2.3.x/server-nodejs/examples/graphql/query.md new file mode 100644 index 000000000..86ba69626 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/graphql/query.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 graphql = new sdk.Graphql(client); + +const result = await graphql.query({ + query: {}, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/locale/get.md b/examples/2.3.x/server-nodejs/examples/locale/get.md new file mode 100644 index 000000000..004a93257 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/locale/get.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 locale = new sdk.Locale(client); + +const result = await locale.get(); +``` 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 new file mode 100644 index 000000000..136992f40 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/locale/list-codes.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 locale = new sdk.Locale(client); + +const result = await locale.listCodes(); +``` 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 new file mode 100644 index 000000000..aa58ec572 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/locale/list-continents.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 locale = new sdk.Locale(client); + +const result = await locale.listContinents(); +``` 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 new file mode 100644 index 000000000..538b49271 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/locale/list-countries-eu.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 locale = new sdk.Locale(client); + +const result = await locale.listCountriesEU(); +``` 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 new file mode 100644 index 000000000..c27014185 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/locale/list-countries-phones.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 locale = new sdk.Locale(client); + +const result = await locale.listCountriesPhones(); +``` 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 new file mode 100644 index 000000000..99ee2d350 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/locale/list-countries.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 locale = new sdk.Locale(client); + +const result = await locale.listCountries(); +``` 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 new file mode 100644 index 000000000..c381774d2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/locale/list-currencies.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 locale = new sdk.Locale(client); + +const result = await locale.listCurrencies(); +``` 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 new file mode 100644 index 000000000..cfd522c6f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/locale/list-languages.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 locale = new sdk.Locale(client); + +const result = await locale.listLanguages(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..04e45525d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-apns-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.createAPNSProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false, // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..0ad3b75d0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,18 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createAppwriteProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, // optional + qos: 0, // optional + expiry: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-email.md b/examples/2.3.x/server-nodejs/examples/messaging/create-email.md new file mode 100644 index 000000000..499e39280 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-email.md @@ -0,0 +1,27 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createEmail({ + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // 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 +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..d23e5f468 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-fcm-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.createFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..70f64eb45 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + domain: 'example.com', // optional + isEuRegion: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..ace599e3a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>', // optional + enabled: 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 new file mode 100644 index 000000000..6e2fd1409 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-push.md @@ -0,0 +1,32 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createPush({ + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: {}, // optional + action: '<ACTION>', // optional + image: '<ID1:ID2>', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: sdk.MessagePriority.Normal, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..746cdeb99 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-resend-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.createResendProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..18eea0b92 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-sendgrid-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.createSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..2112c2838 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-ses-provider.md @@ -0,0 +1,23 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createSesProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + accessKey: '<ACCESS_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + region: '<REGION>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-sms.md b/examples/2.3.x/server-nodejs/examples/messaging/create-sms.md new file mode 100644 index 000000000..0108af62f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-sms.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 messaging = new sdk.Messaging(client); + +const result = await messaging.createSMS({ + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..65e264ff4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createSMTPProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 587, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + encryption: sdk.SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-subscriber.md b/examples/2.3.x/server-nodejs/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..cd5027e9d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-subscriber.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 + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..7d2a8e33c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..05b493473 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-topic.md b/examples/2.3.x/server-nodejs/examples/messaging/create-topic.md new file mode 100644 index 000000000..0a4b29265 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-topic.md @@ -0,0 +1,18 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ['any'], // optional + qos: 0, // optional + expiry: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..ae0b6fd4e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '<FROM>', // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..f5f94a5bd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.createVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/delete-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/delete-provider.md new file mode 100644 index 000000000..d1bc60747 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/delete-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.deleteProvider({ + providerId: '<PROVIDER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-nodejs/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..d25b9d792 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +```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 + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/delete-topic.md b/examples/2.3.x/server-nodejs/examples/messaging/delete-topic.md new file mode 100644 index 000000000..78a0898fc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/delete-topic.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 messaging = new sdk.Messaging(client); + +const result = await messaging.deleteTopic({ + topicId: '<TOPIC_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/delete.md b/examples/2.3.x/server-nodejs/examples/messaging/delete.md new file mode 100644 index 000000000..feb7e028d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/delete.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 messaging = new sdk.Messaging(client); + +const result = await messaging.delete({ + messageId: '<MESSAGE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/get-message.md b/examples/2.3.x/server-nodejs/examples/messaging/get-message.md new file mode 100644 index 000000000..30c5ee154 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/get-message.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 messaging = new sdk.Messaging(client); + +const result = await messaging.getMessage({ + messageId: '<MESSAGE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/get-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/get-provider.md new file mode 100644 index 000000000..e7f43b890 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/get-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.getProvider({ + providerId: '<PROVIDER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/get-subscriber.md b/examples/2.3.x/server-nodejs/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..7fbb75d0c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.getSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/get-topic.md b/examples/2.3.x/server-nodejs/examples/messaging/get-topic.md new file mode 100644 index 000000000..72c855f3a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/get-topic.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 messaging = new sdk.Messaging(client); + +const result = await messaging.getTopic({ + topicId: '<TOPIC_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/list-messages.md b/examples/2.3.x/server-nodejs/examples/messaging/list-messages.md new file mode 100644 index 000000000..39ad98fa6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/list-messages.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 messaging = new sdk.Messaging(client); + +const result = await messaging.listMessages({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/list-providers.md b/examples/2.3.x/server-nodejs/examples/messaging/list-providers.md new file mode 100644 index 000000000..968921d12 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/list-providers.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 messaging = new sdk.Messaging(client); + +const result = await messaging.listProviders({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/list-subscribers.md b/examples/2.3.x/server-nodejs/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..241c7493b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/list-subscribers.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 messaging = new sdk.Messaging(client); + +const result = await messaging.listSubscribers({ + topicId: '<TOPIC_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/list-targets.md b/examples/2.3.x/server-nodejs/examples/messaging/list-targets.md new file mode 100644 index 000000000..d318da81c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/list-targets.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 messaging = new sdk.Messaging(client); + +const result = await messaging.listTargets({ + messageId: '<MESSAGE_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/list-topics.md b/examples/2.3.x/server-nodejs/examples/messaging/list-topics.md new file mode 100644 index 000000000..eaef351fb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/list-topics.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 messaging = new sdk.Messaging(client); + +const result = await messaging.listTopics({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..800e88506 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-apns-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateAPNSProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..b41d18f0d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,18 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateAppwriteProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + qos: 0, // optional + expiry: 0, // 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 new file mode 100644 index 000000000..426641c78 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-email.md @@ -0,0 +1,27 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateEmail({ + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // 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-fcm-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..8612b2a69 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-fcm-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateFCMProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + serviceAccountJSON: {}, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..fddbf5d69 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + apiKey: '<API_KEY>', // optional + domain: 'example.com', // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..debc079b0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>', // 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 new file mode 100644 index 000000000..cf8f6f1b5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-push.md @@ -0,0 +1,32 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updatePush({ + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + title: '<TITLE>', // optional + body: '<BODY>', // optional + data: {}, // optional + action: '<ACTION>', // optional + image: '<ID1:ID2>', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: sdk.MessagePriority.Normal, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..e3c7fc2f4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-resend-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateResendProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..8e5b59b99 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-sendgrid-provider.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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..d3e943a17 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-ses-provider.md @@ -0,0 +1,23 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateSesProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accessKey: '<ACCESS_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + region: '<REGION>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // 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 new file mode 100644 index 000000000..940474a44 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-sms.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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateSMS({ + messageId: '<MESSAGE_ID>', + 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/messaging/update-smtp-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..94e862bec --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateSMTPProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + host: '<HOST>', // optional + port: 1, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + encryption: sdk.SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..5d9442f29 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..ef15093d1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-topic.md b/examples/2.3.x/server-nodejs/examples/messaging/update-topic.md new file mode 100644 index 000000000..292b3b6a6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-topic.md @@ -0,0 +1,18 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ['any'], // optional + qos: 0, // optional + expiry: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..eb02eccdb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + from: '<FROM>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-nodejs/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..203e435c8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +```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 messaging = new sdk.Messaging(client); + +const result = await messaging.updateVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + from: '<FROM>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-nodejs/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..3496600c8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/create-backup-policy.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 mongo = new sdk.Mongo(client); + +const result = await mongo.createBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/create-backup.md b/examples/2.3.x/server-nodejs/examples/mongo/create-backup.md new file mode 100644 index 000000000..532eac7b8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/create-backup.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.createBackup({ + databaseId: '<DATABASE_ID>', + type: 'full', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/create-branch.md b/examples/2.3.x/server-nodejs/examples/mongo/create-branch.md new file mode 100644 index 000000000..78aa37594 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/create-branch.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 mongo = new sdk.Mongo(client); + +const result = await mongo.createBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/create-failover.md b/examples/2.3.x/server-nodejs/examples/mongo/create-failover.md new file mode 100644 index 000000000..598b48d71 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/create-failover.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/create-migration.md b/examples/2.3.x/server-nodejs/examples/mongo/create-migration.md new file mode 100644 index 000000000..dfa2b2b70 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/create-migration.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 mongo = new sdk.Mongo(client); + +const result = await mongo.createMigration({ + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/create-restoration.md b/examples/2.3.x/server-nodejs/examples/mongo/create-restoration.md new file mode 100644 index 000000000..7a6f1a3d2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/create-restoration.md @@ -0,0 +1,18 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.createRestoration({ + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/create-upgrade.md b/examples/2.3.x/server-nodejs/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..6764df2dc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/create-upgrade.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.createUpgrade({ + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/create.md b/examples/2.3.x/server-nodejs/examples/mongo/create.md new file mode 100644 index 000000000..cb6d8f71a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/create.md @@ -0,0 +1,27 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-nodejs/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..959a03cfd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/delete-backup-policy.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.deleteBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/delete-backup.md b/examples/2.3.x/server-nodejs/examples/mongo/delete-backup.md new file mode 100644 index 000000000..386d2209c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/delete-backup.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.deleteBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/delete-branch.md b/examples/2.3.x/server-nodejs/examples/mongo/delete-branch.md new file mode 100644 index 000000000..2bb3b262c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/delete-branch.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.deleteBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/delete.md b/examples/2.3.x/server-nodejs/examples/mongo/delete.md new file mode 100644 index 000000000..8da60508b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/delete.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 mongo = new sdk.Mongo(client); + +const result = await mongo.delete({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-nodejs/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..fe057b5ca --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/get-backup-policy.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.getBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/get-backup.md b/examples/2.3.x/server-nodejs/examples/mongo/get-backup.md new file mode 100644 index 000000000..a80c62908 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/get-backup.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.getBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/get-pitr.md b/examples/2.3.x/server-nodejs/examples/mongo/get-pitr.md new file mode 100644 index 000000000..fb1fe5d75 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/get-pitr.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 mongo = new sdk.Mongo(client); + +const result = await mongo.getPitr({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/get-replicas.md b/examples/2.3.x/server-nodejs/examples/mongo/get-replicas.md new file mode 100644 index 000000000..33402e1dd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/get-replicas.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 mongo = new sdk.Mongo(client); + +const result = await mongo.getReplicas({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/get-restoration.md b/examples/2.3.x/server-nodejs/examples/mongo/get-restoration.md new file mode 100644 index 000000000..0ab1d0cd4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/get-restoration.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.getRestoration({ + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/get-status.md b/examples/2.3.x/server-nodejs/examples/mongo/get-status.md new file mode 100644 index 000000000..2e15d8298 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/get-status.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 mongo = new sdk.Mongo(client); + +const result = await mongo.getStatus({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/get.md b/examples/2.3.x/server-nodejs/examples/mongo/get.md new file mode 100644 index 000000000..7caf63483 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/get.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 mongo = new sdk.Mongo(client); + +const result = await mongo.get({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-nodejs/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..d40381ef9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/list-backup-policies.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.listBackupPolicies({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/list-backups.md b/examples/2.3.x/server-nodejs/examples/mongo/list-backups.md new file mode 100644 index 000000000..2041759ff --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/list-backups.md @@ -0,0 +1,15 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.listBackups({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/list-branches.md b/examples/2.3.x/server-nodejs/examples/mongo/list-branches.md new file mode 100644 index 000000000..663723b83 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/list-branches.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 mongo = new sdk.Mongo(client); + +const result = await mongo.listBranches({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/list-operations.md b/examples/2.3.x/server-nodejs/examples/mongo/list-operations.md new file mode 100644 index 000000000..aac0189c7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/list-operations.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 mongo = new sdk.Mongo(client); + +const result = await mongo.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/list-restorations.md b/examples/2.3.x/server-nodejs/examples/mongo/list-restorations.md new file mode 100644 index 000000000..1efd14620 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/list-restorations.md @@ -0,0 +1,18 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.listRestorations({ + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/list-specifications.md b/examples/2.3.x/server-nodejs/examples/mongo/list-specifications.md new file mode 100644 index 000000000..f8b3110fc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const mongo = new sdk.Mongo(client); + +const result = await mongo.listSpecifications(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/list.md b/examples/2.3.x/server-nodejs/examples/mongo/list.md new file mode 100644 index 000000000..ee7406b77 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/list.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 mongo = new sdk.Mongo(client); + +const result = await mongo.list({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-nodejs/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..9d22b7810 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/update-backup-policy.md @@ -0,0 +1,19 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.updateBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-nodejs/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..8632ab61d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/update-backup-storage.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 mongo = new sdk.Mongo(client); + +const result = await mongo.updateBackupStorage({ + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/update-credentials.md b/examples/2.3.x/server-nodejs/examples/mongo/update-credentials.md new file mode 100644 index 000000000..43cd025a1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/update-credentials.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 mongo = new sdk.Mongo(client); + +const result = await mongo.updateCredentials({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/update-maintenance.md b/examples/2.3.x/server-nodejs/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..e28f6fd11 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/update-maintenance.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 mongo = new sdk.Mongo(client); + +const result = await mongo.updateMaintenance({ + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mongo/update.md b/examples/2.3.x/server-nodejs/examples/mongo/update.md new file mode 100644 index 000000000..046588e65 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mongo/update.md @@ -0,0 +1,34 @@ +```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 mongo = new sdk.Mongo(client); + +const result = await mongo.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-nodejs/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..bbaf973e7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create-backup-policy.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 mysql = new sdk.Mysql(client); + +const result = await mysql.createBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create-backup.md b/examples/2.3.x/server-nodejs/examples/mysql/create-backup.md new file mode 100644 index 000000000..5515c81cc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create-backup.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.createBackup({ + databaseId: '<DATABASE_ID>', + type: 'full', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create-branch.md b/examples/2.3.x/server-nodejs/examples/mysql/create-branch.md new file mode 100644 index 000000000..6c5f671fa --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create-branch.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 mysql = new sdk.Mysql(client); + +const result = await mysql.createBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create-execution.md b/examples/2.3.x/server-nodejs/examples/mysql/create-execution.md new file mode 100644 index 000000000..2554bbeb1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create-execution.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 mysql = new sdk.Mysql(client); + +const result = await mysql.createExecution({ + databaseId: '<DATABASE_ID>', + sql: '<SQL>', + bindings: {}, // optional + timeoutSeconds: 1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create-failover.md b/examples/2.3.x/server-nodejs/examples/mysql/create-failover.md new file mode 100644 index 000000000..0fcf5b90e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create-failover.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create-migration.md b/examples/2.3.x/server-nodejs/examples/mysql/create-migration.md new file mode 100644 index 000000000..1c09f5650 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create-migration.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 mysql = new sdk.Mysql(client); + +const result = await mysql.createMigration({ + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create-restoration.md b/examples/2.3.x/server-nodejs/examples/mysql/create-restoration.md new file mode 100644 index 000000000..6e95f0111 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create-restoration.md @@ -0,0 +1,18 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.createRestoration({ + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create-upgrade.md b/examples/2.3.x/server-nodejs/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..36aeac547 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create-upgrade.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.createUpgrade({ + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/create.md b/examples/2.3.x/server-nodejs/examples/mysql/create.md new file mode 100644 index 000000000..81573b49c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/create.md @@ -0,0 +1,27 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-nodejs/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..94b672a20 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/delete-backup-policy.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.deleteBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/delete-backup.md b/examples/2.3.x/server-nodejs/examples/mysql/delete-backup.md new file mode 100644 index 000000000..1a4166914 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/delete-backup.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.deleteBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/delete-branch.md b/examples/2.3.x/server-nodejs/examples/mysql/delete-branch.md new file mode 100644 index 000000000..426cbccdb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/delete-branch.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.deleteBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/delete.md b/examples/2.3.x/server-nodejs/examples/mysql/delete.md new file mode 100644 index 000000000..3cd55c347 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/delete.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 mysql = new sdk.Mysql(client); + +const result = await mysql.delete({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-nodejs/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..e6f98bcfb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/get-backup-policy.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.getBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/get-backup.md b/examples/2.3.x/server-nodejs/examples/mysql/get-backup.md new file mode 100644 index 000000000..2c97a9d48 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/get-backup.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.getBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/get-pitr.md b/examples/2.3.x/server-nodejs/examples/mysql/get-pitr.md new file mode 100644 index 000000000..69e114ce9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/get-pitr.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 mysql = new sdk.Mysql(client); + +const result = await mysql.getPitr({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/get-pooler.md b/examples/2.3.x/server-nodejs/examples/mysql/get-pooler.md new file mode 100644 index 000000000..8817ead37 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/get-pooler.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 mysql = new sdk.Mysql(client); + +const result = await mysql.getPooler({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/get-replicas.md b/examples/2.3.x/server-nodejs/examples/mysql/get-replicas.md new file mode 100644 index 000000000..a5f669d4d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/get-replicas.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 mysql = new sdk.Mysql(client); + +const result = await mysql.getReplicas({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/get-restoration.md b/examples/2.3.x/server-nodejs/examples/mysql/get-restoration.md new file mode 100644 index 000000000..9a8285b4f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/get-restoration.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.getRestoration({ + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/get-status.md b/examples/2.3.x/server-nodejs/examples/mysql/get-status.md new file mode 100644 index 000000000..eb783a459 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/get-status.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 mysql = new sdk.Mysql(client); + +const result = await mysql.getStatus({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/get.md b/examples/2.3.x/server-nodejs/examples/mysql/get.md new file mode 100644 index 000000000..0608db70a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/get.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 mysql = new sdk.Mysql(client); + +const result = await mysql.get({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-nodejs/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..4b3127af6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/list-backup-policies.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.listBackupPolicies({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/list-backups.md b/examples/2.3.x/server-nodejs/examples/mysql/list-backups.md new file mode 100644 index 000000000..c88356e56 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/list-backups.md @@ -0,0 +1,15 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.listBackups({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/list-branches.md b/examples/2.3.x/server-nodejs/examples/mysql/list-branches.md new file mode 100644 index 000000000..7c3f80da8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/list-branches.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 mysql = new sdk.Mysql(client); + +const result = await mysql.listBranches({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/list-operations.md b/examples/2.3.x/server-nodejs/examples/mysql/list-operations.md new file mode 100644 index 000000000..9e322f165 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/list-operations.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 mysql = new sdk.Mysql(client); + +const result = await mysql.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/list-restorations.md b/examples/2.3.x/server-nodejs/examples/mysql/list-restorations.md new file mode 100644 index 000000000..179e85a02 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/list-restorations.md @@ -0,0 +1,18 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.listRestorations({ + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/list-specifications.md b/examples/2.3.x/server-nodejs/examples/mysql/list-specifications.md new file mode 100644 index 000000000..2fe885332 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const mysql = new sdk.Mysql(client); + +const result = await mysql.listSpecifications(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/list.md b/examples/2.3.x/server-nodejs/examples/mysql/list.md new file mode 100644 index 000000000..11907b7d8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/list.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 mysql = new sdk.Mysql(client); + +const result = await mysql.list({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-nodejs/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..a693487fc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/update-backup-policy.md @@ -0,0 +1,19 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.updateBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-nodejs/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..96e57e470 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/update-backup-storage.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 mysql = new sdk.Mysql(client); + +const result = await mysql.updateBackupStorage({ + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/update-credentials.md b/examples/2.3.x/server-nodejs/examples/mysql/update-credentials.md new file mode 100644 index 000000000..00747ff37 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/update-credentials.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 mysql = new sdk.Mysql(client); + +const result = await mysql.updateCredentials({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/update-maintenance.md b/examples/2.3.x/server-nodejs/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..c47156e32 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/update-maintenance.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 mysql = new sdk.Mysql(client); + +const result = await mysql.updateMaintenance({ + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/update-pooler.md b/examples/2.3.x/server-nodejs/examples/mysql/update-pooler.md new file mode 100644 index 000000000..19af6f493 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/update-pooler.md @@ -0,0 +1,22 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.updatePooler({ + databaseId: '<DATABASE_ID>', + mode: 'transaction', // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: '<POOLER_CPU_REQUEST>', // optional + poolerCpuLimit: '<POOLER_CPU_LIMIT>', // optional + poolerMemoryRequest: '<POOLER_MEMORY_REQUEST>', // optional + poolerMemoryLimit: '<POOLER_MEMORY_LIMIT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/mysql/update.md b/examples/2.3.x/server-nodejs/examples/mysql/update.md new file mode 100644 index 000000000..2e16df54e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/mysql/update.md @@ -0,0 +1,34 @@ +```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 mysql = new sdk.Mysql(client); + +const result = await mysql.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/approve.md b/examples/2.3.x/server-nodejs/examples/oauth2/approve.md new file mode 100644 index 000000000..ee1222669 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/approve.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 + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.approve({ + grantId: '<GRANT_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + scope: '<SCOPE>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/authorize-post.md b/examples/2.3.x/server-nodejs/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..003c71792 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/authorize-post.md @@ -0,0 +1,27 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.authorizePost({ + clientId: '<CLIENT_ID>', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional + requestUri: '<REQUEST_URI>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/authorize.md b/examples/2.3.x/server-nodejs/examples/oauth2/authorize.md new file mode 100644 index 000000000..fe529c62b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/authorize.md @@ -0,0 +1,27 @@ +```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 oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.authorize({ + clientId: '<CLIENT_ID>', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional + requestUri: '<REQUEST_URI>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-nodejs/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..e49bef1d3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/create-device-authorization.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.createDeviceAuthorization({ + clientId: '<CLIENT_ID>', // optional + scope: '<SCOPE>', // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/create-grant.md b/examples/2.3.x/server-nodejs/examples/oauth2/create-grant.md new file mode 100644 index 000000000..e0989fb24 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/create-grant.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.createGrant({ + userCode: '<USER_CODE>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/create-par.md b/examples/2.3.x/server-nodejs/examples/oauth2/create-par.md new file mode 100644 index 000000000..b579484e3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/create-par.md @@ -0,0 +1,26 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.createPAR({ + clientId: '<CLIENT_ID>', + redirectUri: 'https://example.com', + responseType: 'code', + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/create-token.md b/examples/2.3.x/server-nodejs/examples/oauth2/create-token.md new file mode 100644 index 000000000..ea081d155 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/create-token.md @@ -0,0 +1,23 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.createToken({ + grantType: '<GRANT_TYPE>', + code: '<CODE>', // 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-nodejs/examples/oauth2/get-grant.md b/examples/2.3.x/server-nodejs/examples/oauth2/get-grant.md new file mode 100644 index 000000000..59c8a5650 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/get-grant.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.getGrant({ + grantId: '<GRANT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/list-organizations.md b/examples/2.3.x/server-nodejs/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..ca8121cf9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/list-organizations.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.listOrganizations({ + limit: 1, // optional + offset: 0, // optional + search: '<SEARCH>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/list-projects.md b/examples/2.3.x/server-nodejs/examples/oauth2/list-projects.md new file mode 100644 index 000000000..6b2488cac --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/list-projects.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.listProjects({ + limit: 1, // optional + offset: 0, // optional + search: '<SEARCH>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/reject.md b/examples/2.3.x/server-nodejs/examples/oauth2/reject.md new file mode 100644 index 000000000..473305b5b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/reject.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 + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.reject({ + grantId: '<GRANT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/revoke.md b/examples/2.3.x/server-nodejs/examples/oauth2/revoke.md new file mode 100644 index 000000000..b2c9a5def --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/revoke.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 + .setSession(''); // The user session to authenticate with + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.revoke({ + 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 new file mode 100644 index 000000000..a2801e67a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/create-ephemeral-project-key.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 organization = new sdk.Organization(client); + +const result = await organization.createEphemeralProjectKey({ + projectId: '<PROJECT_ID>', + scopes: [sdk.ProjectKeyScopes.ProjectRead], + duration: 600, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/create-installation.md b/examples/2.3.x/server-nodejs/examples/organization/create-installation.md new file mode 100644 index 000000000..b9e6c27c1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/create-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.createInstallation({ + appId: '<APP_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/create-membership.md b/examples/2.3.x/server-nodejs/examples/organization/create-membership.md new file mode 100644 index 000000000..dbc5be911 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/create-membership.md @@ -0,0 +1,19 @@ +```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 organization = new sdk.Organization(client); + +const result = await organization.createMembership({ + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/create-project.md b/examples/2.3.x/server-nodejs/examples/organization/create-project.md new file mode 100644 index 000000000..686773ccb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/create-project.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 organization = new sdk.Organization(client); + +const result = await organization.createProject({ + projectId: '<PROJECT_ID>', + name: '<NAME>', + region: sdk.Region.Fra, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/delete-installation.md b/examples/2.3.x/server-nodejs/examples/organization/delete-installation.md new file mode 100644 index 000000000..c48c79c0f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/delete-installation.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '<INSTALLATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/delete-membership.md b/examples/2.3.x/server-nodejs/examples/organization/delete-membership.md new file mode 100644 index 000000000..3a5c91902 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/delete-membership.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 organization = new sdk.Organization(client); + +const result = await organization.deleteMembership({ + membershipId: '<MEMBERSHIP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/delete-project-key.md b/examples/2.3.x/server-nodejs/examples/organization/delete-project-key.md new file mode 100644 index 000000000..1e6db3c7a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/delete-project-key.md @@ -0,0 +1,15 @@ +```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 organization = new sdk.Organization(client); + +const result = await organization.deleteProjectKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/delete-project.md b/examples/2.3.x/server-nodejs/examples/organization/delete-project.md new file mode 100644 index 000000000..fcc24c806 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/delete-project.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 organization = new sdk.Organization(client); + +const result = await organization.deleteProject({ + projectId: '<PROJECT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/delete.md b/examples/2.3.x/server-nodejs/examples/organization/delete.md new file mode 100644 index 000000000..79b8e0803 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/delete.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const organization = new sdk.Organization(client); + +const result = await organization.delete(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/get-installation.md b/examples/2.3.x/server-nodejs/examples/organization/get-installation.md new file mode 100644 index 000000000..d48c35c1a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/get-installation.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.getInstallation({ + installationId: '<INSTALLATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/get-membership.md b/examples/2.3.x/server-nodejs/examples/organization/get-membership.md new file mode 100644 index 000000000..e7f317123 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/get-membership.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 organization = new sdk.Organization(client); + +const result = await organization.getMembership({ + membershipId: '<MEMBERSHIP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/get-project-key.md b/examples/2.3.x/server-nodejs/examples/organization/get-project-key.md new file mode 100644 index 000000000..23171a6aa --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/get-project-key.md @@ -0,0 +1,15 @@ +```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 organization = new sdk.Organization(client); + +const result = await organization.getProjectKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/get-project.md b/examples/2.3.x/server-nodejs/examples/organization/get-project.md new file mode 100644 index 000000000..a44109679 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/get-project.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 organization = new sdk.Organization(client); + +const result = await organization.getProject({ + projectId: '<PROJECT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/get.md b/examples/2.3.x/server-nodejs/examples/organization/get.md new file mode 100644 index 000000000..3b156dd54 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/get.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const organization = new sdk.Organization(client); + +const result = await organization.get(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/list-installations.md b/examples/2.3.x/server-nodejs/examples/organization/list-installations.md new file mode 100644 index 000000000..2488802eb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/list-installations.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/list-memberships.md b/examples/2.3.x/server-nodejs/examples/organization/list-memberships.md new file mode 100644 index 000000000..12861589f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/list-memberships.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 organization = new sdk.Organization(client); + +const result = await organization.listMemberships({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/list-project-keys.md b/examples/2.3.x/server-nodejs/examples/organization/list-project-keys.md new file mode 100644 index 000000000..74487441e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/list-project-keys.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 organization = new sdk.Organization(client); + +const result = await organization.listProjectKeys({ + projectId: '<PROJECT_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/list-projects.md b/examples/2.3.x/server-nodejs/examples/organization/list-projects.md new file mode 100644 index 000000000..e883082df --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/list-projects.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 organization = new sdk.Organization(client); + +const result = await organization.listProjects({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/update-installation.md b/examples/2.3.x/server-nodejs/examples/organization/update-installation.md new file mode 100644 index 000000000..24ba74dc4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/update-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.updateInstallation({ + installationId: '<INSTALLATION_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/update-membership.md b/examples/2.3.x/server-nodejs/examples/organization/update-membership.md new file mode 100644 index 000000000..1898509f2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/update-membership.md @@ -0,0 +1,15 @@ +```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 organization = new sdk.Organization(client); + +const result = await organization.updateMembership({ + membershipId: '<MEMBERSHIP_ID>', + roles: [], +}); +``` 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 new file mode 100644 index 000000000..17d19c4f9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/update-project-key.md @@ -0,0 +1,18 @@ +```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 organization = new sdk.Organization(client); + +const result = await organization.updateProjectKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [sdk.ProjectKeyScopes.ProjectRead], + expire: '2020-10-15T06:38:00.000+00:00', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/update-project.md b/examples/2.3.x/server-nodejs/examples/organization/update-project.md new file mode 100644 index 000000000..5daee821a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/update-project.md @@ -0,0 +1,15 @@ +```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 organization = new sdk.Organization(client); + +const result = await organization.updateProject({ + projectId: '<PROJECT_ID>', + name: '<NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/update.md b/examples/2.3.x/server-nodejs/examples/organization/update.md new file mode 100644 index 000000000..c06253b46 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/organization/update.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 organization = new sdk.Organization(client); + +const result = await organization.update({ + name: '<NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..be7e3a27d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-backup-policy.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-backup.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-backup.md new file mode 100644 index 000000000..77115813e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-backup.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createBackup({ + databaseId: '<DATABASE_ID>', + type: 'full', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-branch.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-branch.md new file mode 100644 index 000000000..e0bcb7bed --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-branch.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-execution.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-execution.md new file mode 100644 index 000000000..28d8a93c3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-execution.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createExecution({ + databaseId: '<DATABASE_ID>', + sql: '<SQL>', + bindings: {}, // optional + timeoutSeconds: 1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-extension.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-extension.md new file mode 100644 index 000000000..106c82791 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-extension.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createExtension({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-failover.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-failover.md new file mode 100644 index 000000000..8dccf7127 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-failover.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-migration.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-migration.md new file mode 100644 index 000000000..6f9629d1a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-migration.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createMigration({ + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-restoration.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..5cc8ea053 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-restoration.md @@ -0,0 +1,18 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createRestoration({ + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-nodejs/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..018f1e72d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create-upgrade.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.createUpgrade({ + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/create.md b/examples/2.3.x/server-nodejs/examples/postgresql/create.md new file mode 100644 index 000000000..90f66cb9d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/create.md @@ -0,0 +1,27 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-nodejs/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..0b19db37a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.deleteBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/delete-backup.md b/examples/2.3.x/server-nodejs/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..2574a4b81 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/delete-backup.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.deleteBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/delete-branch.md b/examples/2.3.x/server-nodejs/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..dc4778b8f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/delete-branch.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.deleteBranch({ + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/delete-extension.md b/examples/2.3.x/server-nodejs/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..470cd12c7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/delete-extension.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.deleteExtension({ + databaseId: '<DATABASE_ID>', + extensionName: '<EXTENSION_NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/delete.md b/examples/2.3.x/server-nodejs/examples/postgresql/delete.md new file mode 100644 index 000000000..c36770207 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/delete.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.delete({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-nodejs/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..cf54b34c2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/get-backup-policy.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.getBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/get-backup.md b/examples/2.3.x/server-nodejs/examples/postgresql/get-backup.md new file mode 100644 index 000000000..419acb979 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/get-backup.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.getBackup({ + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/get-pitr.md b/examples/2.3.x/server-nodejs/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..1032b3cab --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/get-pitr.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.getPitr({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/get-pooler.md b/examples/2.3.x/server-nodejs/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..a06ae6d26 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/get-pooler.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.getPooler({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/get-replicas.md b/examples/2.3.x/server-nodejs/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..b0c52c0ee --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/get-replicas.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.getReplicas({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/get-restoration.md b/examples/2.3.x/server-nodejs/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..593f710db --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/get-restoration.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.getRestoration({ + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/get-status.md b/examples/2.3.x/server-nodejs/examples/postgresql/get-status.md new file mode 100644 index 000000000..0f6d7e995 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/get-status.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.getStatus({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/get.md b/examples/2.3.x/server-nodejs/examples/postgresql/get.md new file mode 100644 index 000000000..dc2d021d3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/get.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.get({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-nodejs/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..281577f7e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/list-backup-policies.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.listBackupPolicies({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/list-backups.md b/examples/2.3.x/server-nodejs/examples/postgresql/list-backups.md new file mode 100644 index 000000000..183fd59c8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/list-backups.md @@ -0,0 +1,15 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.listBackups({ + databaseId: '<DATABASE_ID>', + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/list-branches.md b/examples/2.3.x/server-nodejs/examples/postgresql/list-branches.md new file mode 100644 index 000000000..bda35d2c6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/list-branches.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.listBranches({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/list-extensions.md b/examples/2.3.x/server-nodejs/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..9e3631912 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/list-extensions.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.listExtensions({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/list-operations.md b/examples/2.3.x/server-nodejs/examples/postgresql/list-operations.md new file mode 100644 index 000000000..3c1183499 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/list-operations.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/list-restorations.md b/examples/2.3.x/server-nodejs/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..9ee58d27c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/list-restorations.md @@ -0,0 +1,18 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.listRestorations({ + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/list-specifications.md b/examples/2.3.x/server-nodejs/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..14b5b5d79 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const postgresql = new sdk.Postgresql(client); + +const result = await postgresql.listSpecifications(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/list.md b/examples/2.3.x/server-nodejs/examples/postgresql/list.md new file mode 100644 index 000000000..4a6597b7e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/list.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.list({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-nodejs/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..9914a6ec6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/update-backup-policy.md @@ -0,0 +1,19 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.updateBackupPolicy({ + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-nodejs/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..83ae700c7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/update-backup-storage.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.updateBackupStorage({ + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/update-credentials.md b/examples/2.3.x/server-nodejs/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..26898b613 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/update-credentials.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.updateCredentials({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-nodejs/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..da5a12bd0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/update-maintenance.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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.updateMaintenance({ + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/update-pooler.md b/examples/2.3.x/server-nodejs/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..e09e1d8a7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/update-pooler.md @@ -0,0 +1,22 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.updatePooler({ + databaseId: '<DATABASE_ID>', + mode: 'transaction', // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: '<POOLER_CPU_REQUEST>', // optional + poolerCpuLimit: '<POOLER_CPU_LIMIT>', // optional + poolerMemoryRequest: '<POOLER_MEMORY_REQUEST>', // optional + poolerMemoryLimit: '<POOLER_MEMORY_LIMIT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/postgresql/update.md b/examples/2.3.x/server-nodejs/examples/postgresql/update.md new file mode 100644 index 000000000..87de3f94a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/postgresql/update.md @@ -0,0 +1,34 @@ +```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 postgresql = new sdk.Postgresql(client); + +const result = await postgresql.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/presences/delete.md b/examples/2.3.x/server-nodejs/examples/presences/delete.md new file mode 100644 index 000000000..866d674b0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/presences/delete.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 presences = new sdk.Presences(client); + +const result = await presences.delete({ + presenceId: '<PRESENCE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/presences/get.md b/examples/2.3.x/server-nodejs/examples/presences/get.md new file mode 100644 index 000000000..76aee5980 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/presences/get.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 presences = new sdk.Presences(client); + +const result = await presences.get({ + presenceId: '<PRESENCE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/presences/list.md b/examples/2.3.x/server-nodejs/examples/presences/list.md new file mode 100644 index 000000000..cd6e51d6e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/presences/list.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 presences = new sdk.Presences(client); + +const result = await presences.list({ + queries: [], // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/presences/update.md b/examples/2.3.x/server-nodejs/examples/presences/update.md new file mode 100644 index 000000000..e456487cb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/presences/update.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 presences = new sdk.Presences(client); + +const result = await presences.update({ + presenceId: '<PRESENCE_ID>', + userId: '<USER_ID>', + status: '<STATUS>', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + purge: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/presences/upsert.md b/examples/2.3.x/server-nodejs/examples/presences/upsert.md new file mode 100644 index 000000000..646cab86c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/presences/upsert.md @@ -0,0 +1,19 @@ +```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 presences = new sdk.Presences(client); + +const result = await presences.upsert({ + presenceId: '<PRESENCE_ID>', + userId: '<USER_ID>', + status: '<STATUS>', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-android-platform.md b/examples/2.3.x/server-nodejs/examples/project/create-android-platform.md new file mode 100644 index 000000000..083eee147 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-android-platform.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.createAndroidPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + applicationId: '<APPLICATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-apple-platform.md b/examples/2.3.x/server-nodejs/examples/project/create-apple-platform.md new file mode 100644 index 000000000..544e3068a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-apple-platform.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.createApplePlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + bundleIdentifier: '<BUNDLE_IDENTIFIER>', +}); +``` 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 new file mode 100644 index 000000000..352c6316a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-ephemeral-key.md @@ -0,0 +1,15 @@ +```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.createEphemeralKey({ + scopes: [sdk.ProjectKeyScopes.ProjectRead], + duration: 600, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-linux-platform.md b/examples/2.3.x/server-nodejs/examples/project/create-linux-platform.md new file mode 100644 index 000000000..7555da386 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-linux-platform.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.createLinuxPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageName: '<PACKAGE_NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-mock-phone.md b/examples/2.3.x/server-nodejs/examples/project/create-mock-phone.md new file mode 100644 index 000000000..74fc63991 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-mock-phone.md @@ -0,0 +1,15 @@ +```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.createMockPhone({ + number: '+12065550100', + otp: '<OTP>', +}); +``` 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 new file mode 100644 index 000000000..0246650b0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-smtp-test.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 project = new sdk.Project(client); + +const result = await project.createSMTPTest({ + emails: [], +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-variable.md b/examples/2.3.x/server-nodejs/examples/project/create-variable.md new file mode 100644 index 000000000..3f06a9e60 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-variable.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 project = new sdk.Project(client); + +const result = await project.createVariable({ + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-web-platform.md b/examples/2.3.x/server-nodejs/examples/project/create-web-platform.md new file mode 100644 index 000000000..50ae6db8b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-web-platform.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.createWebPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-windows-platform.md b/examples/2.3.x/server-nodejs/examples/project/create-windows-platform.md new file mode 100644 index 000000000..4bc666e05 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/create-windows-platform.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.createWindowsPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/delete-key.md b/examples/2.3.x/server-nodejs/examples/project/delete-key.md new file mode 100644 index 000000000..10013221e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/delete-key.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 project = new sdk.Project(client); + +const result = await project.deleteKey({ + keyId: '<KEY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/delete-mock-phone.md b/examples/2.3.x/server-nodejs/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..7270f738a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/delete-mock-phone.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 project = new sdk.Project(client); + +const result = await project.deleteMockPhone({ + number: '+12065550100', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/delete-platform.md b/examples/2.3.x/server-nodejs/examples/project/delete-platform.md new file mode 100644 index 000000000..f1cd0a9f2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/delete-platform.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 project = new sdk.Project(client); + +const result = await project.deletePlatform({ + platformId: '<PLATFORM_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/delete-variable.md b/examples/2.3.x/server-nodejs/examples/project/delete-variable.md new file mode 100644 index 000000000..9db9b3a21 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/delete-variable.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 project = new sdk.Project(client); + +const result = await project.deleteVariable({ + variableId: '<VARIABLE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/delete.md b/examples/2.3.x/server-nodejs/examples/project/delete.md new file mode 100644 index 000000000..150939ed3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/delete.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const project = new sdk.Project(client); + +const result = await project.delete(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/get-email-template.md b/examples/2.3.x/server-nodejs/examples/project/get-email-template.md new file mode 100644 index 000000000..5645f4057 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/get-email-template.md @@ -0,0 +1,15 @@ +```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.getEmailTemplate({ + templateId: sdk.ProjectEmailTemplateId.Verification, + locale: sdk.ProjectEmailTemplateLocale.Af, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/get-key.md b/examples/2.3.x/server-nodejs/examples/project/get-key.md new file mode 100644 index 000000000..ef42cd150 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/get-key.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 project = new sdk.Project(client); + +const result = await project.getKey({ + keyId: '<KEY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/get-mock-phone.md b/examples/2.3.x/server-nodejs/examples/project/get-mock-phone.md new file mode 100644 index 000000000..d17069d90 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/get-mock-phone.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 project = new sdk.Project(client); + +const result = await project.getMockPhone({ + number: '+12065550100', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-nodejs/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..94012a514 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/get-o-auth-2-provider.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 project = new sdk.Project(client); + +const result = await project.getOAuth2Provider({ + providerId: sdk.ProjectOAuthProviderId.Amazon, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/get-platform.md b/examples/2.3.x/server-nodejs/examples/project/get-platform.md new file mode 100644 index 000000000..bfebc6b5e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/get-platform.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 project = new sdk.Project(client); + +const result = await project.getPlatform({ + platformId: '<PLATFORM_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/get-policy.md b/examples/2.3.x/server-nodejs/examples/project/get-policy.md new file mode 100644 index 000000000..03e43274c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/get-policy.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 project = new sdk.Project(client); + +const result = await project.getPolicy({ + policyId: sdk.ProjectPolicyId.PasswordDictionary, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/get-variable.md b/examples/2.3.x/server-nodejs/examples/project/get-variable.md new file mode 100644 index 000000000..951e5d44b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/get-variable.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 project = new sdk.Project(client); + +const result = await project.getVariable({ + variableId: '<VARIABLE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/get.md b/examples/2.3.x/server-nodejs/examples/project/get.md new file mode 100644 index 000000000..5ee86b8a5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/get.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const project = new sdk.Project(client); + +const result = await project.get(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/list-email-templates.md b/examples/2.3.x/server-nodejs/examples/project/list-email-templates.md new file mode 100644 index 000000000..54c3cea21 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/list-email-templates.md @@ -0,0 +1,15 @@ +```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.listEmailTemplates({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/list-keys.md b/examples/2.3.x/server-nodejs/examples/project/list-keys.md new file mode 100644 index 000000000..e0890bd62 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/list-keys.md @@ -0,0 +1,15 @@ +```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.listKeys({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/list-mock-phones.md b/examples/2.3.x/server-nodejs/examples/project/list-mock-phones.md new file mode 100644 index 000000000..024b551b1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/list-mock-phones.md @@ -0,0 +1,15 @@ +```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.listMockPhones({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-nodejs/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..50adaa040 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,15 @@ +```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.listOAuth2Providers({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/list-platforms.md b/examples/2.3.x/server-nodejs/examples/project/list-platforms.md new file mode 100644 index 000000000..fc26d4e46 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/list-platforms.md @@ -0,0 +1,15 @@ +```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.listPlatforms({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/list-policies.md b/examples/2.3.x/server-nodejs/examples/project/list-policies.md new file mode 100644 index 000000000..971552b42 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/list-policies.md @@ -0,0 +1,15 @@ +```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.listPolicies({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/list-variables.md b/examples/2.3.x/server-nodejs/examples/project/list-variables.md new file mode 100644 index 000000000..6f5052503 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/list-variables.md @@ -0,0 +1,15 @@ +```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.listVariables({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-android-platform.md b/examples/2.3.x/server-nodejs/examples/project/update-android-platform.md new file mode 100644 index 000000000..ad0d3d28c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-android-platform.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.updateAndroidPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + applicationId: '<APPLICATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-apple-platform.md b/examples/2.3.x/server-nodejs/examples/project/update-apple-platform.md new file mode 100644 index 000000000..7170be871 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-apple-platform.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.updateApplePlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + bundleIdentifier: '<BUNDLE_IDENTIFIER>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-auth-method.md b/examples/2.3.x/server-nodejs/examples/project/update-auth-method.md new file mode 100644 index 000000000..1994e2cb7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-auth-method.md @@ -0,0 +1,15 @@ +```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.updateAuthMethod({ + methodId: sdk.ProjectAuthMethodId.EmailPassword, + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..61b96ceb8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-deny-aliased-email-policy.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 project = new sdk.Project(client); + +const result = await project.updateDenyAliasedEmailPolicy({ + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..c1b8c9fa5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-deny-corporate-email-policy.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 project = new sdk.Project(client); + +const result = await project.updateDenyCorporateEmailPolicy({ + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..b707e5a63 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-deny-disposable-email-policy.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 project = new sdk.Project(client); + +const result = await project.updateDenyDisposableEmailPolicy({ + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..07b5e68b3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-deny-free-email-policy.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 project = new sdk.Project(client); + +const result = await project.updateDenyFreeEmailPolicy({ + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-email-template.md b/examples/2.3.x/server-nodejs/examples/project/update-email-template.md new file mode 100644 index 000000000..ae1450414 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-email-template.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 project = new sdk.Project(client); + +const result = await project.updateEmailTemplate({ + templateId: sdk.ProjectEmailTemplateId.Verification, + locale: sdk.ProjectEmailTemplateLocale.Af, // optional + subject: '<SUBJECT>', // optional + message: '<MESSAGE>', // optional + senderName: '<SENDER_NAME>', // optional + senderEmail: 'email@example.com', // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional +}); +``` 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 new file mode 100644 index 000000000..0505a54f9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-key.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 project = new sdk.Project(client); + +const result = await project.updateKey({ + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [sdk.ProjectKeyScopes.ProjectRead], + 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 new file mode 100644 index 000000000..1d58ef1c8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-labels.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 project = new sdk.Project(client); + +const result = await project.updateLabels({ + labels: [], +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-linux-platform.md b/examples/2.3.x/server-nodejs/examples/project/update-linux-platform.md new file mode 100644 index 000000000..b1459527f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-linux-platform.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.updateLinuxPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageName: '<PACKAGE_NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..9f23b9a6f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,19 @@ +```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.updateMembershipPrivacyPolicy({ + userId: false, // optional + userEmail: false, // optional + userPhone: false, // optional + userName: false, // optional + userMFA: false, // optional + userAccessedAt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..1d9be8f2f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-mfa-factors-policy.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 project = new sdk.Project(client); + +const result = await project.updateMFAFactorsPolicy({ + totp: false, // optional + email: false, // optional + phone: false, // optional + custom: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-mock-phone.md b/examples/2.3.x/server-nodejs/examples/project/update-mock-phone.md new file mode 100644 index 000000000..1beb26834 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-mock-phone.md @@ -0,0 +1,15 @@ +```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.updateMockPhone({ + number: '+12065550100', + otp: '<OTP>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..a6ddbdb3a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-amazon.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.updateOAuth2Amazon({ + 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-apple.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..9319a90e1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-apple.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 project = new sdk.Project(client); + +const result = await project.updateOAuth2Apple({ + serviceId: '<SERVICE_ID>', // optional + keyId: '<KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + p8File: '<P8_FILE>', // optional + nativeClientIds: [], // optional + enabled: false, // optional + nativeEnabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..b48ccbba1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-appwrite.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.updateOAuth2Appwrite({ + 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-auth-0.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..d23fb2c5a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-auth-0.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 project = new sdk.Project(client); + +const result = await project.updateOAuth2Auth0({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..ab18b29d8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-authentik.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 project = new sdk.Project(client); + +const result = await project.updateOAuth2Authentik({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..e3be00818 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-autodesk.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.updateOAuth2Autodesk({ + 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-bitbucket.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..d521d53c5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-bitbucket.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.updateOAuth2Bitbucket({ + key: '<KEY>', // optional + secret: '<SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..2c1471742 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-bitly.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.updateOAuth2Bitly({ + 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-box.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..87a23c1cd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-box.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.updateOAuth2Box({ + 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-cloudflare.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..ae26fc9a0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-cloudflare.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.updateOAuth2Cloudflare({ + 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-dailymotion.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..16942aa21 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-dailymotion.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.updateOAuth2Dailymotion({ + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // 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 new file mode 100644 index 000000000..151b93c1a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-discord.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.updateOAuth2Discord({ + 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-disqus.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..296d1e99e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-disqus.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.updateOAuth2Disqus({ + publicKey: '<PUBLIC_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..913b3cf05 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-dropbox.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.updateOAuth2Dropbox({ + appKey: '<APP_KEY>', // optional + appSecret: '<APP_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..a0002893e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-etsy.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.updateOAuth2Etsy({ + keyString: '<KEY_STRING>', // optional + sharedSecret: '<SHARED_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..ed0b5316a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-facebook.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.updateOAuth2Facebook({ + appId: '<APP_ID>', // optional + appSecret: '<APP_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..a81d5b1dd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-figma.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.updateOAuth2Figma({ + 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-fusion-auth.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..fc33b5fd6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-fusion-auth.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 project = new sdk.Project(client); + +const result = await project.updateOAuth2FusionAuth({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // 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 new file mode 100644 index 000000000..0a7a757d1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-git-hub.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.updateOAuth2GitHub({ + 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-gitlab.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..273c1bc8e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-gitlab.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 project = new sdk.Project(client); + +const result = await project.updateOAuth2Gitlab({ + applicationId: '<APPLICATION_ID>', // optional + secret: '<SECRET>', // optional + endpoint: 'https://example.com', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..0325eefab --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-google.md @@ -0,0 +1,19 @@ +```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.updateOAuth2Google({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + prompt: [sdk.ProjectOAuth2GooglePrompt.None], // optional + nativeClientIds: [], // optional + enabled: false, // optional + nativeEnabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..ca0acbe64 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-hugging-face.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.updateOAuth2HuggingFace({ + 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-kakao.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..1a26ea6a7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kakao.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.updateOAuth2Kakao({ + 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-keycloak.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..542675b82 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,18 @@ +```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.updateOAuth2Keycloak({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + realmName: '<REALM_NAME>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..88bebd748 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kick.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.updateOAuth2Kick({ + 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-linkedin.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..4e08e846e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-linkedin.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.updateOAuth2Linkedin({ + clientId: '<CLIENT_ID>', // optional + primaryClientSecret: '<PRIMARY_CLIENT_SECRET>', // 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 new file mode 100644 index 000000000..29e186977 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-microsoft.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 project = new sdk.Project(client); + +const result = await project.updateOAuth2Microsoft({ + applicationId: '<APPLICATION_ID>', // optional + applicationSecret: '<APPLICATION_SECRET>', // optional + tenant: '<TENANT>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..84ccf7b5b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-notion.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.updateOAuth2Notion({ + oauthClientId: '<OAUTH_CLIENT_ID>', // optional + oauthClientSecret: '<OAUTH_CLIENT_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..6f345b232 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,22 @@ +```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.updateOAuth2Oidc({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + wellKnownURL: 'https://example.com', // optional + authorizationURL: 'https://example.com', // optional + tokenURL: 'https://example.com', // optional + userInfoURL: 'https://example.com', // optional + prompt: [sdk.ProjectOAuth2OidcPrompt.None], // optional + maxAge: 0, // 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 new file mode 100644 index 000000000..519f02654 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,18 @@ +```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.updateOAuth2Okta({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + domain: 'example.com', // optional + authorizationServerId: '<AUTHORIZATION_SERVER_ID>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..0abb7d7ed --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-paypal-sandbox.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.updateOAuth2PaypalSandbox({ + clientId: '<CLIENT_ID>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..1b989c82f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-paypal.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.updateOAuth2Paypal({ + clientId: '<CLIENT_ID>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..2da41643c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-podio.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.updateOAuth2Podio({ + 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-resend.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..d6c706891 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-resend.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.updateOAuth2Resend({ + 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-salesforce.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..642249f1d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-salesforce.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.updateOAuth2Salesforce({ + customerKey: '<CUSTOMER_KEY>', // optional + customerSecret: '<CUSTOMER_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..4dc93051a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-server.md @@ -0,0 +1,29 @@ +```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.updateOAuth2Server({ + enabled: false, + authorizationUrl: 'https://example.com', + scopes: [], // optional + authorizationDetailsTypes: [], // optional + accessTokenDuration: 60, // optional + refreshTokenDuration: 60, // optional + publicAccessTokenDuration: 60, // optional + publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional + confidentialPkce: false, // optional + verificationUrl: 'https://example.com', // optional + userCodeLength: 6, // optional + userCodeFormat: 'numeric', // optional + deviceCodeDuration: 60, // optional + defaultScopes: [], // optional + installationScopes: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..dd9b69689 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-slack.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.updateOAuth2Slack({ + 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-spotify.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..9144b697f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-spotify.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.updateOAuth2Spotify({ + 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-stripe.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..4621803ac --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-stripe.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.updateOAuth2Stripe({ + clientId: '<CLIENT_ID>', // optional + apiSecretKey: '<API_SECRET_KEY>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..dd7d2e8d9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-tik-tok.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.updateOAuth2TikTok({ + 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-tradeshift-sandbox.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..1be4443f4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-tradeshift-sandbox.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.updateOAuth2TradeshiftSandbox({ + oauth2ClientId: '<OAUTH2_CLIENT_ID>', // optional + oauth2ClientSecret: '<OAUTH2_CLIENT_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..0fe5c0fb1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-tradeshift.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.updateOAuth2Tradeshift({ + oauth2ClientId: '<OAUTH2_CLIENT_ID>', // optional + oauth2ClientSecret: '<OAUTH2_CLIENT_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..0cc817caf --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-twitch.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.updateOAuth2Twitch({ + 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-word-press.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..262989f1d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-word-press.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.updateOAuth2WordPress({ + 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-yahoo.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..28534ef44 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-yahoo.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.updateOAuth2Yahoo({ + 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-yandex.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..2618e1781 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-yandex.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.updateOAuth2Yandex({ + 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 new file mode 100644 index 000000000..8b623cd8e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-zoho.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.updateOAuth2Zoho({ + 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-zoom.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..76d432626 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-zoom.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.updateOAuth2Zoom({ + 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-2x.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..4e37f1346 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2x.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.updateOAuth2X({ + customerKey: '<CUSTOMER_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..859aa6eab --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-password-dictionary-policy.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 project = new sdk.Project(client); + +const result = await project.updatePasswordDictionaryPolicy({ + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-password-history-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..e7c018538 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-password-history-policy.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 project = new sdk.Project(client); + +const result = await project.updatePasswordHistoryPolicy({ + total: 1, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..b0669c53c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-password-personal-data-policy.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 project = new sdk.Project(client); + +const result = await project.updatePasswordPersonalDataPolicy({ + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..df89b3508 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-password-pwned-policy.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.updatePasswordPwnedPolicy({ + enabled: false, // optional + sessions: false, // optional + users: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..9fc9359f3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-password-strength-policy.md @@ -0,0 +1,18 @@ +```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.updatePasswordStrengthPolicy({ + min: 8, // optional + uppercase: false, // optional + lowercase: false, // optional + number: false, // optional + symbols: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-protocol.md b/examples/2.3.x/server-nodejs/examples/project/update-protocol.md new file mode 100644 index 000000000..89d117e04 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-protocol.md @@ -0,0 +1,15 @@ +```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.updateProtocol({ + protocolId: sdk.ProjectProtocolId.Rest, + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-service.md b/examples/2.3.x/server-nodejs/examples/project/update-service.md new file mode 100644 index 000000000..2140085c1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-service.md @@ -0,0 +1,15 @@ +```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.updateService({ + serviceId: sdk.ProjectServiceId.Account, + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..5a713438d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-session-alert-policy.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 project = new sdk.Project(client); + +const result = await project.updateSessionAlertPolicy({ + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..12544efe2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-session-duration-policy.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 project = new sdk.Project(client); + +const result = await project.updateSessionDurationPolicy({ + duration: 60, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..c4234ff8c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-session-invalidation-policy.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 project = new sdk.Project(client); + +const result = await project.updateSessionInvalidationPolicy({ + enabled: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..0c4c8a397 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-session-limit-policy.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 project = new sdk.Project(client); + +const result = await project.updateSessionLimitPolicy({ + total: 1, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-smtp.md b/examples/2.3.x/server-nodejs/examples/project/update-smtp.md new file mode 100644 index 000000000..869ab6073 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-smtp.md @@ -0,0 +1,23 @@ +```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.updateSMTP({ + host: 'example.com', // optional + port: 587, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + senderEmail: 'email@example.com', // optional + senderName: '<SENDER_NAME>', // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + secure: sdk.ProjectSMTPSecure.Tls, // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-nodejs/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..44451f8bf --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-user-limit-policy.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 project = new sdk.Project(client); + +const result = await project.updateUserLimitPolicy({ + total: 0, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-variable.md b/examples/2.3.x/server-nodejs/examples/project/update-variable.md new file mode 100644 index 000000000..b53da55d4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-variable.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 project = new sdk.Project(client); + +const result = await project.updateVariable({ + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-web-platform.md b/examples/2.3.x/server-nodejs/examples/project/update-web-platform.md new file mode 100644 index 000000000..8dcdca76a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-web-platform.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.updateWebPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-windows-platform.md b/examples/2.3.x/server-nodejs/examples/project/update-windows-platform.md new file mode 100644 index 000000000..0fc1f5372 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-windows-platform.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.updateWindowsPlatform({ + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/create-api-rule.md b/examples/2.3.x/server-nodejs/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..2d615fe99 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/create-api-rule.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 proxy = new sdk.Proxy(client); + +const result = await proxy.createAPIRule({ + domain: 'example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/create-function-rule.md b/examples/2.3.x/server-nodejs/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..67203df7a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/create-function-rule.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 proxy = new sdk.Proxy(client); + +const result = await proxy.createFunctionRule({ + domain: 'example.com', + functionId: '<FUNCTION_ID>', + branch: '<BRANCH>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/create-invalidation.md b/examples/2.3.x/server-nodejs/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..a2e460782 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/create-invalidation.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 proxy = new sdk.Proxy(client); + +const result = await proxy.createInvalidation({ + domain: 'example.com', + type: sdk.InvalidationType.Tag, + reference: '<REFERENCE>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-nodejs/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..28370b5e0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/create-redirect-rule.md @@ -0,0 +1,18 @@ +```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 proxy = new sdk.Proxy(client); + +const result = await proxy.createRedirectRule({ + domain: 'example.com', + url: 'https://example.com', + statusCode: sdk.StatusCode.MovedPermanently, + resourceId: '<RESOURCE_ID>', + resourceType: sdk.ProxyResourceType.Site, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/create-site-rule.md b/examples/2.3.x/server-nodejs/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..74b033f3d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/create-site-rule.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 proxy = new sdk.Proxy(client); + +const result = await proxy.createSiteRule({ + domain: 'example.com', + siteId: '<SITE_ID>', + branch: '<BRANCH>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/delete-rule.md b/examples/2.3.x/server-nodejs/examples/proxy/delete-rule.md new file mode 100644 index 000000000..b4c2c901c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/delete-rule.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 proxy = new sdk.Proxy(client); + +const result = await proxy.deleteRule({ + ruleId: '<RULE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/get-rule.md b/examples/2.3.x/server-nodejs/examples/proxy/get-rule.md new file mode 100644 index 000000000..26d05426e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/get-rule.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 proxy = new sdk.Proxy(client); + +const result = await proxy.getRule({ + ruleId: '<RULE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/list-rules.md b/examples/2.3.x/server-nodejs/examples/proxy/list-rules.md new file mode 100644 index 000000000..50e4adefc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/list-rules.md @@ -0,0 +1,15 @@ +```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 proxy = new sdk.Proxy(client); + +const result = await proxy.listRules({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/proxy/update-rule-status.md b/examples/2.3.x/server-nodejs/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..62bc0dac7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/proxy/update-rule-status.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 proxy = new sdk.Proxy(client); + +const result = await proxy.updateRuleStatus({ + ruleId: '<RULE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/create-deployment.md b/examples/2.3.x/server-nodejs/examples/sites/create-deployment.md new file mode 100644 index 000000000..a07dedee6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/create-deployment.md @@ -0,0 +1,20 @@ +```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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createDeployment({ + siteId: '<SITE_ID>', + code: InputFile.fromPath('/path/to/file', 'filename'), + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + activate: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-nodejs/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..84e57866e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.createDuplicateDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/create-template-deployment.md b/examples/2.3.x/server-nodejs/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..f78ae972f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/create-template-deployment.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 sites = new sdk.Sites(client); + +const result = await sites.createTemplateDeployment({ + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + type: sdk.TemplateReferenceType.Branch, + reference: '<REFERENCE>', + activate: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/create-variable.md b/examples/2.3.x/server-nodejs/examples/sites/create-variable.md new file mode 100644 index 000000000..b6acc61ed --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/create-variable.md @@ -0,0 +1,18 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.createVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-nodejs/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..5e0b68aac --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/create-vcs-deployment.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 sites = new sdk.Sites(client); + +const result = await sites.createVcsDeployment({ + siteId: '<SITE_ID>', + type: sdk.VCSReferenceType.Branch, + reference: '<REFERENCE>', + activate: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/create.md b/examples/2.3.x/server-nodejs/examples/sites/create.md new file mode 100644 index 000000000..686e7377e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/create.md @@ -0,0 +1,37 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.create({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: sdk.Framework.Analog, + buildRuntime: sdk.BuildRuntime.Node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + startCommand: '<START_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + adapter: sdk.Adapter.Static, // optional + installationId: '<INSTALLATION_ID>', // optional + fallbackFile: '<FALLBACK_FILE>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // optional + scopes: [sdk.ProjectKeyScopes.ProjectRead], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/delete-deployment.md b/examples/2.3.x/server-nodejs/examples/sites/delete-deployment.md new file mode 100644 index 000000000..cf508cc8d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.deleteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/delete-log.md b/examples/2.3.x/server-nodejs/examples/sites/delete-log.md new file mode 100644 index 000000000..e198a5aa1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.deleteLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/delete-variable.md b/examples/2.3.x/server-nodejs/examples/sites/delete-variable.md new file mode 100644 index 000000000..b47b7acdb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.deleteVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/delete.md b/examples/2.3.x/server-nodejs/examples/sites/delete.md new file mode 100644 index 000000000..45fdb0df6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/delete.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 sites = new sdk.Sites(client); + +const result = await sites.delete({ + siteId: '<SITE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/get-deployment-download.md b/examples/2.3.x/server-nodejs/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..0cd6d782b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/get-deployment-download.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 sites = new sdk.Sites(client); + +const result = await sites.getDeploymentDownload({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: sdk.DeploymentDownloadType.Source, // optional + token: '<TOKEN>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/get-deployment.md b/examples/2.3.x/server-nodejs/examples/sites/get-deployment.md new file mode 100644 index 000000000..b12fa8d10 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/get-deployment.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.getDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/get-log.md b/examples/2.3.x/server-nodejs/examples/sites/get-log.md new file mode 100644 index 000000000..74233128a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/get-log.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.getLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/get-variable.md b/examples/2.3.x/server-nodejs/examples/sites/get-variable.md new file mode 100644 index 000000000..1403faeae --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.getVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/get.md b/examples/2.3.x/server-nodejs/examples/sites/get.md new file mode 100644 index 000000000..e5a6ef690 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/get.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 sites = new sdk.Sites(client); + +const result = await sites.get({ + siteId: '<SITE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/list-deployments.md b/examples/2.3.x/server-nodejs/examples/sites/list-deployments.md new file mode 100644 index 000000000..dec9ad4b9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/list-deployments.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 sites = new sdk.Sites(client); + +const result = await sites.listDeployments({ + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: 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 new file mode 100644 index 000000000..9a417bfd0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/list-frameworks.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listFrameworks(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/list-logs.md b/examples/2.3.x/server-nodejs/examples/sites/list-logs.md new file mode 100644 index 000000000..967b3fe49 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/list-logs.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 sites = new sdk.Sites(client); + +const result = await sites.listLogs({ + siteId: '<SITE_ID>', + queries: [], // optional + 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 new file mode 100644 index 000000000..85a1a84fb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/list-specifications.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 sites = new sdk.Sites(client); + +const result = await sites.listSpecifications({ + type: 'runtimes', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/list-variables.md b/examples/2.3.x/server-nodejs/examples/sites/list-variables.md new file mode 100644 index 000000000..413399623 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/list-variables.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 sites = new sdk.Sites(client); + +const result = await sites.listVariables({ + siteId: '<SITE_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/list.md b/examples/2.3.x/server-nodejs/examples/sites/list.md new file mode 100644 index 000000000..4b00cd023 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/list.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 sites = new sdk.Sites(client); + +const result = await sites.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/update-deployment-status.md b/examples/2.3.x/server-nodejs/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..6a4680128 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.updateDeploymentStatus({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/update-site-deployment.md b/examples/2.3.x/server-nodejs/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..5b23fbe6c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.updateSiteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/update-variable.md b/examples/2.3.x/server-nodejs/examples/sites/update-variable.md new file mode 100644 index 000000000..d489347c1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.updateVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/update.md b/examples/2.3.x/server-nodejs/examples/sites/update.md new file mode 100644 index 000000000..932cf0026 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/sites/update.md @@ -0,0 +1,37 @@ +```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 sites = new sdk.Sites(client); + +const result = await sites.update({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: sdk.Framework.Analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + startCommand: '<START_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + buildRuntime: sdk.BuildRuntime.Node145, // optional + adapter: sdk.Adapter.Static, // optional + fallbackFile: '<FALLBACK_FILE>', // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // optional + scopes: [sdk.ProjectKeyScopes.ProjectRead], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/create-bucket.md b/examples/2.3.x/server-nodejs/examples/storage/create-bucket.md new file mode 100644 index 000000000..fe16a23bc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/create-bucket.md @@ -0,0 +1,24 @@ +```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 storage = new sdk.Storage(client); + +const result = await storage.createBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: sdk.Compression.None, // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/create-file.md b/examples/2.3.x/server-nodejs/examples/storage/create-file.md new file mode 100644 index 000000000..d69727e16 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/create-file.md @@ -0,0 +1,19 @@ +```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 storage = new sdk.Storage(client); + +const result = await storage.createFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile.fromPath('/path/to/file', 'filename'), + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + folder: 'photos/2026', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/delete-bucket.md b/examples/2.3.x/server-nodejs/examples/storage/delete-bucket.md new file mode 100644 index 000000000..50fb31977 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/delete-bucket.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 storage = new sdk.Storage(client); + +const result = await storage.deleteBucket({ + bucketId: '<BUCKET_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/delete-file.md b/examples/2.3.x/server-nodejs/examples/storage/delete-file.md new file mode 100644 index 000000000..da2765333 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +```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 storage = new sdk.Storage(client); + +const result = await storage.deleteFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/get-bucket.md b/examples/2.3.x/server-nodejs/examples/storage/get-bucket.md new file mode 100644 index 000000000..6608f90a5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/get-bucket.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 storage = new sdk.Storage(client); + +const result = await storage.getBucket({ + bucketId: '<BUCKET_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/get-file-download.md b/examples/2.3.x/server-nodejs/examples/storage/get-file-download.md new file mode 100644 index 000000000..6282691af --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/get-file-download.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 + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFileDownload({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/get-file-preview.md b/examples/2.3.x/server-nodejs/examples/storage/get-file-preview.md new file mode 100644 index 000000000..d3447ea2e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/get-file-preview.md @@ -0,0 +1,27 @@ +```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 storage = new sdk.Storage(client); + +const result = await storage.getFilePreview({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // optional + height: 0, // optional + gravity: sdk.ImageGravity.Auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: 'FFFFFF', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: 'FFFFFF', // optional + output: sdk.ImageFormat.Jpg, // optional + token: '<TOKEN>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/get-file-view.md b/examples/2.3.x/server-nodejs/examples/storage/get-file-view.md new file mode 100644 index 000000000..ad9a9d1ec --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/get-file-view.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 + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFileView({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/get-file.md b/examples/2.3.x/server-nodejs/examples/storage/get-file.md new file mode 100644 index 000000000..f1aca864b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/get-file.md @@ -0,0 +1,15 @@ +```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 storage = new sdk.Storage(client); + +const result = await storage.getFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/list-buckets.md b/examples/2.3.x/server-nodejs/examples/storage/list-buckets.md new file mode 100644 index 000000000..109ff9030 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/list-buckets.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 storage = new sdk.Storage(client); + +const result = await storage.listBuckets({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/list-files.md b/examples/2.3.x/server-nodejs/examples/storage/list-files.md new file mode 100644 index 000000000..476da76c1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/list-files.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 + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.listFiles({ + bucketId: '<BUCKET_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/update-bucket.md b/examples/2.3.x/server-nodejs/examples/storage/update-bucket.md new file mode 100644 index 000000000..baddf9cf7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/update-bucket.md @@ -0,0 +1,24 @@ +```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 storage = new sdk.Storage(client); + +const result = await storage.updateBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: sdk.Compression.None, // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/storage/update-file.md b/examples/2.3.x/server-nodejs/examples/storage/update-file.md new file mode 100644 index 000000000..e178b0875 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/storage/update-file.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 + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.updateFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..914c27a3b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-big-int-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createBigIntColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 1000000, // optional + xdefault: 0, // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..c8c89558f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: false, // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..71f02bbc7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-cutover.md @@ -0,0 +1,15 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createCutover({ + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..7c0d259bb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: '2020-10-15T06:38:00.000+00:00', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..957759870 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-email-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'email@example.com', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..d3b878a5c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-enum-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + elements: ['active', 'inactive'], + required: false, + xdefault: 'active', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-failover.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..b95a51919 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-failover.md @@ -0,0 +1,15 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..5a284bea1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-float-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + xdefault: 10.5, // optional + array: 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 new file mode 100644 index 000000000..2bd4818e2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-index.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + type: sdk.TablesDBIndexType.Key, + columns: [], + orders: [sdk.OrderBy.Asc], // optional + lengths: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..a7d37f771 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-integer-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + xdefault: 10, // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..b6be4f142 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-ip-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: '192.0.2.0', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..f23523ea1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-line-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createLineColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [1, 2], + [3, 4], + [5, 6], + ], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..04dde8ed9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-longtext-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createLongtextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..5c9ec6df7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-mediumtext-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createMediumtextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-migration.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..5b67e91fc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-migration.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createMigration({ + databaseId: '<DATABASE_ID>', + specification: 's-1vcpu-1gb', + autoCutover: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-operations.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..80ae63596 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-operations.md @@ -0,0 +1,25 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createOperations({ + transactionId: '<TRANSACTION_ID>', + operations: [ + { + action: 'create', + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..9783951d2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-point-column.md @@ -0,0 +1,18 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createPointColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [1, 2], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..71f14061b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,25 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createPolygonColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [ + [1, 2], + [3, 4], + [5, 6], + [1, 2], + ], + ], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..0f40996e8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-relationship-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: sdk.RelationshipType.OneToOne, + twoWay: false, // optional + key: '<KEY>', // optional + twoWayKey: '<TWO_WAY_KEY>', // optional + onDelete: sdk.RelationMutate.Cascade, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-row.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-row.md new file mode 100644 index 000000000..c1181b1a7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-row.md @@ -0,0 +1,25 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..af17e879d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-rows.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..217c050b8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-string-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + size: 1, + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-table.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-table.md new file mode 100644 index 000000000..cd898df0b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-table.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + rowSecurity: false, // optional + enabled: false, // optional + columns: [], // optional + indexes: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..4ac2fe7db --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-text-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createTextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..467ae167b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-transaction.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createTransaction({ + ttl: 60, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..ba037a62a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-url-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'https://example.com', // optional + array: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..3c3ae8abf --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-varchar-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createVarcharColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + size: 1, + required: false, + xdefault: 'Hello World', // optional + array: false, // optional + encrypt: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create.md new file mode 100644 index 000000000..c7b475943 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..86e3bec40 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/decrement-row-column.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 + .setSession(''); // The user session to authenticate with + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.decrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '<COLUMN>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/delete-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..abe3d7644 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.deleteColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/delete-index.md b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..88252ddc2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-index.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..9895352b4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-migration.md @@ -0,0 +1,15 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.deleteMigration({ + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/delete-row.md b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..7bf02f6b3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-row.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 + .setSession(''); // The user session to authenticate with + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.deleteRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + 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 new file mode 100644 index 000000000..ccc97155d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-rows.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.deleteRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/delete-table.md b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..519c16229 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-table.md @@ -0,0 +1,15 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.deleteTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..2b91f54c1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-transaction.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.deleteTransaction({ + transactionId: '<TRANSACTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/delete.md b/examples/2.3.x/server-nodejs/examples/tablesdb/delete.md new file mode 100644 index 000000000..f31f624d9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.delete({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get-column.md new file mode 100644 index 000000000..36159efe5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.getColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get-index.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get-index.md new file mode 100644 index 000000000..8a47a395a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get-index.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.getIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get-migration.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..6d55824f0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get-migration.md @@ -0,0 +1,15 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.getMigration({ + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..4d10f1dc8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get-replicas.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.getReplicas({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get-row.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get-row.md new file mode 100644 index 000000000..5847c699f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get-row.md @@ -0,0 +1,18 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.getRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get-status.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get-status.md new file mode 100644 index 000000000..3dfa7de0c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get-status.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.getStatus({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get-table.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get-table.md new file mode 100644 index 000000000..74c793855 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get-table.md @@ -0,0 +1,15 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.getTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..e14fe0407 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get-transaction.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.getTransaction({ + transactionId: '<TRANSACTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/get.md b/examples/2.3.x/server-nodejs/examples/tablesdb/get.md new file mode 100644 index 000000000..18187de8e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/get.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.get({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..626b84f57 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/increment-row-column.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 + .setSession(''); // The user session to authenticate with + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.incrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '<COLUMN>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list-columns.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..f14d02b7a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-columns.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.listColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..4d5f71bad --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-indexes.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.listIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..c8df807df --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-migrations.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.listMigrations({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list-operations.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..b2962782e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-operations.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list-rows.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..4a8c1b5e4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-rows.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.listRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..c5e11ea9b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.listSpecifications(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list-tables.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..f59133f3f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-tables.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.listTables({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // 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 new file mode 100644 index 000000000..51a3fc45e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-transactions.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.listTransactions({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list.md new file mode 100644 index 000000000..48e0e0187 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..51ba71ab9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-big-int-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateBigIntColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 0, + min: 0, // optional + max: 1000000, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..0f292d000 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: false, + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..162f2f72e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: '2020-10-15T06:38:00.000+00:00', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..4c4f1e8e8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-email-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'email@example.com', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..0b1bf8d64 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-enum-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + elements: ['active', 'inactive'], + required: false, + xdefault: 'active', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..ee1f80a80 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-float-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 10.5, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..16284f3e5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-integer-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 10, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..99b0a3c81 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-ip-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: '192.0.2.0', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..f1d3573db --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-line-column.md @@ -0,0 +1,23 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateLineColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [1, 2], + [3, 4], + [5, 6], + ], // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..e10359343 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateLongtextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..329215192 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateMediumtextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..d5ec47256 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-point-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updatePointColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [1, 2], // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..41b65bf34 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-polygon-column.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updatePolygonColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: [ + [ + [1, 2], + [3, 4], + [5, 6], + [1, 2], + ], + ], // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..88b17f10d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,18 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + onDelete: sdk.RelationMutate.Cascade, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-row.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-row.md new file mode 100644 index 000000000..c88e3ea77 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-row.md @@ -0,0 +1,25 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-rows.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..c8bb76aed --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-rows.md @@ -0,0 +1,24 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..368d97c1e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-string-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-table.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-table.md new file mode 100644 index 000000000..dd37e42d9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-table.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + rowSecurity: false, // optional + enabled: false, // optional + purge: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..4a132e667 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-text-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateTextColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..a955d48b3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-transaction.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateTransaction({ + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..72f285cfc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-url-column.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'https://example.com', + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..e2e7714e8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update-varchar-column.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.updateVarcharColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + xdefault: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/update.md b/examples/2.3.x/server-nodejs/examples/tablesdb/update.md new file mode 100644 index 000000000..2eb06473e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/update.md @@ -0,0 +1,19 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-nodejs/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..38257ec6f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/upsert-row.md @@ -0,0 +1,25 @@ +```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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.upsertRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, + }, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..fea4cbcbb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/upsert-rows.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 tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.upsertRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/create-installation.md b/examples/2.3.x/server-nodejs/examples/teams/create-installation.md new file mode 100644 index 000000000..30015e7a0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/create-installation.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.createInstallation({ + teamId: '<TEAM_ID>', + appId: '<APP_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // 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 new file mode 100644 index 000000000..3aa45e3b1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/create-membership.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.createMembership({ + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/create.md b/examples/2.3.x/server-nodejs/examples/teams/create.md new file mode 100644 index 000000000..a26fdd0ff --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/create.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.create({ + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/delete-installation.md b/examples/2.3.x/server-nodejs/examples/teams/delete-installation.md new file mode 100644 index 000000000..dd235d019 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/delete-membership.md b/examples/2.3.x/server-nodejs/examples/teams/delete-membership.md new file mode 100644 index 000000000..018a8da4c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +```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 teams = new sdk.Teams(client); + +const result = await teams.deleteMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/delete.md b/examples/2.3.x/server-nodejs/examples/teams/delete.md new file mode 100644 index 000000000..eb1c1dacc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/delete.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.delete({ + teamId: '<TEAM_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/get-installation.md b/examples/2.3.x/server-nodejs/examples/teams/get-installation.md new file mode 100644 index 000000000..694561368 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/get-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getInstallation({ + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/get-membership.md b/examples/2.3.x/server-nodejs/examples/teams/get-membership.md new file mode 100644 index 000000000..d0e27b6c1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +```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 teams = new sdk.Teams(client); + +const result = await teams.getMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/get-prefs.md b/examples/2.3.x/server-nodejs/examples/teams/get-prefs.md new file mode 100644 index 000000000..fc121f7c1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/get-prefs.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getPrefs({ + teamId: '<TEAM_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/get.md b/examples/2.3.x/server-nodejs/examples/teams/get.md new file mode 100644 index 000000000..bc6134448 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/get.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.get({ + teamId: '<TEAM_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/list-installations.md b/examples/2.3.x/server-nodejs/examples/teams/list-installations.md new file mode 100644 index 000000000..07d25e917 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/list-installations.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.listInstallations({ + teamId: '<TEAM_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/list-memberships.md b/examples/2.3.x/server-nodejs/examples/teams/list-memberships.md new file mode 100644 index 000000000..802695053 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/list-memberships.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.listMemberships({ + teamId: '<TEAM_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/list.md b/examples/2.3.x/server-nodejs/examples/teams/list.md new file mode 100644 index 000000000..3484c2957 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/list.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/update-installation.md b/examples/2.3.x/server-nodejs/examples/teams/update-installation.md new file mode 100644 index 000000000..b97c7c8bb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/update-installation.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateInstallation({ + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/update-membership-status.md b/examples/2.3.x/server-nodejs/examples/teams/update-membership-status.md new file mode 100644 index 000000000..51d222269 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/update-membership-status.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateMembershipStatus({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>', +}); +``` 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 new file mode 100644 index 000000000..7b6fe57f7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/update-membership.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 + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [], +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/update-name.md b/examples/2.3.x/server-nodejs/examples/teams/update-name.md new file mode 100644 index 000000000..e92a921cd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/update-name.md @@ -0,0 +1,15 @@ +```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 teams = new sdk.Teams(client); + +const result = await teams.updateName({ + teamId: '<TEAM_ID>', + name: '<NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/update-prefs.md b/examples/2.3.x/server-nodejs/examples/teams/update-prefs.md new file mode 100644 index 000000000..3f3e90d70 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +```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 teams = new sdk.Teams(client); + +const result = await teams.updatePrefs({ + teamId: '<TEAM_ID>', + prefs: {}, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tokens/create-file-token.md b/examples/2.3.x/server-nodejs/examples/tokens/create-file-token.md new file mode 100644 index 000000000..9161ed910 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tokens/create-file-token.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 tokens = new sdk.Tokens(client); + +const 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-nodejs/examples/tokens/delete.md b/examples/2.3.x/server-nodejs/examples/tokens/delete.md new file mode 100644 index 000000000..01d424b6b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tokens/delete.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 tokens = new sdk.Tokens(client); + +const result = await tokens.delete({ + tokenId: '<TOKEN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tokens/get.md b/examples/2.3.x/server-nodejs/examples/tokens/get.md new file mode 100644 index 000000000..bd06de120 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tokens/get.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 tokens = new sdk.Tokens(client); + +const result = await tokens.get({ + tokenId: '<TOKEN_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tokens/list.md b/examples/2.3.x/server-nodejs/examples/tokens/list.md new file mode 100644 index 000000000..cd8bd9ead --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tokens/list.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 tokens = new sdk.Tokens(client); + +const result = await tokens.list({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/tokens/update.md b/examples/2.3.x/server-nodejs/examples/tokens/update.md new file mode 100644 index 000000000..3f3ddde78 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/tokens/update.md @@ -0,0 +1,15 @@ +```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 tokens = new sdk.Tokens(client); + +const 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-nodejs/examples/users/create-argon-2-user.md b/examples/2.3.x/server-nodejs/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..7035e6d50 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-argon-2-user.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 users = new sdk.Users(client); + +const result = await users.createArgon2User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-nodejs/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..bbe9a74c7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-bcrypt-user.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 users = new sdk.Users(client); + +const result = await users.createBcryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-jwt.md b/examples/2.3.x/server-nodejs/examples/users/create-jwt.md new file mode 100644 index 000000000..cd0c49f0a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-jwt.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 users = new sdk.Users(client); + +const result = await users.createJWT({ + userId: '<USER_ID>', + sessionId: 'recent()', // optional + duration: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-md-5-user.md b/examples/2.3.x/server-nodejs/examples/users/create-md-5-user.md new file mode 100644 index 000000000..578ba7bcb --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-md-5-user.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 users = new sdk.Users(client); + +const result = await users.createMD5User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-nodejs/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..e16cd6454 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-mfa-recovery-codes.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 users = new sdk.Users(client); + +const result = await users.createMFARecoveryCodes({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-nodejs/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..b55fa4285 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-ph-pass-user.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 users = new sdk.Users(client); + +const result = await users.createPHPassUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-nodejs/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..f574a9ede --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-scrypt-modified-user.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 users = new sdk.Users(client); + +const result = await users.createScryptModifiedUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-scrypt-user.md b/examples/2.3.x/server-nodejs/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..e0d72dd57 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +```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 users = new sdk.Users(client); + +const result = await users.createScryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: 8, + passwordMemory: 65536, + passwordParallel: 1, + passwordLength: 64, + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-session.md b/examples/2.3.x/server-nodejs/examples/users/create-session.md new file mode 100644 index 000000000..2a06e1fa2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-session.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 users = new sdk.Users(client); + +const result = await users.createSession({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-sha-user.md b/examples/2.3.x/server-nodejs/examples/users/create-sha-user.md new file mode 100644 index 000000000..97a0e4b80 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-sha-user.md @@ -0,0 +1,18 @@ +```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 users = new sdk.Users(client); + +const result = await users.createSHAUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: sdk.PasswordHash.Sha1, // optional + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-target.md b/examples/2.3.x/server-nodejs/examples/users/create-target.md new file mode 100644 index 000000000..e8e1053d9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-target.md @@ -0,0 +1,19 @@ +```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 users = new sdk.Users(client); + +const result = await users.createTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: sdk.MessagingProviderType.Email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create-token.md b/examples/2.3.x/server-nodejs/examples/users/create-token.md new file mode 100644 index 000000000..6bfe51475 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create-token.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 users = new sdk.Users(client); + +const result = await users.createToken({ + userId: '<USER_ID>', + length: 4, // optional + expire: 60, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/create.md b/examples/2.3.x/server-nodejs/examples/users/create.md new file mode 100644 index 000000000..d552ca3c9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/create.md @@ -0,0 +1,18 @@ +```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 users = new sdk.Users(client); + +const result = await users.create({ + userId: '<USER_ID>', + email: 'email@example.com', // optional + phone: '+12065550100', // optional + password: 'password', // optional + name: '<NAME>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/delete-identity.md b/examples/2.3.x/server-nodejs/examples/users/delete-identity.md new file mode 100644 index 000000000..2cd96a13b --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/delete-identity.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 users = new sdk.Users(client); + +const result = await users.deleteIdentity({ + identityId: '<IDENTITY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-nodejs/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..5edacd777 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.deleteMFAAuthenticator({ + userId: '<USER_ID>', + type: sdk.AuthenticatorType.Totp, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/delete-session.md b/examples/2.3.x/server-nodejs/examples/users/delete-session.md new file mode 100644 index 000000000..dbc81ca9e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/delete-session.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.deleteSession({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/delete-sessions.md b/examples/2.3.x/server-nodejs/examples/users/delete-sessions.md new file mode 100644 index 000000000..abde055fd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/delete-sessions.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 users = new sdk.Users(client); + +const result = await users.deleteSessions({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/delete-target.md b/examples/2.3.x/server-nodejs/examples/users/delete-target.md new file mode 100644 index 000000000..1136fad55 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/delete-target.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.deleteTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/delete.md b/examples/2.3.x/server-nodejs/examples/users/delete.md new file mode 100644 index 000000000..326ac2a55 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/delete.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 users = new sdk.Users(client); + +const result = await users.delete({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-nodejs/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..a782f3494 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/get-mfa-challenge.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.getMFAChallenge({ + userId: '<USER_ID>', + challengeId: '<CHALLENGE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-nodejs/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..45bd7a969 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/get-mfa-recovery-codes.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 users = new sdk.Users(client); + +const result = await users.getMFARecoveryCodes({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/get-prefs.md b/examples/2.3.x/server-nodejs/examples/users/get-prefs.md new file mode 100644 index 000000000..ce4fa9e28 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/get-prefs.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 users = new sdk.Users(client); + +const result = await users.getPrefs({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/get-target.md b/examples/2.3.x/server-nodejs/examples/users/get-target.md new file mode 100644 index 000000000..33a86401e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/get-target.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.getTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/get.md b/examples/2.3.x/server-nodejs/examples/users/get.md new file mode 100644 index 000000000..fa2bd0e9a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/get.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 users = new sdk.Users(client); + +const result = await users.get({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/list-identities.md b/examples/2.3.x/server-nodejs/examples/users/list-identities.md new file mode 100644 index 000000000..f2ecf2871 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/list-identities.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 users = new sdk.Users(client); + +const result = await users.listIdentities({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/list-memberships.md b/examples/2.3.x/server-nodejs/examples/users/list-memberships.md new file mode 100644 index 000000000..b8cdcdae6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/list-memberships.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 users = new sdk.Users(client); + +const result = await users.listMemberships({ + userId: '<USER_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/list-mfa-factors.md b/examples/2.3.x/server-nodejs/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..9685721f4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/list-mfa-factors.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 users = new sdk.Users(client); + +const result = await users.listMFAFactors({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/list-sessions.md b/examples/2.3.x/server-nodejs/examples/users/list-sessions.md new file mode 100644 index 000000000..fb163e250 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/list-sessions.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.listSessions({ + userId: '<USER_ID>', + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/list-targets.md b/examples/2.3.x/server-nodejs/examples/users/list-targets.md new file mode 100644 index 000000000..9ec0bb0f3 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/list-targets.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 users = new sdk.Users(client); + +const result = await users.listTargets({ + userId: '<USER_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/list.md b/examples/2.3.x/server-nodejs/examples/users/list.md new file mode 100644 index 000000000..04b3ead4e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/list.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 users = new sdk.Users(client); + +const result = await users.list({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-email-verification.md b/examples/2.3.x/server-nodejs/examples/users/update-email-verification.md new file mode 100644 index 000000000..2fcca5df2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-email-verification.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updateEmailVerification({ + userId: '<USER_ID>', + emailVerification: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-email.md b/examples/2.3.x/server-nodejs/examples/users/update-email.md new file mode 100644 index 000000000..f465f32da --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-email.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updateEmail({ + userId: '<USER_ID>', + email: 'email@example.com', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-impersonator.md b/examples/2.3.x/server-nodejs/examples/users/update-impersonator.md new file mode 100644 index 000000000..7fe71a37a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-impersonator.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updateImpersonator({ + userId: '<USER_ID>', + impersonator: false, +}); +``` 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 new file mode 100644 index 000000000..e74ec102d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-labels.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updateLabels({ + userId: '<USER_ID>', + labels: [], +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-nodejs/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..5f5f3c408 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-mfa-recovery-codes.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 users = new sdk.Users(client); + +const result = await users.updateMFARecoveryCodes({ + userId: '<USER_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-mfa.md b/examples/2.3.x/server-nodejs/examples/users/update-mfa.md new file mode 100644 index 000000000..e6dc0ec20 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-mfa.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updateMFA({ + userId: '<USER_ID>', + mfa: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-name.md b/examples/2.3.x/server-nodejs/examples/users/update-name.md new file mode 100644 index 000000000..16816e3a7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-name.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updateName({ + userId: '<USER_ID>', + name: '<NAME>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-password.md b/examples/2.3.x/server-nodejs/examples/users/update-password.md new file mode 100644 index 000000000..fe8f33aa6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-password.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updatePassword({ + userId: '<USER_ID>', + password: 'password', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-phone-verification.md b/examples/2.3.x/server-nodejs/examples/users/update-phone-verification.md new file mode 100644 index 000000000..b850d97fe --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-phone-verification.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updatePhoneVerification({ + userId: '<USER_ID>', + phoneVerification: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-phone.md b/examples/2.3.x/server-nodejs/examples/users/update-phone.md new file mode 100644 index 000000000..e29f79604 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-phone.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updatePhone({ + userId: '<USER_ID>', + number: '+12065550100', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-prefs.md b/examples/2.3.x/server-nodejs/examples/users/update-prefs.md new file mode 100644 index 000000000..c041e37c4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updatePrefs({ + userId: '<USER_ID>', + prefs: {}, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-status.md b/examples/2.3.x/server-nodejs/examples/users/update-status.md new file mode 100644 index 000000000..87c273c80 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-status.md @@ -0,0 +1,15 @@ +```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 users = new sdk.Users(client); + +const result = await users.updateStatus({ + userId: '<USER_ID>', + status: false, +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-target.md b/examples/2.3.x/server-nodejs/examples/users/update-target.md new file mode 100644 index 000000000..f6ab16246 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/users/update-target.md @@ -0,0 +1,18 @@ +```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 users = new sdk.Users(client); + +const result = await users.updateTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // optional + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>', // optional +}); +``` 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 new file mode 100644 index 000000000..d7ccf5359 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-collection.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, + 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-document.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..35778def1 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-document.md @@ -0,0 +1,24 @@ +```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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + key: 'value', + }, + }, + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..bcaedd48c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-documents.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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..1fe5b24e6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-failover.md @@ -0,0 +1,15 @@ +```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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createFailover({ + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_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 new file mode 100644 index 000000000..4b092220a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-index.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: sdk.VectorsDBIndexType.HnswEuclidean, + attributes: [], + 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 new file mode 100644 index 000000000..3804aeed9 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createOperations({ + transactionId: '<TRANSACTION_ID>', + operations: [ + { + action: 'create', + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-query.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..cf98dd23f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-query.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createQuery({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..1e4fd6d41 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createTransaction({ + ttl: 60, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/create.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create.md new file mode 100644 index 000000000..8fbd31dae --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create.md @@ -0,0 +1,19 @@ +```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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..21aa353d6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-collection.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..c2f27c3b4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-document.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..a3905b374 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-documents.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..2362e3fce --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-index.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..4871cf84a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteTransaction({ + transactionId: '<TRANSACTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/delete.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete.md new file mode 100644 index 000000000..486889a51 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete.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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.delete({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..147cfa8b5 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-collection.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/get-document.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..a414c9cd8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-document.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/get-index.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..9b7abb040 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-index.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..7ce16fa65 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-replicas.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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getReplicas({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/get-status.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..cb2b35d56 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-status.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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getStatus({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..68437bc00 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/get-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getTransaction({ + transactionId: '<TRANSACTION_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/get.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/get.md new file mode 100644 index 000000000..3ea49d65a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/get.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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.get({ + databaseId: '<DATABASE_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..e3a509eb0 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-collections.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listCollections({ + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..c2b4b6edf --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-documents.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..b0c5b8e22 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-indexes.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..a28e8f4dd --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-operations.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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listOperations({ + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..1c281fa47 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-specifications.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 + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listSpecifications(); +``` 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 new file mode 100644 index 000000000..3dfb27329 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-transactions.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listTransactions({ + queries: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/list.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/list.md new file mode 100644 index 000000000..55418e838 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/list.md @@ -0,0 +1,15 @@ +```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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.list({ + 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 new file mode 100644 index 000000000..4f5465429 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-collection.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.updateCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, // 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/update-document.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..2c9fe6508 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-document.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.updateDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..70278246d --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-documents.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..5543dfce6 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-transaction.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.updateTransaction({ + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/update.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/update.md new file mode 100644 index 000000000..09108e70e --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/update.md @@ -0,0 +1,19 @@ +```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 vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..26ec74e61 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/upsert-document.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.upsertDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '<TRANSACTION_ID>', // 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 new file mode 100644 index 000000000..38079b970 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + 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 new file mode 100644 index 000000000..21ecaccc2 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/webhooks/create.md @@ -0,0 +1,22 @@ +```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 webhooks = new sdk.Webhooks(client); + +const result = await webhooks.create({ + webhookId: '<WEBHOOK_ID>', + url: 'https://example.com/webhook', + name: '<NAME>', + events: [], + enabled: false, // optional + tls: false, // optional + authUsername: '<AUTH_USERNAME>', // optional + authPassword: 'password', // optional + secret: '<SECRET>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/webhooks/delete.md b/examples/2.3.x/server-nodejs/examples/webhooks/delete.md new file mode 100644 index 000000000..ecdfcd080 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/webhooks/delete.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 webhooks = new sdk.Webhooks(client); + +const result = await webhooks.delete({ + webhookId: '<WEBHOOK_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/webhooks/get.md b/examples/2.3.x/server-nodejs/examples/webhooks/get.md new file mode 100644 index 000000000..02c4eac3a --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/webhooks/get.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 webhooks = new sdk.Webhooks(client); + +const result = await webhooks.get({ + webhookId: '<WEBHOOK_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/webhooks/list.md b/examples/2.3.x/server-nodejs/examples/webhooks/list.md new file mode 100644 index 000000000..cab8f126f --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/webhooks/list.md @@ -0,0 +1,15 @@ +```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 webhooks = new sdk.Webhooks(client); + +const result = await webhooks.list({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/webhooks/update-secret.md b/examples/2.3.x/server-nodejs/examples/webhooks/update-secret.md new file mode 100644 index 000000000..73a41aabc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/webhooks/update-secret.md @@ -0,0 +1,15 @@ +```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 webhooks = new sdk.Webhooks(client); + +const result = await webhooks.updateSecret({ + webhookId: '<WEBHOOK_ID>', + secret: '<SECRET>', // 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 new file mode 100644 index 000000000..25362bf14 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/webhooks/update.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 webhooks = new sdk.Webhooks(client); + +const result = await webhooks.update({ + webhookId: '<WEBHOOK_ID>', + name: '<NAME>', + url: 'https://example.com/webhook', + events: [], + enabled: false, // optional + tls: false, // optional + authUsername: '<AUTH_USERNAME>', // optional + authPassword: 'password', // optional +}); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-anonymous-session.md b/examples/2.3.x/server-php/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..90283cf33 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-anonymous-session.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createAnonymousSession(); +``` 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 new file mode 100644 index 000000000..b462ef807 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-email-password-session.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createEmailPasswordSession( + email: 'email@example.com', + password: 'password' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-email-token.md b/examples/2.3.x/server-php/examples/account/create-email-token.md new file mode 100644 index 000000000..1494943f2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-email-token.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createEmailToken( + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-php/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..c70bbaf22 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-email-verification-otp.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createEmailVerificationOTP( + phrase: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-email-verification.md b/examples/2.3.x/server-php/examples/account/create-email-verification.md new file mode 100644 index 000000000..de0eab932 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-email-verification.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createEmailVerification( + url: 'https://example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-id-token-session.md b/examples/2.3.x/server-php/examples/account/create-id-token-session.md new file mode 100644 index 000000000..c4873827f --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-id-token-session.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\IdTokenProvider; + +$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 + +$account = new Account($client); + +$result = $account->createIdTokenSession( + provider: IdTokenProvider::APPLE(), + idToken: '<ID_TOKEN>', + nonce: '<NONCE>', // optional + accessToken: '<ACCESS_TOKEN>', // optional + accessTokenExpiry: 0, // optional + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-magic-url-token.md b/examples/2.3.x/server-php/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..9c31a5138 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-magic-url-token.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createMagicURLToken( + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-php/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..75d848d0d --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-mfa-authenticator.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$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 + +$account = new Account($client); + +$result = $account->createMFAAuthenticator( + type: AuthenticatorType::TOTP() +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-php/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..3b3700309 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-mfa-challenge.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticationFactor; + +$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 + +$account = new Account($client); + +$result = $account->createMFAChallenge( + factor: AuthenticationFactor::EMAIL() +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-php/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..655663f7f --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-php/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..db4dc650a --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-o-auth-2-token.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\OAuthProvider; + +$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 + +$account = new Account($client); + +$result = $account->createOAuth2Token( + provider: OAuthProvider::AMAZON(), + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-phone-token.md b/examples/2.3.x/server-php/examples/account/create-phone-token.md new file mode 100644 index 000000000..bf56212ef --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-phone-token.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createPhoneToken( + userId: '<USER_ID>', + phone: '+12065550100' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-phone-verification.md b/examples/2.3.x/server-php/examples/account/create-phone-verification.md new file mode 100644 index 000000000..4cedfba48 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-phone-verification.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createPhoneVerification(); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-recovery-otp.md b/examples/2.3.x/server-php/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..1da306f5d --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-recovery-otp.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createRecoveryOTP( + email: 'email@example.com', + phrase: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-recovery.md b/examples/2.3.x/server-php/examples/account/create-recovery.md new file mode 100644 index 000000000..24d308c2c --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-recovery.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createRecovery( + email: 'email@example.com', + url: 'https://example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-session.md b/examples/2.3.x/server-php/examples/account/create-session.md new file mode 100644 index 000000000..d40041f74 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-session.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create-verification.md b/examples/2.3.x/server-php/examples/account/create-verification.md new file mode 100644 index 000000000..72fa5a9a5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create-verification.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->createVerification( + url: 'https://example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/create.md b/examples/2.3.x/server-php/examples/account/create.md new file mode 100644 index 000000000..b4f8c1c69 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/create.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->create( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/delete-consent-token.md b/examples/2.3.x/server-php/examples/account/delete-consent-token.md new file mode 100644 index 000000000..8db797b48 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/delete-consent-token.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->deleteConsentToken( + consentId: '<CONSENT_ID>', + tokenId: '<TOKEN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/delete-consent.md b/examples/2.3.x/server-php/examples/account/delete-consent.md new file mode 100644 index 000000000..e7457d496 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/delete-consent.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->deleteConsent( + consentId: '<CONSENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/delete-identity.md b/examples/2.3.x/server-php/examples/account/delete-identity.md new file mode 100644 index 000000000..15f7fa5fc --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/delete-identity.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->deleteIdentity( + identityId: '<IDENTITY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-php/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..dd434416d --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$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 + +$account = new Account($client); + +$result = $account->deleteMFAAuthenticator( + type: AuthenticatorType::TOTP() +); +``` diff --git a/examples/2.3.x/server-php/examples/account/delete-session.md b/examples/2.3.x/server-php/examples/account/delete-session.md new file mode 100644 index 000000000..498b0c47c --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/delete-session.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->deleteSession( + sessionId: '<SESSION_ID>' +); +``` 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 new file mode 100644 index 000000000..7886fabf7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/delete-sessions.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->deleteSessions(); +``` diff --git a/examples/2.3.x/server-php/examples/account/get-consent-token.md b/examples/2.3.x/server-php/examples/account/get-consent-token.md new file mode 100644 index 000000000..4667c5c94 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/get-consent-token.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->getConsentToken( + consentId: '<CONSENT_ID>', + tokenId: '<TOKEN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/get-consent.md b/examples/2.3.x/server-php/examples/account/get-consent.md new file mode 100644 index 000000000..2b22510ee --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/get-consent.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->getConsent( + consentId: '<CONSENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-php/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..9a99dac2c --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->getMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-php/examples/account/get-prefs.md b/examples/2.3.x/server-php/examples/account/get-prefs.md new file mode 100644 index 000000000..e1259176d --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/get-prefs.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->getPrefs(); +``` diff --git a/examples/2.3.x/server-php/examples/account/get-session.md b/examples/2.3.x/server-php/examples/account/get-session.md new file mode 100644 index 000000000..15a99f2b9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/get-session.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->getSession( + sessionId: '<SESSION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/get.md b/examples/2.3.x/server-php/examples/account/get.md new file mode 100644 index 000000000..d1fb255bc --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/get.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->get(); +``` diff --git a/examples/2.3.x/server-php/examples/account/list-consent-tokens.md b/examples/2.3.x/server-php/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..848249470 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/list-consent-tokens.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->listConsentTokens( + consentId: '<CONSENT_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/list-consents.md b/examples/2.3.x/server-php/examples/account/list-consents.md new file mode 100644 index 000000000..9b2255ef2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/list-consents.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->listConsents( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/list-identities.md b/examples/2.3.x/server-php/examples/account/list-identities.md new file mode 100644 index 000000000..69c8bbbb4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/list-identities.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->listIdentities( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/list-mfa-factors.md b/examples/2.3.x/server-php/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..96b6021bf --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/list-mfa-factors.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->listMFAFactors(); +``` 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 new file mode 100644 index 000000000..9c42f8ca8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/list-sessions.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->listSessions(); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-php/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..f70bd5928 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-email-verification-otp.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateEmailVerificationOTP( + userId: '<USER_ID>', + secret: '<SECRET>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-email-verification.md b/examples/2.3.x/server-php/examples/account/update-email-verification.md new file mode 100644 index 000000000..1c363e978 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-email-verification.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateEmailVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-email.md b/examples/2.3.x/server-php/examples/account/update-email.md new file mode 100644 index 000000000..fb2079130 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-email.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateEmail( + email: 'email@example.com', + password: 'password' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-magic-url-session.md b/examples/2.3.x/server-php/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..3fd0179fa --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-magic-url-session.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateMagicURLSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-php/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..d02e79ce3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-mfa-authenticator.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$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 + +$account = new Account($client); + +$result = $account->updateMFAAuthenticator( + type: AuthenticatorType::TOTP(), + otp: '<OTP>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-php/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..bc829a6ed --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-mfa-challenge.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateMFAChallenge( + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-php/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..ee16a9c9d --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateMFARecoveryCodes(); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-mfa.md b/examples/2.3.x/server-php/examples/account/update-mfa.md new file mode 100644 index 000000000..2d1f35afd --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-mfa.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateMFA( + mfa: false +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-name.md b/examples/2.3.x/server-php/examples/account/update-name.md new file mode 100644 index 000000000..9ebb43814 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-name.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateName( + name: '<NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-password.md b/examples/2.3.x/server-php/examples/account/update-password.md new file mode 100644 index 000000000..c9e0fc553 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-password.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updatePassword( + password: 'password', + oldPassword: 'password' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-phone-session.md b/examples/2.3.x/server-php/examples/account/update-phone-session.md new file mode 100644 index 000000000..f547ca978 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-phone-session.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updatePhoneSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-phone-verification.md b/examples/2.3.x/server-php/examples/account/update-phone-verification.md new file mode 100644 index 000000000..cbc6790c7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-phone-verification.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updatePhoneVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-phone.md b/examples/2.3.x/server-php/examples/account/update-phone.md new file mode 100644 index 000000000..b9fe2bd3c --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-phone.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updatePhone( + phone: '+12065550100', + password: 'password' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-prefs.md b/examples/2.3.x/server-php/examples/account/update-prefs.md new file mode 100644 index 000000000..9176756be --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-prefs.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updatePrefs( + prefs: [ + 'language' => 'en', + 'timezone' => 'UTC', + 'darkTheme' => true + ] +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-recovery-otp.md b/examples/2.3.x/server-php/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..bd3f2af3f --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-recovery-otp.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateRecoveryOTP( + userId: '<USER_ID>', + secret: '<SECRET>', + password: 'password' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-recovery.md b/examples/2.3.x/server-php/examples/account/update-recovery.md new file mode 100644 index 000000000..eb540c39a --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-recovery.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateRecovery( + userId: '<USER_ID>', + secret: '<SECRET>', + password: 'password' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-session.md b/examples/2.3.x/server-php/examples/account/update-session.md new file mode 100644 index 000000000..b98cb3bd1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-session.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateSession( + sessionId: '<SESSION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-status.md b/examples/2.3.x/server-php/examples/account/update-status.md new file mode 100644 index 000000000..7f0088a63 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-status.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateStatus(); +``` diff --git a/examples/2.3.x/server-php/examples/account/update-verification.md b/examples/2.3.x/server-php/examples/account/update-verification.md new file mode 100644 index 000000000..a84126d41 --- /dev/null +++ b/examples/2.3.x/server-php/examples/account/update-verification.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$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 + +$account = new Account($client); + +$result = $account->updateVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); +``` diff --git a/examples/2.3.x/server-php/examples/activities/get-event.md b/examples/2.3.x/server-php/examples/activities/get-event.md new file mode 100644 index 000000000..d4b7f3f52 --- /dev/null +++ b/examples/2.3.x/server-php/examples/activities/get-event.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Activities; + +$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 + +$activities = new Activities($client); + +$result = $activities->getEvent( + eventId: '<EVENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/activities/list-events.md b/examples/2.3.x/server-php/examples/activities/list-events.md new file mode 100644 index 000000000..3ffec8773 --- /dev/null +++ b/examples/2.3.x/server-php/examples/activities/list-events.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Activities; + +$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 + +$activities = new Activities($client); + +$result = $activities->listEvents( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/advisor/delete-report.md b/examples/2.3.x/server-php/examples/advisor/delete-report.md new file mode 100644 index 000000000..41d2e336c --- /dev/null +++ b/examples/2.3.x/server-php/examples/advisor/delete-report.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Advisor; + +$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 + +$advisor = new Advisor($client); + +$result = $advisor->deleteReport( + reportId: '<REPORT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/advisor/get-insight.md b/examples/2.3.x/server-php/examples/advisor/get-insight.md new file mode 100644 index 000000000..812ee9bcf --- /dev/null +++ b/examples/2.3.x/server-php/examples/advisor/get-insight.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Advisor; + +$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 + +$advisor = new Advisor($client); + +$result = $advisor->getInsight( + reportId: '<REPORT_ID>', + insightId: '<INSIGHT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/advisor/get-report.md b/examples/2.3.x/server-php/examples/advisor/get-report.md new file mode 100644 index 000000000..1379419c2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/advisor/get-report.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Advisor; + +$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 + +$advisor = new Advisor($client); + +$result = $advisor->getReport( + reportId: '<REPORT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/advisor/list-insights.md b/examples/2.3.x/server-php/examples/advisor/list-insights.md new file mode 100644 index 000000000..d475153cb --- /dev/null +++ b/examples/2.3.x/server-php/examples/advisor/list-insights.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Advisor; + +$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 + +$advisor = new Advisor($client); + +$result = $advisor->listInsights( + reportId: '<REPORT_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/advisor/list-reports.md b/examples/2.3.x/server-php/examples/advisor/list-reports.md new file mode 100644 index 000000000..9dc55caeb --- /dev/null +++ b/examples/2.3.x/server-php/examples/advisor/list-reports.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Advisor; + +$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 + +$advisor = new Advisor($client); + +$result = $advisor->listReports( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/create-installation-token.md b/examples/2.3.x/server-php/examples/apps/create-installation-token.md new file mode 100644 index 000000000..1e8323e11 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/create-installation-token.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->createInstallationToken( + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/create-key.md b/examples/2.3.x/server-php/examples/apps/create-key.md new file mode 100644 index 000000000..0f7d69b4b --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/create-key.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->createKey( + appId: '<APP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/create-secret.md b/examples/2.3.x/server-php/examples/apps/create-secret.md new file mode 100644 index 000000000..59336de44 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/create-secret.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->createSecret( + appId: '<APP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/create.md b/examples/2.3.x/server-php/examples/apps/create.md new file mode 100644 index 000000000..459786ed8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/create.md @@ -0,0 +1,35 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->create( + appId: '<APP_ID>', + name: '<NAME>', + redirectUris: [], + description: '<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: '<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: '<TEAM_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/delete-installation.md b/examples/2.3.x/server-php/examples/apps/delete-installation.md new file mode 100644 index 000000000..e6c89fdad --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/delete-installation.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->deleteInstallation( + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/delete-key.md b/examples/2.3.x/server-php/examples/apps/delete-key.md new file mode 100644 index 000000000..a178c1d7e --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/delete-key.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->deleteKey( + appId: '<APP_ID>', + keyId: '<KEY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/delete-secret.md b/examples/2.3.x/server-php/examples/apps/delete-secret.md new file mode 100644 index 000000000..947efae1f --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/delete-secret.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->deleteSecret( + appId: '<APP_ID>', + secretId: '<SECRET_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/delete-tokens.md b/examples/2.3.x/server-php/examples/apps/delete-tokens.md new file mode 100644 index 000000000..bca4ae85f --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/delete-tokens.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->deleteTokens( + appId: '<APP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/delete.md b/examples/2.3.x/server-php/examples/apps/delete.md new file mode 100644 index 000000000..b0d4c61ea --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->delete( + appId: '<APP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/get-installation.md b/examples/2.3.x/server-php/examples/apps/get-installation.md new file mode 100644 index 000000000..75ab80c36 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/get-installation.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->getInstallation( + appId: '<APP_ID>', + installationId: '<INSTALLATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/get-key.md b/examples/2.3.x/server-php/examples/apps/get-key.md new file mode 100644 index 000000000..a45ee7b70 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/get-key.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->getKey( + appId: '<APP_ID>', + keyId: '<KEY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/get-secret.md b/examples/2.3.x/server-php/examples/apps/get-secret.md new file mode 100644 index 000000000..c55906ace --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/get-secret.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->getSecret( + appId: '<APP_ID>', + secretId: '<SECRET_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/get.md b/examples/2.3.x/server-php/examples/apps/get.md new file mode 100644 index 000000000..1324923d1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->get( + appId: '<APP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-php/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..f60f6c51f --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/list-installation-scopes.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->listInstallationScopes(); +``` diff --git a/examples/2.3.x/server-php/examples/apps/list-installations.md b/examples/2.3.x/server-php/examples/apps/list-installations.md new file mode 100644 index 000000000..08dd109ff --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/list-installations.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->listInstallations( + appId: '<APP_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/list-keys.md b/examples/2.3.x/server-php/examples/apps/list-keys.md new file mode 100644 index 000000000..33a9fdf9c --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/list-keys.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->listKeys( + appId: '<APP_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-php/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..4bcfa44b6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->listOAuth2Scopes(); +``` diff --git a/examples/2.3.x/server-php/examples/apps/list-secrets.md b/examples/2.3.x/server-php/examples/apps/list-secrets.md new file mode 100644 index 000000000..bbfeac402 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/list-secrets.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->listSecrets( + appId: '<APP_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/list.md b/examples/2.3.x/server-php/examples/apps/list.md new file mode 100644 index 000000000..e92a0fdba --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/list.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->list( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/update-labels.md b/examples/2.3.x/server-php/examples/apps/update-labels.md new file mode 100644 index 000000000..8ab41d2bc --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/update-labels.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->updateLabels( + appId: '<APP_ID>', + labels: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/update-team.md b/examples/2.3.x/server-php/examples/apps/update-team.md new file mode 100644 index 000000000..385809792 --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/update-team.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->updateTeam( + appId: '<APP_ID>', + teamId: '<TEAM_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/apps/update.md b/examples/2.3.x/server-php/examples/apps/update.md new file mode 100644 index 000000000..5d72dc0ad --- /dev/null +++ b/examples/2.3.x/server-php/examples/apps/update.md @@ -0,0 +1,36 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Apps; + +$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 + +$apps = new Apps($client); + +$result = $apps->update( + appId: '<APP_ID>', + name: '<NAME>', + description: '<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: '<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/server-php/examples/avatars/get-browser.md b/examples/2.3.x/server-php/examples/avatars/get-browser.md new file mode 100644 index 000000000..ccf98858c --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-browser.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\Browser; + +$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->getBrowser( + code: Browser::AVANTBROWSER(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/get-credit-card.md b/examples/2.3.x/server-php/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..ff4fd2b30 --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-credit-card.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\CreditCard; + +$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->getCreditCard( + code: CreditCard::AMERICANEXPRESS(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/get-favicon.md b/examples/2.3.x/server-php/examples/avatars/get-favicon.md new file mode 100644 index 000000000..346f46d1f --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-favicon.md @@ -0,0 +1,17 @@ +```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->getFavicon( + url: 'https://example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/get-flag.md b/examples/2.3.x/server-php/examples/avatars/get-flag.md new file mode 100644 index 000000000..e2b455b33 --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-flag.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\Flag; + +$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->getFlag( + code: Flag::AFGHANISTAN(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/get-image.md b/examples/2.3.x/server-php/examples/avatars/get-image.md new file mode 100644 index 000000000..2ca260193 --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-image.md @@ -0,0 +1,19 @@ +```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->getImage( + url: 'https://example.com', + width: 0, // optional + height: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/get-initials.md b/examples/2.3.x/server-php/examples/avatars/get-initials.md new file mode 100644 index 000000000..67681d074 --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-initials.md @@ -0,0 +1,20 @@ +```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->getInitials( + name: '<NAME>', // optional + width: 0, // optional + height: 0, // optional + background: 'FFFFFF' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/get-photo.md b/examples/2.3.x/server-php/examples/avatars/get-photo.md new file mode 100644 index 000000000..5f5899d64 --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-photo.md @@ -0,0 +1,24 @@ +```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->getPhoto( + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: 'png', // optional + rating: 'g', // optional + userId: 'current()', // optional + emailHash: '<EMAIL_HASH>', // optional + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/get-qr.md b/examples/2.3.x/server-php/examples/avatars/get-qr.md new file mode 100644 index 000000000..ec6e3441a --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-qr.md @@ -0,0 +1,20 @@ +```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->getQR( + text: '<TEXT>', + size: 1, // optional + margin: 0, // optional + download: false // optional +); +``` 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 new file mode 100644 index 000000000..59fbd663d --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/get-screenshot.md @@ -0,0 +1,43 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\BrowserTheme; +use Appwrite\Enums\Timezone; +use Appwrite\Enums\BrowserPermission; +use Appwrite\Enums\ImageFormat; + +$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->getScreenshot( + url: 'https://example.com', + headers: [ + 'Authorization' => 'Bearer token123', + 'X-Custom-Header' => 'value' + ], // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // 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 + locale: 'en-US', // optional + timezone: Timezone::AFRICAABIDJAN(), // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [BrowserPermission::GEOLOCATION(), BrowserPermission::NOTIFICATIONS()], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: ImageFormat::JPEG() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/create-archive.md b/examples/2.3.x/server-php/examples/backups/create-archive.md new file mode 100644 index 000000000..77d51a460 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/create-archive.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; +use Appwrite\Enums\BackupServices; + +$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 + +$backups = new Backups($client); + +$result = $backups->createArchive( + services: [BackupServices::DATABASES()], + resourceId: '<RESOURCE_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/create-policy.md b/examples/2.3.x/server-php/examples/backups/create-policy.md new file mode 100644 index 000000000..301cec37e --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/create-policy.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; +use Appwrite\Enums\BackupServices; + +$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 + +$backups = new Backups($client); + +$result = $backups->createPolicy( + policyId: '<POLICY_ID>', + services: [BackupServices::DATABASES()], + retention: 1, + schedule: '', + name: '<NAME>', // optional + resourceId: '<RESOURCE_ID>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/create-restoration.md b/examples/2.3.x/server-php/examples/backups/create-restoration.md new file mode 100644 index 000000000..8b7b1e701 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/create-restoration.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; +use Appwrite\Enums\BackupServices; + +$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 + +$backups = new Backups($client); + +$result = $backups->createRestoration( + archiveId: '<ARCHIVE_ID>', + services: [BackupServices::DATABASES()], + newResourceId: '<NEW_RESOURCE_ID>', // optional + newResourceName: '<NEW_RESOURCE_NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/delete-archive.md b/examples/2.3.x/server-php/examples/backups/delete-archive.md new file mode 100644 index 000000000..444146f25 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/delete-archive.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->deleteArchive( + archiveId: '<ARCHIVE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/delete-policy.md b/examples/2.3.x/server-php/examples/backups/delete-policy.md new file mode 100644 index 000000000..a8d964985 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/delete-policy.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->deletePolicy( + policyId: '<POLICY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/get-archive.md b/examples/2.3.x/server-php/examples/backups/get-archive.md new file mode 100644 index 000000000..7f5f79a4e --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/get-archive.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->getArchive( + archiveId: '<ARCHIVE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/get-policy.md b/examples/2.3.x/server-php/examples/backups/get-policy.md new file mode 100644 index 000000000..a24d8cf63 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/get-policy.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->getPolicy( + policyId: '<POLICY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/get-restoration.md b/examples/2.3.x/server-php/examples/backups/get-restoration.md new file mode 100644 index 000000000..9b97e4712 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/get-restoration.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->getRestoration( + restorationId: '<RESTORATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/list-archives.md b/examples/2.3.x/server-php/examples/backups/list-archives.md new file mode 100644 index 000000000..af9f412a5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/list-archives.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->listArchives( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/list-policies.md b/examples/2.3.x/server-php/examples/backups/list-policies.md new file mode 100644 index 000000000..f9775cd4b --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/list-policies.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->listPolicies( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/list-restorations.md b/examples/2.3.x/server-php/examples/backups/list-restorations.md new file mode 100644 index 000000000..a02a1cb78 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/list-restorations.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->listRestorations( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/backups/update-policy.md b/examples/2.3.x/server-php/examples/backups/update-policy.md new file mode 100644 index 000000000..54d8adcb7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/backups/update-policy.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Backups; + +$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 + +$backups = new Backups($client); + +$result = $backups->updatePolicy( + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + retention: 1, // optional + schedule: '', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-php/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..1384fb18b --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-big-int-attribute.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createBigIntAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 1000000, // optional + default: 0, // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-php/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..2004cf687 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-boolean-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: false, // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-collection.md b/examples/2.3.x/server-php/examples/databases/create-collection.md new file mode 100644 index 000000000..5adf6f565 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-collection.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$databases = new Databases($client); + +$result = $databases->createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-php/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..9ff49a89a --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-datetime-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: '2020-10-15T06:38:00.000+00:00', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-document.md b/examples/2.3.x/server-php/examples/databases/create-document.md new file mode 100644 index 000000000..efd3083f9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-document.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$databases = new Databases($client); + +$result = $databases->createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 30, + 'isAdmin' => false + ], + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` 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 new file mode 100644 index 000000000..1f64387b5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-email-attribute.md b/examples/2.3.x/server-php/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..0a104de3c --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-email-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'email@example.com', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-php/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..962b5a793 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-enum-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + required: false, + default: 'active', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-float-attribute.md b/examples/2.3.x/server-php/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..5df36f2d9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-float-attribute.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + default: 10.5, // optional + array: false // 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 new file mode 100644 index 000000000..1005239ed --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-index.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\DatabasesIndexType; +use Appwrite\Enums\OrderBy; + +$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 + +$databases = new Databases($client); + +$result = $databases->createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: DatabasesIndexType::KEY(), + attributes: [], + orders: [OrderBy::ASC()], // optional + lengths: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-php/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..1b9c453d2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-integer-attribute.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + default: 10, // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-php/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..afb0ed338 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-ip-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: '192.0.2.0', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-line-attribute.md b/examples/2.3.x/server-php/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..c892610af --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-line-attribute.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createLineAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [[1, 2], [3, 4], [5, 6]] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-php/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..376288bbc --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-longtext-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createLongtextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-php/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..67e3da160 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createMediumtextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-operations.md b/examples/2.3.x/server-php/examples/databases/create-operations.md new file mode 100644 index 000000000..82172a3f6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-operations.md @@ -0,0 +1,28 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createOperations( + transactionId: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-point-attribute.md b/examples/2.3.x/server-php/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..385415454 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-point-attribute.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createPointAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [1, 2] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-php/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..5a37c3535 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-polygon-attribute.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createPolygonAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-php/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..6be348856 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-relationship-attribute.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\RelationshipType; +use Appwrite\Enums\RelationMutate; + +$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 + +$databases = new Databases($client); + +$result = $databases->createRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '<KEY>', // optional + twoWayKey: '<TWO_WAY_KEY>', // optional + onDelete: RelationMutate::CASCADE() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-string-attribute.md b/examples/2.3.x/server-php/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..c0d932106 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-string-attribute.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-text-attribute.md b/examples/2.3.x/server-php/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..4ad0643d4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-text-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createTextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-transaction.md b/examples/2.3.x/server-php/examples/databases/create-transaction.md new file mode 100644 index 000000000..600cda585 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createTransaction( + ttl: 60 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-url-attribute.md b/examples/2.3.x/server-php/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..a5e837bba --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-url-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'https://example.com', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-php/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..2bd55824a --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create-varchar-attribute.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->createVarcharAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create.md b/examples/2.3.x/server-php/examples/databases/create.md new file mode 100644 index 000000000..95f3cf404 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/create.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-php/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..ca4a5e3d5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/decrement-document-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->decrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/delete-attribute.md b/examples/2.3.x/server-php/examples/databases/delete-attribute.md new file mode 100644 index 000000000..4d8b12be1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/delete-attribute.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->deleteAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/delete-collection.md b/examples/2.3.x/server-php/examples/databases/delete-collection.md new file mode 100644 index 000000000..486b9f36d --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/delete-collection.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/delete-document.md b/examples/2.3.x/server-php/examples/databases/delete-document.md new file mode 100644 index 000000000..33f9e1791 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/delete-document.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..f39cbfe0a --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/delete-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/delete-index.md b/examples/2.3.x/server-php/examples/databases/delete-index.md new file mode 100644 index 000000000..ffbc6c29a --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/delete-index.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/delete-transaction.md b/examples/2.3.x/server-php/examples/databases/delete-transaction.md new file mode 100644 index 000000000..09634f298 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/delete-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->deleteTransaction( + transactionId: '<TRANSACTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/delete.md b/examples/2.3.x/server-php/examples/databases/delete.md new file mode 100644 index 000000000..6f25053af --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->delete( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/get-attribute.md b/examples/2.3.x/server-php/examples/databases/get-attribute.md new file mode 100644 index 000000000..bf6db3cc1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/get-attribute.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->getAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/get-collection.md b/examples/2.3.x/server-php/examples/databases/get-collection.md new file mode 100644 index 000000000..e8cdada67 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/get-collection.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/get-document.md b/examples/2.3.x/server-php/examples/databases/get-document.md new file mode 100644 index 000000000..f0827f6e9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/get-document.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/get-index.md b/examples/2.3.x/server-php/examples/databases/get-index.md new file mode 100644 index 000000000..f0d58b284 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/get-index.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/get-transaction.md b/examples/2.3.x/server-php/examples/databases/get-transaction.md new file mode 100644 index 000000000..235816852 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/get-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->getTransaction( + transactionId: '<TRANSACTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/get.md b/examples/2.3.x/server-php/examples/databases/get.md new file mode 100644 index 000000000..8eb28cbee --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->get( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-php/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..5eec9fb12 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/increment-document-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->incrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/list-attributes.md b/examples/2.3.x/server-php/examples/databases/list-attributes.md new file mode 100644 index 000000000..1867283b2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/list-attributes.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->listAttributes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/list-collections.md b/examples/2.3.x/server-php/examples/databases/list-collections.md new file mode 100644 index 000000000..29dd5ec27 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/list-collections.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/list-documents.md b/examples/2.3.x/server-php/examples/databases/list-documents.md new file mode 100644 index 000000000..9e4d143fd --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/list-documents.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/list-indexes.md b/examples/2.3.x/server-php/examples/databases/list-indexes.md new file mode 100644 index 000000000..40b21bbd5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/list-indexes.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false // 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 new file mode 100644 index 000000000..97cb6abd9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/list-transactions.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->listTransactions( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/list.md b/examples/2.3.x/server-php/examples/databases/list.md new file mode 100644 index 000000000..f48d27ff0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/list.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->list( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-php/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..41a27b10f --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-big-int-attribute.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateBigIntAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 0, + min: 0, // optional + max: 1000000, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-php/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..ed2ff661e --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-boolean-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: false, + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-collection.md b/examples/2.3.x/server-php/examples/databases/update-collection.md new file mode 100644 index 000000000..dc8e35221 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-collection.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', // optional + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-php/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..83e704801 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-datetime-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: '2020-10-15T06:38:00.000+00:00', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-document.md b/examples/2.3.x/server-php/examples/databases/update-document.md new file mode 100644 index 000000000..1f3b6359e --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-document.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 33, + 'isAdmin' => false + ], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-documents.md b/examples/2.3.x/server-php/examples/databases/update-documents.md new file mode 100644 index 000000000..68c122177 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-documents.md @@ -0,0 +1,27 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 33, + 'isAdmin' => false + ], // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-email-attribute.md b/examples/2.3.x/server-php/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..44a4da009 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-email-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'email@example.com', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-php/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..8a736bebc --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-enum-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + required: false, + default: 'active', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-float-attribute.md b/examples/2.3.x/server-php/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..d5ad4a166 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-float-attribute.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 10.5, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-php/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..7a51383ff --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-integer-attribute.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 10, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-php/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..1daf50014 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-ip-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: '192.0.2.0', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-line-attribute.md b/examples/2.3.x/server-php/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..a18dbb71a --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-line-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateLineAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [[1, 2], [3, 4], [5, 6]], // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-php/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..06e0ef987 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-longtext-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateLongtextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-php/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..e08925a75 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateMediumtextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-point-attribute.md b/examples/2.3.x/server-php/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..54577171a --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-point-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updatePointAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [1, 2], // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-php/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..448b4ef96 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-polygon-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updatePolygonAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-php/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..d1264dfb5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-relationship-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\RelationMutate; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-string-attribute.md b/examples/2.3.x/server-php/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..656401df9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-string-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-text-attribute.md b/examples/2.3.x/server-php/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..61bf96f0f --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-text-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateTextAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-transaction.md b/examples/2.3.x/server-php/examples/databases/update-transaction.md new file mode 100644 index 000000000..354d01bb0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-transaction.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateTransaction( + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-url-attribute.md b/examples/2.3.x/server-php/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..9ab77063a --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-url-attribute.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'https://example.com', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-php/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..73b2b7d5c --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update-varchar-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->updateVarcharAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/update.md b/examples/2.3.x/server-php/examples/databases/update.md new file mode 100644 index 000000000..bd56abc6b --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/update.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/upsert-document.md b/examples/2.3.x/server-php/examples/databases/upsert-document.md new file mode 100644 index 000000000..94aad5829 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/upsert-document.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$databases = new Databases($client); + +$result = $databases->upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 30, + 'isAdmin' => false + ], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..0049fdc69 --- /dev/null +++ b/examples/2.3.x/server-php/examples/databases/upsert-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$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 + +$databases = new Databases($client); + +$result = $databases->upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/create-collection.md b/examples/2.3.x/server-php/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..b149a152b --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/create-collection.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/create-document.md b/examples/2.3.x/server-php/examples/documentsdb/create-document.md new file mode 100644 index 000000000..4b894f418 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/create-document.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 30, + 'isAdmin' => false + ], + permissions: [Permission::read(Role::any())], // optional + 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 new file mode 100644 index 000000000..ec6a43552 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/create-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/create-failover.md b/examples/2.3.x/server-php/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..9198a42f7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/create-failover.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_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 new file mode 100644 index 000000000..b64d1f8af --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/create-index.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; +use Appwrite\Enums\DocumentsDBIndexType; +use Appwrite\Enums\OrderBy; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: DocumentsDBIndexType::KEY(), + attributes: [], + orders: [OrderBy::ASC()], // optional + lengths: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/create-operations.md b/examples/2.3.x/server-php/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..83d3bab24 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/create-operations.md @@ -0,0 +1,28 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createOperations( + transactionId: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-php/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..bcf4ad3a4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/create-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createTransaction( + ttl: 60 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/create.md b/examples/2.3.x/server-php/examples/documentsdb/create.md new file mode 100644 index 000000000..a82f793be --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/create.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-php/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..3c7224e2c --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->decrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-php/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..2b11da4d0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/delete-collection.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/delete-document.md b/examples/2.3.x/server-php/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..1e01f3e47 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/delete-document.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..b77b3756f --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/delete-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/delete-index.md b/examples/2.3.x/server-php/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..a58794821 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/delete-index.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-php/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..6e1f20c9c --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/delete-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteTransaction( + transactionId: '<TRANSACTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/delete.md b/examples/2.3.x/server-php/examples/documentsdb/delete.md new file mode 100644 index 000000000..48d8885b7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->delete( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/get-collection.md b/examples/2.3.x/server-php/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..4aa50f2e3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/get-collection.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/get-document.md b/examples/2.3.x/server-php/examples/documentsdb/get-document.md new file mode 100644 index 000000000..f82d09a51 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/get-document.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/get-index.md b/examples/2.3.x/server-php/examples/documentsdb/get-index.md new file mode 100644 index 000000000..2f4c28ee3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/get-index.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-php/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..3ccdbb331 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/get-replicas.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getReplicas( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/get-status.md b/examples/2.3.x/server-php/examples/documentsdb/get-status.md new file mode 100644 index 000000000..a18b0c4e2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/get-status.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getStatus( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-php/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..44ddeaca2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/get-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getTransaction( + transactionId: '<TRANSACTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/get.md b/examples/2.3.x/server-php/examples/documentsdb/get.md new file mode 100644 index 000000000..c69054b1b --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->get( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-php/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..5be35f331 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->incrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/list-collections.md b/examples/2.3.x/server-php/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..a4a3c9942 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/list-collections.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/list-documents.md b/examples/2.3.x/server-php/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..57c24c2f6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/list-documents.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-php/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..a229e1109 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/list-indexes.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/list-operations.md b/examples/2.3.x/server-php/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..beea6b58c --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/list-operations.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-php/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..79371a224 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/list-specifications.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listSpecifications(); +``` 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 new file mode 100644 index 000000000..f154df8e1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/list-transactions.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listTransactions( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/list.md b/examples/2.3.x/server-php/examples/documentsdb/list.md new file mode 100644 index 000000000..8345a88e9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/list.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->list( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/update-collection.md b/examples/2.3.x/server-php/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..a160bac08 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/update-collection.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/update-document.md b/examples/2.3.x/server-php/examples/documentsdb/update-document.md new file mode 100644 index 000000000..0bd209531 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/update-document.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/update-documents.md b/examples/2.3.x/server-php/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..3daf9039f --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/update-documents.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: [], // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-php/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..30b0b7bb7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/update-transaction.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->updateTransaction( + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/update.md b/examples/2.3.x/server-php/examples/documentsdb/update.md new file mode 100644 index 000000000..d9caf5bb6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/update.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-php/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..c35cb3b58 --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/upsert-document.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..09021e0af --- /dev/null +++ b/examples/2.3.x/server-php/examples/documentsdb/upsert-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\DocumentsDB; + +$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 + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-php/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..fc372d933 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createPresetGoogleWorkspace( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-php/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..13b323862 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createPresetICloud( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-php/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..e8383ba5e --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-preset-mailgun.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createPresetMailgun( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-php/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..55124396e --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-preset-outlook.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createPresetOutlook( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-php/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..80444beea --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createPresetProtonMail( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-php/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..3a481b3a1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-preset-zoho.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createPresetZoho( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-a.md b/examples/2.3.x/server-php/examples/domains/create-record-a.md new file mode 100644 index 000000000..d1dfed17d --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-a.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordA( + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-php/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..9f2995447 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-aaaa.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordAAAA( + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-alias.md b/examples/2.3.x/server-php/examples/domains/create-record-alias.md new file mode 100644 index 000000000..157dbade7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-alias.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordAlias( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-caa.md b/examples/2.3.x/server-php/examples/domains/create-record-caa.md new file mode 100644 index 000000000..12b711221 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-caa.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordCAA( + domainId: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-cname.md b/examples/2.3.x/server-php/examples/domains/create-record-cname.md new file mode 100644 index 000000000..c0ccb3bf7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-cname.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordCNAME( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-https.md b/examples/2.3.x/server-php/examples/domains/create-record-https.md new file mode 100644 index 000000000..6736edb56 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-https.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordHTTPS( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-mx.md b/examples/2.3.x/server-php/examples/domains/create-record-mx.md new file mode 100644 index 000000000..409dc09fc --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-mx.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordMX( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-ns.md b/examples/2.3.x/server-php/examples/domains/create-record-ns.md new file mode 100644 index 000000000..9faef2971 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-ns.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordNS( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-srv.md b/examples/2.3.x/server-php/examples/domains/create-record-srv.md new file mode 100644 index 000000000..fa3a45afa --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-srv.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordSRV( + domainId: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create-record-txt.md b/examples/2.3.x/server-php/examples/domains/create-record-txt.md new file mode 100644 index 000000000..a541e82d0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create-record-txt.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->createRecordTXT( + domainId: '<DOMAIN_ID>', + name: '', + ttl: 1, + value: '<VALUE>', // optional + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/create.md b/examples/2.3.x/server-php/examples/domains/create.md new file mode 100644 index 000000000..898f946b5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/create.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->create( + teamId: '<TEAM_ID>', + domain: 'example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/delete-record.md b/examples/2.3.x/server-php/examples/domains/delete-record.md new file mode 100644 index 000000000..706864729 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/delete-record.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->deleteRecord( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/delete.md b/examples/2.3.x/server-php/examples/domains/delete.md new file mode 100644 index 000000000..b38392f3a --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->delete( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-php/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..3cd165397 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getPresetGoogleWorkspace( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-php/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..98d33b0c6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getPresetICloud( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-php/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..5f1440d77 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-preset-mailgun.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getPresetMailgun( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-php/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..3619b440d --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-preset-outlook.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getPresetOutlook( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-php/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..157592078 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getPresetProtonMail( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-php/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..151896cb5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-preset-zoho.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getPresetZoho( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-price.md b/examples/2.3.x/server-php/examples/domains/get-price.md new file mode 100644 index 000000000..7df25fa43 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-price.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; +use Appwrite\Enums\DomainRegistrationType; + +$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 + +$domains = new Domains($client); + +$result = $domains->getPrice( + domain: 'example.com', + periodYears: null, // optional + registrationType: DomainRegistrationType::NEW() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-record.md b/examples/2.3.x/server-php/examples/domains/get-record.md new file mode 100644 index 000000000..96cb15613 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-record.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getRecord( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-transfer-status.md b/examples/2.3.x/server-php/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..7789d3b94 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-transfer-status.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getTransferStatus( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get-zone.md b/examples/2.3.x/server-php/examples/domains/get-zone.md new file mode 100644 index 000000000..f8d2dc156 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get-zone.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->getZone( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/get.md b/examples/2.3.x/server-php/examples/domains/get.md new file mode 100644 index 000000000..12ed01174 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->get( + domainId: '<DOMAIN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/list-prices.md b/examples/2.3.x/server-php/examples/domains/list-prices.md new file mode 100644 index 000000000..f1211fc4e --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/list-prices.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; +use Appwrite\Enums\DomainRegistrationType; + +$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 + +$domains = new Domains($client); + +$result = $domains->listPrices( + domains: [], + periodYears: null, // optional + registrationType: DomainRegistrationType::NEW() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/list-records.md b/examples/2.3.x/server-php/examples/domains/list-records.md new file mode 100644 index 000000000..19d29a93f --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/list-records.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->listRecords( + domainId: '<DOMAIN_ID>', + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/list.md b/examples/2.3.x/server-php/examples/domains/list.md new file mode 100644 index 000000000..dcce2187e --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/list.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->list( + queries: [], // optional + search: '<SEARCH>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-nameservers.md b/examples/2.3.x/server-php/examples/domains/update-nameservers.md new file mode 100644 index 000000000..3e99d08a9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-nameservers.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateNameservers( + domainId: '<DOMAIN_ID>', + nameservers: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-a.md b/examples/2.3.x/server-php/examples/domains/update-record-a.md new file mode 100644 index 000000000..243f89b4d --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-a.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordA( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-php/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..8bc18ee98 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-aaaa.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordAAAA( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-alias.md b/examples/2.3.x/server-php/examples/domains/update-record-alias.md new file mode 100644 index 000000000..457a3bed0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-alias.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordAlias( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-caa.md b/examples/2.3.x/server-php/examples/domains/update-record-caa.md new file mode 100644 index 000000000..26bcadfdf --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-caa.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordCAA( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-cname.md b/examples/2.3.x/server-php/examples/domains/update-record-cname.md new file mode 100644 index 000000000..c170899cc --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-cname.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordCNAME( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-https.md b/examples/2.3.x/server-php/examples/domains/update-record-https.md new file mode 100644 index 000000000..2182a9958 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-https.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordHTTPS( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-mx.md b/examples/2.3.x/server-php/examples/domains/update-record-mx.md new file mode 100644 index 000000000..7f152d6a9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-mx.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordMX( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-ns.md b/examples/2.3.x/server-php/examples/domains/update-record-ns.md new file mode 100644 index 000000000..a6530196a --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-ns.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordNS( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-srv.md b/examples/2.3.x/server-php/examples/domains/update-record-srv.md new file mode 100644 index 000000000..7148a740f --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-srv.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordSRV( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-record-txt.md b/examples/2.3.x/server-php/examples/domains/update-record-txt.md new file mode 100644 index 000000000..677b5fe47 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-record-txt.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateRecordTXT( + domainId: '<DOMAIN_ID>', + recordId: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-team.md b/examples/2.3.x/server-php/examples/domains/update-team.md new file mode 100644 index 000000000..bd706e5cf --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-team.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateTeam( + domainId: '<DOMAIN_ID>', + teamId: '<TEAM_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/update-zone.md b/examples/2.3.x/server-php/examples/domains/update-zone.md new file mode 100644 index 000000000..e60c7a92f --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/update-zone.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->updateZone( + domainId: '<DOMAIN_ID>', + content: '<CONTENT>' +); +``` diff --git a/examples/2.3.x/server-php/examples/domains/verify-nameservers.md b/examples/2.3.x/server-php/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..6a66d9d05 --- /dev/null +++ b/examples/2.3.x/server-php/examples/domains/verify-nameservers.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Domains; + +$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 + +$domains = new Domains($client); + +$result = $domains->verifyNameservers( + domainId: '<DOMAIN_ID>' +); +``` 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 new file mode 100644 index 000000000..70f0f7e1d --- /dev/null +++ b/examples/2.3.x/server-php/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Embeddings; +use Appwrite\Enums\EmbeddingModel; + +$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 + +$embeddings = new Embeddings($client); + +$result = $embeddings->createTextEmbeddings( + texts: [], + model: EmbeddingModel::NOMICEMBEDTEXT() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/create-deployment.md b/examples/2.3.x/server-php/examples/functions/create-deployment.md new file mode 100644 index 000000000..673d21b42 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/create-deployment.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->createDeployment( + functionId: '<FUNCTION_ID>', + code: InputFile::withPath('file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-php/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..75cfedfc6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->createDuplicateDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/create-execution.md b/examples/2.3.x/server-php/examples/functions/create-execution.md new file mode 100644 index 000000000..94427dea9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/create-execution.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\ExecutionMethod; + +$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 + +$functions = new Functions($client); + +$result = $functions->createExecution( + functionId: '<FUNCTION_ID>', + body: '<BODY>', // optional + async: false, // optional + path: '<PATH>', // optional + method: ExecutionMethod::GET(), // optional + headers: [], // optional + scheduledAt: '<SCHEDULED_AT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/create-template-deployment.md b/examples/2.3.x/server-php/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..14ec5a732 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/create-template-deployment.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\TemplateReferenceType; + +$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 + +$functions = new Functions($client); + +$result = $functions->createTemplateDeployment( + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + type: TemplateReferenceType::COMMIT(), + reference: '<REFERENCE>', + activate: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/create-variable.md b/examples/2.3.x/server-php/examples/functions/create-variable.md new file mode 100644 index 000000000..206ac80b3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/create-variable.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->createVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-php/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..ab9d0572e --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/create-vcs-deployment.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\VCSReferenceType; + +$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 + +$functions = new Functions($client); + +$result = $functions->createVcsDeployment( + functionId: '<FUNCTION_ID>', + type: VCSReferenceType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/create.md b/examples/2.3.x/server-php/examples/functions/create.md new file mode 100644 index 000000000..0fcac5814 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/create.md @@ -0,0 +1,40 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\Runtime; +use Appwrite\Enums\ProjectKeyScopes; + +$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 + +$functions = new Functions($client); + +$result = $functions->create( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: Runtime::NODE145(), + execute: ["any"], // optional + events: [], // optional + schedule: '0 0 * * *', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [ProjectKeyScopes::PROJECTREAD()], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/delete-deployment.md b/examples/2.3.x/server-php/examples/functions/delete-deployment.md new file mode 100644 index 000000000..60e9cff78 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/delete-deployment.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->deleteDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/delete-execution.md b/examples/2.3.x/server-php/examples/functions/delete-execution.md new file mode 100644 index 000000000..9bf9e5d63 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/delete-execution.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->deleteExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/delete-variable.md b/examples/2.3.x/server-php/examples/functions/delete-variable.md new file mode 100644 index 000000000..25f41540d --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/delete-variable.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->deleteVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/delete.md b/examples/2.3.x/server-php/examples/functions/delete.md new file mode 100644 index 000000000..004319102 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->delete( + functionId: '<FUNCTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/get-deployment-download.md b/examples/2.3.x/server-php/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..fb6d3d01d --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/get-deployment-download.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\DeploymentDownloadType; + +$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 + +$functions = new Functions($client); + +$result = $functions->getDeploymentDownload( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE(), // optional + token: '<TOKEN>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/get-deployment.md b/examples/2.3.x/server-php/examples/functions/get-deployment.md new file mode 100644 index 000000000..1e264d85c --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/get-deployment.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->getDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/get-execution.md b/examples/2.3.x/server-php/examples/functions/get-execution.md new file mode 100644 index 000000000..b1be6b232 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/get-execution.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->getExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/get-variable.md b/examples/2.3.x/server-php/examples/functions/get-variable.md new file mode 100644 index 000000000..6b9a802e7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/get-variable.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->getVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/get.md b/examples/2.3.x/server-php/examples/functions/get.md new file mode 100644 index 000000000..8821156ab --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->get( + functionId: '<FUNCTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/list-deployments.md b/examples/2.3.x/server-php/examples/functions/list-deployments.md new file mode 100644 index 000000000..de89fe381 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/list-deployments.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->listDeployments( + functionId: '<FUNCTION_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/list-executions.md b/examples/2.3.x/server-php/examples/functions/list-executions.md new file mode 100644 index 000000000..9b1fc5b5f --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/list-executions.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->listExecutions( + functionId: '<FUNCTION_ID>', + queries: [], // optional + total: false // 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 new file mode 100644 index 000000000..320a9dc6c --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/list-runtimes.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->listRuntimes(); +``` 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 new file mode 100644 index 000000000..da2bec2e6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/list-specifications.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->listSpecifications( + type: 'runtimes' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/list-variables.md b/examples/2.3.x/server-php/examples/functions/list-variables.md new file mode 100644 index 000000000..1cc854cc5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/list-variables.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->listVariables( + functionId: '<FUNCTION_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/list.md b/examples/2.3.x/server-php/examples/functions/list.md new file mode 100644 index 000000000..4775e062b --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/list.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->list( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/update-deployment-status.md b/examples/2.3.x/server-php/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..c8984428c --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/update-deployment-status.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->updateDeploymentStatus( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/update-function-deployment.md b/examples/2.3.x/server-php/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..5aa5a2669 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/update-function-deployment.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->updateFunctionDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/update-variable.md b/examples/2.3.x/server-php/examples/functions/update-variable.md new file mode 100644 index 000000000..a60cea5e9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/update-variable.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$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 + +$functions = new Functions($client); + +$result = $functions->updateVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/functions/update.md b/examples/2.3.x/server-php/examples/functions/update.md new file mode 100644 index 000000000..e13ede1fc --- /dev/null +++ b/examples/2.3.x/server-php/examples/functions/update.md @@ -0,0 +1,40 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\Runtime; +use Appwrite\Enums\ProjectKeyScopes; + +$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 + +$functions = new Functions($client); + +$result = $functions->update( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: Runtime::NODE145(), // optional + execute: ["any"], // optional + events: [], // optional + schedule: '0 0 * * *', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [ProjectKeyScopes::PROJECTREAD()], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0 // 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 new file mode 100644 index 000000000..c2f1b9890 --- /dev/null +++ b/examples/2.3.x/server-php/examples/graphql/mutation.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Graphql; + +$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 + +$graphql = new Graphql($client); + +$result = $graphql->mutation( + query: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/graphql/query.md b/examples/2.3.x/server-php/examples/graphql/query.md new file mode 100644 index 000000000..9731e9988 --- /dev/null +++ b/examples/2.3.x/server-php/examples/graphql/query.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Graphql; + +$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 + +$graphql = new Graphql($client); + +$result = $graphql->query( + query: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/locale/get.md b/examples/2.3.x/server-php/examples/locale/get.md new file mode 100644 index 000000000..8b204573d --- /dev/null +++ b/examples/2.3.x/server-php/examples/locale/get.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$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 + +$locale = new Locale($client); + +$result = $locale->get(); +``` 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 new file mode 100644 index 000000000..5c99bbf2d --- /dev/null +++ b/examples/2.3.x/server-php/examples/locale/list-codes.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$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 + +$locale = new Locale($client); + +$result = $locale->listCodes(); +``` 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 new file mode 100644 index 000000000..1245b2ecf --- /dev/null +++ b/examples/2.3.x/server-php/examples/locale/list-continents.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$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 + +$locale = new Locale($client); + +$result = $locale->listContinents(); +``` 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 new file mode 100644 index 000000000..9744c8ea6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/locale/list-countries-eu.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$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 + +$locale = new Locale($client); + +$result = $locale->listCountriesEU(); +``` 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 new file mode 100644 index 000000000..df66061f6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/locale/list-countries-phones.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$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 + +$locale = new Locale($client); + +$result = $locale->listCountriesPhones(); +``` 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 new file mode 100644 index 000000000..f4f962622 --- /dev/null +++ b/examples/2.3.x/server-php/examples/locale/list-countries.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$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 + +$locale = new Locale($client); + +$result = $locale->listCountries(); +``` 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 new file mode 100644 index 000000000..f4f1125a9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/locale/list-currencies.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$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 + +$locale = new Locale($client); + +$result = $locale->listCurrencies(); +``` 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 new file mode 100644 index 000000000..b25fab642 --- /dev/null +++ b/examples/2.3.x/server-php/examples/locale/list-languages.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$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 + +$locale = new Locale($client); + +$result = $locale->listLanguages(); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-php/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..2464d9fa8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-apns-provider.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createAPNSProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false, // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-php/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..178e2bc96 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createAppwriteProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, // optional + qos: 0, // optional + expiry: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-email.md b/examples/2.3.x/server-php/examples/messaging/create-email.md new file mode 100644 index 000000000..d9830c59a --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-email.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createEmail( + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // 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 +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-php/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..8ff6b217e --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-fcm-provider.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createFCMProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: [], // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-php/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..23eede55f --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + domain: 'example.com', // optional + isEuRegion: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-php/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..212f6b236 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>', // optional + enabled: 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 new file mode 100644 index 000000000..75734171e --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-push.md @@ -0,0 +1,36 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; +use Appwrite\Enums\MessagePriority; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createPush( + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: [], // optional + action: '<ACTION>', // optional + image: '<ID1:ID2>', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-php/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..9892a9ce0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-resend-provider.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createResendProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-php/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..30c08aef0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-php/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..183b37349 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-ses-provider.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createSesProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + accessKey: '<ACCESS_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + region: '<REGION>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-sms.md b/examples/2.3.x/server-php/examples/messaging/create-sms.md new file mode 100644 index 000000000..945775ba8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-sms.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createSMS( + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-php/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..4da37c045 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-smtp-provider.md @@ -0,0 +1,31 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; +use Appwrite\Enums\SmtpEncryption; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createSMTPProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 587, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + encryption: SmtpEncryption::NONE(), // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-subscriber.md b/examples/2.3.x/server-php/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..f016b862e --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-subscriber.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$messaging = new Messaging($client); + +$result = $messaging->createSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-php/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..4f05f8985 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-telesign-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-php/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..7c60a96fd --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-topic.md b/examples/2.3.x/server-php/examples/messaging/create-topic.md new file mode 100644 index 000000000..ffb578bbe --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-topic.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"], // optional + qos: 0, // optional + expiry: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-php/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..4f96e8acc --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-twilio-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '<FROM>', // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-php/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..719835de7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/create-vonage-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->createVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/delete-provider.md b/examples/2.3.x/server-php/examples/messaging/delete-provider.md new file mode 100644 index 000000000..c6849300e --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/delete-provider.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->deleteProvider( + providerId: '<PROVIDER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-php/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..bef4fad1b --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/delete-subscriber.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$messaging = new Messaging($client); + +$result = $messaging->deleteSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/delete-topic.md b/examples/2.3.x/server-php/examples/messaging/delete-topic.md new file mode 100644 index 000000000..353ae213c --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/delete-topic.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->deleteTopic( + topicId: '<TOPIC_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/delete.md b/examples/2.3.x/server-php/examples/messaging/delete.md new file mode 100644 index 000000000..d1e07dd41 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->delete( + messageId: '<MESSAGE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/get-message.md b/examples/2.3.x/server-php/examples/messaging/get-message.md new file mode 100644 index 000000000..19e98cab8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/get-message.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->getMessage( + messageId: '<MESSAGE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/get-provider.md b/examples/2.3.x/server-php/examples/messaging/get-provider.md new file mode 100644 index 000000000..c0b834eee --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/get-provider.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->getProvider( + providerId: '<PROVIDER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/get-subscriber.md b/examples/2.3.x/server-php/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..9f6265bb1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/get-subscriber.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->getSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/get-topic.md b/examples/2.3.x/server-php/examples/messaging/get-topic.md new file mode 100644 index 000000000..d048acb40 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/get-topic.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->getTopic( + topicId: '<TOPIC_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/list-messages.md b/examples/2.3.x/server-php/examples/messaging/list-messages.md new file mode 100644 index 000000000..9bab16efb --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/list-messages.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->listMessages( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/list-providers.md b/examples/2.3.x/server-php/examples/messaging/list-providers.md new file mode 100644 index 000000000..1a2640f6e --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/list-providers.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->listProviders( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/list-subscribers.md b/examples/2.3.x/server-php/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..34e20a749 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/list-subscribers.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->listSubscribers( + topicId: '<TOPIC_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/list-targets.md b/examples/2.3.x/server-php/examples/messaging/list-targets.md new file mode 100644 index 000000000..2fdcb93d9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/list-targets.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->listTargets( + messageId: '<MESSAGE_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/list-topics.md b/examples/2.3.x/server-php/examples/messaging/list-topics.md new file mode 100644 index 000000000..d489bf44a --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/list-topics.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->listTopics( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-php/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..71708a8bd --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-apns-provider.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateAPNSProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-php/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..bc041e6ae --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateAppwriteProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + qos: 0, // optional + expiry: 0 // 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 new file mode 100644 index 000000000..b5a2488b1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-email.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateEmail( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional + attachments: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-fcm-provider.md b/examples/2.3.x/server-php/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..0bac7199f --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-fcm-provider.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateFCMProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + serviceAccountJSON: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-php/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..9aaabcfb5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + apiKey: '<API_KEY>', // optional + domain: 'example.com', // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-php/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..0dce50357 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>' // 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 new file mode 100644 index 000000000..a1b14b71b --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-push.md @@ -0,0 +1,36 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; +use Appwrite\Enums\MessagePriority; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updatePush( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + title: '<TITLE>', // optional + body: '<BODY>', // optional + data: [], // optional + action: '<ACTION>', // optional + image: '<ID1:ID2>', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-php/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..50af4fd54 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-resend-provider.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateResendProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-php/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..f13f1ea5c --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-php/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..970081383 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-ses-provider.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateSesProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accessKey: '<ACCESS_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + region: '<REGION>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // 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 new file mode 100644 index 000000000..3cfd25800 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-sms.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateSMS( + messageId: '<MESSAGE_ID>', + 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/messaging/update-smtp-provider.md b/examples/2.3.x/server-php/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..1c82f9214 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-smtp-provider.md @@ -0,0 +1,31 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; +use Appwrite\Enums\SmtpEncryption; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateSMTPProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + host: '<HOST>', // optional + port: 1, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + encryption: SmtpEncryption::NONE(), // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-php/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..d89267683 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-telesign-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-php/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..16c4355b5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-topic.md b/examples/2.3.x/server-php/examples/messaging/update-topic.md new file mode 100644 index 000000000..6016049c8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-topic.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ["any"], // optional + qos: 0, // optional + expiry: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-php/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..35ec95d78 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-twilio-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + from: '<FROM>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-php/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..a4d0f88a4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/messaging/update-vonage-provider.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$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 + +$messaging = new Messaging($client); + +$result = $messaging->updateVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + from: '<FROM>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-php/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..72bffa600 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/create-backup-policy.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->createBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/create-backup.md b/examples/2.3.x/server-php/examples/mongo/create-backup.md new file mode 100644 index 000000000..d1af454a6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/create-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->createBackup( + databaseId: '<DATABASE_ID>', + type: 'full' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/create-branch.md b/examples/2.3.x/server-php/examples/mongo/create-branch.md new file mode 100644 index 000000000..de857b4d6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/create-branch.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->createBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/create-failover.md b/examples/2.3.x/server-php/examples/mongo/create-failover.md new file mode 100644 index 000000000..455e657fc --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/create-failover.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/create-migration.md b/examples/2.3.x/server-php/examples/mongo/create-migration.md new file mode 100644 index 000000000..53b9f7dbc --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/create-migration.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->createMigration( + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/create-restoration.md b/examples/2.3.x/server-php/examples/mongo/create-restoration.md new file mode 100644 index 000000000..e16d2e314 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/create-restoration.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->createRestoration( + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/create-upgrade.md b/examples/2.3.x/server-php/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..8c9e9ebf9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/create-upgrade.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->createUpgrade( + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/create.md b/examples/2.3.x/server-php/examples/mongo/create.md new file mode 100644 index 000000000..d5c458dda --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/create.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-php/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..385d69274 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/delete-backup-policy.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->deleteBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/delete-backup.md b/examples/2.3.x/server-php/examples/mongo/delete-backup.md new file mode 100644 index 000000000..77eddfff3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/delete-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->deleteBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/delete-branch.md b/examples/2.3.x/server-php/examples/mongo/delete-branch.md new file mode 100644 index 000000000..0996e1f0a --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/delete-branch.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->deleteBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/delete.md b/examples/2.3.x/server-php/examples/mongo/delete.md new file mode 100644 index 000000000..7d39dcdaa --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->delete( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-php/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..19c2516d7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/get-backup-policy.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->getBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/get-backup.md b/examples/2.3.x/server-php/examples/mongo/get-backup.md new file mode 100644 index 000000000..0e85d1b7b --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/get-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->getBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/get-pitr.md b/examples/2.3.x/server-php/examples/mongo/get-pitr.md new file mode 100644 index 000000000..d864fae1d --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/get-pitr.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->getPitr( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/get-replicas.md b/examples/2.3.x/server-php/examples/mongo/get-replicas.md new file mode 100644 index 000000000..88b285c99 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/get-replicas.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->getReplicas( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/get-restoration.md b/examples/2.3.x/server-php/examples/mongo/get-restoration.md new file mode 100644 index 000000000..a836fa083 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/get-restoration.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->getRestoration( + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/get-status.md b/examples/2.3.x/server-php/examples/mongo/get-status.md new file mode 100644 index 000000000..80a99a29c --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/get-status.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->getStatus( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/get.md b/examples/2.3.x/server-php/examples/mongo/get.md new file mode 100644 index 000000000..bc3cf516a --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->get( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-php/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..84922f686 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/list-backup-policies.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->listBackupPolicies( + databaseId: '<DATABASE_ID>', + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/list-backups.md b/examples/2.3.x/server-php/examples/mongo/list-backups.md new file mode 100644 index 000000000..d712d12aa --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/list-backups.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->listBackups( + databaseId: '<DATABASE_ID>', + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/list-branches.md b/examples/2.3.x/server-php/examples/mongo/list-branches.md new file mode 100644 index 000000000..c6181aac0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/list-branches.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->listBranches( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/list-operations.md b/examples/2.3.x/server-php/examples/mongo/list-operations.md new file mode 100644 index 000000000..bed15de3e --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/list-operations.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/list-restorations.md b/examples/2.3.x/server-php/examples/mongo/list-restorations.md new file mode 100644 index 000000000..688d74934 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/list-restorations.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->listRestorations( + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/list-specifications.md b/examples/2.3.x/server-php/examples/mongo/list-specifications.md new file mode 100644 index 000000000..c579bd401 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/list-specifications.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->listSpecifications(); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/list.md b/examples/2.3.x/server-php/examples/mongo/list.md new file mode 100644 index 000000000..d9f3f9a2d --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/list.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->list( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-php/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..4b8a26493 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/update-backup-policy.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->updateBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-php/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..0960ed86a --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/update-backup-storage.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->updateBackupStorage( + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/update-credentials.md b/examples/2.3.x/server-php/examples/mongo/update-credentials.md new file mode 100644 index 000000000..ef1cda8a2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/update-credentials.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->updateCredentials( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/update-maintenance.md b/examples/2.3.x/server-php/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..871bc37ff --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/update-maintenance.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->updateMaintenance( + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0 +); +``` diff --git a/examples/2.3.x/server-php/examples/mongo/update.md b/examples/2.3.x/server-php/examples/mongo/update.md new file mode 100644 index 000000000..6a382abca --- /dev/null +++ b/examples/2.3.x/server-php/examples/mongo/update.md @@ -0,0 +1,37 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mongo; + +$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 + +$mongo = new Mongo($client); + +$result = $mongo->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-php/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..5fe91d04c --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create-backup-policy.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->createBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create-backup.md b/examples/2.3.x/server-php/examples/mysql/create-backup.md new file mode 100644 index 000000000..82316edf7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->createBackup( + databaseId: '<DATABASE_ID>', + type: 'full' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create-branch.md b/examples/2.3.x/server-php/examples/mysql/create-branch.md new file mode 100644 index 000000000..abb2c58a8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create-branch.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->createBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create-execution.md b/examples/2.3.x/server-php/examples/mysql/create-execution.md new file mode 100644 index 000000000..fcaa046f5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create-execution.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->createExecution( + databaseId: '<DATABASE_ID>', + sql: '<SQL>', + bindings: [], // optional + timeoutSeconds: 1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create-failover.md b/examples/2.3.x/server-php/examples/mysql/create-failover.md new file mode 100644 index 000000000..4f6b59abb --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create-failover.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create-migration.md b/examples/2.3.x/server-php/examples/mysql/create-migration.md new file mode 100644 index 000000000..65f318ac6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create-migration.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->createMigration( + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create-restoration.md b/examples/2.3.x/server-php/examples/mysql/create-restoration.md new file mode 100644 index 000000000..b906838cc --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create-restoration.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->createRestoration( + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create-upgrade.md b/examples/2.3.x/server-php/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..a840d05cd --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create-upgrade.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->createUpgrade( + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/create.md b/examples/2.3.x/server-php/examples/mysql/create.md new file mode 100644 index 000000000..6d78be99e --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/create.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-php/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..34c1cec88 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/delete-backup-policy.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->deleteBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/delete-backup.md b/examples/2.3.x/server-php/examples/mysql/delete-backup.md new file mode 100644 index 000000000..2dc66b780 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/delete-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->deleteBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/delete-branch.md b/examples/2.3.x/server-php/examples/mysql/delete-branch.md new file mode 100644 index 000000000..708863509 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/delete-branch.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->deleteBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/delete.md b/examples/2.3.x/server-php/examples/mysql/delete.md new file mode 100644 index 000000000..28594d0fe --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->delete( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-php/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..6174e24b4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/get-backup-policy.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->getBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/get-backup.md b/examples/2.3.x/server-php/examples/mysql/get-backup.md new file mode 100644 index 000000000..be6f44801 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/get-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->getBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/get-pitr.md b/examples/2.3.x/server-php/examples/mysql/get-pitr.md new file mode 100644 index 000000000..7fe7d049d --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/get-pitr.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->getPitr( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/get-pooler.md b/examples/2.3.x/server-php/examples/mysql/get-pooler.md new file mode 100644 index 000000000..336067c8c --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/get-pooler.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->getPooler( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/get-replicas.md b/examples/2.3.x/server-php/examples/mysql/get-replicas.md new file mode 100644 index 000000000..fe41dbbe5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/get-replicas.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->getReplicas( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/get-restoration.md b/examples/2.3.x/server-php/examples/mysql/get-restoration.md new file mode 100644 index 000000000..0cfaa2250 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/get-restoration.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->getRestoration( + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/get-status.md b/examples/2.3.x/server-php/examples/mysql/get-status.md new file mode 100644 index 000000000..9467ffeae --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/get-status.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->getStatus( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/get.md b/examples/2.3.x/server-php/examples/mysql/get.md new file mode 100644 index 000000000..7d72ba5c7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->get( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-php/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..5586d5ab2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/list-backup-policies.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->listBackupPolicies( + databaseId: '<DATABASE_ID>', + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/list-backups.md b/examples/2.3.x/server-php/examples/mysql/list-backups.md new file mode 100644 index 000000000..1604dc862 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/list-backups.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->listBackups( + databaseId: '<DATABASE_ID>', + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/list-branches.md b/examples/2.3.x/server-php/examples/mysql/list-branches.md new file mode 100644 index 000000000..079e58c6d --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/list-branches.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->listBranches( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/list-operations.md b/examples/2.3.x/server-php/examples/mysql/list-operations.md new file mode 100644 index 000000000..1126a4232 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/list-operations.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/list-restorations.md b/examples/2.3.x/server-php/examples/mysql/list-restorations.md new file mode 100644 index 000000000..8407ea06c --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/list-restorations.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->listRestorations( + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/list-specifications.md b/examples/2.3.x/server-php/examples/mysql/list-specifications.md new file mode 100644 index 000000000..217a65ec4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/list-specifications.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->listSpecifications(); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/list.md b/examples/2.3.x/server-php/examples/mysql/list.md new file mode 100644 index 000000000..a038ae93d --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/list.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->list( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-php/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..ce71dc677 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/update-backup-policy.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->updateBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-php/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..5847be85b --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/update-backup-storage.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->updateBackupStorage( + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/update-credentials.md b/examples/2.3.x/server-php/examples/mysql/update-credentials.md new file mode 100644 index 000000000..3b5a4fd59 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/update-credentials.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->updateCredentials( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/update-maintenance.md b/examples/2.3.x/server-php/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..1e15ad660 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/update-maintenance.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->updateMaintenance( + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0 +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/update-pooler.md b/examples/2.3.x/server-php/examples/mysql/update-pooler.md new file mode 100644 index 000000000..83b5a9e88 --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/update-pooler.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->updatePooler( + databaseId: '<DATABASE_ID>', + mode: 'transaction', // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: '<POOLER_CPU_REQUEST>', // optional + poolerCpuLimit: '<POOLER_CPU_LIMIT>', // optional + poolerMemoryRequest: '<POOLER_MEMORY_REQUEST>', // optional + poolerMemoryLimit: '<POOLER_MEMORY_LIMIT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/mysql/update.md b/examples/2.3.x/server-php/examples/mysql/update.md new file mode 100644 index 000000000..b9fd3a1fc --- /dev/null +++ b/examples/2.3.x/server-php/examples/mysql/update.md @@ -0,0 +1,37 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Mysql; + +$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 + +$mysql = new Mysql($client); + +$result = $mysql->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/approve.md b/examples/2.3.x/server-php/examples/oauth2/approve.md new file mode 100644 index 000000000..2a9f07aae --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/approve.md @@ -0,0 +1,19 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->approve( + grantId: '<GRANT_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + scope: '<SCOPE>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/authorize-post.md b/examples/2.3.x/server-php/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..4048c0ec5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/authorize-post.md @@ -0,0 +1,30 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->authorizePost( + clientId: '<CLIENT_ID>', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional + requestUri: '<REQUEST_URI>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/authorize.md b/examples/2.3.x/server-php/examples/oauth2/authorize.md new file mode 100644 index 000000000..2486f9de5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/authorize.md @@ -0,0 +1,30 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->authorize( + clientId: '<CLIENT_ID>', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>', // optional + requestUri: '<REQUEST_URI>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-php/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..58fbb8dda --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/create-device-authorization.md @@ -0,0 +1,21 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->createDeviceAuthorization( + clientId: '<CLIENT_ID>', // optional + scope: '<SCOPE>', // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/create-grant.md b/examples/2.3.x/server-php/examples/oauth2/create-grant.md new file mode 100644 index 000000000..a0328e696 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/create-grant.md @@ -0,0 +1,17 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->createGrant( + userCode: '<USER_CODE>' +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/create-par.md b/examples/2.3.x/server-php/examples/oauth2/create-par.md new file mode 100644 index 000000000..63d8b3f72 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/create-par.md @@ -0,0 +1,29 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->createPAR( + clientId: '<CLIENT_ID>', + redirectUri: 'https://example.com', + responseType: 'code', + scope: '<SCOPE>', // optional + state: '<STATE>', // optional + nonce: '<NONCE>', // optional + codeChallenge: '<CODE_CHALLENGE>', // optional + codeChallengeMethod: 's256', // optional + prompt: '<PROMPT>', // optional + maxAge: 0, // optional + authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional + resource: '', // optional + audience: '<AUDIENCE>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/create-token.md b/examples/2.3.x/server-php/examples/oauth2/create-token.md new file mode 100644 index 000000000..26825bdb8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/create-token.md @@ -0,0 +1,26 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->createToken( + grantType: '<GRANT_TYPE>', + code: '<CODE>', // 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-php/examples/oauth2/get-grant.md b/examples/2.3.x/server-php/examples/oauth2/get-grant.md new file mode 100644 index 000000000..d83efe8f0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/get-grant.md @@ -0,0 +1,17 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->getGrant( + grantId: '<GRANT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/list-organizations.md b/examples/2.3.x/server-php/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..7237c3f8d --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/list-organizations.md @@ -0,0 +1,19 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->listOrganizations( + limit: 1, // optional + offset: 0, // optional + search: '<SEARCH>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/list-projects.md b/examples/2.3.x/server-php/examples/oauth2/list-projects.md new file mode 100644 index 000000000..9abc1548a --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/list-projects.md @@ -0,0 +1,19 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->listProjects( + limit: 1, // optional + offset: 0, // optional + search: '<SEARCH>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/reject.md b/examples/2.3.x/server-php/examples/oauth2/reject.md new file mode 100644 index 000000000..0cc9cf7f0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/reject.md @@ -0,0 +1,17 @@ +```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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->reject( + grantId: '<GRANT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/oauth2/revoke.md b/examples/2.3.x/server-php/examples/oauth2/revoke.md new file mode 100644 index 000000000..1e8230036 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/revoke.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 + ->setSession(''); // The user session to authenticate with + +$oauth2 = new Oauth2($client); + +$result = $oauth2->revoke( + 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 new file mode 100644 index 000000000..1272ccd19 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; +use Appwrite\Enums\ProjectKeyScopes; + +$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 + +$organization = new Organization($client); + +$result = $organization->createEphemeralProjectKey( + projectId: '<PROJECT_ID>', + scopes: [ProjectKeyScopes::PROJECTREAD()], + duration: 600 +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/create-installation.md b/examples/2.3.x/server-php/examples/organization/create-installation.md new file mode 100644 index 000000000..70a656e75 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/create-installation.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->createInstallation( + appId: '<APP_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/create-membership.md b/examples/2.3.x/server-php/examples/organization/create-membership.md new file mode 100644 index 000000000..c0de51a8f --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/create-membership.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->createMembership( + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/create-project.md b/examples/2.3.x/server-php/examples/organization/create-project.md new file mode 100644 index 000000000..12288f4f8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/create-project.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; +use Appwrite\Enums\Region; + +$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 + +$organization = new Organization($client); + +$result = $organization->createProject( + projectId: '<PROJECT_ID>', + name: '<NAME>', + region: Region::FRA() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/delete-installation.md b/examples/2.3.x/server-php/examples/organization/delete-installation.md new file mode 100644 index 000000000..c0eab5cd0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/delete-installation.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->deleteInstallation( + installationId: '<INSTALLATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/delete-membership.md b/examples/2.3.x/server-php/examples/organization/delete-membership.md new file mode 100644 index 000000000..86b73786e --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/delete-membership.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->deleteMembership( + membershipId: '<MEMBERSHIP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/delete-project-key.md b/examples/2.3.x/server-php/examples/organization/delete-project-key.md new file mode 100644 index 000000000..29483c93f --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/delete-project-key.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->deleteProjectKey( + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/delete-project.md b/examples/2.3.x/server-php/examples/organization/delete-project.md new file mode 100644 index 000000000..3456ab77c --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/delete-project.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->deleteProject( + projectId: '<PROJECT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/delete.md b/examples/2.3.x/server-php/examples/organization/delete.md new file mode 100644 index 000000000..1160857a9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/delete.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->delete(); +``` diff --git a/examples/2.3.x/server-php/examples/organization/get-installation.md b/examples/2.3.x/server-php/examples/organization/get-installation.md new file mode 100644 index 000000000..fea4b673b --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/get-installation.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->getInstallation( + installationId: '<INSTALLATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/get-membership.md b/examples/2.3.x/server-php/examples/organization/get-membership.md new file mode 100644 index 000000000..bb5802ca0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/get-membership.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->getMembership( + membershipId: '<MEMBERSHIP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/get-project-key.md b/examples/2.3.x/server-php/examples/organization/get-project-key.md new file mode 100644 index 000000000..7e777a454 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/get-project-key.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->getProjectKey( + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/get-project.md b/examples/2.3.x/server-php/examples/organization/get-project.md new file mode 100644 index 000000000..97fe8c37b --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/get-project.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->getProject( + projectId: '<PROJECT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/get.md b/examples/2.3.x/server-php/examples/organization/get.md new file mode 100644 index 000000000..6fb38198f --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/get.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->get(); +``` diff --git a/examples/2.3.x/server-php/examples/organization/list-installations.md b/examples/2.3.x/server-php/examples/organization/list-installations.md new file mode 100644 index 000000000..016988c38 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/list-installations.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->listInstallations( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/list-memberships.md b/examples/2.3.x/server-php/examples/organization/list-memberships.md new file mode 100644 index 000000000..fa76eb4de --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/list-memberships.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->listMemberships( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/list-project-keys.md b/examples/2.3.x/server-php/examples/organization/list-project-keys.md new file mode 100644 index 000000000..64b5490b1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/list-project-keys.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->listProjectKeys( + projectId: '<PROJECT_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/list-projects.md b/examples/2.3.x/server-php/examples/organization/list-projects.md new file mode 100644 index 000000000..d44084b85 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/list-projects.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->listProjects( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/update-installation.md b/examples/2.3.x/server-php/examples/organization/update-installation.md new file mode 100644 index 000000000..af6cf57bf --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/update-installation.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->updateInstallation( + installationId: '<INSTALLATION_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/update-membership.md b/examples/2.3.x/server-php/examples/organization/update-membership.md new file mode 100644 index 000000000..63994a9fd --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/update-membership.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->updateMembership( + membershipId: '<MEMBERSHIP_ID>', + roles: [] +); +``` 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 new file mode 100644 index 000000000..0781b1fb1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/update-project-key.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; +use Appwrite\Enums\ProjectKeyScopes; + +$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 + +$organization = new Organization($client); + +$result = $organization->updateProjectKey( + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [ProjectKeyScopes::PROJECTREAD()], + expire: '2020-10-15T06:38:00.000+00:00' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/update-project.md b/examples/2.3.x/server-php/examples/organization/update-project.md new file mode 100644 index 000000000..577fe9f86 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/update-project.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->updateProject( + projectId: '<PROJECT_ID>', + name: '<NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/update.md b/examples/2.3.x/server-php/examples/organization/update.md new file mode 100644 index 000000000..1c2ccac42 --- /dev/null +++ b/examples/2.3.x/server-php/examples/organization/update.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Organization; + +$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 + +$organization = new Organization($client); + +$result = $organization->update( + name: '<NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-php/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..76ac24377 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-backup-policy.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-backup.md b/examples/2.3.x/server-php/examples/postgresql/create-backup.md new file mode 100644 index 000000000..7339850ef --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createBackup( + databaseId: '<DATABASE_ID>', + type: 'full' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-branch.md b/examples/2.3.x/server-php/examples/postgresql/create-branch.md new file mode 100644 index 000000000..88d08232c --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-branch.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>', // optional + ttl: 300 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-execution.md b/examples/2.3.x/server-php/examples/postgresql/create-execution.md new file mode 100644 index 000000000..68bf4df92 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-execution.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createExecution( + databaseId: '<DATABASE_ID>', + sql: '<SQL>', + bindings: [], // optional + timeoutSeconds: 1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-extension.md b/examples/2.3.x/server-php/examples/postgresql/create-extension.md new file mode 100644 index 000000000..d53b5cd01 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-extension.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createExtension( + databaseId: '<DATABASE_ID>', + name: '<NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-failover.md b/examples/2.3.x/server-php/examples/postgresql/create-failover.md new file mode 100644 index 000000000..104996d5b --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-failover.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-migration.md b/examples/2.3.x/server-php/examples/postgresql/create-migration.md new file mode 100644 index 000000000..d3a294e5c --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-migration.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createMigration( + databaseId: '<DATABASE_ID>', + targetType: 'shared', + specification: '<SPECIFICATION>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-restoration.md b/examples/2.3.x/server-php/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..f94c6972d --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-restoration.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createRestoration( + databaseId: '<DATABASE_ID>', + type: 'backup', // optional + backupId: '<BACKUP_ID>', // optional + targetDatabaseId: '<TARGET_DATABASE_ID>', // optional + targetTime: '2020-10-15T06:38:00.000+00:00' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-php/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..d8c472e82 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create-upgrade.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->createUpgrade( + databaseId: '<DATABASE_ID>', + targetVersion: '<TARGET_VERSION>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/create.md b/examples/2.3.x/server-php/examples/postgresql/create.md new file mode 100644 index 000000000..8f9c160a9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/create.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + version: '17', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-php/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..74fb3d36c --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->deleteBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/delete-backup.md b/examples/2.3.x/server-php/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..4b05fc9e0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/delete-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->deleteBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/delete-branch.md b/examples/2.3.x/server-php/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..c46f8a099 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/delete-branch.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->deleteBranch( + databaseId: '<DATABASE_ID>', + branchId: '<BRANCH_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/delete-extension.md b/examples/2.3.x/server-php/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..0d03c5787 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/delete-extension.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->deleteExtension( + databaseId: '<DATABASE_ID>', + extensionName: '<EXTENSION_NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/delete.md b/examples/2.3.x/server-php/examples/postgresql/delete.md new file mode 100644 index 000000000..94a1a54ef --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->delete( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-php/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..a89ad91e9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/get-backup-policy.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->getBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/get-backup.md b/examples/2.3.x/server-php/examples/postgresql/get-backup.md new file mode 100644 index 000000000..f1bacfdd5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/get-backup.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->getBackup( + databaseId: '<DATABASE_ID>', + backupId: '<BACKUP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/get-pitr.md b/examples/2.3.x/server-php/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..878354c5b --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/get-pitr.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->getPitr( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/get-pooler.md b/examples/2.3.x/server-php/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..725fa54ea --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/get-pooler.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->getPooler( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/get-replicas.md b/examples/2.3.x/server-php/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..9ee070186 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/get-replicas.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->getReplicas( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/get-restoration.md b/examples/2.3.x/server-php/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..2b40395a4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/get-restoration.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->getRestoration( + databaseId: '<DATABASE_ID>', + restorationId: '<RESTORATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/get-status.md b/examples/2.3.x/server-php/examples/postgresql/get-status.md new file mode 100644 index 000000000..541e61191 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/get-status.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->getStatus( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/get.md b/examples/2.3.x/server-php/examples/postgresql/get.md new file mode 100644 index 000000000..1c14c3f5c --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->get( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-php/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..aff3883b3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/list-backup-policies.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->listBackupPolicies( + databaseId: '<DATABASE_ID>', + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/list-backups.md b/examples/2.3.x/server-php/examples/postgresql/list-backups.md new file mode 100644 index 000000000..7aa154493 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/list-backups.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->listBackups( + databaseId: '<DATABASE_ID>', + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/list-branches.md b/examples/2.3.x/server-php/examples/postgresql/list-branches.md new file mode 100644 index 000000000..84d2600a0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/list-branches.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->listBranches( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/list-extensions.md b/examples/2.3.x/server-php/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..7551322aa --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/list-extensions.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->listExtensions( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/list-operations.md b/examples/2.3.x/server-php/examples/postgresql/list-operations.md new file mode 100644 index 000000000..fbd43f212 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/list-operations.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/list-restorations.md b/examples/2.3.x/server-php/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..2c97a2869 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/list-restorations.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->listRestorations( + databaseId: '<DATABASE_ID>', + status: 'pending', // optional + type: 'backup', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/list-specifications.md b/examples/2.3.x/server-php/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..343beaf52 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/list-specifications.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->listSpecifications(); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/list.md b/examples/2.3.x/server-php/examples/postgresql/list.md new file mode 100644 index 000000000..090939e39 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/list.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->list( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-php/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..65dd72f34 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/update-backup-policy.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->updateBackupPolicy( + databaseId: '<DATABASE_ID>', + policyId: '<POLICY_ID>', + name: '<NAME>', // optional + schedule: '', // optional + retention: 1, // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-php/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..5d882b329 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/update-backup-storage.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->updateBackupStorage( + databaseId: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + accessKey: '<ACCESS_KEY>', + secretKey: '<SECRET_KEY>', + region: '<REGION>', // optional + prefix: '<PREFIX>', // optional + endpoint: '<ENDPOINT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/update-credentials.md b/examples/2.3.x/server-php/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..18a84f50e --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/update-credentials.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->updateCredentials( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-php/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..7554edff7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/update-maintenance.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->updateMaintenance( + databaseId: '<DATABASE_ID>', + day: 'sun', + hourUtc: 0 +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/update-pooler.md b/examples/2.3.x/server-php/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..f245baa59 --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/update-pooler.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->updatePooler( + databaseId: '<DATABASE_ID>', + mode: 'transaction', // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: '<POOLER_CPU_REQUEST>', // optional + poolerCpuLimit: '<POOLER_CPU_LIMIT>', // optional + poolerMemoryRequest: '<POOLER_MEMORY_REQUEST>', // optional + poolerMemoryLimit: '<POOLER_MEMORY_LIMIT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/postgresql/update.md b/examples/2.3.x/server-php/examples/postgresql/update.md new file mode 100644 index 000000000..52f299c9a --- /dev/null +++ b/examples/2.3.x/server-php/examples/postgresql/update.md @@ -0,0 +1,37 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Postgresql; + +$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 + +$postgresql = new Postgresql($client); + +$result = $postgresql->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + status: 'ready', // optional + specification: '<SPECIFICATION>', // optional + replicas: 0, // optional + syncMode: 'async', // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: null, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/presences/delete.md b/examples/2.3.x/server-php/examples/presences/delete.md new file mode 100644 index 000000000..c303ca79a --- /dev/null +++ b/examples/2.3.x/server-php/examples/presences/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Presences; + +$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 + +$presences = new Presences($client); + +$result = $presences->delete( + presenceId: '<PRESENCE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/presences/get.md b/examples/2.3.x/server-php/examples/presences/get.md new file mode 100644 index 000000000..24619c6e0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/presences/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Presences; + +$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 + +$presences = new Presences($client); + +$result = $presences->get( + presenceId: '<PRESENCE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/presences/list.md b/examples/2.3.x/server-php/examples/presences/list.md new file mode 100644 index 000000000..5fb17b992 --- /dev/null +++ b/examples/2.3.x/server-php/examples/presences/list.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Presences; + +$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 + +$presences = new Presences($client); + +$result = $presences->list( + queries: [], // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/presences/update.md b/examples/2.3.x/server-php/examples/presences/update.md new file mode 100644 index 000000000..dc05bcfe3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/presences/update.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Presences; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$presences = new Presences($client); + +$result = $presences->update( + presenceId: '<PRESENCE_ID>', + userId: '<USER_ID>', + status: '<STATUS>', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: [], // optional + permissions: [Permission::read(Role::any())], // optional + purge: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/presences/upsert.md b/examples/2.3.x/server-php/examples/presences/upsert.md new file mode 100644 index 000000000..df2e58dcf --- /dev/null +++ b/examples/2.3.x/server-php/examples/presences/upsert.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Presences; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$presences = new Presences($client); + +$result = $presences->upsert( + presenceId: '<PRESENCE_ID>', + userId: '<USER_ID>', + status: '<STATUS>', + permissions: [Permission::read(Role::any())], // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/create-android-platform.md b/examples/2.3.x/server-php/examples/project/create-android-platform.md new file mode 100644 index 000000000..ae1df1971 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-android-platform.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->createAndroidPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + applicationId: '<APPLICATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/create-apple-platform.md b/examples/2.3.x/server-php/examples/project/create-apple-platform.md new file mode 100644 index 000000000..6b2bbd24b --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-apple-platform.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->createApplePlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + bundleIdentifier: '<BUNDLE_IDENTIFIER>' +); +``` 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 new file mode 100644 index 000000000..224dc841a --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-ephemeral-key.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectKeyScopes; + +$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->createEphemeralKey( + scopes: [ProjectKeyScopes::PROJECTREAD()], + duration: 600 +); +``` diff --git a/examples/2.3.x/server-php/examples/project/create-linux-platform.md b/examples/2.3.x/server-php/examples/project/create-linux-platform.md new file mode 100644 index 000000000..e7ea4295c --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-linux-platform.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->createLinuxPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageName: '<PACKAGE_NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/create-mock-phone.md b/examples/2.3.x/server-php/examples/project/create-mock-phone.md new file mode 100644 index 000000000..87da696cc --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-mock-phone.md @@ -0,0 +1,18 @@ +```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->createMockPhone( + number: '+12065550100', + otp: '<OTP>' +); +``` 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 new file mode 100644 index 000000000..a16026a82 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-smtp-test.md @@ -0,0 +1,17 @@ +```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->createSMTPTest( + emails: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/project/create-variable.md b/examples/2.3.x/server-php/examples/project/create-variable.md new file mode 100644 index 000000000..1bf09c499 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-variable.md @@ -0,0 +1,20 @@ +```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->createVariable( + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/create-web-platform.md b/examples/2.3.x/server-php/examples/project/create-web-platform.md new file mode 100644 index 000000000..dc1f7e81f --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-web-platform.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->createWebPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/create-windows-platform.md b/examples/2.3.x/server-php/examples/project/create-windows-platform.md new file mode 100644 index 000000000..c9dd6500c --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/create-windows-platform.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->createWindowsPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/delete-key.md b/examples/2.3.x/server-php/examples/project/delete-key.md new file mode 100644 index 000000000..b964e9d17 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/delete-key.md @@ -0,0 +1,17 @@ +```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->deleteKey( + keyId: '<KEY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/delete-mock-phone.md b/examples/2.3.x/server-php/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..c800757f1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/delete-mock-phone.md @@ -0,0 +1,17 @@ +```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->deleteMockPhone( + number: '+12065550100' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/delete-platform.md b/examples/2.3.x/server-php/examples/project/delete-platform.md new file mode 100644 index 000000000..9171a0bd4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/delete-platform.md @@ -0,0 +1,17 @@ +```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->deletePlatform( + platformId: '<PLATFORM_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/delete-variable.md b/examples/2.3.x/server-php/examples/project/delete-variable.md new file mode 100644 index 000000000..988ff801a --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/delete-variable.md @@ -0,0 +1,17 @@ +```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->deleteVariable( + variableId: '<VARIABLE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/delete.md b/examples/2.3.x/server-php/examples/project/delete.md new file mode 100644 index 000000000..adb632418 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/delete.md @@ -0,0 +1,15 @@ +```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->delete(); +``` diff --git a/examples/2.3.x/server-php/examples/project/get-email-template.md b/examples/2.3.x/server-php/examples/project/get-email-template.md new file mode 100644 index 000000000..87df1a1c0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/get-email-template.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectEmailTemplateId; +use Appwrite\Enums\ProjectEmailTemplateLocale; + +$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->getEmailTemplate( + templateId: ProjectEmailTemplateId::VERIFICATION(), + locale: ProjectEmailTemplateLocale::AF() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/get-key.md b/examples/2.3.x/server-php/examples/project/get-key.md new file mode 100644 index 000000000..45a87d10e --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/get-key.md @@ -0,0 +1,17 @@ +```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->getKey( + keyId: '<KEY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/get-mock-phone.md b/examples/2.3.x/server-php/examples/project/get-mock-phone.md new file mode 100644 index 000000000..e9a69c289 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/get-mock-phone.md @@ -0,0 +1,17 @@ +```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->getMockPhone( + number: '+12065550100' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-php/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..718e0e372 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuthProviderId; + +$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->getOAuth2Provider( + providerId: ProjectOAuthProviderId::AMAZON() +); +``` diff --git a/examples/2.3.x/server-php/examples/project/get-platform.md b/examples/2.3.x/server-php/examples/project/get-platform.md new file mode 100644 index 000000000..e99c8deaa --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/get-platform.md @@ -0,0 +1,17 @@ +```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->getPlatform( + platformId: '<PLATFORM_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/get-policy.md b/examples/2.3.x/server-php/examples/project/get-policy.md new file mode 100644 index 000000000..d629ac722 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/get-policy.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectPolicyId; + +$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->getPolicy( + policyId: ProjectPolicyId::PASSWORDDICTIONARY() +); +``` diff --git a/examples/2.3.x/server-php/examples/project/get-variable.md b/examples/2.3.x/server-php/examples/project/get-variable.md new file mode 100644 index 000000000..5d47cefee --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/get-variable.md @@ -0,0 +1,17 @@ +```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->getVariable( + variableId: '<VARIABLE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/get.md b/examples/2.3.x/server-php/examples/project/get.md new file mode 100644 index 000000000..4e90450b2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/get.md @@ -0,0 +1,15 @@ +```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->get(); +``` diff --git a/examples/2.3.x/server-php/examples/project/list-email-templates.md b/examples/2.3.x/server-php/examples/project/list-email-templates.md new file mode 100644 index 000000000..6887b8bda --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/list-email-templates.md @@ -0,0 +1,18 @@ +```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->listEmailTemplates( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/list-keys.md b/examples/2.3.x/server-php/examples/project/list-keys.md new file mode 100644 index 000000000..1430acd75 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/list-keys.md @@ -0,0 +1,18 @@ +```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->listKeys( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/list-mock-phones.md b/examples/2.3.x/server-php/examples/project/list-mock-phones.md new file mode 100644 index 000000000..7c49e8423 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/list-mock-phones.md @@ -0,0 +1,18 @@ +```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->listMockPhones( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-php/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..2cfec075a --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,18 @@ +```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->listOAuth2Providers( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/list-platforms.md b/examples/2.3.x/server-php/examples/project/list-platforms.md new file mode 100644 index 000000000..f5b1bbdde --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/list-platforms.md @@ -0,0 +1,18 @@ +```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->listPlatforms( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/list-policies.md b/examples/2.3.x/server-php/examples/project/list-policies.md new file mode 100644 index 000000000..2b8ffd339 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/list-policies.md @@ -0,0 +1,18 @@ +```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->listPolicies( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/list-variables.md b/examples/2.3.x/server-php/examples/project/list-variables.md new file mode 100644 index 000000000..8cce3662a --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/list-variables.md @@ -0,0 +1,18 @@ +```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->listVariables( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-android-platform.md b/examples/2.3.x/server-php/examples/project/update-android-platform.md new file mode 100644 index 000000000..1898911d1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-android-platform.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->updateAndroidPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + applicationId: '<APPLICATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-apple-platform.md b/examples/2.3.x/server-php/examples/project/update-apple-platform.md new file mode 100644 index 000000000..ec7f32458 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-apple-platform.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->updateApplePlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + bundleIdentifier: '<BUNDLE_IDENTIFIER>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-auth-method.md b/examples/2.3.x/server-php/examples/project/update-auth-method.md new file mode 100644 index 000000000..006f40f31 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-auth-method.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectAuthMethodId; + +$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->updateAuthMethod( + methodId: ProjectAuthMethodId::EMAILPASSWORD(), + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-php/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..c54022b9a --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,17 @@ +```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->updateDenyAliasedEmailPolicy( + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-php/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..d702cc354 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,17 @@ +```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->updateDenyCorporateEmailPolicy( + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-php/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..52698e38e --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,17 @@ +```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->updateDenyDisposableEmailPolicy( + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-php/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..98419586d --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,17 @@ +```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->updateDenyFreeEmailPolicy( + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-email-template.md b/examples/2.3.x/server-php/examples/project/update-email-template.md new file mode 100644 index 000000000..2659fb13b --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-email-template.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectEmailTemplateId; +use Appwrite\Enums\ProjectEmailTemplateLocale; + +$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->updateEmailTemplate( + templateId: ProjectEmailTemplateId::VERIFICATION(), + locale: ProjectEmailTemplateLocale::AF(), // optional + subject: '<SUBJECT>', // optional + message: '<MESSAGE>', // optional + senderName: '<SENDER_NAME>', // optional + senderEmail: 'email@example.com', // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>' // optional +); +``` 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 new file mode 100644 index 000000000..db8839455 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-key.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectKeyScopes; + +$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->updateKey( + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [ProjectKeyScopes::PROJECTREAD()], + 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 new file mode 100644 index 000000000..aace3165f --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-labels.md @@ -0,0 +1,17 @@ +```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->updateLabels( + labels: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-linux-platform.md b/examples/2.3.x/server-php/examples/project/update-linux-platform.md new file mode 100644 index 000000000..1e1cb5f9c --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-linux-platform.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->updateLinuxPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageName: '<PACKAGE_NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-php/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..145d31675 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,22 @@ +```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->updateMembershipPrivacyPolicy( + userId: false, // optional + userEmail: false, // optional + userPhone: false, // optional + userName: false, // optional + userMFA: false, // optional + userAccessedAt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-php/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..c0eb035d7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-mfa-factors-policy.md @@ -0,0 +1,20 @@ +```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->updateMFAFactorsPolicy( + totp: false, // optional + email: false, // optional + phone: false, // optional + custom: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-mock-phone.md b/examples/2.3.x/server-php/examples/project/update-mock-phone.md new file mode 100644 index 000000000..7befe9a80 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-mock-phone.md @@ -0,0 +1,18 @@ +```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->updateMockPhone( + number: '+12065550100', + otp: '<OTP>' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..f73c85e47 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-amazon.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->updateOAuth2Amazon( + 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-apple.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..47bf7045f --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,23 @@ +```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->updateOAuth2Apple( + serviceId: '<SERVICE_ID>', // optional + keyId: '<KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + p8File: '<P8_FILE>', // optional + nativeClientIds: [], // optional + enabled: false, // optional + nativeEnabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..bf5252d40 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-appwrite.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->updateOAuth2Appwrite( + 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-auth-0.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..b80b4b154 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-auth-0.md @@ -0,0 +1,20 @@ +```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->updateOAuth2Auth0( + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..0a6c66ac0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-authentik.md @@ -0,0 +1,20 @@ +```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->updateOAuth2Authentik( + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..8c3eba870 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-autodesk.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->updateOAuth2Autodesk( + 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-bitbucket.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..d33326ec2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-bitbucket.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->updateOAuth2Bitbucket( + key: '<KEY>', // optional + secret: '<SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..40de46672 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-bitly.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->updateOAuth2Bitly( + 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-box.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..551499877 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-box.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->updateOAuth2Box( + 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-cloudflare.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..95e98cbb0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-cloudflare.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->updateOAuth2Cloudflare( + 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-dailymotion.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..112a73019 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-dailymotion.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->updateOAuth2Dailymotion( + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // 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 new file mode 100644 index 000000000..9a0b16162 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-discord.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->updateOAuth2Discord( + 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-disqus.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..ffc8e7351 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-disqus.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->updateOAuth2Disqus( + publicKey: '<PUBLIC_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..982c6f3dd --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-dropbox.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->updateOAuth2Dropbox( + appKey: '<APP_KEY>', // optional + appSecret: '<APP_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..01c45f245 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-etsy.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->updateOAuth2Etsy( + keyString: '<KEY_STRING>', // optional + sharedSecret: '<SHARED_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..0545945a6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-facebook.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->updateOAuth2Facebook( + appId: '<APP_ID>', // optional + appSecret: '<APP_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..420ebc066 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-figma.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->updateOAuth2Figma( + 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-fusion-auth.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..bc8e7205e --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,20 @@ +```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->updateOAuth2FusionAuth( + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // 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 new file mode 100644 index 000000000..92dc57265 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-git-hub.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->updateOAuth2GitHub( + 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-gitlab.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..485d05f1a --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-gitlab.md @@ -0,0 +1,20 @@ +```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->updateOAuth2Gitlab( + applicationId: '<APPLICATION_ID>', // optional + secret: '<SECRET>', // optional + endpoint: 'https://example.com', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..aecc34bb6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-google.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2GooglePrompt; + +$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->updateOAuth2Google( + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2GooglePrompt::NONE()], // optional + nativeClientIds: [], // optional + enabled: false, // optional + nativeEnabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..c42599ab1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-hugging-face.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->updateOAuth2HuggingFace( + 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-kakao.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..6262f8694 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-kakao.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->updateOAuth2Kakao( + 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-keycloak.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..19d9b9b21 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,21 @@ +```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->updateOAuth2Keycloak( + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + endpoint: '<ENDPOINT>', // optional + realmName: '<REALM_NAME>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..39aba8916 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-kick.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->updateOAuth2Kick( + 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-linkedin.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..f80ea7a45 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-linkedin.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->updateOAuth2Linkedin( + clientId: '<CLIENT_ID>', // optional + primaryClientSecret: '<PRIMARY_CLIENT_SECRET>', // 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 new file mode 100644 index 000000000..349bf9329 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-microsoft.md @@ -0,0 +1,20 @@ +```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->updateOAuth2Microsoft( + applicationId: '<APPLICATION_ID>', // optional + applicationSecret: '<APPLICATION_SECRET>', // optional + tenant: '<TENANT>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..d4de282bd --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-notion.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->updateOAuth2Notion( + oauthClientId: '<OAUTH_CLIENT_ID>', // optional + oauthClientSecret: '<OAUTH_CLIENT_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..f3b1b8a0a --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2OidcPrompt; + +$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->updateOAuth2Oidc( + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + wellKnownURL: 'https://example.com', // optional + authorizationURL: 'https://example.com', // optional + tokenURL: 'https://example.com', // optional + userInfoURL: 'https://example.com', // optional + prompt: [ProjectOAuth2OidcPrompt::NONE()], // optional + maxAge: 0, // 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 new file mode 100644 index 000000000..e03c9b833 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,21 @@ +```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->updateOAuth2Okta( + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + domain: 'example.com', // optional + authorizationServerId: '<AUTHORIZATION_SERVER_ID>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..c6e4096f0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-paypal-sandbox.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->updateOAuth2PaypalSandbox( + clientId: '<CLIENT_ID>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..bab2e8c41 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-paypal.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->updateOAuth2Paypal( + clientId: '<CLIENT_ID>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..411269c6d --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-podio.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->updateOAuth2Podio( + 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-resend.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..89c0ba70c --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-resend.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->updateOAuth2Resend( + 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-salesforce.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..1247627ca --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-salesforce.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->updateOAuth2Salesforce( + customerKey: '<CUSTOMER_KEY>', // optional + customerSecret: '<CUSTOMER_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..08a2c921c --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-server.md @@ -0,0 +1,32 @@ +```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->updateOAuth2Server( + enabled: false, + authorizationUrl: 'https://example.com', + scopes: [], // optional + authorizationDetailsTypes: [], // optional + accessTokenDuration: 60, // optional + refreshTokenDuration: 60, // optional + publicAccessTokenDuration: 60, // optional + publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional + confidentialPkce: false, // optional + verificationUrl: 'https://example.com', // optional + userCodeLength: 6, // optional + userCodeFormat: 'numeric', // optional + deviceCodeDuration: 60, // optional + defaultScopes: [], // optional + installationScopes: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..0f07f22a9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-slack.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->updateOAuth2Slack( + 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-spotify.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..08e7e89db --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-spotify.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->updateOAuth2Spotify( + 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-stripe.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..975f39257 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-stripe.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->updateOAuth2Stripe( + clientId: '<CLIENT_ID>', // optional + apiSecretKey: '<API_SECRET_KEY>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..435ab6643 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-tik-tok.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->updateOAuth2TikTok( + 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-tradeshift-sandbox.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..74e32d316 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-tradeshift-sandbox.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->updateOAuth2TradeshiftSandbox( + oauth2ClientId: '<OAUTH2_CLIENT_ID>', // optional + oauth2ClientSecret: '<OAUTH2_CLIENT_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..a9431d32d --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-tradeshift.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->updateOAuth2Tradeshift( + oauth2ClientId: '<OAUTH2_CLIENT_ID>', // optional + oauth2ClientSecret: '<OAUTH2_CLIENT_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..0e66fc0eb --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-twitch.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->updateOAuth2Twitch( + 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-word-press.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..77469fa1e --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-word-press.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->updateOAuth2WordPress( + 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-yahoo.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..379bb0553 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-yahoo.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->updateOAuth2Yahoo( + 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-yandex.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..f756b1000 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-yandex.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->updateOAuth2Yandex( + 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 new file mode 100644 index 000000000..624b7f4fc --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-zoho.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->updateOAuth2Zoho( + 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-zoom.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..655a54820 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-zoom.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->updateOAuth2Zoom( + 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-2x.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..93f3ef31d --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2x.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->updateOAuth2X( + customerKey: '<CUSTOMER_KEY>', // optional + secretKey: '<SECRET_KEY>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-php/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..5a8da06fa --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,17 @@ +```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->updatePasswordDictionaryPolicy( + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-password-history-policy.md b/examples/2.3.x/server-php/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..2d4c36ef6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-password-history-policy.md @@ -0,0 +1,17 @@ +```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->updatePasswordHistoryPolicy( + total: 1 +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-php/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..70cc79d11 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,17 @@ +```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->updatePasswordPersonalDataPolicy( + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-php/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..5cd19adea --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-password-pwned-policy.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->updatePasswordPwnedPolicy( + enabled: false, // optional + sessions: false, // optional + users: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-php/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..08ca290f5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-password-strength-policy.md @@ -0,0 +1,21 @@ +```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->updatePasswordStrengthPolicy( + min: 8, // optional + uppercase: false, // optional + lowercase: false, // optional + number: false, // optional + symbols: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-protocol.md b/examples/2.3.x/server-php/examples/project/update-protocol.md new file mode 100644 index 000000000..1b8a71f2b --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-protocol.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectProtocolId; + +$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->updateProtocol( + protocolId: ProjectProtocolId::REST(), + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-service.md b/examples/2.3.x/server-php/examples/project/update-service.md new file mode 100644 index 000000000..606dcca0e --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-service.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectServiceId; + +$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->updateService( + serviceId: ProjectServiceId::ACCOUNT(), + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-php/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..3973a5a9c --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-session-alert-policy.md @@ -0,0 +1,17 @@ +```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->updateSessionAlertPolicy( + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-php/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..a6f29fc7e --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-session-duration-policy.md @@ -0,0 +1,17 @@ +```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->updateSessionDurationPolicy( + duration: 60 +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-php/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..57b9b4fbb --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,17 @@ +```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->updateSessionInvalidationPolicy( + enabled: false +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-php/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..5dbda4193 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-session-limit-policy.md @@ -0,0 +1,17 @@ +```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->updateSessionLimitPolicy( + total: 1 +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-smtp.md b/examples/2.3.x/server-php/examples/project/update-smtp.md new file mode 100644 index 000000000..46c5569b1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-smtp.md @@ -0,0 +1,27 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; +use Appwrite\Enums\ProjectSMTPSecure; + +$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->updateSMTP( + host: 'example.com', // optional + port: 587, // optional + username: '<USERNAME>', // optional + password: 'password', // optional + senderEmail: 'email@example.com', // optional + senderName: '<SENDER_NAME>', // optional + replyToEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + secure: ProjectSMTPSecure::TLS(), // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-php/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..0c75e1011 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-user-limit-policy.md @@ -0,0 +1,17 @@ +```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->updateUserLimitPolicy( + total: 0 +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-variable.md b/examples/2.3.x/server-php/examples/project/update-variable.md new file mode 100644 index 000000000..632467898 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-variable.md @@ -0,0 +1,20 @@ +```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->updateVariable( + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-web-platform.md b/examples/2.3.x/server-php/examples/project/update-web-platform.md new file mode 100644 index 000000000..5066fc6e4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-web-platform.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->updateWebPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-windows-platform.md b/examples/2.3.x/server-php/examples/project/update-windows-platform.md new file mode 100644 index 000000000..25e4f3e9e --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-windows-platform.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->updateWindowsPlatform( + platformId: '<PLATFORM_ID>', + name: '<NAME>', + packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/create-api-rule.md b/examples/2.3.x/server-php/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..20afada28 --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/create-api-rule.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->createAPIRule( + domain: 'example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/create-function-rule.md b/examples/2.3.x/server-php/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..8e04ee22f --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/create-function-rule.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->createFunctionRule( + domain: 'example.com', + functionId: '<FUNCTION_ID>', + branch: '<BRANCH>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/create-invalidation.md b/examples/2.3.x/server-php/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..fde01fc22 --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/create-invalidation.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; +use Appwrite\Enums\InvalidationType; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->createInvalidation( + domain: 'example.com', + type: InvalidationType::TAG(), + reference: '<REFERENCE>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-php/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..475317173 --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/create-redirect-rule.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; +use Appwrite\Enums\StatusCode; +use Appwrite\Enums\ProxyResourceType; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->createRedirectRule( + domain: 'example.com', + url: 'https://example.com', + statusCode: StatusCode::MOVEDPERMANENTLY(), + resourceId: '<RESOURCE_ID>', + resourceType: ProxyResourceType::SITE() +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/create-site-rule.md b/examples/2.3.x/server-php/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..02b1b8716 --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/create-site-rule.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->createSiteRule( + domain: 'example.com', + siteId: '<SITE_ID>', + branch: '<BRANCH>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/delete-rule.md b/examples/2.3.x/server-php/examples/proxy/delete-rule.md new file mode 100644 index 000000000..34ab03d9e --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/delete-rule.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->deleteRule( + ruleId: '<RULE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/get-rule.md b/examples/2.3.x/server-php/examples/proxy/get-rule.md new file mode 100644 index 000000000..dd2f22766 --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/get-rule.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->getRule( + ruleId: '<RULE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/list-rules.md b/examples/2.3.x/server-php/examples/proxy/list-rules.md new file mode 100644 index 000000000..4f357f44e --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/list-rules.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->listRules( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/proxy/update-rule-status.md b/examples/2.3.x/server-php/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..c62487409 --- /dev/null +++ b/examples/2.3.x/server-php/examples/proxy/update-rule-status.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Proxy; + +$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 + +$proxy = new Proxy($client); + +$result = $proxy->updateRuleStatus( + ruleId: '<RULE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/create-deployment.md b/examples/2.3.x/server-php/examples/sites/create-deployment.md new file mode 100644 index 000000000..96bec4fdc --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/create-deployment.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->createDeployment( + siteId: '<SITE_ID>', + code: InputFile::withPath('file.png'), + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + activate: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-php/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..52cb598d6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->createDuplicateDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/create-template-deployment.md b/examples/2.3.x/server-php/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..5eb34f8dd --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/create-template-deployment.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\TemplateReferenceType; + +$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 + +$sites = new Sites($client); + +$result = $sites->createTemplateDeployment( + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + type: TemplateReferenceType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/create-variable.md b/examples/2.3.x/server-php/examples/sites/create-variable.md new file mode 100644 index 000000000..ea1baabdf --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/create-variable.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->createVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-php/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..3ffffd137 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/create-vcs-deployment.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\VCSReferenceType; + +$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 + +$sites = new Sites($client); + +$result = $sites->createVcsDeployment( + siteId: '<SITE_ID>', + type: VCSReferenceType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/create.md b/examples/2.3.x/server-php/examples/sites/create.md new file mode 100644 index 000000000..d25a024f1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/create.md @@ -0,0 +1,44 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\Framework; +use Appwrite\Enums\BuildRuntime; +use Appwrite\Enums\Adapter; +use Appwrite\Enums\ProjectKeyScopes; + +$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 + +$sites = new Sites($client); + +$result = $sites->create( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: Framework::ANALOG(), + buildRuntime: BuildRuntime::NODE145(), + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + startCommand: '<START_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + adapter: Adapter::STATIC(), // optional + installationId: '<INSTALLATION_ID>', // optional + fallbackFile: '<FALLBACK_FILE>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // optional + scopes: [ProjectKeyScopes::PROJECTREAD()] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/delete-deployment.md b/examples/2.3.x/server-php/examples/sites/delete-deployment.md new file mode 100644 index 000000000..df06bd2c0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/delete-deployment.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->deleteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/delete-log.md b/examples/2.3.x/server-php/examples/sites/delete-log.md new file mode 100644 index 000000000..67db0a86b --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/delete-log.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->deleteLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/delete-variable.md b/examples/2.3.x/server-php/examples/sites/delete-variable.md new file mode 100644 index 000000000..b8d24cb17 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/delete-variable.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->deleteVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/delete.md b/examples/2.3.x/server-php/examples/sites/delete.md new file mode 100644 index 000000000..8a37fe997 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->delete( + siteId: '<SITE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/get-deployment-download.md b/examples/2.3.x/server-php/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..b37b45e1d --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/get-deployment-download.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\DeploymentDownloadType; + +$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 + +$sites = new Sites($client); + +$result = $sites->getDeploymentDownload( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE(), // optional + token: '<TOKEN>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/get-deployment.md b/examples/2.3.x/server-php/examples/sites/get-deployment.md new file mode 100644 index 000000000..94138c06a --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/get-deployment.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->getDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/get-log.md b/examples/2.3.x/server-php/examples/sites/get-log.md new file mode 100644 index 000000000..e5b561a08 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/get-log.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->getLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/get-variable.md b/examples/2.3.x/server-php/examples/sites/get-variable.md new file mode 100644 index 000000000..9ab1ec370 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/get-variable.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->getVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/get.md b/examples/2.3.x/server-php/examples/sites/get.md new file mode 100644 index 000000000..013197669 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->get( + siteId: '<SITE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/list-deployments.md b/examples/2.3.x/server-php/examples/sites/list-deployments.md new file mode 100644 index 000000000..450c2890e --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/list-deployments.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->listDeployments( + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: 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 new file mode 100644 index 000000000..74ea88215 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/list-frameworks.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->listFrameworks(); +``` diff --git a/examples/2.3.x/server-php/examples/sites/list-logs.md b/examples/2.3.x/server-php/examples/sites/list-logs.md new file mode 100644 index 000000000..28f71df21 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/list-logs.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->listLogs( + siteId: '<SITE_ID>', + queries: [], // optional + 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 new file mode 100644 index 000000000..3a6826adc --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/list-specifications.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->listSpecifications( + type: 'runtimes' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/list-variables.md b/examples/2.3.x/server-php/examples/sites/list-variables.md new file mode 100644 index 000000000..047e609e1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/list-variables.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->listVariables( + siteId: '<SITE_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/list.md b/examples/2.3.x/server-php/examples/sites/list.md new file mode 100644 index 000000000..0d01e8131 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/list.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->list( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/update-deployment-status.md b/examples/2.3.x/server-php/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..d511aa62d --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/update-deployment-status.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->updateDeploymentStatus( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/update-site-deployment.md b/examples/2.3.x/server-php/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..ed1c580fa --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/update-site-deployment.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->updateSiteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/update-variable.md b/examples/2.3.x/server-php/examples/sites/update-variable.md new file mode 100644 index 000000000..b1bc3600e --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/update-variable.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$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 + +$sites = new Sites($client); + +$result = $sites->updateVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', // optional + value: '<VALUE>', // optional + secret: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/sites/update.md b/examples/2.3.x/server-php/examples/sites/update.md new file mode 100644 index 000000000..16b517136 --- /dev/null +++ b/examples/2.3.x/server-php/examples/sites/update.md @@ -0,0 +1,44 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\Framework; +use Appwrite\Enums\BuildRuntime; +use Appwrite\Enums\Adapter; +use Appwrite\Enums\ProjectKeyScopes; + +$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 + +$sites = new Sites($client); + +$result = $sites->update( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: Framework::ANALOG(), + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + startCommand: '<START_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + buildRuntime: BuildRuntime::NODE145(), // optional + adapter: Adapter::STATIC(), // optional + fallbackFile: '<FALLBACK_FILE>', // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: 's-1vcpu-512mb', // optional + runtimeSpecification: 's-1vcpu-512mb', // optional + deploymentRetention: 0, // optional + scopes: [ProjectKeyScopes::PROJECTREAD()] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/create-bucket.md b/examples/2.3.x/server-php/examples/storage/create-bucket.md new file mode 100644 index 000000000..df878841e --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/create-bucket.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; +use Appwrite\Enums\Compression; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$storage = new Storage($client); + +$result = $storage->createBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: [Permission::read(Role::any())], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: Compression::NONE(), // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/create-file.md b/examples/2.3.x/server-php/examples/storage/create-file.md new file mode 100644 index 000000000..1a9387b63 --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/create-file.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Storage; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$storage = new Storage($client); + +$result = $storage->createFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile::withPath('file.png'), + permissions: [Permission::read(Role::any())], // optional + folder: 'photos/2026' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/delete-bucket.md b/examples/2.3.x/server-php/examples/storage/delete-bucket.md new file mode 100644 index 000000000..d3e497264 --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/delete-bucket.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$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 + +$storage = new Storage($client); + +$result = $storage->deleteBucket( + bucketId: '<BUCKET_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/delete-file.md b/examples/2.3.x/server-php/examples/storage/delete-file.md new file mode 100644 index 000000000..894783522 --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/delete-file.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$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 + +$storage = new Storage($client); + +$result = $storage->deleteFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/get-bucket.md b/examples/2.3.x/server-php/examples/storage/get-bucket.md new file mode 100644 index 000000000..6dbeac9cd --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/get-bucket.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$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 + +$storage = new Storage($client); + +$result = $storage->getBucket( + bucketId: '<BUCKET_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/get-file-download.md b/examples/2.3.x/server-php/examples/storage/get-file-download.md new file mode 100644 index 000000000..58797f239 --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/get-file-download.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$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 + +$storage = new Storage($client); + +$result = $storage->getFileDownload( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/get-file-preview.md b/examples/2.3.x/server-php/examples/storage/get-file-preview.md new file mode 100644 index 000000000..85cf889df --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/get-file-preview.md @@ -0,0 +1,32 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; +use Appwrite\Enums\ImageGravity; +use Appwrite\Enums\ImageFormat; + +$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 + +$storage = new Storage($client); + +$result = $storage->getFilePreview( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity::AUTO(), // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: 'FFFFFF', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: 'FFFFFF', // optional + output: ImageFormat::JPG(), // optional + token: '<TOKEN>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/get-file-view.md b/examples/2.3.x/server-php/examples/storage/get-file-view.md new file mode 100644 index 000000000..270cf900b --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/get-file-view.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$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 + +$storage = new Storage($client); + +$result = $storage->getFileView( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/get-file.md b/examples/2.3.x/server-php/examples/storage/get-file.md new file mode 100644 index 000000000..5d5a1914c --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/get-file.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$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 + +$storage = new Storage($client); + +$result = $storage->getFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/list-buckets.md b/examples/2.3.x/server-php/examples/storage/list-buckets.md new file mode 100644 index 000000000..5bc0f3071 --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/list-buckets.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$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 + +$storage = new Storage($client); + +$result = $storage->listBuckets( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/list-files.md b/examples/2.3.x/server-php/examples/storage/list-files.md new file mode 100644 index 000000000..46718e2bc --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/list-files.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$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 + +$storage = new Storage($client); + +$result = $storage->listFiles( + bucketId: '<BUCKET_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/update-bucket.md b/examples/2.3.x/server-php/examples/storage/update-bucket.md new file mode 100644 index 000000000..5557ce89c --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/update-bucket.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; +use Appwrite\Enums\Compression; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$storage = new Storage($client); + +$result = $storage->updateBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: [Permission::read(Role::any())], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: Compression::NONE(), // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/storage/update-file.md b/examples/2.3.x/server-php/examples/storage/update-file.md new file mode 100644 index 000000000..05bcc65a2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/storage/update-file.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$storage = new Storage($client); + +$result = $storage->updateFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // optional + permissions: [Permission::read(Role::any())] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..0ada6f92e --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createBigIntColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 1000000, // optional + default: 0, // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..f73001e7e --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: false, // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-php/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..b07aa3cb8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-cutover.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createCutover( + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..d05fad4ad --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: '2020-10-15T06:38:00.000+00:00', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..6a23e2a8a --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-email-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'email@example.com', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..c9e3f5fba --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-enum-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + required: false, + default: 'active', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-failover.md b/examples/2.3.x/server-php/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..e23ce6e71 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-failover.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..9b194fc3e --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-float-column.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + default: 10.5, // optional + array: 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 new file mode 100644 index 000000000..2b840eb30 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-index.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; +use Appwrite\Enums\TablesDBIndexType; +use Appwrite\Enums\OrderBy; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + type: TablesDBIndexType::KEY(), + columns: [], + orders: [OrderBy::ASC()], // optional + lengths: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..f1fa5219d --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-integer-column.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, // optional + max: 100, // optional + default: 10, // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..2d7103912 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-ip-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: '192.0.2.0', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..4d2204680 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-line-column.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createLineColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [[1, 2], [3, 4], [5, 6]] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..8d853305b --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createLongtextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..8da9475c1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createMediumtextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-migration.md b/examples/2.3.x/server-php/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..520d30471 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-migration.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createMigration( + databaseId: '<DATABASE_ID>', + specification: 's-1vcpu-1gb', + autoCutover: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-operations.md b/examples/2.3.x/server-php/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..e60cf34ee --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-operations.md @@ -0,0 +1,28 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createOperations( + transactionId: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..76079b217 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-point-column.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createPointColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [1, 2] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..7018c1e10 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createPolygonColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..a7ddabc2e --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; +use Appwrite\Enums\RelationshipType; +use Appwrite\Enums\RelationMutate; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '<KEY>', // optional + twoWayKey: '<TWO_WAY_KEY>', // optional + onDelete: RelationMutate::CASCADE() // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-row.md b/examples/2.3.x/server-php/examples/tablesdb/create-row.md new file mode 100644 index 000000000..1af620076 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-row.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 30, + 'isAdmin' => false + ], + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..6ae0f802c --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-rows.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..a5f1d5c93 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-string-column.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + size: 1, + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-table.md b/examples/2.3.x/server-php/examples/tablesdb/create-table.md new file mode 100644 index 000000000..e4d281b42 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-table.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: [Permission::read(Role::any())], // optional + rowSecurity: false, // optional + enabled: false, // optional + columns: [], // optional + indexes: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..b729dc5bb --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-text-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createTextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-php/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..022dc50ce --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createTransaction( + ttl: 60 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..9c3b89a59 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-url-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'https://example.com', // optional + array: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-php/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..6afddbf83 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createVarcharColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + size: 1, + required: false, + default: 'Hello World', // optional + array: false, // optional + encrypt: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create.md b/examples/2.3.x/server-php/examples/tablesdb/create.md new file mode 100644 index 000000000..e0f7503fd --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/create.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-php/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..4cc4b3803 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '<COLUMN>', + value: 1, // optional + min: 0, // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/delete-column.md b/examples/2.3.x/server-php/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..9f477a3d3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/delete-column.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/delete-index.md b/examples/2.3.x/server-php/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..0072ae207 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/delete-index.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-php/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..e2ee36c2a --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/delete-migration.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->deleteMigration( + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/delete-row.md b/examples/2.3.x/server-php/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..164a4d236 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/delete-row.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + 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 new file mode 100644 index 000000000..2b13b6c7b --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/delete-rows.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/delete-table.md b/examples/2.3.x/server-php/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..fd65a34f8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/delete-table.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->deleteTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-php/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..0127259d3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/delete-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->deleteTransaction( + transactionId: '<TRANSACTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/delete.md b/examples/2.3.x/server-php/examples/tablesdb/delete.md new file mode 100644 index 000000000..279bcf5f9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->delete( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get-column.md b/examples/2.3.x/server-php/examples/tablesdb/get-column.md new file mode 100644 index 000000000..b7d88318d --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get-column.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get-index.md b/examples/2.3.x/server-php/examples/tablesdb/get-index.md new file mode 100644 index 000000000..b09bf03fd --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get-index.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get-migration.md b/examples/2.3.x/server-php/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..317e3fb04 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get-migration.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->getMigration( + databaseId: '<DATABASE_ID>', + migrationId: '<MIGRATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-php/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..5b7f832d3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get-replicas.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->getReplicas( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get-row.md b/examples/2.3.x/server-php/examples/tablesdb/get-row.md new file mode 100644 index 000000000..c0415a602 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get-row.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get-status.md b/examples/2.3.x/server-php/examples/tablesdb/get-status.md new file mode 100644 index 000000000..bba69f9b6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get-status.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->getStatus( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get-table.md b/examples/2.3.x/server-php/examples/tablesdb/get-table.md new file mode 100644 index 000000000..5a2415f47 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get-table.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->getTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-php/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..bbce444e8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->getTransaction( + transactionId: '<TRANSACTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/get.md b/examples/2.3.x/server-php/examples/tablesdb/get.md new file mode 100644 index 000000000..cc771eb6f --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->get( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-php/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..475409b2a --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/increment-row-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '<COLUMN>', + value: 1, // optional + max: 100, // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list-columns.md b/examples/2.3.x/server-php/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..8004a3a3b --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list-columns.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-php/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..dd865c5bb --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list-indexes.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-php/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..f78c820f8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list-migrations.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->listMigrations( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list-operations.md b/examples/2.3.x/server-php/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..f84e6b36b --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list-operations.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list-rows.md b/examples/2.3.x/server-php/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..3d4bdfb9e --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list-rows.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-php/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..b4080072b --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list-specifications.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->listSpecifications(); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list-tables.md b/examples/2.3.x/server-php/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..e4c4134a9 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list-tables.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->listTables( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // 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 new file mode 100644 index 000000000..90b698c57 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list-transactions.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->listTransactions( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list.md b/examples/2.3.x/server-php/examples/tablesdb/list.md new file mode 100644 index 000000000..ec6ec0467 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/list.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->list( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..e1e1aeb4f --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateBigIntColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 0, + min: 0, // optional + max: 1000000, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..a95d7956d --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: false, + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..c9c6de418 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: '2020-10-15T06:38:00.000+00:00', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..8cc042881 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-email-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'email@example.com', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..9d657ba6e --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-enum-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + required: false, + default: 'active', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..9ab8b205c --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-float-column.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 10.5, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..1de8db17e --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-integer-column.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 10, + min: 0, // optional + max: 100, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..f742db248 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-ip-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: '192.0.2.0', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..58257151b --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-line-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateLineColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [[1, 2], [3, 4], [5, 6]], // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..e8746ebca --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateLongtextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..45d60e4ad --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateMediumtextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..3b55a7aba --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-point-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updatePointColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [1, 2], // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..05be2de0f --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updatePolygonColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..f3e4e7051 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; +use Appwrite\Enums\RelationMutate; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-row.md b/examples/2.3.x/server-php/examples/tablesdb/update-row.md new file mode 100644 index 000000000..197179e89 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-row.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 33, + 'isAdmin' => false + ], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-rows.md b/examples/2.3.x/server-php/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..5e9dd0aa4 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-rows.md @@ -0,0 +1,27 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 33, + 'isAdmin' => false + ], // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..b1a7c8572 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-string-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-table.md b/examples/2.3.x/server-php/examples/tablesdb/update-table.md new file mode 100644 index 000000000..1881d2e2d --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-table.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', // optional + permissions: [Permission::read(Role::any())], // optional + rowSecurity: false, // optional + enabled: false, // optional + purge: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..df1fea578 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-text-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateTextColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-php/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..ee2c7fab8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-transaction.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateTransaction( + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..d674819ee --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-url-column.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'https://example.com', + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-php/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..c6e46c7b2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->updateVarcharColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + size: 1, // optional + newKey: '<NEW_KEY>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/update.md b/examples/2.3.x/server-php/examples/tablesdb/update.md new file mode 100644 index 000000000..24d46560d --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/update.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', // optional + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-php/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..377862391 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/upsert-row.md @@ -0,0 +1,30 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 33, + 'isAdmin' => false + ], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..56aa2657f --- /dev/null +++ b/examples/2.3.x/server-php/examples/tablesdb/upsert-rows.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDB; + +$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 + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/create-installation.md b/examples/2.3.x/server-php/examples/teams/create-installation.md new file mode 100644 index 000000000..b61627f93 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/create-installation.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->createInstallation( + teamId: '<TEAM_ID>', + appId: '<APP_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>' // 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 new file mode 100644 index 000000000..4c09dc7ec --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/create-membership.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->createMembership( + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/create.md b/examples/2.3.x/server-php/examples/teams/create.md new file mode 100644 index 000000000..c4112e997 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/create.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->create( + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/delete-installation.md b/examples/2.3.x/server-php/examples/teams/delete-installation.md new file mode 100644 index 000000000..ead89460b --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/delete-installation.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->deleteInstallation( + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/delete-membership.md b/examples/2.3.x/server-php/examples/teams/delete-membership.md new file mode 100644 index 000000000..fd686ec26 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/delete-membership.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->deleteMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/delete.md b/examples/2.3.x/server-php/examples/teams/delete.md new file mode 100644 index 000000000..af3754d93 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->delete( + teamId: '<TEAM_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/get-installation.md b/examples/2.3.x/server-php/examples/teams/get-installation.md new file mode 100644 index 000000000..8d9a8bbdb --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/get-installation.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->getInstallation( + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/get-membership.md b/examples/2.3.x/server-php/examples/teams/get-membership.md new file mode 100644 index 000000000..541897733 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/get-membership.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->getMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/get-prefs.md b/examples/2.3.x/server-php/examples/teams/get-prefs.md new file mode 100644 index 000000000..eb7022b3e --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/get-prefs.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->getPrefs( + teamId: '<TEAM_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/get.md b/examples/2.3.x/server-php/examples/teams/get.md new file mode 100644 index 000000000..4c4ed5894 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->get( + teamId: '<TEAM_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/list-installations.md b/examples/2.3.x/server-php/examples/teams/list-installations.md new file mode 100644 index 000000000..b772c3b18 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/list-installations.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->listInstallations( + teamId: '<TEAM_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/list-memberships.md b/examples/2.3.x/server-php/examples/teams/list-memberships.md new file mode 100644 index 000000000..919911939 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/list-memberships.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->listMemberships( + teamId: '<TEAM_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/list.md b/examples/2.3.x/server-php/examples/teams/list.md new file mode 100644 index 000000000..118339e26 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/list.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->list( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/update-installation.md b/examples/2.3.x/server-php/examples/teams/update-installation.md new file mode 100644 index 000000000..177516384 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/update-installation.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->updateInstallation( + teamId: '<TEAM_ID>', + installationId: '<INSTALLATION_ID>', + authorizationDetails: '<AUTHORIZATION_DETAILS>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/update-membership-status.md b/examples/2.3.x/server-php/examples/teams/update-membership-status.md new file mode 100644 index 000000000..b83abc888 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/update-membership-status.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->updateMembershipStatus( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>' +); +``` 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 new file mode 100644 index 000000000..87741774b --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/update-membership.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->updateMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/update-name.md b/examples/2.3.x/server-php/examples/teams/update-name.md new file mode 100644 index 000000000..21260a370 --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/update-name.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->updateName( + teamId: '<TEAM_ID>', + name: '<NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/teams/update-prefs.md b/examples/2.3.x/server-php/examples/teams/update-prefs.md new file mode 100644 index 000000000..c6a98331c --- /dev/null +++ b/examples/2.3.x/server-php/examples/teams/update-prefs.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$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 + +$teams = new Teams($client); + +$result = $teams->updatePrefs( + teamId: '<TEAM_ID>', + prefs: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/tokens/create-file-token.md b/examples/2.3.x/server-php/examples/tokens/create-file-token.md new file mode 100644 index 000000000..c700c5682 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tokens/create-file-token.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$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 + +$tokens = new Tokens($client); + +$result = $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-php/examples/tokens/delete.md b/examples/2.3.x/server-php/examples/tokens/delete.md new file mode 100644 index 000000000..2c4aea6f7 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tokens/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$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 + +$tokens = new Tokens($client); + +$result = $tokens->delete( + tokenId: '<TOKEN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tokens/get.md b/examples/2.3.x/server-php/examples/tokens/get.md new file mode 100644 index 000000000..37911e259 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tokens/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$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 + +$tokens = new Tokens($client); + +$result = $tokens->get( + tokenId: '<TOKEN_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/tokens/list.md b/examples/2.3.x/server-php/examples/tokens/list.md new file mode 100644 index 000000000..724d44ed0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/tokens/list.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$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 + +$tokens = new Tokens($client); + +$result = $tokens->list( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/tokens/update.md b/examples/2.3.x/server-php/examples/tokens/update.md new file mode 100644 index 000000000..9944a9ceb --- /dev/null +++ b/examples/2.3.x/server-php/examples/tokens/update.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$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 + +$tokens = new Tokens($client); + +$result = $tokens->update( + tokenId: '<TOKEN_ID>', + expire: '2020-10-15T06:38:00.000+00:00' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-argon-2-user.md b/examples/2.3.x/server-php/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..34018bc69 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-argon-2-user.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createArgon2User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-php/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..c8badcaff --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-bcrypt-user.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createBcryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-jwt.md b/examples/2.3.x/server-php/examples/users/create-jwt.md new file mode 100644 index 000000000..89870a354 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-jwt.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createJWT( + userId: '<USER_ID>', + sessionId: 'recent()', // optional + duration: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-md-5-user.md b/examples/2.3.x/server-php/examples/users/create-md-5-user.md new file mode 100644 index 000000000..304783358 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-md-5-user.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createMD5User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-php/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..d58681a41 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createMFARecoveryCodes( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-php/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..c9426373c --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-ph-pass-user.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createPHPassUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-php/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..bd3077e7f --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createScryptModifiedUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-scrypt-user.md b/examples/2.3.x/server-php/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..d8be12e22 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-scrypt-user.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createScryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: 8, + passwordMemory: 65536, + passwordParallel: 1, + passwordLength: 64, + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-session.md b/examples/2.3.x/server-php/examples/users/create-session.md new file mode 100644 index 000000000..625cd8492 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-session.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createSession( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-sha-user.md b/examples/2.3.x/server-php/examples/users/create-sha-user.md new file mode 100644 index 000000000..94a674cbf --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-sha-user.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\PasswordHash; + +$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 + +$users = new Users($client); + +$result = $users->createSHAUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash::SHA1(), // optional + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-target.md b/examples/2.3.x/server-php/examples/users/create-target.md new file mode 100644 index 000000000..e9d83ebb6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-target.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\MessagingProviderType; + +$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 + +$users = new Users($client); + +$result = $users->createTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType::EMAIL(), + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create-token.md b/examples/2.3.x/server-php/examples/users/create-token.md new file mode 100644 index 000000000..b346dd530 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create-token.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->createToken( + userId: '<USER_ID>', + length: 4, // optional + expire: 60 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/create.md b/examples/2.3.x/server-php/examples/users/create.md new file mode 100644 index 000000000..0409e50fa --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/create.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->create( + userId: '<USER_ID>', + email: 'email@example.com', // optional + phone: '+12065550100', // optional + password: 'password', // optional + name: '<NAME>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/delete-identity.md b/examples/2.3.x/server-php/examples/users/delete-identity.md new file mode 100644 index 000000000..9a812db68 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/delete-identity.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->deleteIdentity( + identityId: '<IDENTITY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-php/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..8fa62661e --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\AuthenticatorType; + +$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 + +$users = new Users($client); + +$result = $users->deleteMFAAuthenticator( + userId: '<USER_ID>', + type: AuthenticatorType::TOTP() +); +``` diff --git a/examples/2.3.x/server-php/examples/users/delete-session.md b/examples/2.3.x/server-php/examples/users/delete-session.md new file mode 100644 index 000000000..3279befec --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/delete-session.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->deleteSession( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/delete-sessions.md b/examples/2.3.x/server-php/examples/users/delete-sessions.md new file mode 100644 index 000000000..df58398a3 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/delete-sessions.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->deleteSessions( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/delete-target.md b/examples/2.3.x/server-php/examples/users/delete-target.md new file mode 100644 index 000000000..ed23c1772 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/delete-target.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->deleteTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/delete.md b/examples/2.3.x/server-php/examples/users/delete.md new file mode 100644 index 000000000..dd79743b2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->delete( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-php/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..4f6202dfc --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/get-mfa-challenge.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->getMFAChallenge( + userId: '<USER_ID>', + challengeId: '<CHALLENGE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-php/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..3978e1a8e --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->getMFARecoveryCodes( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/get-prefs.md b/examples/2.3.x/server-php/examples/users/get-prefs.md new file mode 100644 index 000000000..72ebd61a6 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/get-prefs.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->getPrefs( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/get-target.md b/examples/2.3.x/server-php/examples/users/get-target.md new file mode 100644 index 000000000..8f86c11c1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/get-target.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->getTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/get.md b/examples/2.3.x/server-php/examples/users/get.md new file mode 100644 index 000000000..f974d7c0c --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->get( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/list-identities.md b/examples/2.3.x/server-php/examples/users/list-identities.md new file mode 100644 index 000000000..38b1be775 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/list-identities.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->listIdentities( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/list-memberships.md b/examples/2.3.x/server-php/examples/users/list-memberships.md new file mode 100644 index 000000000..b198103ba --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/list-memberships.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->listMemberships( + userId: '<USER_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/list-mfa-factors.md b/examples/2.3.x/server-php/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..ace853e69 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/list-mfa-factors.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->listMFAFactors( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/list-sessions.md b/examples/2.3.x/server-php/examples/users/list-sessions.md new file mode 100644 index 000000000..12c5cbe04 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/list-sessions.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->listSessions( + userId: '<USER_ID>', + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/list-targets.md b/examples/2.3.x/server-php/examples/users/list-targets.md new file mode 100644 index 000000000..468ac2e25 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/list-targets.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->listTargets( + userId: '<USER_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/list.md b/examples/2.3.x/server-php/examples/users/list.md new file mode 100644 index 000000000..87b03f3cd --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/list.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->list( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-email-verification.md b/examples/2.3.x/server-php/examples/users/update-email-verification.md new file mode 100644 index 000000000..b188568a5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-email-verification.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateEmailVerification( + userId: '<USER_ID>', + emailVerification: false +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-email.md b/examples/2.3.x/server-php/examples/users/update-email.md new file mode 100644 index 000000000..d30f7d117 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-email.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateEmail( + userId: '<USER_ID>', + email: 'email@example.com' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-impersonator.md b/examples/2.3.x/server-php/examples/users/update-impersonator.md new file mode 100644 index 000000000..b1e9e99fe --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-impersonator.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateImpersonator( + userId: '<USER_ID>', + impersonator: false +); +``` 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 new file mode 100644 index 000000000..7ac457f58 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-labels.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateLabels( + userId: '<USER_ID>', + labels: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-php/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..adee4c7c5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateMFARecoveryCodes( + userId: '<USER_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-mfa.md b/examples/2.3.x/server-php/examples/users/update-mfa.md new file mode 100644 index 000000000..6ff44fef8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-mfa.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateMFA( + userId: '<USER_ID>', + mfa: false +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-name.md b/examples/2.3.x/server-php/examples/users/update-name.md new file mode 100644 index 000000000..fd2740188 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-name.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateName( + userId: '<USER_ID>', + name: '<NAME>' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-password.md b/examples/2.3.x/server-php/examples/users/update-password.md new file mode 100644 index 000000000..512c67b6c --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-password.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updatePassword( + userId: '<USER_ID>', + password: 'password' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-phone-verification.md b/examples/2.3.x/server-php/examples/users/update-phone-verification.md new file mode 100644 index 000000000..0cfb243d1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-phone-verification.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updatePhoneVerification( + userId: '<USER_ID>', + phoneVerification: false +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-phone.md b/examples/2.3.x/server-php/examples/users/update-phone.md new file mode 100644 index 000000000..b07c4bd81 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-phone.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updatePhone( + userId: '<USER_ID>', + number: '+12065550100' +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-prefs.md b/examples/2.3.x/server-php/examples/users/update-prefs.md new file mode 100644 index 000000000..450f7a4b2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-prefs.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updatePrefs( + userId: '<USER_ID>', + prefs: [] +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-status.md b/examples/2.3.x/server-php/examples/users/update-status.md new file mode 100644 index 000000000..b9e003d95 --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-status.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateStatus( + userId: '<USER_ID>', + status: false +); +``` diff --git a/examples/2.3.x/server-php/examples/users/update-target.md b/examples/2.3.x/server-php/examples/users/update-target.md new file mode 100644 index 000000000..c4efc592c --- /dev/null +++ b/examples/2.3.x/server-php/examples/users/update-target.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$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 + +$users = new Users($client); + +$result = $users->updateTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // optional + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>' // optional +); +``` 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 new file mode 100644 index 000000000..c3ed66282 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-collection.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create-document.md b/examples/2.3.x/server-php/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..b97f81e4c --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-document.md @@ -0,0 +1,34 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [ + 'embeddings' => [ + '0' => 0.12, + '1' => -0.55, + '2' => 0.88, + '3' => 1.02 + ], + 'metadata' => [ + 'key' => 'value' + ] + ], + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..2d1c9c2f8 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-php/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..7e5eeb310 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-failover.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createFailover( + databaseId: '<DATABASE_ID>', + targetReplicaId: '<TARGET_REPLICA_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 new file mode 100644 index 000000000..d3e699cbd --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-index.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; +use Appwrite\Enums\VectorsDBIndexType; +use Appwrite\Enums\OrderBy; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>', + type: VectorsDBIndexType::HNSWEUCLIDEAN(), + attributes: [], + 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 new file mode 100644 index 000000000..c311d5e41 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-operations.md @@ -0,0 +1,28 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createOperations( + transactionId: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create-query.md b/examples/2.3.x/server-php/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..baa9655c2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-query.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createQuery( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-php/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..e8fd72e77 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createTransaction( + ttl: 60 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create.md b/examples/2.3.x/server-php/examples/vectorsdb/create.md new file mode 100644 index 000000000..e554bee6b --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/create.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-php/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..f92fc345a --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/delete-collection.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-php/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..7d4968110 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/delete-document.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..17b0831d0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/delete-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-php/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..e5693e415 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/delete-index.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-php/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..c3dee45b5 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteTransaction( + transactionId: '<TRANSACTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/delete.md b/examples/2.3.x/server-php/examples/vectorsdb/delete.md new file mode 100644 index 000000000..2fed51fe2 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->delete( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-php/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..1d5f2adda --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/get-collection.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/get-document.md b/examples/2.3.x/server-php/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..d3d4e5ecd --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/get-document.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/get-index.md b/examples/2.3.x/server-php/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..1fd9bf9ad --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/get-index.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '<KEY>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-php/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..4612cae2b --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/get-replicas.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getReplicas( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/get-status.md b/examples/2.3.x/server-php/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..ad313fc62 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/get-status.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getStatus( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-php/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..c6db89273 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/get-transaction.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getTransaction( + transactionId: '<TRANSACTION_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/get.md b/examples/2.3.x/server-php/examples/vectorsdb/get.md new file mode 100644 index 000000000..7d61d872e --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->get( + databaseId: '<DATABASE_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-php/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..7275e094f --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/list-collections.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-php/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..d90096182 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/list-documents.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + transactionId: '<TRANSACTION_ID>', // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-php/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..e49f04530 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/list-indexes.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-php/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..fed2f5c7e --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/list-operations.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listOperations( + databaseId: '<DATABASE_ID>', + status: 'queued', // optional + limit: 1, // optional + offset: 0 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-php/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..149ad0c71 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/list-specifications.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listSpecifications(); +``` 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 new file mode 100644 index 000000000..022bd60e1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/list-transactions.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listTransactions( + queries: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/list.md b/examples/2.3.x/server-php/examples/vectorsdb/list.md new file mode 100644 index 000000000..f649ab89d --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/list.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->list( + 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 new file mode 100644 index 000000000..7898ee038 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/update-collection.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, // optional + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/update-document.md b/examples/2.3.x/server-php/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..e6ac13cab --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/update-document.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-php/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..96ec4c37a --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/update-documents.md @@ -0,0 +1,21 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: [], // optional + queries: [], // optional + transactionId: '<TRANSACTION_ID>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-php/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..448120904 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/update-transaction.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->updateTransaction( + transactionId: '<TRANSACTION_ID>', + commit: false, // optional + rollback: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/update.md b/examples/2.3.x/server-php/examples/vectorsdb/update.md new file mode 100644 index 000000000..977ef1030 --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/update.md @@ -0,0 +1,22 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // optional + specification: 'serverless', // optional + replicas: 0, // optional + syncMode: 'async' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-php/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..b7acca16d --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/upsert-document.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; +use Appwrite\Permission; +use Appwrite\Role; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '<TRANSACTION_ID>' // 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 new file mode 100644 index 000000000..11e5d31fd --- /dev/null +++ b/examples/2.3.x/server-php/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\VectorsDB; + +$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 + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], + 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 new file mode 100644 index 000000000..2b437a54b --- /dev/null +++ b/examples/2.3.x/server-php/examples/webhooks/create.md @@ -0,0 +1,25 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Webhooks; + +$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 + +$webhooks = new Webhooks($client); + +$result = $webhooks->create( + webhookId: '<WEBHOOK_ID>', + url: 'https://example.com/webhook', + name: '<NAME>', + events: [], + enabled: false, // optional + tls: false, // optional + authUsername: '<AUTH_USERNAME>', // optional + authPassword: 'password', // optional + secret: '<SECRET>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/webhooks/delete.md b/examples/2.3.x/server-php/examples/webhooks/delete.md new file mode 100644 index 000000000..c96a1d5fc --- /dev/null +++ b/examples/2.3.x/server-php/examples/webhooks/delete.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Webhooks; + +$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 + +$webhooks = new Webhooks($client); + +$result = $webhooks->delete( + webhookId: '<WEBHOOK_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/webhooks/get.md b/examples/2.3.x/server-php/examples/webhooks/get.md new file mode 100644 index 000000000..85e95776b --- /dev/null +++ b/examples/2.3.x/server-php/examples/webhooks/get.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Webhooks; + +$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 + +$webhooks = new Webhooks($client); + +$result = $webhooks->get( + webhookId: '<WEBHOOK_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/webhooks/list.md b/examples/2.3.x/server-php/examples/webhooks/list.md new file mode 100644 index 000000000..e0652d51b --- /dev/null +++ b/examples/2.3.x/server-php/examples/webhooks/list.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Webhooks; + +$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 + +$webhooks = new Webhooks($client); + +$result = $webhooks->list( + queries: [], // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/webhooks/update-secret.md b/examples/2.3.x/server-php/examples/webhooks/update-secret.md new file mode 100644 index 000000000..6a8168d5d --- /dev/null +++ b/examples/2.3.x/server-php/examples/webhooks/update-secret.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Webhooks; + +$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 + +$webhooks = new Webhooks($client); + +$result = $webhooks->updateSecret( + webhookId: '<WEBHOOK_ID>', + secret: '<SECRET>' // 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 new file mode 100644 index 000000000..95dafcf0f --- /dev/null +++ b/examples/2.3.x/server-php/examples/webhooks/update.md @@ -0,0 +1,24 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Webhooks; + +$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 + +$webhooks = new Webhooks($client); + +$result = $webhooks->update( + webhookId: '<WEBHOOK_ID>', + name: '<NAME>', + url: 'https://example.com/webhook', + events: [], + enabled: false, // optional + tls: false, // optional + authUsername: '<AUTH_USERNAME>', // optional + authPassword: 'password' // optional +); +``` diff --git a/examples/2.3.x/server-python/examples/account/create-anonymous-session.md b/examples/2.3.x/server-python/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..70a7dd343 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-anonymous-session.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session + +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 + +account = Account(client) + +result: Session = account.create_anonymous_session() + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..292074dba --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-email-password-session.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session + +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 + +account = Account(client) + +result: Session = account.create_email_password_session( + email = 'email@example.com', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-email-token.md b/examples/2.3.x/server-python/examples/account/create-email-token.md new file mode 100644 index 000000000..78c5ecaab --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-email-token.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_email_token( + user_id = '<USER_ID>', + email = 'email@example.com', + phrase = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-python/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..92de90e88 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-email-verification-otp.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_email_verification_otp( + phrase = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-email-verification.md b/examples/2.3.x/server-python/examples/account/create-email-verification.md new file mode 100644 index 000000000..d4d8fd866 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-email-verification.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_email_verification( + url = 'https://example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-id-token-session.md b/examples/2.3.x/server-python/examples/account/create-id-token-session.md new file mode 100644 index 000000000..393617ecf --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-id-token-session.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session +from appwrite.enums import IdTokenProvider + +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 + +account = Account(client) + +result: Session = account.create_id_token_session( + provider = IdTokenProvider.APPLE, + id_token = '<ID_TOKEN>', + nonce = '<NONCE>', # optional + access_token = '<ACCESS_TOKEN>', # optional + access_token_expiry = 0, # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-magic-url-token.md b/examples/2.3.x/server-python/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..5ded01281 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-magic-url-token.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_magic_url_token( + user_id = '<USER_ID>', + email = 'email@example.com', + url = 'https://example.com', # optional + phrase = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-python/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..468011b2e --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-mfa-authenticator.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import MfaType +from appwrite.enums import AuthenticatorType + +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 + +account = Account(client) + +result: MfaType = account.create_mfa_authenticator( + type = AuthenticatorType.TOTP +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-python/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..f31797a45 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-mfa-challenge.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import MfaChallenge +from appwrite.enums import AuthenticationFactor + +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 + +account = Account(client) + +result: MfaChallenge = account.create_mfa_challenge( + factor = AuthenticationFactor.EMAIL +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-python/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..b7a2c4dd5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import MfaRecoveryCodes + +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 + +account = Account(client) + +result: MfaRecoveryCodes = account.create_mfa_recovery_codes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-python/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..87f7de0f4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-o-auth-2-token.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import OAuthProvider + +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 + +account = Account(client) + +result: str = account.create_o_auth2_token( + provider = OAuthProvider.AMAZON, + success = 'https://example.com', # optional + failure = 'https://example.com', # optional + scopes = [] # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-phone-token.md b/examples/2.3.x/server-python/examples/account/create-phone-token.md new file mode 100644 index 000000000..fb09d64ec --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-phone-token.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_phone_token( + user_id = '<USER_ID>', + phone = '+12065550100' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-phone-verification.md b/examples/2.3.x/server-python/examples/account/create-phone-verification.md new file mode 100644 index 000000000..35d058e2b --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-phone-verification.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_phone_verification() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-recovery-otp.md b/examples/2.3.x/server-python/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..02240e318 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-recovery-otp.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_recovery_otp( + email = 'email@example.com', + phrase = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-recovery.md b/examples/2.3.x/server-python/examples/account/create-recovery.md new file mode 100644 index 000000000..ea63672fe --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-recovery.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_recovery( + email = 'email@example.com', + url = 'https://example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-session.md b/examples/2.3.x/server-python/examples/account/create-session.md new file mode 100644 index 000000000..b09cf7224 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-session.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session + +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 + +account = Account(client) + +result: Session = account.create_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create-verification.md b/examples/2.3.x/server-python/examples/account/create-verification.md new file mode 100644 index 000000000..c44a76936 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create-verification.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.create_verification( + url = 'https://example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/create.md b/examples/2.3.x/server-python/examples/account/create.md new file mode 100644 index 000000000..503b37016 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/create.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.create( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/delete-consent-token.md b/examples/2.3.x/server-python/examples/account/delete-consent-token.md new file mode 100644 index 000000000..614b78ee7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/delete-consent-token.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account 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 + +account = Account(client) + +result = account.delete_consent_token( + consent_id = '<CONSENT_ID>', + token_id = '<TOKEN_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/account/delete-consent.md b/examples/2.3.x/server-python/examples/account/delete-consent.md new file mode 100644 index 000000000..8c2c41133 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/delete-consent.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.account 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 + +account = Account(client) + +result = account.delete_consent( + consent_id = '<CONSENT_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/account/delete-identity.md b/examples/2.3.x/server-python/examples/account/delete-identity.md new file mode 100644 index 000000000..1ba48c203 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/delete-identity.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.account 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 + +account = Account(client) + +result = account.delete_identity( + identity_id = '<IDENTITY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-python/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..faeccb8b2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +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 + +account = Account(client) + +result = account.delete_mfa_authenticator( + type = AuthenticatorType.TOTP +) +``` diff --git a/examples/2.3.x/server-python/examples/account/delete-session.md b/examples/2.3.x/server-python/examples/account/delete-session.md new file mode 100644 index 000000000..051a38a57 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/delete-session.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.account 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 + +account = Account(client) + +result = account.delete_session( + session_id = '<SESSION_ID>' +) +``` 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 new file mode 100644 index 000000000..4db5c1ec6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/delete-sessions.md @@ -0,0 +1,13 @@ +```python +from appwrite.client import Client +from appwrite.services.account 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 + +account = Account(client) + +result = account.delete_sessions() +``` diff --git a/examples/2.3.x/server-python/examples/account/get-consent-token.md b/examples/2.3.x/server-python/examples/account/get-consent-token.md new file mode 100644 index 000000000..a5edd0a70 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/get-consent-token.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Oauth2ConsentToken + +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 + +account = Account(client) + +result: Oauth2ConsentToken = account.get_consent_token( + consent_id = '<CONSENT_ID>', + token_id = '<TOKEN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/get-consent.md b/examples/2.3.x/server-python/examples/account/get-consent.md new file mode 100644 index 000000000..45ba0a82f --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/get-consent.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Oauth2Consent + +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 + +account = Account(client) + +result: Oauth2Consent = account.get_consent( + consent_id = '<CONSENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-python/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..f236eb6ba --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import MfaRecoveryCodes + +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 + +account = Account(client) + +result: MfaRecoveryCodes = account.get_mfa_recovery_codes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/get-prefs.md b/examples/2.3.x/server-python/examples/account/get-prefs.md new file mode 100644 index 000000000..db5861525 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/get-prefs.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Preferences + +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 + +account = Account(client) + +result: Preferences = account.get_prefs() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/get-session.md b/examples/2.3.x/server-python/examples/account/get-session.md new file mode 100644 index 000000000..9a247b2ae --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/get-session.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session + +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 + +account = Account(client) + +result: Session = account.get_session( + session_id = '<SESSION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/get.md b/examples/2.3.x/server-python/examples/account/get.md new file mode 100644 index 000000000..c06fd6ba0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/get.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.get() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/list-consent-tokens.md b/examples/2.3.x/server-python/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..3be9fbe34 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/list-consent-tokens.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Oauth2ConsentTokenList + +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 + +account = Account(client) + +result: Oauth2ConsentTokenList = account.list_consent_tokens( + consent_id = '<CONSENT_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/list-consents.md b/examples/2.3.x/server-python/examples/account/list-consents.md new file mode 100644 index 000000000..d2b5b69c2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/list-consents.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Oauth2ConsentList + +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 + +account = Account(client) + +result: Oauth2ConsentList = account.list_consents( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/list-identities.md b/examples/2.3.x/server-python/examples/account/list-identities.md new file mode 100644 index 000000000..5b8496de0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/list-identities.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import IdentityList + +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 + +account = Account(client) + +result: IdentityList = account.list_identities( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/list-mfa-factors.md b/examples/2.3.x/server-python/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..411a3e9a1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/list-mfa-factors.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import MfaFactors + +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 + +account = Account(client) + +result: MfaFactors = account.list_mfa_factors() + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..d9df7a714 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/list-sessions.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import SessionList + +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 + +account = Account(client) + +result: SessionList = account.list_sessions() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-python/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..b112871f8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-email-verification-otp.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.update_email_verification_otp( + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-email-verification.md b/examples/2.3.x/server-python/examples/account/update-email-verification.md new file mode 100644 index 000000000..5415f7d92 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-email-verification.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.update_email_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-email.md b/examples/2.3.x/server-python/examples/account/update-email.md new file mode 100644 index 000000000..d559e026c --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-email.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.update_email( + email = 'email@example.com', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-magic-url-session.md b/examples/2.3.x/server-python/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..754bbcdff --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-magic-url-session.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session + +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 + +account = Account(client) + +result: Session = account.update_magic_url_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-python/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..e7040b0a2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-mfa-authenticator.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User +from appwrite.enums import AuthenticatorType + +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 + +account = Account(client) + +result: User = account.update_mfa_authenticator( + type = AuthenticatorType.TOTP, + otp = '<OTP>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-python/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..40d6382f2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-mfa-challenge.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session + +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 + +account = Account(client) + +result: Session = account.update_mfa_challenge( + challenge_id = '<CHALLENGE_ID>', + otp = '<OTP>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-python/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..38ff568d9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import MfaRecoveryCodes + +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 + +account = Account(client) + +result: MfaRecoveryCodes = account.update_mfa_recovery_codes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-mfa.md b/examples/2.3.x/server-python/examples/account/update-mfa.md new file mode 100644 index 000000000..607cea791 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-mfa.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.update_mfa( + mfa = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-name.md b/examples/2.3.x/server-python/examples/account/update-name.md new file mode 100644 index 000000000..d16c8dd01 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-name.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.update_name( + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-password.md b/examples/2.3.x/server-python/examples/account/update-password.md new file mode 100644 index 000000000..2c6db58bc --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-password.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.update_password( + password = 'password', + old_password = 'password' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-phone-session.md b/examples/2.3.x/server-python/examples/account/update-phone-session.md new file mode 100644 index 000000000..300cadd8f --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-phone-session.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session + +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 + +account = Account(client) + +result: Session = account.update_phone_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-phone-verification.md b/examples/2.3.x/server-python/examples/account/update-phone-verification.md new file mode 100644 index 000000000..9091264d3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-phone-verification.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.update_phone_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-phone.md b/examples/2.3.x/server-python/examples/account/update-phone.md new file mode 100644 index 000000000..6dcd811e3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-phone.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.update_phone( + phone = '+12065550100', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-prefs.md b/examples/2.3.x/server-python/examples/account/update-prefs.md new file mode 100644 index 000000000..1c6a0a518 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-prefs.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.update_prefs( + prefs = { + "language": "en", + "timezone": "UTC", + "darkTheme": True + } +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-recovery-otp.md b/examples/2.3.x/server-python/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..e34e58084 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-recovery-otp.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.update_recovery_otp( + user_id = '<USER_ID>', + secret = '<SECRET>', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-recovery.md b/examples/2.3.x/server-python/examples/account/update-recovery.md new file mode 100644 index 000000000..3201722e7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-recovery.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.update_recovery( + user_id = '<USER_ID>', + secret = '<SECRET>', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-session.md b/examples/2.3.x/server-python/examples/account/update-session.md new file mode 100644 index 000000000..6232e0b38 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-session.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Session + +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 + +account = Account(client) + +result: Session = account.update_session( + session_id = '<SESSION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-status.md b/examples/2.3.x/server-python/examples/account/update-status.md new file mode 100644 index 000000000..d48014532 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-status.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import User + +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 + +account = Account(client) + +result: User = account.update_status() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/account/update-verification.md b/examples/2.3.x/server-python/examples/account/update-verification.md new file mode 100644 index 000000000..5dffe6ad4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/account/update-verification.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.models import Token + +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 + +account = Account(client) + +result: Token = account.update_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/activities/get-event.md b/examples/2.3.x/server-python/examples/activities/get-event.md new file mode 100644 index 000000000..12819034c --- /dev/null +++ b/examples/2.3.x/server-python/examples/activities/get-event.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.activities import Activities +from appwrite.models import ActivityEvent + +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 + +activities = Activities(client) + +result: ActivityEvent = activities.get_event( + event_id = '<EVENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/activities/list-events.md b/examples/2.3.x/server-python/examples/activities/list-events.md new file mode 100644 index 000000000..17f3b67d0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/activities/list-events.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.activities import Activities +from appwrite.models import ActivityEventList + +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 + +activities = Activities(client) + +result: ActivityEventList = activities.list_events( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/advisor/delete-report.md b/examples/2.3.x/server-python/examples/advisor/delete-report.md new file mode 100644 index 000000000..ef50a2f0d --- /dev/null +++ b/examples/2.3.x/server-python/examples/advisor/delete-report.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.advisor import Advisor + +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 + +advisor = Advisor(client) + +result = advisor.delete_report( + report_id = '<REPORT_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/advisor/get-insight.md b/examples/2.3.x/server-python/examples/advisor/get-insight.md new file mode 100644 index 000000000..7f4b804ad --- /dev/null +++ b/examples/2.3.x/server-python/examples/advisor/get-insight.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.advisor import Advisor +from appwrite.models import Insight + +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 + +advisor = Advisor(client) + +result: Insight = advisor.get_insight( + report_id = '<REPORT_ID>', + insight_id = '<INSIGHT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/advisor/get-report.md b/examples/2.3.x/server-python/examples/advisor/get-report.md new file mode 100644 index 000000000..2d9836ac4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/advisor/get-report.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.advisor import Advisor +from appwrite.models import Report + +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 + +advisor = Advisor(client) + +result: Report = advisor.get_report( + report_id = '<REPORT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/advisor/list-insights.md b/examples/2.3.x/server-python/examples/advisor/list-insights.md new file mode 100644 index 000000000..2813e6e3b --- /dev/null +++ b/examples/2.3.x/server-python/examples/advisor/list-insights.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.advisor import Advisor +from appwrite.models import InsightList + +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 + +advisor = Advisor(client) + +result: InsightList = advisor.list_insights( + report_id = '<REPORT_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/advisor/list-reports.md b/examples/2.3.x/server-python/examples/advisor/list-reports.md new file mode 100644 index 000000000..146bbf1c4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/advisor/list-reports.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.advisor import Advisor +from appwrite.models import ReportList + +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 + +advisor = Advisor(client) + +result: ReportList = advisor.list_reports( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/create-installation-token.md b/examples/2.3.x/server-python/examples/apps/create-installation-token.md new file mode 100644 index 000000000..acbe6cc73 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/create-installation-token.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import Oauth2Token + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result: Oauth2Token = apps.create_installation_token( + app_id = '<APP_ID>', + installation_id = '<INSTALLATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/create-key.md b/examples/2.3.x/server-python/examples/apps/create-key.md new file mode 100644 index 000000000..2821ba653 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/create-key.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppKey + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result: AppKey = apps.create_key( + app_id = '<APP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/create-secret.md b/examples/2.3.x/server-python/examples/apps/create-secret.md new file mode 100644 index 000000000..3c901c7ea --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/create-secret.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppSecretPlaintext + +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 + +apps = Apps(client) + +result: AppSecretPlaintext = apps.create_secret( + app_id = '<APP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/create.md b/examples/2.3.x/server-python/examples/apps/create.md new file mode 100644 index 000000000..045249044 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/create.md @@ -0,0 +1,36 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import App + +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 + +apps = Apps(client) + +result: App = apps.create( + app_id = '<APP_ID>', + name = '<NAME>', + redirect_uris = [], + description = '<DESCRIPTION>', # optional + client_uri = 'https://example.com', # optional + logo_uri = 'https://example.com', # optional + privacy_policy_url = 'https://example.com', # optional + terms_url = 'https://example.com', # optional + contacts = [], # optional + tagline = '<TAGLINE>', # optional + tags = [], # optional + images = [], # optional + support_url = 'https://example.com', # optional + data_deletion_url = 'https://example.com', # optional + post_logout_redirect_uris = [], # optional + enabled = False, # optional + type = 'public', # optional + device_flow = False, # optional + team_id = '<TEAM_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/delete-installation.md b/examples/2.3.x/server-python/examples/apps/delete-installation.md new file mode 100644 index 000000000..2a941e8ef --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/delete-installation.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps + +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 + +apps = Apps(client) + +result = apps.delete_installation( + app_id = '<APP_ID>', + installation_id = '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/apps/delete-key.md b/examples/2.3.x/server-python/examples/apps/delete-key.md new file mode 100644 index 000000000..dca52e39d --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result = apps.delete_key( + app_id = '<APP_ID>', + key_id = '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/apps/delete-secret.md b/examples/2.3.x/server-python/examples/apps/delete-secret.md new file mode 100644 index 000000000..ae7f09760 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/delete-secret.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps + +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 + +apps = Apps(client) + +result = apps.delete_secret( + app_id = '<APP_ID>', + secret_id = '<SECRET_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/apps/delete-tokens.md b/examples/2.3.x/server-python/examples/apps/delete-tokens.md new file mode 100644 index 000000000..60c7f6ff7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/delete-tokens.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps + +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 + +apps = Apps(client) + +result = apps.delete_tokens( + app_id = '<APP_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/apps/delete.md b/examples/2.3.x/server-python/examples/apps/delete.md new file mode 100644 index 000000000..2318e2efd --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps + +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 + +apps = Apps(client) + +result = apps.delete( + app_id = '<APP_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/apps/get-installation.md b/examples/2.3.x/server-python/examples/apps/get-installation.md new file mode 100644 index 000000000..d71858c96 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/get-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result: AppInstallation = apps.get_installation( + app_id = '<APP_ID>', + installation_id = '<INSTALLATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/get-key.md b/examples/2.3.x/server-python/examples/apps/get-key.md new file mode 100644 index 000000000..4df3d4244 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/get-key.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppKey + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result: AppKey = apps.get_key( + app_id = '<APP_ID>', + key_id = '<KEY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/get-secret.md b/examples/2.3.x/server-python/examples/apps/get-secret.md new file mode 100644 index 000000000..deaea4478 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/get-secret.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppSecret + +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 + +apps = Apps(client) + +result: AppSecret = apps.get_secret( + app_id = '<APP_ID>', + secret_id = '<SECRET_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/get.md b/examples/2.3.x/server-python/examples/apps/get.md new file mode 100644 index 000000000..05a82fdcf --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import App + +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 + +apps = Apps(client) + +result: App = apps.get( + app_id = '<APP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-python/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..4705cf7b0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/list-installation-scopes.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppScopeList + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result: AppScopeList = apps.list_installation_scopes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/list-installations.md b/examples/2.3.x/server-python/examples/apps/list-installations.md new file mode 100644 index 000000000..e21575cbb --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/list-installations.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppInstallationList + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result: AppInstallationList = apps.list_installations( + app_id = '<APP_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/list-keys.md b/examples/2.3.x/server-python/examples/apps/list-keys.md new file mode 100644 index 000000000..7ed785437 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/list-keys.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppKeyList + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result: AppKeyList = apps.list_keys( + app_id = '<APP_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-python/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..8720e78c7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppScopeList + +client = Client() +client.set_endpoint('https://<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 + +apps = Apps(client) + +result: AppScopeList = apps.list_o_auth2_scopes() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/list-secrets.md b/examples/2.3.x/server-python/examples/apps/list-secrets.md new file mode 100644 index 000000000..83a4dcd34 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/list-secrets.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppSecretList + +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 + +apps = Apps(client) + +result: AppSecretList = apps.list_secrets( + app_id = '<APP_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/list.md b/examples/2.3.x/server-python/examples/apps/list.md new file mode 100644 index 000000000..d8edd5f41 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/list.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppsList + +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 + +apps = Apps(client) + +result: AppsList = apps.list( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/update-labels.md b/examples/2.3.x/server-python/examples/apps/update-labels.md new file mode 100644 index 000000000..0601df3fd --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/update-labels.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import App + +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 + +apps = Apps(client) + +result: App = apps.update_labels( + app_id = '<APP_ID>', + labels = [] +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/update-team.md b/examples/2.3.x/server-python/examples/apps/update-team.md new file mode 100644 index 000000000..44203fff2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/update-team.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import App + +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 + +apps = Apps(client) + +result: App = apps.update_team( + app_id = '<APP_ID>', + team_id = '<TEAM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/apps/update.md b/examples/2.3.x/server-python/examples/apps/update.md new file mode 100644 index 000000000..c9006df6f --- /dev/null +++ b/examples/2.3.x/server-python/examples/apps/update.md @@ -0,0 +1,37 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import App + +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 + +apps = Apps(client) + +result: App = apps.update( + app_id = '<APP_ID>', + name = '<NAME>', + description = '<DESCRIPTION>', # optional + client_uri = 'https://example.com', # optional + logo_uri = 'https://example.com', # optional + privacy_policy_url = 'https://example.com', # optional + terms_url = 'https://example.com', # optional + contacts = [], # optional + tagline = '<TAGLINE>', # optional + tags = [], # optional + images = [], # optional + support_url = 'https://example.com', # optional + data_deletion_url = 'https://example.com', # optional + enabled = False, # optional + redirect_uris = [], # optional + post_logout_redirect_uris = [], # optional + type = 'public', # optional + device_flow = False, # optional + installation_scopes = [], # optional + installation_redirect_url = 'https://example.com' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-browser.md b/examples/2.3.x/server-python/examples/avatars/get-browser.md new file mode 100644 index 000000000..3c950dbb8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-browser.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import Browser + +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: bytes = avatars.get_browser( + code = Browser.AVANT_BROWSER, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-credit-card.md b/examples/2.3.x/server-python/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..8ef04f635 --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-credit-card.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import CreditCard + +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: bytes = avatars.get_credit_card( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-favicon.md b/examples/2.3.x/server-python/examples/avatars/get-favicon.md new file mode 100644 index 000000000..dd234eafc --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-favicon.md @@ -0,0 +1,15 @@ +```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: bytes = avatars.get_favicon( + url = 'https://example.com' +) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-flag.md b/examples/2.3.x/server-python/examples/avatars/get-flag.md new file mode 100644 index 000000000..f97b20dd8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-flag.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import Flag + +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: bytes = avatars.get_flag( + code = Flag.AFGHANISTAN, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-image.md b/examples/2.3.x/server-python/examples/avatars/get-image.md new file mode 100644 index 000000000..9beea030e --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +```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: bytes = avatars.get_image( + url = 'https://example.com', + width = 0, # optional + height = 0 # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-initials.md b/examples/2.3.x/server-python/examples/avatars/get-initials.md new file mode 100644 index 000000000..08788555e --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-initials.md @@ -0,0 +1,18 @@ +```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: bytes = avatars.get_initials( + name = '<NAME>', # optional + width = 0, # optional + height = 0, # optional + background = 'FFFFFF' # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-photo.md b/examples/2.3.x/server-python/examples/avatars/get-photo.md new file mode 100644 index 000000000..64cdf309e --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-photo.md @@ -0,0 +1,22 @@ +```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: bytes = avatars.get_photo( + width = 0, # optional + height = 0, # optional + quality = 0, # optional + output = 'png', # optional + rating = 'g', # optional + user_id = 'current()', # optional + email_hash = '<EMAIL_HASH>', # optional + name = '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-qr.md b/examples/2.3.x/server-python/examples/avatars/get-qr.md new file mode 100644 index 000000000..a7968e75c --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-qr.md @@ -0,0 +1,18 @@ +```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: bytes = avatars.get_qr( + text = '<TEXT>', + size = 1, # optional + margin = 0, # optional + download = False # optional +) +``` 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 new file mode 100644 index 000000000..cf7f9a6b4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/get-screenshot.md @@ -0,0 +1,41 @@ +```python +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import BrowserTheme +from appwrite.enums import Timezone +from appwrite.enums import BrowserPermission +from appwrite.enums import ImageFormat + +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: bytes = avatars.get_screenshot( + url = 'https://example.com', + headers = { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, # optional + viewport_width = 1920, # optional + viewport_height = 1080, # optional + scale = 2, # optional + theme = BrowserTheme.DARK, # optional + user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', # optional + fullpage = True, # optional + locale = 'en-US', # optional + timezone = Timezone.AFRICA_ABIDJAN, # optional + latitude = 37.7749, # optional + longitude = -122.4194, # optional + accuracy = 100, # optional + touch = True, # optional + permissions = [BrowserPermission.GEOLOCATION, BrowserPermission.NOTIFICATIONS], # optional + sleep = 3, # optional + width = 800, # optional + height = 600, # optional + quality = 85, # optional + output = ImageFormat.JPEG # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/backups/create-archive.md b/examples/2.3.x/server-python/examples/backups/create-archive.md new file mode 100644 index 000000000..77264469d --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/create-archive.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupArchive +from appwrite.enums import BackupServices + +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 + +backups = Backups(client) + +result: BackupArchive = backups.create_archive( + services = [BackupServices.DATABASES], + resource_id = '<RESOURCE_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/create-policy.md b/examples/2.3.x/server-python/examples/backups/create-policy.md new file mode 100644 index 000000000..bf24e87ad --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/create-policy.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupPolicy +from appwrite.enums import BackupServices + +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 + +backups = Backups(client) + +result: BackupPolicy = backups.create_policy( + policy_id = '<POLICY_ID>', + services = [BackupServices.DATABASES], + retention = 1, + schedule = '', + name = '<NAME>', # optional + resource_id = '<RESOURCE_ID>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/create-restoration.md b/examples/2.3.x/server-python/examples/backups/create-restoration.md new file mode 100644 index 000000000..e2966caa1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/create-restoration.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupRestoration +from appwrite.enums import BackupServices + +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 + +backups = Backups(client) + +result: BackupRestoration = backups.create_restoration( + archive_id = '<ARCHIVE_ID>', + services = [BackupServices.DATABASES], + new_resource_id = '<NEW_RESOURCE_ID>', # optional + new_resource_name = '<NEW_RESOURCE_NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/delete-archive.md b/examples/2.3.x/server-python/examples/backups/delete-archive.md new file mode 100644 index 000000000..106e9f0f4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/delete-archive.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +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 + +backups = Backups(client) + +result = backups.delete_archive( + archive_id = '<ARCHIVE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/backups/delete-policy.md b/examples/2.3.x/server-python/examples/backups/delete-policy.md new file mode 100644 index 000000000..0583a8205 --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/delete-policy.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +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 + +backups = Backups(client) + +result = backups.delete_policy( + policy_id = '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/backups/get-archive.md b/examples/2.3.x/server-python/examples/backups/get-archive.md new file mode 100644 index 000000000..60b9c646c --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/get-archive.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupArchive + +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 + +backups = Backups(client) + +result: BackupArchive = backups.get_archive( + archive_id = '<ARCHIVE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/get-policy.md b/examples/2.3.x/server-python/examples/backups/get-policy.md new file mode 100644 index 000000000..3fa673a8e --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/get-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupPolicy + +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 + +backups = Backups(client) + +result: BackupPolicy = backups.get_policy( + policy_id = '<POLICY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/get-restoration.md b/examples/2.3.x/server-python/examples/backups/get-restoration.md new file mode 100644 index 000000000..775f047b7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/get-restoration.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupRestoration + +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 + +backups = Backups(client) + +result: BackupRestoration = backups.get_restoration( + restoration_id = '<RESTORATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/list-archives.md b/examples/2.3.x/server-python/examples/backups/list-archives.md new file mode 100644 index 000000000..3d1799234 --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/list-archives.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupArchiveList + +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 + +backups = Backups(client) + +result: BackupArchiveList = backups.list_archives( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/list-policies.md b/examples/2.3.x/server-python/examples/backups/list-policies.md new file mode 100644 index 000000000..bcfb67348 --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/list-policies.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupPolicyList + +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 + +backups = Backups(client) + +result: BackupPolicyList = backups.list_policies( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/list-restorations.md b/examples/2.3.x/server-python/examples/backups/list-restorations.md new file mode 100644 index 000000000..c353a50e0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/list-restorations.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupRestorationList + +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 + +backups = Backups(client) + +result: BackupRestorationList = backups.list_restorations( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/backups/update-policy.md b/examples/2.3.x/server-python/examples/backups/update-policy.md new file mode 100644 index 000000000..74fbdeb3d --- /dev/null +++ b/examples/2.3.x/server-python/examples/backups/update-policy.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.models import BackupPolicy + +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 + +backups = Backups(client) + +result: BackupPolicy = backups.update_policy( + policy_id = '<POLICY_ID>', + name = '<NAME>', # optional + retention = 1, # optional + schedule = '', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-python/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..e55ab28c5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-big-int-attribute.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeBigint + +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 + +databases = Databases(client) + +result: AttributeBigint = databases.create_big_int_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 1000000, # optional + default = 0, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-python/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..7c66b3227 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-boolean-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeBoolean + +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 + +databases = Databases(client) + +result: AttributeBoolean = databases.create_boolean_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = False, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-collection.md b/examples/2.3.x/server-python/examples/databases/create-collection.md new file mode 100644 index 000000000..7e9afa0f1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-collection.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Collection +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +databases = Databases(client) + +result: Collection = databases.create_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + attributes = [], # optional + indexes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-python/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..d6e5a4379 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-datetime-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeDatetime + +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 + +databases = Databases(client) + +result: AttributeDatetime = databases.create_datetime_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = '2020-10-15T06:38:00.000+00:00', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-document.md b/examples/2.3.x/server-python/examples/databases/create-document.md new file mode 100644 index 000000000..26b003443 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-document.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +databases = Databases(client) + +result: Document = databases.create_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +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 new file mode 100644 index 000000000..a1df96a90 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import DocumentList + +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 + +databases = Databases(client) + +result: DocumentList = databases.create_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-email-attribute.md b/examples/2.3.x/server-python/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..8330bb9aa --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-email-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeEmail + +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 + +databases = Databases(client) + +result: AttributeEmail = databases.create_email_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'email@example.com', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-python/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..4710819f7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-enum-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeEnum + +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 + +databases = Databases(client) + +result: AttributeEnum = databases.create_enum_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + elements = ["active", "inactive"], + required = False, + default = 'active', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-float-attribute.md b/examples/2.3.x/server-python/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..e7155081c --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-float-attribute.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeFloat + +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 + +databases = Databases(client) + +result: AttributeFloat = databases.create_float_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 100, # optional + default = 10.5, # optional + array = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..71c694f1f --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-index.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Index +from appwrite.enums import DatabasesIndexType +from appwrite.enums import OrderBy + +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 + +databases = Databases(client) + +result: Index = databases.create_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + type = DatabasesIndexType.KEY, + attributes = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-python/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..c46e22959 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-integer-attribute.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeInteger + +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 + +databases = Databases(client) + +result: AttributeInteger = databases.create_integer_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 100, # optional + default = 10, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-python/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..34542fa9e --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-ip-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeIp + +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 + +databases = Databases(client) + +result: AttributeIp = databases.create_ip_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = '192.0.2.0', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-line-attribute.md b/examples/2.3.x/server-python/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..6745498ad --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-line-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeLine + +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 + +databases = Databases(client) + +result: AttributeLine = databases.create_line_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = [[1, 2], [3, 4], [5, 6]] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-python/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..70b0eb483 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-longtext-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeLongtext + +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 + +databases = Databases(client) + +result: AttributeLongtext = databases.create_longtext_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-python/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..cf3011acf --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeMediumtext + +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 + +databases = Databases(client) + +result: AttributeMediumtext = databases.create_mediumtext_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-operations.md b/examples/2.3.x/server-python/examples/databases/create-operations.md new file mode 100644 index 000000000..ce412c3b6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-operations.md @@ -0,0 +1,29 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Transaction + +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 + +databases = Databases(client) + +result: Transaction = databases.create_operations( + transaction_id = '<TRANSACTION_ID>', + operations = [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-point-attribute.md b/examples/2.3.x/server-python/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..a3d12715a --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-point-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributePoint + +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 + +databases = Databases(client) + +result: AttributePoint = databases.create_point_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = [1, 2] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-python/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..4e6145f5e --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-polygon-attribute.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributePolygon + +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 + +databases = Databases(client) + +result: AttributePolygon = databases.create_polygon_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-python/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..81959496e --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-relationship-attribute.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeRelationship +from appwrite.enums import RelationshipType +from appwrite.enums import RelationMutate + +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 + +databases = Databases(client) + +result: AttributeRelationship = databases.create_relationship_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + related_collection_id = '<RELATED_COLLECTION_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '<KEY>', # optional + two_way_key = '<TWO_WAY_KEY>', # optional + on_delete = RelationMutate.CASCADE # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-string-attribute.md b/examples/2.3.x/server-python/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..840892433 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-string-attribute.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeString + +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 + +databases = Databases(client) + +result: AttributeString = databases.create_string_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + size = 1, + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-text-attribute.md b/examples/2.3.x/server-python/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..195650ee8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-text-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeText + +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 + +databases = Databases(client) + +result: AttributeText = databases.create_text_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-transaction.md b/examples/2.3.x/server-python/examples/databases/create-transaction.md new file mode 100644 index 000000000..733b2cf3b --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Transaction + +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 + +databases = Databases(client) + +result: Transaction = databases.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-url-attribute.md b/examples/2.3.x/server-python/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..2fdaadaca --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-url-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeUrl + +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 + +databases = Databases(client) + +result: AttributeUrl = databases.create_url_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'https://example.com', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-python/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..b0a322216 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create-varchar-attribute.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeVarchar + +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 + +databases = Databases(client) + +result: AttributeVarchar = databases.create_varchar_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + size = 1, + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create.md b/examples/2.3.x/server-python/examples/databases/create.md new file mode 100644 index 000000000..68a5b3743 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/create.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Database + +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 + +databases = Databases(client) + +result: Database = databases.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-python/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..15a42ec3a --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/decrement-document-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Document + +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 + +databases = Databases(client) + +result: Document = databases.decrement_document_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + attribute = '<ATTRIBUTE>', + value = 1, # optional + min = 0, # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/delete-attribute.md b/examples/2.3.x/server-python/examples/databases/delete-attribute.md new file mode 100644 index 000000000..f3ba64766 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/delete-attribute.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases + +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 + +databases = Databases(client) + +result = databases.delete_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/server-python/examples/databases/delete-collection.md b/examples/2.3.x/server-python/examples/databases/delete-collection.md new file mode 100644 index 000000000..ff486c588 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/delete-collection.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases + +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 + +databases = Databases(client) + +result = databases.delete_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/databases/delete-document.md b/examples/2.3.x/server-python/examples/databases/delete-document.md new file mode 100644 index 000000000..6a56cd2df --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/delete-document.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases + +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 + +databases = Databases(client) + +result = databases.delete_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + transaction_id = '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..d410bdefe --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/delete-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import DocumentList + +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 + +databases = Databases(client) + +result: DocumentList = databases.delete_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/delete-index.md b/examples/2.3.x/server-python/examples/databases/delete-index.md new file mode 100644 index 000000000..1e48fa8e2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/delete-index.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases + +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 + +databases = Databases(client) + +result = databases.delete_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/server-python/examples/databases/delete-transaction.md b/examples/2.3.x/server-python/examples/databases/delete-transaction.md new file mode 100644 index 000000000..bbc0d9757 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/delete-transaction.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases + +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 + +databases = Databases(client) + +result = databases.delete_transaction( + transaction_id = '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/databases/delete.md b/examples/2.3.x/server-python/examples/databases/delete.md new file mode 100644 index 000000000..4bf78037a --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases + +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 + +databases = Databases(client) + +result = databases.delete( + database_id = '<DATABASE_ID>' +) +``` 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 new file mode 100644 index 000000000..880a58727 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/get-attribute.md @@ -0,0 +1,30 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeBoolean +from appwrite.models import AttributeInteger +from appwrite.models import AttributeFloat +from appwrite.models import AttributeEmail +from appwrite.models import AttributeEnum +from appwrite.models import AttributeUrl +from appwrite.models import AttributeIp +from appwrite.models import AttributeDatetime +from appwrite.models import AttributeRelationship +from appwrite.models import AttributeString +from typing import Union + +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 + +databases = Databases(client) + +result: Union[AttributeBoolean, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributeString] = databases.get_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/get-collection.md b/examples/2.3.x/server-python/examples/databases/get-collection.md new file mode 100644 index 000000000..6650f4ae8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/get-collection.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Collection + +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 + +databases = Databases(client) + +result: Collection = databases.get_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/get-document.md b/examples/2.3.x/server-python/examples/databases/get-document.md new file mode 100644 index 000000000..c6d968ac1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/get-document.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Document + +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 + +databases = Databases(client) + +result: Document = databases.get_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/get-index.md b/examples/2.3.x/server-python/examples/databases/get-index.md new file mode 100644 index 000000000..4d327be10 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/get-index.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Index + +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 + +databases = Databases(client) + +result: Index = databases.get_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/get-transaction.md b/examples/2.3.x/server-python/examples/databases/get-transaction.md new file mode 100644 index 000000000..3348baa83 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/get-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Transaction + +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 + +databases = Databases(client) + +result: Transaction = databases.get_transaction( + transaction_id = '<TRANSACTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/get.md b/examples/2.3.x/server-python/examples/databases/get.md new file mode 100644 index 000000000..b2906c561 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Database + +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 + +databases = Databases(client) + +result: Database = databases.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-python/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..77a96bd3f --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/increment-document-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Document + +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 + +databases = Databases(client) + +result: Document = databases.increment_document_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + attribute = '<ATTRIBUTE>', + value = 1, # optional + max = 100, # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/list-attributes.md b/examples/2.3.x/server-python/examples/databases/list-attributes.md new file mode 100644 index 000000000..4fc25f41b --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/list-attributes.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeList + +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 + +databases = Databases(client) + +result: AttributeList = databases.list_attributes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/list-collections.md b/examples/2.3.x/server-python/examples/databases/list-collections.md new file mode 100644 index 000000000..19e71456e --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/list-collections.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import CollectionList + +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 + +databases = Databases(client) + +result: CollectionList = databases.list_collections( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/list-documents.md b/examples/2.3.x/server-python/examples/databases/list-documents.md new file mode 100644 index 000000000..f085c7d30 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/list-documents.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import DocumentList + +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 + +databases = Databases(client) + +result: DocumentList = databases.list_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/list-indexes.md b/examples/2.3.x/server-python/examples/databases/list-indexes.md new file mode 100644 index 000000000..7129c5a55 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/list-indexes.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import IndexList + +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 + +databases = Databases(client) + +result: IndexList = databases.list_indexes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..bd0993144 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/list-transactions.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import TransactionList + +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 + +databases = Databases(client) + +result: TransactionList = databases.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/list.md b/examples/2.3.x/server-python/examples/databases/list.md new file mode 100644 index 000000000..7fb1acd22 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import DatabaseList + +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 + +databases = Databases(client) + +result: DatabaseList = databases.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-python/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..84ecb9425 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-big-int-attribute.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeBigint + +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 + +databases = Databases(client) + +result: AttributeBigint = databases.update_big_int_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 0, + min = 0, # optional + max = 1000000, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-python/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..26ac80236 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-boolean-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeBoolean + +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 + +databases = Databases(client) + +result: AttributeBoolean = databases.update_boolean_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = False, + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-collection.md b/examples/2.3.x/server-python/examples/databases/update-collection.md new file mode 100644 index 000000000..85d50789f --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Collection +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +databases = Databases(client) + +result: Collection = databases.update_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', # optional + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-python/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..cf80c1d73 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-datetime-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeDatetime + +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 + +databases = Databases(client) + +result: AttributeDatetime = databases.update_datetime_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = '2020-10-15T06:38:00.000+00:00', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-document.md b/examples/2.3.x/server-python/examples/databases/update-document.md new file mode 100644 index 000000000..667d9b6e3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-document.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +databases = Databases(client) + +result: Document = databases.update_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-documents.md b/examples/2.3.x/server-python/examples/databases/update-documents.md new file mode 100644 index 000000000..edae26a45 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-documents.md @@ -0,0 +1,28 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import DocumentList + +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 + +databases = Databases(client) + +result: DocumentList = databases.update_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-email-attribute.md b/examples/2.3.x/server-python/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..6a6b2d522 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-email-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeEmail + +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 + +databases = Databases(client) + +result: AttributeEmail = databases.update_email_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'email@example.com', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-python/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..822f712c2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-enum-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeEnum + +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 + +databases = Databases(client) + +result: AttributeEnum = databases.update_enum_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + elements = ["active", "inactive"], + required = False, + default = 'active', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-float-attribute.md b/examples/2.3.x/server-python/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..4497a4a5d --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-float-attribute.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeFloat + +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 + +databases = Databases(client) + +result: AttributeFloat = databases.update_float_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 10.5, + min = 0, # optional + max = 100, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-python/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..61fe8bccd --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-integer-attribute.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeInteger + +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 + +databases = Databases(client) + +result: AttributeInteger = databases.update_integer_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 10, + min = 0, # optional + max = 100, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-python/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..89945ee31 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-ip-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeIp + +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 + +databases = Databases(client) + +result: AttributeIp = databases.update_ip_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = '192.0.2.0', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-line-attribute.md b/examples/2.3.x/server-python/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..96d6b4e64 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-line-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeLine + +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 + +databases = Databases(client) + +result: AttributeLine = databases.update_line_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = [[1, 2], [3, 4], [5, 6]], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-python/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..d039a6e0d --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-longtext-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeLongtext + +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 + +databases = Databases(client) + +result: AttributeLongtext = databases.update_longtext_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-python/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..dc960fc64 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeMediumtext + +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 + +databases = Databases(client) + +result: AttributeMediumtext = databases.update_mediumtext_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-point-attribute.md b/examples/2.3.x/server-python/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..bf6a94d83 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-point-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributePoint + +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 + +databases = Databases(client) + +result: AttributePoint = databases.update_point_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = [1, 2], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-python/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..2dd1194cb --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-polygon-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributePolygon + +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 + +databases = Databases(client) + +result: AttributePolygon = databases.update_polygon_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-python/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..a507aca11 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-relationship-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeRelationship +from appwrite.enums import RelationMutate + +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 + +databases = Databases(client) + +result: AttributeRelationship = databases.update_relationship_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + on_delete = RelationMutate.CASCADE, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-string-attribute.md b/examples/2.3.x/server-python/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..bfe14df17 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-string-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeString + +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 + +databases = Databases(client) + +result: AttributeString = databases.update_string_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + size = 1, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-text-attribute.md b/examples/2.3.x/server-python/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..01f66d137 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-text-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeText + +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 + +databases = Databases(client) + +result: AttributeText = databases.update_text_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-transaction.md b/examples/2.3.x/server-python/examples/databases/update-transaction.md new file mode 100644 index 000000000..937a227e6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-transaction.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Transaction + +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 + +databases = Databases(client) + +result: Transaction = databases.update_transaction( + transaction_id = '<TRANSACTION_ID>', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-url-attribute.md b/examples/2.3.x/server-python/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..9f05a4a4d --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-url-attribute.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeUrl + +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 + +databases = Databases(client) + +result: AttributeUrl = databases.update_url_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'https://example.com', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-python/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..b844a7128 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update-varchar-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import AttributeVarchar + +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 + +databases = Databases(client) + +result: AttributeVarchar = databases.update_varchar_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + size = 1, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/update.md b/examples/2.3.x/server-python/examples/databases/update.md new file mode 100644 index 000000000..73458d4f2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/update.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Database + +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 + +databases = Databases(client) + +result: Database = databases.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/upsert-document.md b/examples/2.3.x/server-python/examples/databases/upsert-document.md new file mode 100644 index 000000000..b18eb794d --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/upsert-document.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +databases = Databases(client) + +result: Document = databases.upsert_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..5039ccb0a --- /dev/null +++ b/examples/2.3.x/server-python/examples/databases/upsert-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.models import DocumentList + +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 + +databases = Databases(client) + +result: DocumentList = databases.upsert_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/create-collection.md b/examples/2.3.x/server-python/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..b717460fc --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/create-collection.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Collection +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.create_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + attributes = [], # optional + indexes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/create-document.md b/examples/2.3.x/server-python/examples/documentsdb/create-document.md new file mode 100644 index 000000000..a6a3055f6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/create-document.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Document = documents_db.create_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..2b15e560a --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/create-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.create_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/create-failover.md b/examples/2.3.x/server-python/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..fc7b0570f --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/create-failover.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DedicatedDatabase + +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 + +documents_db = DocumentsDB(client) + +result: DedicatedDatabase = documents_db.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..34a36dc83 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/create-index.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Index +from appwrite.enums import DocumentsDBIndexType +from appwrite.enums import OrderBy + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Index = documents_db.create_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + type = DocumentsDBIndexType.KEY, + attributes = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/create-operations.md b/examples/2.3.x/server-python/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..23128e81e --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/create-operations.md @@ -0,0 +1,29 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.create_operations( + transaction_id = '<TRANSACTION_ID>', + operations = [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-python/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..d34b358e5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/create-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/create.md b/examples/2.3.x/server-python/examples/documentsdb/create.md new file mode 100644 index 000000000..b8da9d4b5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/create.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Database + +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 + +documents_db = DocumentsDB(client) + +result: Database = documents_db.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-python/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..d6c753299 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Document = documents_db.decrement_document_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + attribute = '<ATTRIBUTE>', + value = 1, # optional + min = 0, # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-python/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..1652ab2be --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/delete-collection.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result = documents_db.delete_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/delete-document.md b/examples/2.3.x/server-python/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..e588088e0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result = documents_db.delete_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + transaction_id = '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..8bc343de9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/delete-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.delete_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/delete-index.md b/examples/2.3.x/server-python/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..befd9fee0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/delete-index.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result = documents_db.delete_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-python/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..009bf807d --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result = documents_db.delete_transaction( + transaction_id = '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/delete.md b/examples/2.3.x/server-python/examples/documentsdb/delete.md new file mode 100644 index 000000000..648450918 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result = documents_db.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/get-collection.md b/examples/2.3.x/server-python/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..5ec739b89 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/get-collection.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Collection + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.get_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/get-document.md b/examples/2.3.x/server-python/examples/documentsdb/get-document.md new file mode 100644 index 000000000..3f0006e7c --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/get-document.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Document = documents_db.get_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/get-index.md b/examples/2.3.x/server-python/examples/documentsdb/get-index.md new file mode 100644 index 000000000..598873f07 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/get-index.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Index + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Index = documents_db.get_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-python/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..1eabb127b --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/get-replicas.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DedicatedDatabaseReplicas + +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 + +documents_db = DocumentsDB(client) + +result: DedicatedDatabaseReplicas = documents_db.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/get-status.md b/examples/2.3.x/server-python/examples/documentsdb/get-status.md new file mode 100644 index 000000000..9e26368a3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/get-status.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DatabaseStatus + +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 + +documents_db = DocumentsDB(client) + +result: DatabaseStatus = documents_db.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-python/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..27d88ee76 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/get-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.get_transaction( + transaction_id = '<TRANSACTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/get.md b/examples/2.3.x/server-python/examples/documentsdb/get.md new file mode 100644 index 000000000..fc2ffb9b1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Database + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Database = documents_db.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-python/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..08e618834 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Document = documents_db.increment_document_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + attribute = '<ATTRIBUTE>', + value = 1, # optional + max = 100, # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/list-collections.md b/examples/2.3.x/server-python/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..0d72a3761 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/list-collections.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import CollectionList + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: CollectionList = documents_db.list_collections( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/list-documents.md b/examples/2.3.x/server-python/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..c1b2a3607 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/list-documents.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.list_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-python/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..26655d728 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/list-indexes.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import IndexList + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: IndexList = documents_db.list_indexes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/list-operations.md b/examples/2.3.x/server-python/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..90c01baa0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/list-operations.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DedicatedDatabaseOperationList + +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 + +documents_db = DocumentsDB(client) + +result: DedicatedDatabaseOperationList = documents_db.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-python/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..6917c4838 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/list-specifications.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DedicatedDatabaseSpecificationList + +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 + +documents_db = DocumentsDB(client) + +result: DedicatedDatabaseSpecificationList = documents_db.list_specifications() + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..6dc7aae2f --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/list-transactions.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import TransactionList + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: TransactionList = documents_db.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/list.md b/examples/2.3.x/server-python/examples/documentsdb/list.md new file mode 100644 index 000000000..59d3557ee --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/list.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DatabaseList + +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 + +documents_db = DocumentsDB(client) + +result: DatabaseList = documents_db.list( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/update-collection.md b/examples/2.3.x/server-python/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..955fb28fa --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/update-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Collection +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.update_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/update-document.md b/examples/2.3.x/server-python/examples/documentsdb/update-document.md new file mode 100644 index 000000000..cf0bfcc9d --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/update-document.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Document = documents_db.update_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/update-documents.md b/examples/2.3.x/server-python/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..2c183e55a --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/update-documents.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.update_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + data = {}, # optional + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-python/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..fff946cba --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/update-transaction.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.update_transaction( + transaction_id = '<TRANSACTION_ID>', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/update.md b/examples/2.3.x/server-python/examples/documentsdb/update.md new file mode 100644 index 000000000..03d7e861e --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/update.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Database + +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 + +documents_db = DocumentsDB(client) + +result: Database = documents_db.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-python/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..07086f4a8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/upsert-document.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: Document = documents_db.upsert_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..d98b227c2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/documentsdb/upsert-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.upsert_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-python/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..73c5594ea --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_google_workspace( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-python/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..d9a957aa9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_i_cloud( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-python/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..890122676 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-preset-mailgun.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_mailgun( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-python/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..b8e0f790f --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-preset-outlook.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_outlook( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-python/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..1caf9d5d6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_proton_mail( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-python/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..bc5a7c2aa --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-preset-zoho.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.create_preset_zoho( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-a.md b/examples/2.3.x/server-python/examples/domains/create-record-a.md new file mode 100644 index 000000000..17be375ec --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-a.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_a( + domain_id = '<DOMAIN_ID>', + name = '', + value = '', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-python/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..c02fff659 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-aaaa.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_aaaa( + domain_id = '<DOMAIN_ID>', + name = '', + value = '', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-alias.md b/examples/2.3.x/server-python/examples/domains/create-record-alias.md new file mode 100644 index 000000000..a5c9f1677 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-alias.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_alias( + domain_id = '<DOMAIN_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-caa.md b/examples/2.3.x/server-python/examples/domains/create-record-caa.md new file mode 100644 index 000000000..5e0ee5d87 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-caa.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_caa( + domain_id = '<DOMAIN_ID>', + name = '', + value = '', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-cname.md b/examples/2.3.x/server-python/examples/domains/create-record-cname.md new file mode 100644 index 000000000..8afe96a2d --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-cname.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_cname( + domain_id = '<DOMAIN_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-https.md b/examples/2.3.x/server-python/examples/domains/create-record-https.md new file mode 100644 index 000000000..2448b64c3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-https.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_https( + domain_id = '<DOMAIN_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-mx.md b/examples/2.3.x/server-python/examples/domains/create-record-mx.md new file mode 100644 index 000000000..ef492fe1e --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-mx.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_mx( + domain_id = '<DOMAIN_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + priority = 0, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-ns.md b/examples/2.3.x/server-python/examples/domains/create-record-ns.md new file mode 100644 index 000000000..bc2e41875 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-ns.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_ns( + domain_id = '<DOMAIN_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-srv.md b/examples/2.3.x/server-python/examples/domains/create-record-srv.md new file mode 100644 index 000000000..04071b340 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-srv.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_srv( + domain_id = '<DOMAIN_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + priority = 0, + weight = 0, + port = 0, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create-record-txt.md b/examples/2.3.x/server-python/examples/domains/create-record-txt.md new file mode 100644 index 000000000..4a66afd0f --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create-record-txt.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.create_record_txt( + domain_id = '<DOMAIN_ID>', + name = '', + ttl = 1, + value = '<VALUE>', # optional + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/create.md b/examples/2.3.x/server-python/examples/domains/create.md new file mode 100644 index 000000000..01c024147 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/create.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import Domain + +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 + +domains = Domains(client) + +result: Domain = domains.create( + team_id = '<TEAM_ID>', + domain = 'example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/delete-record.md b/examples/2.3.x/server-python/examples/domains/delete-record.md new file mode 100644 index 000000000..40b12e83e --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/delete-record.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains + +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 + +domains = Domains(client) + +result = domains.delete_record( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/domains/delete.md b/examples/2.3.x/server-python/examples/domains/delete.md new file mode 100644 index 000000000..f9cb3c437 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains + +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 + +domains = Domains(client) + +result = domains.delete( + domain_id = '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-python/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..e228af7c4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_google_workspace( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-python/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..5b0169c2f --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_i_cloud( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-python/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..494f42a54 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-preset-mailgun.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_mailgun( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-python/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..5daf056da --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-preset-outlook.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_outlook( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-python/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..5dff2d5bf --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_proton_mail( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-python/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..b9f6e1ab8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-preset-zoho.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.get_preset_zoho( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-price.md b/examples/2.3.x/server-python/examples/domains/get-price.md new file mode 100644 index 000000000..961226a0c --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-price.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DomainPrice +from appwrite.enums import DomainRegistrationType + +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 + +domains = Domains(client) + +result: DomainPrice = domains.get_price( + domain = 'example.com', + period_years = None, # optional + registration_type = DomainRegistrationType.NEW # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-record.md b/examples/2.3.x/server-python/examples/domains/get-record.md new file mode 100644 index 000000000..e923cd6c7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-record.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.get_record( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-transfer-status.md b/examples/2.3.x/server-python/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..ca10cf7a8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-transfer-status.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DomainTransferStatus + +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 + +domains = Domains(client) + +result: DomainTransferStatus = domains.get_transfer_status( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get-zone.md b/examples/2.3.x/server-python/examples/domains/get-zone.md new file mode 100644 index 000000000..ad17f2dc6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get-zone.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains + +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 + +domains = Domains(client) + +result = domains.get_zone( + domain_id = '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/domains/get.md b/examples/2.3.x/server-python/examples/domains/get.md new file mode 100644 index 000000000..c1d772d4b --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import Domain + +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 + +domains = Domains(client) + +result: Domain = domains.get( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/list-prices.md b/examples/2.3.x/server-python/examples/domains/list-prices.md new file mode 100644 index 000000000..b86063a08 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/list-prices.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DomainPricesList +from appwrite.enums import DomainRegistrationType + +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 + +domains = Domains(client) + +result: DomainPricesList = domains.list_prices( + domains = [], + period_years = None, # optional + registration_type = DomainRegistrationType.NEW # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/list-records.md b/examples/2.3.x/server-python/examples/domains/list-records.md new file mode 100644 index 000000000..9d40d2550 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/list-records.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecordsList + +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 + +domains = Domains(client) + +result: DnsRecordsList = domains.list_records( + domain_id = '<DOMAIN_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/list.md b/examples/2.3.x/server-python/examples/domains/list.md new file mode 100644 index 000000000..f0d15a75e --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/list.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DomainsList + +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 + +domains = Domains(client) + +result: DomainsList = domains.list( + queries = [], # optional + search = '<SEARCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-nameservers.md b/examples/2.3.x/server-python/examples/domains/update-nameservers.md new file mode 100644 index 000000000..0e5ed4bef --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-nameservers.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import Domain + +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 + +domains = Domains(client) + +result: Domain = domains.update_nameservers( + domain_id = '<DOMAIN_ID>', + nameservers = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-a.md b/examples/2.3.x/server-python/examples/domains/update-record-a.md new file mode 100644 index 000000000..516e273b4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-a.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_a( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-python/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..1d36e41fe --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-aaaa.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_aaaa( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-alias.md b/examples/2.3.x/server-python/examples/domains/update-record-alias.md new file mode 100644 index 000000000..9dc967843 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-alias.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_alias( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-caa.md b/examples/2.3.x/server-python/examples/domains/update-record-caa.md new file mode 100644 index 000000000..e1c74e35c --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-caa.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_caa( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-cname.md b/examples/2.3.x/server-python/examples/domains/update-record-cname.md new file mode 100644 index 000000000..35e12cd69 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-cname.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_cname( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-https.md b/examples/2.3.x/server-python/examples/domains/update-record-https.md new file mode 100644 index 000000000..c31e963de --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-https.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_https( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-mx.md b/examples/2.3.x/server-python/examples/domains/update-record-mx.md new file mode 100644 index 000000000..bd96398ac --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-mx.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_mx( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + priority = 0, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-ns.md b/examples/2.3.x/server-python/examples/domains/update-record-ns.md new file mode 100644 index 000000000..3ca42be84 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-ns.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_ns( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-srv.md b/examples/2.3.x/server-python/examples/domains/update-record-srv.md new file mode 100644 index 000000000..c47f9f2c3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-srv.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_srv( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + priority = 0, + weight = 0, + port = 0, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-record-txt.md b/examples/2.3.x/server-python/examples/domains/update-record-txt.md new file mode 100644 index 000000000..b64617011 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-record-txt.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import DnsRecord + +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 + +domains = Domains(client) + +result: DnsRecord = domains.update_record_txt( + domain_id = '<DOMAIN_ID>', + record_id = '<RECORD_ID>', + name = '', + value = '<VALUE>', + ttl = 1, + comment = '<COMMENT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-team.md b/examples/2.3.x/server-python/examples/domains/update-team.md new file mode 100644 index 000000000..3963e7789 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-team.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import Domain + +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 + +domains = Domains(client) + +result: Domain = domains.update_team( + domain_id = '<DOMAIN_ID>', + team_id = '<TEAM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/update-zone.md b/examples/2.3.x/server-python/examples/domains/update-zone.md new file mode 100644 index 000000000..89e9011a5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/update-zone.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import Domain + +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 + +domains = Domains(client) + +result: Domain = domains.update_zone( + domain_id = '<DOMAIN_ID>', + content = '<CONTENT>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/domains/verify-nameservers.md b/examples/2.3.x/server-python/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..13caac7ff --- /dev/null +++ b/examples/2.3.x/server-python/examples/domains/verify-nameservers.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.domains import Domains +from appwrite.models import Domain + +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 + +domains = Domains(client) + +result: Domain = domains.verify_nameservers( + domain_id = '<DOMAIN_ID>' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..49d3c258d --- /dev/null +++ b/examples/2.3.x/server-python/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.embeddings import Embeddings +from appwrite.models import EmbeddingList +from appwrite.enums import EmbeddingModel + +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 + +embeddings = Embeddings(client) + +result: EmbeddingList = embeddings.create_text_embeddings( + texts = [], + model = EmbeddingModel.NOMIC_EMBED_TEXT # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/create-deployment.md b/examples/2.3.x/server-python/examples/functions/create-deployment.md new file mode 100644 index 000000000..ed197c329 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/create-deployment.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.input_file import InputFile +from appwrite.models import Deployment + +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 + +functions = Functions(client) + +result: Deployment = functions.create_deployment( + function_id = '<FUNCTION_ID>', + code = InputFile.from_path('file.png'), + activate = False, + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-python/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..68400cbeb --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Deployment + +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 + +functions = Functions(client) + +result: Deployment = functions.create_duplicate_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>', + build_id = '<BUILD_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/create-execution.md b/examples/2.3.x/server-python/examples/functions/create-execution.md new file mode 100644 index 000000000..c88c00efd --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/create-execution.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Execution +from appwrite.enums import ExecutionMethod + +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 + +functions = Functions(client) + +result: Execution = functions.create_execution( + function_id = '<FUNCTION_ID>', + body = '<BODY>', # optional + async = False, # optional + path = '<PATH>', # optional + method = ExecutionMethod.GET, # optional + headers = {}, # optional + scheduled_at = '<SCHEDULED_AT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/create-template-deployment.md b/examples/2.3.x/server-python/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..19227be6f --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/create-template-deployment.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Deployment +from appwrite.enums import TemplateReferenceType + +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 + +functions = Functions(client) + +result: Deployment = functions.create_template_deployment( + function_id = '<FUNCTION_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + type = TemplateReferenceType.COMMIT, + reference = '<REFERENCE>', + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/create-variable.md b/examples/2.3.x/server-python/examples/functions/create-variable.md new file mode 100644 index 000000000..da323f97d --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/create-variable.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Variable + +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 + +functions = Functions(client) + +result: Variable = functions.create_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-python/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..be644a7c4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/create-vcs-deployment.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Deployment +from appwrite.enums import VCSReferenceType + +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 + +functions = Functions(client) + +result: Deployment = functions.create_vcs_deployment( + function_id = '<FUNCTION_ID>', + type = VCSReferenceType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/create.md b/examples/2.3.x/server-python/examples/functions/create.md new file mode 100644 index 000000000..e35204852 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/create.md @@ -0,0 +1,41 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Function +from appwrite.enums import Runtime +from appwrite.enums import ProjectKeyScopes + +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 + +functions = Functions(client) + +result: Function = functions.create( + function_id = '<FUNCTION_ID>', + name = '<NAME>', + runtime = Runtime.NODE_14_5, + execute = ["any"], # optional + events = [], # optional + schedule = '0 0 * * *', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>', # optional + scopes = [ProjectKeyScopes.PROJECT_READ], # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches = [], # optional + provider_paths = [], # optional + build_specification = 's-1vcpu-512mb', # optional + runtime_specification = 's-1vcpu-512mb', # optional + deployment_retention = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/delete-deployment.md b/examples/2.3.x/server-python/examples/functions/delete-deployment.md new file mode 100644 index 000000000..72abfb744 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/delete-deployment.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions + +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 + +functions = Functions(client) + +result = functions.delete_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/functions/delete-execution.md b/examples/2.3.x/server-python/examples/functions/delete-execution.md new file mode 100644 index 000000000..634bfef72 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/delete-execution.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions + +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 + +functions = Functions(client) + +result = functions.delete_execution( + function_id = '<FUNCTION_ID>', + execution_id = '<EXECUTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/functions/delete-variable.md b/examples/2.3.x/server-python/examples/functions/delete-variable.md new file mode 100644 index 000000000..e93cd9c55 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/delete-variable.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions + +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 + +functions = Functions(client) + +result = functions.delete_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/functions/delete.md b/examples/2.3.x/server-python/examples/functions/delete.md new file mode 100644 index 000000000..ebd09f477 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions + +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 + +functions = Functions(client) + +result = functions.delete( + function_id = '<FUNCTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/functions/get-deployment-download.md b/examples/2.3.x/server-python/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..49df861b2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/get-deployment-download.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.enums import DeploymentDownloadType + +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 + +functions = Functions(client) + +result: bytes = functions.get_deployment_download( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE, # optional + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/functions/get-deployment.md b/examples/2.3.x/server-python/examples/functions/get-deployment.md new file mode 100644 index 000000000..d9f8ba2bf --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/get-deployment.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Deployment + +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 + +functions = Functions(client) + +result: Deployment = functions.get_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/get-execution.md b/examples/2.3.x/server-python/examples/functions/get-execution.md new file mode 100644 index 000000000..47d4ce387 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/get-execution.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Execution + +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 + +functions = Functions(client) + +result: Execution = functions.get_execution( + function_id = '<FUNCTION_ID>', + execution_id = '<EXECUTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/get-variable.md b/examples/2.3.x/server-python/examples/functions/get-variable.md new file mode 100644 index 000000000..7ba591ad6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/get-variable.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Variable + +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 + +functions = Functions(client) + +result: Variable = functions.get_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/get.md b/examples/2.3.x/server-python/examples/functions/get.md new file mode 100644 index 000000000..a604e4d9c --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Function + +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 + +functions = Functions(client) + +result: Function = functions.get( + function_id = '<FUNCTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/list-deployments.md b/examples/2.3.x/server-python/examples/functions/list-deployments.md new file mode 100644 index 000000000..097181653 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/list-deployments.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import DeploymentList + +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 + +functions = Functions(client) + +result: DeploymentList = functions.list_deployments( + function_id = '<FUNCTION_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/list-executions.md b/examples/2.3.x/server-python/examples/functions/list-executions.md new file mode 100644 index 000000000..907ec8597 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/list-executions.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import ExecutionList + +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 + +functions = Functions(client) + +result: ExecutionList = functions.list_executions( + function_id = '<FUNCTION_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..ee75c80e6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/list-runtimes.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import RuntimeList + +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 + +functions = Functions(client) + +result: RuntimeList = functions.list_runtimes() + +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 new file mode 100644 index 000000000..7cf529a93 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/list-specifications.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import SpecificationList + +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 + +functions = Functions(client) + +result: SpecificationList = functions.list_specifications( + type = 'runtimes' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/list-variables.md b/examples/2.3.x/server-python/examples/functions/list-variables.md new file mode 100644 index 000000000..693334b7c --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/list-variables.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import VariableList + +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 + +functions = Functions(client) + +result: VariableList = functions.list_variables( + function_id = '<FUNCTION_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/list.md b/examples/2.3.x/server-python/examples/functions/list.md new file mode 100644 index 000000000..6f1876966 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import FunctionList + +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 + +functions = Functions(client) + +result: FunctionList = functions.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/update-deployment-status.md b/examples/2.3.x/server-python/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..97a554935 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/update-deployment-status.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Deployment + +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 + +functions = Functions(client) + +result: Deployment = functions.update_deployment_status( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/update-function-deployment.md b/examples/2.3.x/server-python/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..be39738ac --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/update-function-deployment.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Function + +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 + +functions = Functions(client) + +result: Function = functions.update_function_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/update-variable.md b/examples/2.3.x/server-python/examples/functions/update-variable.md new file mode 100644 index 000000000..6aa2f98c1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/update-variable.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Variable + +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 + +functions = Functions(client) + +result: Variable = functions.update_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', # optional + value = '<VALUE>', # optional + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/functions/update.md b/examples/2.3.x/server-python/examples/functions/update.md new file mode 100644 index 000000000..d7dd50df6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/functions/update.md @@ -0,0 +1,41 @@ +```python +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.models import Function +from appwrite.enums import Runtime +from appwrite.enums import ProjectKeyScopes + +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 + +functions = Functions(client) + +result: Function = functions.update( + function_id = '<FUNCTION_ID>', + name = '<NAME>', + runtime = Runtime.NODE_14_5, # optional + execute = ["any"], # optional + events = [], # optional + schedule = '0 0 * * *', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>', # optional + scopes = [ProjectKeyScopes.PROJECT_READ], # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches = [], # optional + provider_paths = [], # optional + build_specification = 's-1vcpu-512mb', # optional + runtime_specification = 's-1vcpu-512mb', # optional + deployment_retention = 0 # 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 new file mode 100644 index 000000000..26ed1cbed --- /dev/null +++ b/examples/2.3.x/server-python/examples/graphql/mutation.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +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 + +graphql = Graphql(client) + +result = graphql.mutation( + query = {} +) +``` diff --git a/examples/2.3.x/server-python/examples/graphql/query.md b/examples/2.3.x/server-python/examples/graphql/query.md new file mode 100644 index 000000000..94142f993 --- /dev/null +++ b/examples/2.3.x/server-python/examples/graphql/query.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +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 + +graphql = Graphql(client) + +result = graphql.query( + query = {} +) +``` diff --git a/examples/2.3.x/server-python/examples/locale/get.md b/examples/2.3.x/server-python/examples/locale/get.md new file mode 100644 index 000000000..bef85fab8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/locale/get.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.locale import Locale +from appwrite.models import Locale as LocaleModel + +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 + +locale = Locale(client) + +result: LocaleModel = locale.get() + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..adc293961 --- /dev/null +++ b/examples/2.3.x/server-python/examples/locale/list-codes.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.locale import Locale +from appwrite.models import LocaleCodeList + +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 + +locale = Locale(client) + +result: LocaleCodeList = locale.list_codes() + +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 new file mode 100644 index 000000000..fcf05e6ef --- /dev/null +++ b/examples/2.3.x/server-python/examples/locale/list-continents.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.locale import Locale +from appwrite.models import ContinentList + +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 + +locale = Locale(client) + +result: ContinentList = locale.list_continents() + +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 new file mode 100644 index 000000000..374cc9a37 --- /dev/null +++ b/examples/2.3.x/server-python/examples/locale/list-countries-eu.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.locale import Locale +from appwrite.models import CountryList + +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 + +locale = Locale(client) + +result: CountryList = locale.list_countries_eu() + +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 new file mode 100644 index 000000000..8b36a1f91 --- /dev/null +++ b/examples/2.3.x/server-python/examples/locale/list-countries-phones.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.locale import Locale +from appwrite.models import PhoneList + +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 + +locale = Locale(client) + +result: PhoneList = locale.list_countries_phones() + +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 new file mode 100644 index 000000000..5c45a7668 --- /dev/null +++ b/examples/2.3.x/server-python/examples/locale/list-countries.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.locale import Locale +from appwrite.models import CountryList + +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 + +locale = Locale(client) + +result: CountryList = locale.list_countries() + +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 new file mode 100644 index 000000000..07f061c96 --- /dev/null +++ b/examples/2.3.x/server-python/examples/locale/list-currencies.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.locale import Locale +from appwrite.models import CurrencyList + +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 + +locale = Locale(client) + +result: CurrencyList = locale.list_currencies() + +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 new file mode 100644 index 000000000..3fb0c82cf --- /dev/null +++ b/examples/2.3.x/server-python/examples/locale/list-languages.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.locale import Locale +from appwrite.models import LanguageList + +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 + +locale = Locale(client) + +result: LanguageList = locale.list_languages() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-python/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..52d144d62 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-apns-provider.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-python/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..c17c582e3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_appwrite_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + enabled = False, # optional + qos = 0, # optional + expiry = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-email.md b/examples/2.3.x/server-python/examples/messaging/create-email.md new file mode 100644 index 000000000..32d945945 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-email.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Message + +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 + +messaging = Messaging(client) + +result: Message = messaging.create_email( + message_id = '<MESSAGE_ID>', + subject = '<SUBJECT>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + cc = [], # optional + bcc = [], # optional + attachments = [], # optional + reply_to_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # 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/create-fcm-provider.md b/examples/2.3.x/server-python/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..b4dc9b2f2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-fcm-provider.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + service_account_json = {}, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-python/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..89ecea103 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + domain = 'example.com', # optional + is_eu_region = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-python/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..9bf577df7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>', # optional + enabled = 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 new file mode 100644 index 000000000..155128a02 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-push.md @@ -0,0 +1,37 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Message +from appwrite.enums import MessagePriority + +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 + +messaging = Messaging(client) + +result: Message = messaging.create_push( + message_id = '<MESSAGE_ID>', + title = '<TITLE>', # optional + body = '<BODY>', # optional + topics = [], # optional + users = [], # optional + targets = [], # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '<ID1:ID2>', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = 1, # optional + draft = False, # optional + scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-python/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..5a1205a41 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-resend-provider.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_resend_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-python/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..e9abd646a --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-python/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..369ffc71e --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-ses-provider.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_ses_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + access_key = '<ACCESS_KEY>', # optional + secret_key = '<SECRET_KEY>', # optional + region = '<REGION>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-sms.md b/examples/2.3.x/server-python/examples/messaging/create-sms.md new file mode 100644 index 000000000..7512a542d --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-sms.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Message + +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 + +messaging = Messaging(client) + +result: Message = messaging.create_sms( + message_id = '<MESSAGE_ID>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + draft = 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/create-smtp-provider.md b/examples/2.3.x/server-python/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..9681bc18e --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-smtp-provider.md @@ -0,0 +1,32 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider +from appwrite.enums import SmtpEncryption + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + host = '<HOST>', + port = 587, # optional + username = '<USERNAME>', # optional + password = 'password', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-subscriber.md b/examples/2.3.x/server-python/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..2c230b1ac --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-subscriber.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Subscriber + +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_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging(client) + +result: Subscriber = messaging.create_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>', + target_id = '<TARGET_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-python/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..e4e105893 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-telesign-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-python/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..3b42e692b --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-topic.md b/examples/2.3.x/server-python/examples/messaging/create-topic.md new file mode 100644 index 000000000..93388456d --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-topic.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Topic + +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 + +messaging = Messaging(client) + +result: Topic = messaging.create_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', + subscribe = ["any"], # optional + qos = 0, # optional + expiry = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-python/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..b0e315954 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-twilio-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '<FROM>', # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-python/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..4afc224d3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/create-vonage-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.create_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/delete-provider.md b/examples/2.3.x/server-python/examples/messaging/delete-provider.md new file mode 100644 index 000000000..887434c02 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/delete-provider.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +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 + +messaging = Messaging(client) + +result = messaging.delete_provider( + provider_id = '<PROVIDER_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-python/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..32eec660b --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +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_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging(client) + +result = messaging.delete_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/delete-topic.md b/examples/2.3.x/server-python/examples/messaging/delete-topic.md new file mode 100644 index 000000000..f46587099 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/delete-topic.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +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 + +messaging = Messaging(client) + +result = messaging.delete_topic( + topic_id = '<TOPIC_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/delete.md b/examples/2.3.x/server-python/examples/messaging/delete.md new file mode 100644 index 000000000..d3447ced9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +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 + +messaging = Messaging(client) + +result = messaging.delete( + message_id = '<MESSAGE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/get-message.md b/examples/2.3.x/server-python/examples/messaging/get-message.md new file mode 100644 index 000000000..b93df097e --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/get-message.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Message + +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 + +messaging = Messaging(client) + +result: Message = messaging.get_message( + message_id = '<MESSAGE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/get-provider.md b/examples/2.3.x/server-python/examples/messaging/get-provider.md new file mode 100644 index 000000000..77750af4b --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/get-provider.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.get_provider( + provider_id = '<PROVIDER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/get-subscriber.md b/examples/2.3.x/server-python/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..58b6dda21 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/get-subscriber.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Subscriber + +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 + +messaging = Messaging(client) + +result: Subscriber = messaging.get_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/get-topic.md b/examples/2.3.x/server-python/examples/messaging/get-topic.md new file mode 100644 index 000000000..7c38c8012 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/get-topic.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Topic + +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 + +messaging = Messaging(client) + +result: Topic = messaging.get_topic( + topic_id = '<TOPIC_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/list-messages.md b/examples/2.3.x/server-python/examples/messaging/list-messages.md new file mode 100644 index 000000000..cb833b251 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/list-messages.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import MessageList + +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 + +messaging = Messaging(client) + +result: MessageList = messaging.list_messages( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/list-providers.md b/examples/2.3.x/server-python/examples/messaging/list-providers.md new file mode 100644 index 000000000..eae8eee0c --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/list-providers.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import ProviderList + +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 + +messaging = Messaging(client) + +result: ProviderList = messaging.list_providers( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/list-subscribers.md b/examples/2.3.x/server-python/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..7502d00f1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/list-subscribers.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import SubscriberList + +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 + +messaging = Messaging(client) + +result: SubscriberList = messaging.list_subscribers( + topic_id = '<TOPIC_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/list-targets.md b/examples/2.3.x/server-python/examples/messaging/list-targets.md new file mode 100644 index 000000000..6c753b2fb --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/list-targets.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import TargetList + +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 + +messaging = Messaging(client) + +result: TargetList = messaging.list_targets( + message_id = '<MESSAGE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/list-topics.md b/examples/2.3.x/server-python/examples/messaging/list-topics.md new file mode 100644 index 000000000..106deab05 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/list-topics.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import TopicList + +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 + +messaging = Messaging(client) + +result: TopicList = messaging.list_topics( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-python/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..bdbfc06e4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-apns-provider.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-python/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..6b931ab64 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_appwrite_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + qos = 0, # optional + expiry = 0 # 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 new file mode 100644 index 000000000..fc0f9ccba --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-email.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Message + +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 + +messaging = Messaging(client) + +result: Message = messaging.update_email( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + subject = '<SUBJECT>', # optional + content = '<CONTENT>', # optional + draft = False, # optional + html = False, # optional + cc = [], # optional + bcc = [], # 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 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-fcm-provider.md b/examples/2.3.x/server-python/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..6270cb80d --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-fcm-provider.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + service_account_json = {} # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-python/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..82086c418 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + api_key = '<API_KEY>', # optional + domain = 'example.com', # optional + is_eu_region = False, # optional + enabled = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-python/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..d608d6315 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>' # 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 new file mode 100644 index 000000000..0c592d6c1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-push.md @@ -0,0 +1,37 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Message +from appwrite.enums import MessagePriority + +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 + +messaging = Messaging(client) + +result: Message = messaging.update_push( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + title = '<TITLE>', # optional + body = '<BODY>', # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '<ID1:ID2>', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = 1, # optional + draft = False, # optional + scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-python/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..1de7e46fd --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-resend-provider.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_resend_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-python/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..23bf7bad9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-python/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..ab77e2eb7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-ses-provider.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_ses_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + access_key = '<ACCESS_KEY>', # optional + secret_key = '<SECRET_KEY>', # optional + region = '<REGION>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # 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 new file mode 100644 index 000000000..32698978b --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-sms.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Message + +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 + +messaging = Messaging(client) + +result: Message = messaging.update_sms( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + content = '<CONTENT>', # optional + draft = 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-smtp-provider.md b/examples/2.3.x/server-python/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..23294e88b --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-smtp-provider.md @@ -0,0 +1,32 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider +from appwrite.enums import SmtpEncryption + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + host = '<HOST>', # optional + port = 1, # optional + username = '<USERNAME>', # optional + password = 'password', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-python/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..d59fbaf67 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-telesign-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-python/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..e1f9569b9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-topic.md b/examples/2.3.x/server-python/examples/messaging/update-topic.md new file mode 100644 index 000000000..4870903a4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-topic.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Topic + +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 + +messaging = Messaging(client) + +result: Topic = messaging.update_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', # optional + subscribe = ["any"], # optional + qos = 0, # optional + expiry = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-python/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..e4622e273 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-twilio-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + from = '<FROM>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-python/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..ba3798943 --- /dev/null +++ b/examples/2.3.x/server-python/examples/messaging/update-vonage-provider.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.messaging import Messaging +from appwrite.models import Provider + +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 + +messaging = Messaging(client) + +result: Provider = messaging.update_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + from = '<FROM>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-python/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..08db4dede --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/create-backup-policy.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import BackupPolicy + +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 + +mongo = Mongo(client) + +result: BackupPolicy = mongo.create_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', + schedule = '', + retention = 1, + type = 'full', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/create-backup.md b/examples/2.3.x/server-python/examples/mongo/create-backup.md new file mode 100644 index 000000000..713de58ca --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/create-backup.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseBackup + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseBackup = mongo.create_backup( + database_id = '<DATABASE_ID>', + type = 'full' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/create-branch.md b/examples/2.3.x/server-python/examples/mongo/create-branch.md new file mode 100644 index 000000000..9d8f63843 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/create-branch.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>', # optional + ttl = 300 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/create-failover.md b/examples/2.3.x/server-python/examples/mongo/create-failover.md new file mode 100644 index 000000000..09b08d1a4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/create-failover.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/create-migration.md b/examples/2.3.x/server-python/examples/mongo/create-migration.md new file mode 100644 index 000000000..d8f75db1d --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/create-migration.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create_migration( + database_id = '<DATABASE_ID>', + target_type = 'shared', + specification = '<SPECIFICATION>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/create-restoration.md b/examples/2.3.x/server-python/examples/mongo/create-restoration.md new file mode 100644 index 000000000..0ba9b82f7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/create-restoration.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseRestoration + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseRestoration = mongo.create_restoration( + database_id = '<DATABASE_ID>', + type = 'backup', # optional + backup_id = '<BACKUP_ID>', # optional + target_database_id = '<TARGET_DATABASE_ID>', # optional + target_time = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/create-upgrade.md b/examples/2.3.x/server-python/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..111bea188 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/create-upgrade.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create_upgrade( + database_id = '<DATABASE_ID>', + target_version = '<TARGET_VERSION>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/create.md b/examples/2.3.x/server-python/examples/mongo/create.md new file mode 100644 index 000000000..9909aa62d --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/create.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + version = '17', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-python/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..f5a657542 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/delete-backup-policy.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo + +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 + +mongo = Mongo(client) + +result = mongo.delete_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/delete-backup.md b/examples/2.3.x/server-python/examples/mongo/delete-backup.md new file mode 100644 index 000000000..bbcd78c4b --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/delete-backup.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo + +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 + +mongo = Mongo(client) + +result = mongo.delete_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/delete-branch.md b/examples/2.3.x/server-python/examples/mongo/delete-branch.md new file mode 100644 index 000000000..879ef438e --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/delete-branch.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.delete_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/delete.md b/examples/2.3.x/server-python/examples/mongo/delete.md new file mode 100644 index 000000000..9ba0e46cd --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo + +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 + +mongo = Mongo(client) + +result = mongo.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-python/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..1fb3406b0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/get-backup-policy.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import BackupPolicy + +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 + +mongo = Mongo(client) + +result: BackupPolicy = mongo.get_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/get-backup.md b/examples/2.3.x/server-python/examples/mongo/get-backup.md new file mode 100644 index 000000000..49e7db89b --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/get-backup.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseBackup + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseBackup = mongo.get_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/get-pitr.md b/examples/2.3.x/server-python/examples/mongo/get-pitr.md new file mode 100644 index 000000000..b3ae9b81b --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/get-pitr.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabasePITRWindows + +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 + +mongo = Mongo(client) + +result: DedicatedDatabasePITRWindows = mongo.get_pitr( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/get-replicas.md b/examples/2.3.x/server-python/examples/mongo/get-replicas.md new file mode 100644 index 000000000..2f8786ed5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/get-replicas.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseReplicas + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseReplicas = mongo.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/get-restoration.md b/examples/2.3.x/server-python/examples/mongo/get-restoration.md new file mode 100644 index 000000000..7e2572596 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/get-restoration.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseRestoration + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseRestoration = mongo.get_restoration( + database_id = '<DATABASE_ID>', + restoration_id = '<RESTORATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/get-status.md b/examples/2.3.x/server-python/examples/mongo/get-status.md new file mode 100644 index 000000000..f2f832dd4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/get-status.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DatabaseStatus + +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 + +mongo = Mongo(client) + +result: DatabaseStatus = mongo.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/get.md b/examples/2.3.x/server-python/examples/mongo/get.md new file mode 100644 index 000000000..c89e66a54 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-python/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..c023cc1d2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/list-backup-policies.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import BackupPolicyList + +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 + +mongo = Mongo(client) + +result: BackupPolicyList = mongo.list_backup_policies( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/list-backups.md b/examples/2.3.x/server-python/examples/mongo/list-backups.md new file mode 100644 index 000000000..bf8965202 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/list-backups.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseBackupList + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseBackupList = mongo.list_backups( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/list-branches.md b/examples/2.3.x/server-python/examples/mongo/list-branches.md new file mode 100644 index 000000000..4c1f1a4e7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/list-branches.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseBranchList + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseBranchList = mongo.list_branches( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/list-operations.md b/examples/2.3.x/server-python/examples/mongo/list-operations.md new file mode 100644 index 000000000..9c2f77a25 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/list-operations.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseOperationList + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseOperationList = mongo.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/list-restorations.md b/examples/2.3.x/server-python/examples/mongo/list-restorations.md new file mode 100644 index 000000000..89bb120ee --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/list-restorations.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseRestorationList + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseRestorationList = mongo.list_restorations( + database_id = '<DATABASE_ID>', + status = 'pending', # optional + type = 'backup', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/list-specifications.md b/examples/2.3.x/server-python/examples/mongo/list-specifications.md new file mode 100644 index 000000000..6828191ec --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/list-specifications.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseSpecificationList + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseSpecificationList = mongo.list_specifications() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/list.md b/examples/2.3.x/server-python/examples/mongo/list.md new file mode 100644 index 000000000..b956cebeb --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/list.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseList + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseList = mongo.list( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-python/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..5a02ffe18 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/update-backup-policy.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import BackupPolicy + +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 + +mongo = Mongo(client) + +result: BackupPolicy = mongo.update_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', # optional + schedule = '', # optional + retention = 1, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-python/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..9a62d4fd9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/update-backup-storage.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseBackupStorage + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseBackupStorage = mongo.update_backup_storage( + database_id = '<DATABASE_ID>', + provider = 's3', + bucket = '<BUCKET>', + access_key = '<ACCESS_KEY>', + secret_key = '<SECRET_KEY>', + region = '<REGION>', # optional + prefix = '<PREFIX>', # optional + endpoint = '<ENDPOINT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/update-credentials.md b/examples/2.3.x/server-python/examples/mongo/update-credentials.md new file mode 100644 index 000000000..12d138c8e --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/update-credentials.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabaseOperation + +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 + +mongo = Mongo(client) + +result: DedicatedDatabaseOperation = mongo.update_credentials( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/update-maintenance.md b/examples/2.3.x/server-python/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..081016abb --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/update-maintenance.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.update_maintenance( + database_id = '<DATABASE_ID>', + day = 'sun', + hour_utc = 0 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mongo/update.md b/examples/2.3.x/server-python/examples/mongo/update.md new file mode 100644 index 000000000..e14bffc74 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mongo/update.md @@ -0,0 +1,38 @@ +```python +from appwrite.client import Client +from appwrite.services.mongo import Mongo +from appwrite.models import DedicatedDatabase + +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 + +mongo = Mongo(client) + +result: DedicatedDatabase = mongo.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + status = 'ready', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0, # optional + metrics_trace_sample_rate = None, # optional + metrics_slow_query_log_threshold_ms = 0, # optional + sql_api_enabled = False, # optional + sql_api_allowed_statements = [], # optional + sql_api_max_rows = 1, # optional + sql_api_max_bytes = 1024, # optional + sql_api_timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-python/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..bb76383a4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create-backup-policy.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import BackupPolicy + +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 + +mysql = Mysql(client) + +result: BackupPolicy = mysql.create_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', + schedule = '', + retention = 1, + type = 'full', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create-backup.md b/examples/2.3.x/server-python/examples/mysql/create-backup.md new file mode 100644 index 000000000..05e98dd43 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create-backup.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseBackup + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseBackup = mysql.create_backup( + database_id = '<DATABASE_ID>', + type = 'full' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create-branch.md b/examples/2.3.x/server-python/examples/mysql/create-branch.md new file mode 100644 index 000000000..aec24a082 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create-branch.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>', # optional + ttl = 300 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create-execution.md b/examples/2.3.x/server-python/examples/mysql/create-execution.md new file mode 100644 index 000000000..e4cd97727 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create-execution.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseExecution + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseExecution = mysql.create_execution( + database_id = '<DATABASE_ID>', + sql = '<SQL>', + bindings = {}, # optional + timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create-failover.md b/examples/2.3.x/server-python/examples/mysql/create-failover.md new file mode 100644 index 000000000..cde13f402 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create-failover.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create-migration.md b/examples/2.3.x/server-python/examples/mysql/create-migration.md new file mode 100644 index 000000000..b56167804 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create-migration.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create_migration( + database_id = '<DATABASE_ID>', + target_type = 'shared', + specification = '<SPECIFICATION>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create-restoration.md b/examples/2.3.x/server-python/examples/mysql/create-restoration.md new file mode 100644 index 000000000..0c3481f60 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create-restoration.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseRestoration + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseRestoration = mysql.create_restoration( + database_id = '<DATABASE_ID>', + type = 'backup', # optional + backup_id = '<BACKUP_ID>', # optional + target_database_id = '<TARGET_DATABASE_ID>', # optional + target_time = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create-upgrade.md b/examples/2.3.x/server-python/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..f1e246efd --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create-upgrade.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create_upgrade( + database_id = '<DATABASE_ID>', + target_version = '<TARGET_VERSION>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/create.md b/examples/2.3.x/server-python/examples/mysql/create.md new file mode 100644 index 000000000..92a7c007c --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/create.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + version = '17', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-python/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..7f6fbf881 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/delete-backup-policy.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql + +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 + +mysql = Mysql(client) + +result = mysql.delete_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/delete-backup.md b/examples/2.3.x/server-python/examples/mysql/delete-backup.md new file mode 100644 index 000000000..cd0f73223 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/delete-backup.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql + +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 + +mysql = Mysql(client) + +result = mysql.delete_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/delete-branch.md b/examples/2.3.x/server-python/examples/mysql/delete-branch.md new file mode 100644 index 000000000..7e7bbbdc2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/delete-branch.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.delete_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/delete.md b/examples/2.3.x/server-python/examples/mysql/delete.md new file mode 100644 index 000000000..9632ba06a --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql + +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 + +mysql = Mysql(client) + +result = mysql.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-python/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..0d3baec53 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/get-backup-policy.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import BackupPolicy + +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 + +mysql = Mysql(client) + +result: BackupPolicy = mysql.get_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/get-backup.md b/examples/2.3.x/server-python/examples/mysql/get-backup.md new file mode 100644 index 000000000..eb782c5e2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/get-backup.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseBackup + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseBackup = mysql.get_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/get-pitr.md b/examples/2.3.x/server-python/examples/mysql/get-pitr.md new file mode 100644 index 000000000..5202ed668 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/get-pitr.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabasePITRWindows + +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 + +mysql = Mysql(client) + +result: DedicatedDatabasePITRWindows = mysql.get_pitr( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/get-pooler.md b/examples/2.3.x/server-python/examples/mysql/get-pooler.md new file mode 100644 index 000000000..fc2af012b --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/get-pooler.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabasePooler + +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 + +mysql = Mysql(client) + +result: DedicatedDatabasePooler = mysql.get_pooler( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/get-replicas.md b/examples/2.3.x/server-python/examples/mysql/get-replicas.md new file mode 100644 index 000000000..a35bf822e --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/get-replicas.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseReplicas + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseReplicas = mysql.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/get-restoration.md b/examples/2.3.x/server-python/examples/mysql/get-restoration.md new file mode 100644 index 000000000..0e760273b --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/get-restoration.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseRestoration + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseRestoration = mysql.get_restoration( + database_id = '<DATABASE_ID>', + restoration_id = '<RESTORATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/get-status.md b/examples/2.3.x/server-python/examples/mysql/get-status.md new file mode 100644 index 000000000..97adbe6c5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/get-status.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DatabaseStatus + +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 + +mysql = Mysql(client) + +result: DatabaseStatus = mysql.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/get.md b/examples/2.3.x/server-python/examples/mysql/get.md new file mode 100644 index 000000000..431c72cad --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-python/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..0b5328d47 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/list-backup-policies.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import BackupPolicyList + +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 + +mysql = Mysql(client) + +result: BackupPolicyList = mysql.list_backup_policies( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/list-backups.md b/examples/2.3.x/server-python/examples/mysql/list-backups.md new file mode 100644 index 000000000..5a5339511 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/list-backups.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseBackupList + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseBackupList = mysql.list_backups( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/list-branches.md b/examples/2.3.x/server-python/examples/mysql/list-branches.md new file mode 100644 index 000000000..6c05f5437 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/list-branches.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseBranchList + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseBranchList = mysql.list_branches( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/list-operations.md b/examples/2.3.x/server-python/examples/mysql/list-operations.md new file mode 100644 index 000000000..1b4d3c976 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/list-operations.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseOperationList + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseOperationList = mysql.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/list-restorations.md b/examples/2.3.x/server-python/examples/mysql/list-restorations.md new file mode 100644 index 000000000..efe346da6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/list-restorations.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseRestorationList + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseRestorationList = mysql.list_restorations( + database_id = '<DATABASE_ID>', + status = 'pending', # optional + type = 'backup', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/list-specifications.md b/examples/2.3.x/server-python/examples/mysql/list-specifications.md new file mode 100644 index 000000000..c5d48d5a8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/list-specifications.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseSpecificationList + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseSpecificationList = mysql.list_specifications() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/list.md b/examples/2.3.x/server-python/examples/mysql/list.md new file mode 100644 index 000000000..865e474f8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/list.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseList + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseList = mysql.list( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-python/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..65f9a9a37 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/update-backup-policy.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import BackupPolicy + +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 + +mysql = Mysql(client) + +result: BackupPolicy = mysql.update_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', # optional + schedule = '', # optional + retention = 1, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-python/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..ecc41eb9a --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/update-backup-storage.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseBackupStorage + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseBackupStorage = mysql.update_backup_storage( + database_id = '<DATABASE_ID>', + provider = 's3', + bucket = '<BUCKET>', + access_key = '<ACCESS_KEY>', + secret_key = '<SECRET_KEY>', + region = '<REGION>', # optional + prefix = '<PREFIX>', # optional + endpoint = '<ENDPOINT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/update-credentials.md b/examples/2.3.x/server-python/examples/mysql/update-credentials.md new file mode 100644 index 000000000..e277a92d7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/update-credentials.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabaseOperation + +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 + +mysql = Mysql(client) + +result: DedicatedDatabaseOperation = mysql.update_credentials( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/update-maintenance.md b/examples/2.3.x/server-python/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..a14aa8e88 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/update-maintenance.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.update_maintenance( + database_id = '<DATABASE_ID>', + day = 'sun', + hour_utc = 0 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/update-pooler.md b/examples/2.3.x/server-python/examples/mysql/update-pooler.md new file mode 100644 index 000000000..57fde4e70 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/update-pooler.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabasePooler + +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 + +mysql = Mysql(client) + +result: DedicatedDatabasePooler = mysql.update_pooler( + database_id = '<DATABASE_ID>', + mode = 'transaction', # optional + max_connections = 10, # optional + default_pool_size = 1, # optional + read_write_splitting = False, # optional + pooler_cpu_request = '<POOLER_CPU_REQUEST>', # optional + pooler_cpu_limit = '<POOLER_CPU_LIMIT>', # optional + pooler_memory_request = '<POOLER_MEMORY_REQUEST>', # optional + pooler_memory_limit = '<POOLER_MEMORY_LIMIT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/mysql/update.md b/examples/2.3.x/server-python/examples/mysql/update.md new file mode 100644 index 000000000..e3fe24748 --- /dev/null +++ b/examples/2.3.x/server-python/examples/mysql/update.md @@ -0,0 +1,38 @@ +```python +from appwrite.client import Client +from appwrite.services.mysql import Mysql +from appwrite.models import DedicatedDatabase + +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 + +mysql = Mysql(client) + +result: DedicatedDatabase = mysql.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + status = 'ready', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0, # optional + metrics_trace_sample_rate = None, # optional + metrics_slow_query_log_threshold_ms = 0, # optional + sql_api_enabled = False, # optional + sql_api_allowed_statements = [], # optional + sql_api_max_rows = 1, # optional + sql_api_max_bytes = 1024, # optional + sql_api_timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/approve.md b/examples/2.3.x/server-python/examples/oauth2/approve.md new file mode 100644 index 000000000..31bb7317c --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/approve.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2Approve + +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 + +oauth2 = Oauth2(client) + +result: Oauth2Approve = oauth2.approve( + grant_id = '<GRANT_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + scope = '<SCOPE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/authorize-post.md b/examples/2.3.x/server-python/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..778b2e72b --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/authorize-post.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2Authorize + +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 + +oauth2 = Oauth2(client) + +result: Oauth2Authorize = oauth2.authorize_post( + client_id = '<CLIENT_ID>', # optional + redirect_uri = 'https://example.com', # optional + response_type = '', # optional + scope = '<SCOPE>', # optional + state = '<STATE>', # optional + nonce = '<NONCE>', # optional + code_challenge = '<CODE_CHALLENGE>', # optional + code_challenge_method = 's256', # optional + prompt = '<PROMPT>', # optional + max_age = 0, # optional + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + resource = '', # optional + audience = '<AUDIENCE>', # optional + request_uri = '<REQUEST_URI>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/authorize.md b/examples/2.3.x/server-python/examples/oauth2/authorize.md new file mode 100644 index 000000000..f24a14650 --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/authorize.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2Authorize + +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 + +oauth2 = Oauth2(client) + +result: Oauth2Authorize = oauth2.authorize( + client_id = '<CLIENT_ID>', # optional + redirect_uri = 'https://example.com', # optional + response_type = '', # optional + scope = '<SCOPE>', # optional + state = '<STATE>', # optional + nonce = '<NONCE>', # optional + code_challenge = '<CODE_CHALLENGE>', # optional + code_challenge_method = 's256', # optional + prompt = '<PROMPT>', # optional + max_age = 0, # optional + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + resource = '', # optional + audience = '<AUDIENCE>', # optional + request_uri = '<REQUEST_URI>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-python/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..fcf563f57 --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/create-device-authorization.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2DeviceAuthorization + +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 + +oauth2 = Oauth2(client) + +result: Oauth2DeviceAuthorization = oauth2.create_device_authorization( + client_id = '<CLIENT_ID>', # optional + scope = '<SCOPE>', # optional + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + resource = '', # optional + audience = '<AUDIENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/create-grant.md b/examples/2.3.x/server-python/examples/oauth2/create-grant.md new file mode 100644 index 000000000..73727320d --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/create-grant.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2Grant + +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 + +oauth2 = Oauth2(client) + +result: Oauth2Grant = oauth2.create_grant( + user_code = '<USER_CODE>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/create-par.md b/examples/2.3.x/server-python/examples/oauth2/create-par.md new file mode 100644 index 000000000..35bcbf900 --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/create-par.md @@ -0,0 +1,30 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2PAR + +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 + +oauth2 = Oauth2(client) + +result: Oauth2PAR = oauth2.create_par( + client_id = '<CLIENT_ID>', + redirect_uri = 'https://example.com', + response_type = 'code', + scope = '<SCOPE>', # optional + state = '<STATE>', # optional + nonce = '<NONCE>', # optional + code_challenge = '<CODE_CHALLENGE>', # optional + code_challenge_method = 's256', # optional + prompt = '<PROMPT>', # optional + max_age = 0, # optional + authorization_details = '<AUTHORIZATION_DETAILS>', # optional + resource = '', # optional + audience = '<AUDIENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/create-token.md b/examples/2.3.x/server-python/examples/oauth2/create-token.md new file mode 100644 index 000000000..f2f3ce7c0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/create-token.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2Token + +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 + +oauth2 = Oauth2(client) + +result: Oauth2Token = oauth2.create_token( + grant_type = '<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 + resource = '', # optional + audience = '<AUDIENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/get-grant.md b/examples/2.3.x/server-python/examples/oauth2/get-grant.md new file mode 100644 index 000000000..77de5ec2a --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/get-grant.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2Grant + +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 + +oauth2 = Oauth2(client) + +result: Oauth2Grant = oauth2.get_grant( + grant_id = '<GRANT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/list-organizations.md b/examples/2.3.x/server-python/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..5c429e966 --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/list-organizations.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2OrganizationList + +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 + +oauth2 = Oauth2(client) + +result: Oauth2OrganizationList = oauth2.list_organizations( + limit = 1, # optional + offset = 0, # optional + search = '<SEARCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/list-projects.md b/examples/2.3.x/server-python/examples/oauth2/list-projects.md new file mode 100644 index 000000000..b6b45f743 --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/list-projects.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2ProjectList + +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 + +oauth2 = Oauth2(client) + +result: Oauth2ProjectList = oauth2.list_projects( + limit = 1, # optional + offset = 0, # optional + search = '<SEARCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/reject.md b/examples/2.3.x/server-python/examples/oauth2/reject.md new file mode 100644 index 000000000..1979d517d --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/reject.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2Reject + +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 + +oauth2 = Oauth2(client) + +result: Oauth2Reject = oauth2.reject( + grant_id = '<GRANT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/oauth2/revoke.md b/examples/2.3.x/server-python/examples/oauth2/revoke.md new file mode 100644 index 000000000..f351c7714 --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/revoke.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 + +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 + +oauth2 = Oauth2(client) + +result = oauth2.revoke( + 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-python/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-python/examples/organization/create-ephemeral-project-key.md new file mode 100644 index 000000000..b807f2247 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import EphemeralKey +from appwrite.enums import ProjectKeyScopes + +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 + +organization = Organization(client) + +result: EphemeralKey = organization.create_ephemeral_project_key( + project_id = '<PROJECT_ID>', + scopes = [ProjectKeyScopes.PROJECT_READ], + duration = 600 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/create-installation.md b/examples/2.3.x/server-python/examples/organization/create-installation.md new file mode 100644 index 000000000..c7af602af --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/create-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://<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 + +organization = Organization(client) + +result: AppInstallation = organization.create_installation( + app_id = '<APP_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/create-membership.md b/examples/2.3.x/server-python/examples/organization/create-membership.md new file mode 100644 index 000000000..0801bdd77 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/create-membership.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Membership + +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 + +organization = Organization(client) + +result: Membership = organization.create_membership( + roles = [], + email = 'email@example.com', # optional + user_id = '<USER_ID>', # optional + phone = '+12065550100', # optional + url = 'https://example.com', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/create-project.md b/examples/2.3.x/server-python/examples/organization/create-project.md new file mode 100644 index 000000000..da78ecffc --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/create-project.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Project +from appwrite.enums import Region + +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 + +organization = Organization(client) + +result: Project = organization.create_project( + project_id = '<PROJECT_ID>', + name = '<NAME>', + region = Region.FRA # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/delete-installation.md b/examples/2.3.x/server-python/examples/organization/delete-installation.md new file mode 100644 index 000000000..827902820 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization + +client = Client() +client.set_endpoint('https://<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 + +organization = Organization(client) + +result = organization.delete_installation( + installation_id = '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/organization/delete-membership.md b/examples/2.3.x/server-python/examples/organization/delete-membership.md new file mode 100644 index 000000000..dee81d19f --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/delete-membership.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization + +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 + +organization = Organization(client) + +result = organization.delete_membership( + membership_id = '<MEMBERSHIP_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/organization/delete-project-key.md b/examples/2.3.x/server-python/examples/organization/delete-project-key.md new file mode 100644 index 000000000..060c6fd4f --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/delete-project-key.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization + +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 + +organization = Organization(client) + +result = organization.delete_project_key( + project_id = '<PROJECT_ID>', + key_id = '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/organization/delete-project.md b/examples/2.3.x/server-python/examples/organization/delete-project.md new file mode 100644 index 000000000..024c03e84 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/delete-project.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization + +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 + +organization = Organization(client) + +result = organization.delete_project( + project_id = '<PROJECT_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/organization/delete.md b/examples/2.3.x/server-python/examples/organization/delete.md new file mode 100644 index 000000000..94b7c2a74 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/delete.md @@ -0,0 +1,13 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization + +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 + +organization = Organization(client) + +result = organization.delete() +``` diff --git a/examples/2.3.x/server-python/examples/organization/get-installation.md b/examples/2.3.x/server-python/examples/organization/get-installation.md new file mode 100644 index 000000000..0bd78a30f --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/get-installation.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://<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 + +organization = Organization(client) + +result: AppInstallation = organization.get_installation( + installation_id = '<INSTALLATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/get-membership.md b/examples/2.3.x/server-python/examples/organization/get-membership.md new file mode 100644 index 000000000..b3fcd9de2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/get-membership.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Membership + +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 + +organization = Organization(client) + +result: Membership = organization.get_membership( + membership_id = '<MEMBERSHIP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/get-project-key.md b/examples/2.3.x/server-python/examples/organization/get-project-key.md new file mode 100644 index 000000000..841e38179 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/get-project-key.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Key + +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 + +organization = Organization(client) + +result: Key = organization.get_project_key( + project_id = '<PROJECT_ID>', + key_id = '<KEY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/get-project.md b/examples/2.3.x/server-python/examples/organization/get-project.md new file mode 100644 index 000000000..f0d74fd1a --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/get-project.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Project + +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 + +organization = Organization(client) + +result: Project = organization.get_project( + project_id = '<PROJECT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/get.md b/examples/2.3.x/server-python/examples/organization/get.md new file mode 100644 index 000000000..b99b6a7fd --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/get.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Organization as OrganizationModel + +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 + +organization = Organization(client) + +result: OrganizationModel = organization.get() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/list-installations.md b/examples/2.3.x/server-python/examples/organization/list-installations.md new file mode 100644 index 000000000..c2ebe4e80 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/list-installations.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import AppInstallationList + +client = Client() +client.set_endpoint('https://<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 + +organization = Organization(client) + +result: AppInstallationList = organization.list_installations( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/list-memberships.md b/examples/2.3.x/server-python/examples/organization/list-memberships.md new file mode 100644 index 000000000..e49e1793e --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/list-memberships.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import MembershipList + +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 + +organization = Organization(client) + +result: MembershipList = organization.list_memberships( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/list-project-keys.md b/examples/2.3.x/server-python/examples/organization/list-project-keys.md new file mode 100644 index 000000000..c09c02cdf --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/list-project-keys.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import KeyList + +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 + +organization = Organization(client) + +result: KeyList = organization.list_project_keys( + project_id = '<PROJECT_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/list-projects.md b/examples/2.3.x/server-python/examples/organization/list-projects.md new file mode 100644 index 000000000..42b902ea4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/list-projects.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import ProjectList + +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 + +organization = Organization(client) + +result: ProjectList = organization.list_projects( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/update-installation.md b/examples/2.3.x/server-python/examples/organization/update-installation.md new file mode 100644 index 000000000..ab8301b29 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/update-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://<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 + +organization = Organization(client) + +result: AppInstallation = organization.update_installation( + installation_id = '<INSTALLATION_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/update-membership.md b/examples/2.3.x/server-python/examples/organization/update-membership.md new file mode 100644 index 000000000..a4f9c5a02 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/update-membership.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Membership + +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 + +organization = Organization(client) + +result: Membership = organization.update_membership( + membership_id = '<MEMBERSHIP_ID>', + roles = [] +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..8f1269237 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/update-project-key.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Key +from appwrite.enums import ProjectKeyScopes + +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 + +organization = Organization(client) + +result: Key = organization.update_project_key( + project_id = '<PROJECT_ID>', + key_id = '<KEY_ID>', + name = '<NAME>', + scopes = [ProjectKeyScopes.PROJECT_READ], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/update-project.md b/examples/2.3.x/server-python/examples/organization/update-project.md new file mode 100644 index 000000000..c14fd0cc6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/update-project.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Project + +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 + +organization = Organization(client) + +result: Project = organization.update_project( + project_id = '<PROJECT_ID>', + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/update.md b/examples/2.3.x/server-python/examples/organization/update.md new file mode 100644 index 000000000..6d456c57f --- /dev/null +++ b/examples/2.3.x/server-python/examples/organization/update.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import Organization as OrganizationModel + +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 + +organization = Organization(client) + +result: OrganizationModel = organization.update( + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-python/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..bb57ff35e --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-backup-policy.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import BackupPolicy + +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 + +postgresql = Postgresql(client) + +result: BackupPolicy = postgresql.create_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', + schedule = '', + retention = 1, + type = 'full', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-backup.md b/examples/2.3.x/server-python/examples/postgresql/create-backup.md new file mode 100644 index 000000000..6123727aa --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-backup.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseBackup + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBackup = postgresql.create_backup( + database_id = '<DATABASE_ID>', + type = 'full' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-branch.md b/examples/2.3.x/server-python/examples/postgresql/create-branch.md new file mode 100644 index 000000000..bccd70af4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-branch.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>', # optional + ttl = 300 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-execution.md b/examples/2.3.x/server-python/examples/postgresql/create-execution.md new file mode 100644 index 000000000..4d27ed209 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-execution.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseExecution + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseExecution = postgresql.create_execution( + database_id = '<DATABASE_ID>', + sql = '<SQL>', + bindings = {}, # optional + timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-extension.md b/examples/2.3.x/server-python/examples/postgresql/create-extension.md new file mode 100644 index 000000000..507d8968e --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-extension.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_extension( + database_id = '<DATABASE_ID>', + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-failover.md b/examples/2.3.x/server-python/examples/postgresql/create-failover.md new file mode 100644 index 000000000..7610a5022 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-failover.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-migration.md b/examples/2.3.x/server-python/examples/postgresql/create-migration.md new file mode 100644 index 000000000..339e4e6e1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-migration.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_migration( + database_id = '<DATABASE_ID>', + target_type = 'shared', + specification = '<SPECIFICATION>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-restoration.md b/examples/2.3.x/server-python/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..c4d90b462 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-restoration.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseRestoration + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseRestoration = postgresql.create_restoration( + database_id = '<DATABASE_ID>', + type = 'backup', # optional + backup_id = '<BACKUP_ID>', # optional + target_database_id = '<TARGET_DATABASE_ID>', # optional + target_time = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-python/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..9bbbcb903 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create-upgrade.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create_upgrade( + database_id = '<DATABASE_ID>', + target_version = '<TARGET_VERSION>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/create.md b/examples/2.3.x/server-python/examples/postgresql/create.md new file mode 100644 index 000000000..5f1fd90f1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/create.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + version = '17', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-python/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..ea285c363 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql + +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 + +postgresql = Postgresql(client) + +result = postgresql.delete_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/delete-backup.md b/examples/2.3.x/server-python/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..f4092c317 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/delete-backup.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql + +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 + +postgresql = Postgresql(client) + +result = postgresql.delete_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/delete-branch.md b/examples/2.3.x/server-python/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..1c86002d0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/delete-branch.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.delete_branch( + database_id = '<DATABASE_ID>', + branch_id = '<BRANCH_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/delete-extension.md b/examples/2.3.x/server-python/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..f6b09773b --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/delete-extension.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.delete_extension( + database_id = '<DATABASE_ID>', + extension_name = '<EXTENSION_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/delete.md b/examples/2.3.x/server-python/examples/postgresql/delete.md new file mode 100644 index 000000000..3b40a6ce0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql + +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 + +postgresql = Postgresql(client) + +result = postgresql.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-python/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..cd1b94457 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/get-backup-policy.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import BackupPolicy + +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 + +postgresql = Postgresql(client) + +result: BackupPolicy = postgresql.get_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/get-backup.md b/examples/2.3.x/server-python/examples/postgresql/get-backup.md new file mode 100644 index 000000000..8f226ce48 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/get-backup.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseBackup + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBackup = postgresql.get_backup( + database_id = '<DATABASE_ID>', + backup_id = '<BACKUP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/get-pitr.md b/examples/2.3.x/server-python/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..2c845234d --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/get-pitr.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabasePITRWindows + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabasePITRWindows = postgresql.get_pitr( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/get-pooler.md b/examples/2.3.x/server-python/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..3cdfbffbd --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/get-pooler.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabasePooler + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabasePooler = postgresql.get_pooler( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/get-replicas.md b/examples/2.3.x/server-python/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..e4401f4cc --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/get-replicas.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseReplicas + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseReplicas = postgresql.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/get-restoration.md b/examples/2.3.x/server-python/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..1fb8c412e --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/get-restoration.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseRestoration + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseRestoration = postgresql.get_restoration( + database_id = '<DATABASE_ID>', + restoration_id = '<RESTORATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/get-status.md b/examples/2.3.x/server-python/examples/postgresql/get-status.md new file mode 100644 index 000000000..6326f2018 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/get-status.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DatabaseStatus + +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 + +postgresql = Postgresql(client) + +result: DatabaseStatus = postgresql.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/get.md b/examples/2.3.x/server-python/examples/postgresql/get.md new file mode 100644 index 000000000..02c21de97 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-python/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..c9000c592 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/list-backup-policies.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import BackupPolicyList + +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 + +postgresql = Postgresql(client) + +result: BackupPolicyList = postgresql.list_backup_policies( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/list-backups.md b/examples/2.3.x/server-python/examples/postgresql/list-backups.md new file mode 100644 index 000000000..85622373e --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/list-backups.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseBackupList + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBackupList = postgresql.list_backups( + database_id = '<DATABASE_ID>', + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/list-branches.md b/examples/2.3.x/server-python/examples/postgresql/list-branches.md new file mode 100644 index 000000000..84f99a843 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/list-branches.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseBranchList + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBranchList = postgresql.list_branches( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/list-extensions.md b/examples/2.3.x/server-python/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..c97c0e3da --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/list-extensions.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseExtensions + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseExtensions = postgresql.list_extensions( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/list-operations.md b/examples/2.3.x/server-python/examples/postgresql/list-operations.md new file mode 100644 index 000000000..3575a11dd --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/list-operations.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseOperationList + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseOperationList = postgresql.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/list-restorations.md b/examples/2.3.x/server-python/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..0e70f74b4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/list-restorations.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseRestorationList + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseRestorationList = postgresql.list_restorations( + database_id = '<DATABASE_ID>', + status = 'pending', # optional + type = 'backup', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/list-specifications.md b/examples/2.3.x/server-python/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..c49fdb2ef --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/list-specifications.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseSpecificationList + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseSpecificationList = postgresql.list_specifications() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/list.md b/examples/2.3.x/server-python/examples/postgresql/list.md new file mode 100644 index 000000000..fae83f96d --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/list.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseList + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseList = postgresql.list( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-python/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..02fac7355 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/update-backup-policy.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import BackupPolicy + +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 + +postgresql = Postgresql(client) + +result: BackupPolicy = postgresql.update_backup_policy( + database_id = '<DATABASE_ID>', + policy_id = '<POLICY_ID>', + name = '<NAME>', # optional + schedule = '', # optional + retention = 1, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-python/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..d0431b4ab --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/update-backup-storage.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseBackupStorage + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseBackupStorage = postgresql.update_backup_storage( + database_id = '<DATABASE_ID>', + provider = 's3', + bucket = '<BUCKET>', + access_key = '<ACCESS_KEY>', + secret_key = '<SECRET_KEY>', + region = '<REGION>', # optional + prefix = '<PREFIX>', # optional + endpoint = '<ENDPOINT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/update-credentials.md b/examples/2.3.x/server-python/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..7f7b5990d --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/update-credentials.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabaseOperation + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabaseOperation = postgresql.update_credentials( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-python/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..4795124eb --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/update-maintenance.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.update_maintenance( + database_id = '<DATABASE_ID>', + day = 'sun', + hour_utc = 0 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/update-pooler.md b/examples/2.3.x/server-python/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..1f46df6d8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/update-pooler.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabasePooler + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabasePooler = postgresql.update_pooler( + database_id = '<DATABASE_ID>', + mode = 'transaction', # optional + max_connections = 10, # optional + default_pool_size = 1, # optional + read_write_splitting = False, # optional + pooler_cpu_request = '<POOLER_CPU_REQUEST>', # optional + pooler_cpu_limit = '<POOLER_CPU_LIMIT>', # optional + pooler_memory_request = '<POOLER_MEMORY_REQUEST>', # optional + pooler_memory_limit = '<POOLER_MEMORY_LIMIT>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/postgresql/update.md b/examples/2.3.x/server-python/examples/postgresql/update.md new file mode 100644 index 000000000..b6e8ac483 --- /dev/null +++ b/examples/2.3.x/server-python/examples/postgresql/update.md @@ -0,0 +1,38 @@ +```python +from appwrite.client import Client +from appwrite.services.postgresql import Postgresql +from appwrite.models import DedicatedDatabase + +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 + +postgresql = Postgresql(client) + +result: DedicatedDatabase = postgresql.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + status = 'ready', # optional + specification = '<SPECIFICATION>', # optional + replicas = 0, # optional + sync_mode = 'async', # optional + network_idle_timeout_seconds = 60, # optional + network_ip_allowlist = [], # optional + idle_timeout_minutes = 5, # optional + pitr = False, # optional + pitr_retention_days = 1, # optional + storage_autoscaling = False, # optional + storage_autoscaling_threshold_percent = 50, # optional + storage_autoscaling_max_gb = 0, # optional + metrics_trace_sample_rate = None, # optional + metrics_slow_query_log_threshold_ms = 0, # optional + sql_api_enabled = False, # optional + sql_api_allowed_statements = [], # optional + sql_api_max_rows = 1, # optional + sql_api_max_bytes = 1024, # optional + sql_api_timeout_seconds = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/presences/delete.md b/examples/2.3.x/server-python/examples/presences/delete.md new file mode 100644 index 000000000..ca4ba6601 --- /dev/null +++ b/examples/2.3.x/server-python/examples/presences/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.presences import Presences + +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 + +presences = Presences(client) + +result = presences.delete( + presence_id = '<PRESENCE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/presences/get.md b/examples/2.3.x/server-python/examples/presences/get.md new file mode 100644 index 000000000..2c57df097 --- /dev/null +++ b/examples/2.3.x/server-python/examples/presences/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.presences import Presences +from appwrite.models import Presence + +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 + +presences = Presences(client) + +result: Presence = presences.get( + presence_id = '<PRESENCE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/presences/list.md b/examples/2.3.x/server-python/examples/presences/list.md new file mode 100644 index 000000000..a03492851 --- /dev/null +++ b/examples/2.3.x/server-python/examples/presences/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.presences import Presences +from appwrite.models import PresenceList + +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 + +presences = Presences(client) + +result: PresenceList = presences.list( + queries = [], # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/presences/update.md b/examples/2.3.x/server-python/examples/presences/update.md new file mode 100644 index 000000000..fd3a9ef0b --- /dev/null +++ b/examples/2.3.x/server-python/examples/presences/update.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.presences import Presences +from appwrite.models import Presence +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +presences = Presences(client) + +result: Presence = presences.update( + presence_id = '<PRESENCE_ID>', + user_id = '<USER_ID>', + status = '<STATUS>', # optional + expires_at = '2020-10-15T06:38:00.000+00:00', # optional + metadata = {}, # optional + permissions = [Permission.read(Role.any())], # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/presences/upsert.md b/examples/2.3.x/server-python/examples/presences/upsert.md new file mode 100644 index 000000000..2750434c2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/presences/upsert.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.presences import Presences +from appwrite.models import Presence +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +presences = Presences(client) + +result: Presence = presences.upsert( + presence_id = '<PRESENCE_ID>', + user_id = '<USER_ID>', + status = '<STATUS>', + permissions = [Permission.read(Role.any())], # optional + expires_at = '2020-10-15T06:38:00.000+00:00', # optional + metadata = {} # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/create-android-platform.md b/examples/2.3.x/server-python/examples/project/create-android-platform.md new file mode 100644 index 000000000..092376e00 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-android-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformAndroid + +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: PlatformAndroid = project.create_android_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + application_id = '<APPLICATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/create-apple-platform.md b/examples/2.3.x/server-python/examples/project/create-apple-platform.md new file mode 100644 index 000000000..3e190d4c7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-apple-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformApple + +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: PlatformApple = project.create_apple_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + bundle_identifier = '<BUNDLE_IDENTIFIER>' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..17a48da69 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-ephemeral-key.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import EphemeralKey +from appwrite.enums import ProjectKeyScopes + +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: EphemeralKey = project.create_ephemeral_key( + scopes = [ProjectKeyScopes.PROJECT_READ], + duration = 600 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/create-linux-platform.md b/examples/2.3.x/server-python/examples/project/create-linux-platform.md new file mode 100644 index 000000000..e1ac1da86 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-linux-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformLinux + +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: PlatformLinux = project.create_linux_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + package_name = '<PACKAGE_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/create-mock-phone.md b/examples/2.3.x/server-python/examples/project/create-mock-phone.md new file mode 100644 index 000000000..6ad457df8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-mock-phone.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import MockNumber + +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: MockNumber = project.create_mock_phone( + number = '+12065550100', + otp = '<OTP>' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..3b39979bb --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-smtp-test.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project + +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 = project.create_smtp_test( + emails = [] +) +``` diff --git a/examples/2.3.x/server-python/examples/project/create-variable.md b/examples/2.3.x/server-python/examples/project/create-variable.md new file mode 100644 index 000000000..668e3548e --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-variable.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Variable + +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: Variable = project.create_variable( + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/create-web-platform.md b/examples/2.3.x/server-python/examples/project/create-web-platform.md new file mode 100644 index 000000000..c92e167bf --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-web-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformWeb + +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: PlatformWeb = project.create_web_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + hostname = 'app.example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/create-windows-platform.md b/examples/2.3.x/server-python/examples/project/create-windows-platform.md new file mode 100644 index 000000000..5f782144e --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/create-windows-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformWindows + +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: PlatformWindows = project.create_windows_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + package_identifier_name = '<PACKAGE_IDENTIFIER_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/delete-key.md b/examples/2.3.x/server-python/examples/project/delete-key.md new file mode 100644 index 000000000..8af3c0fc4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/delete-key.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project + +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 = project.delete_key( + key_id = '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/project/delete-mock-phone.md b/examples/2.3.x/server-python/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..5ce79db59 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/delete-mock-phone.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project + +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 = project.delete_mock_phone( + number = '+12065550100' +) +``` diff --git a/examples/2.3.x/server-python/examples/project/delete-platform.md b/examples/2.3.x/server-python/examples/project/delete-platform.md new file mode 100644 index 000000000..471bb8386 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/delete-platform.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project + +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 = project.delete_platform( + platform_id = '<PLATFORM_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/project/delete-variable.md b/examples/2.3.x/server-python/examples/project/delete-variable.md new file mode 100644 index 000000000..89b16d21f --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/delete-variable.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project + +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 = project.delete_variable( + variable_id = '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/project/delete.md b/examples/2.3.x/server-python/examples/project/delete.md new file mode 100644 index 000000000..0c74d3116 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/delete.md @@ -0,0 +1,13 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project + +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 = project.delete() +``` diff --git a/examples/2.3.x/server-python/examples/project/get-email-template.md b/examples/2.3.x/server-python/examples/project/get-email-template.md new file mode 100644 index 000000000..8fedaf742 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/get-email-template.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import EmailTemplate +from appwrite.enums import ProjectEmailTemplateId +from appwrite.enums import ProjectEmailTemplateLocale + +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: EmailTemplate = project.get_email_template( + template_id = ProjectEmailTemplateId.VERIFICATION, + locale = ProjectEmailTemplateLocale.AF # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/get-key.md b/examples/2.3.x/server-python/examples/project/get-key.md new file mode 100644 index 000000000..0165746db --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/get-key.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Key + +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: Key = project.get_key( + key_id = '<KEY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/get-mock-phone.md b/examples/2.3.x/server-python/examples/project/get-mock-phone.md new file mode 100644 index 000000000..e35dffdde --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/get-mock-phone.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import MockNumber + +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: MockNumber = project.get_mock_phone( + number = '+12065550100' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..1bdc7e3c2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,64 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Github +from appwrite.models import OAuth2Discord +from appwrite.models import OAuth2Figma +from appwrite.models import OAuth2Dropbox +from appwrite.models import OAuth2Dailymotion +from appwrite.models import OAuth2Bitbucket +from appwrite.models import OAuth2Bitly +from appwrite.models import OAuth2Box +from appwrite.models import OAuth2Autodesk +from appwrite.models import OAuth2Google +from appwrite.models import OAuth2Zoom +from appwrite.models import OAuth2Zoho +from appwrite.models import OAuth2Yandex +from appwrite.models import OAuth2X +from appwrite.models import OAuth2WordPress +from appwrite.models import OAuth2Twitch +from appwrite.models import OAuth2Stripe +from appwrite.models import OAuth2Spotify +from appwrite.models import OAuth2Slack +from appwrite.models import OAuth2Podio +from appwrite.models import OAuth2Notion +from appwrite.models import OAuth2Salesforce +from appwrite.models import OAuth2Yahoo +from appwrite.models import OAuth2HuggingFace +from appwrite.models import OAuth2Resend +from appwrite.models import OAuth2Cloudflare +from appwrite.models import OAuth2Linkedin +from appwrite.models import OAuth2Disqus +from appwrite.models import OAuth2Amazon +from appwrite.models import OAuth2Etsy +from appwrite.models import OAuth2Facebook +from appwrite.models import OAuth2Tradeshift +from appwrite.models import OAuth2Paypal +from appwrite.models import OAuth2Gitlab +from appwrite.models import OAuth2Authentik +from appwrite.models import OAuth2Auth0 +from appwrite.models import OAuth2FusionAuth +from appwrite.models import OAuth2Keycloak +from appwrite.models import OAuth2Oidc +from appwrite.models import OAuth2Apple +from appwrite.models import OAuth2Okta +from appwrite.models import OAuth2Kick +from appwrite.models import OAuth2Microsoft +from appwrite.models import OAuth2TikTok +from appwrite.models import OAuth2Kakao +from typing import Union +from appwrite.enums import ProjectOAuthProviderId + +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: 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( + provider_id = ProjectOAuthProviderId.AMAZON +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/get-platform.md b/examples/2.3.x/server-python/examples/project/get-platform.md new file mode 100644 index 000000000..2075a706a --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/get-platform.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformWeb +from appwrite.models import PlatformApple +from appwrite.models import PlatformAndroid +from appwrite.models import PlatformWindows +from appwrite.models import PlatformLinux +from typing import Union + +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: Union[PlatformWeb, PlatformApple, PlatformAndroid, PlatformWindows, PlatformLinux] = project.get_platform( + platform_id = '<PLATFORM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/get-policy.md b/examples/2.3.x/server-python/examples/project/get-policy.md new file mode 100644 index 000000000..345d18328 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/get-policy.md @@ -0,0 +1,35 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PolicyPasswordDictionary +from appwrite.models import PolicyPasswordHistory +from appwrite.models import PolicyPasswordStrength +from appwrite.models import PolicyPasswordPersonalData +from appwrite.models import PolicyPasswordPwned +from appwrite.models import PolicySessionAlert +from appwrite.models import PolicySessionDuration +from appwrite.models import PolicySessionInvalidation +from appwrite.models import PolicySessionLimit +from appwrite.models import PolicyUserLimit +from appwrite.models import PolicyMembershipPrivacy +from appwrite.models import PolicyMfaFactors +from appwrite.models import PolicyDenyAliasedEmail +from appwrite.models import PolicyDenyDisposableEmail +from appwrite.models import PolicyDenyFreeEmail +from appwrite.models import PolicyDenyCorporateEmail +from typing import Union +from appwrite.enums import ProjectPolicyId + +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: Union[PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicyPasswordPwned, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyMfaFactors, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail, PolicyDenyCorporateEmail] = project.get_policy( + policy_id = ProjectPolicyId.PASSWORD_DICTIONARY +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/get-variable.md b/examples/2.3.x/server-python/examples/project/get-variable.md new file mode 100644 index 000000000..9771151a6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/get-variable.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Variable + +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: Variable = project.get_variable( + variable_id = '<VARIABLE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/get.md b/examples/2.3.x/server-python/examples/project/get.md new file mode 100644 index 000000000..ea0046c71 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/get.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.get() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/list-email-templates.md b/examples/2.3.x/server-python/examples/project/list-email-templates.md new file mode 100644 index 000000000..293bae738 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/list-email-templates.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import EmailTemplateList + +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: EmailTemplateList = project.list_email_templates( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/list-keys.md b/examples/2.3.x/server-python/examples/project/list-keys.md new file mode 100644 index 000000000..e72b20bd2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/list-keys.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import KeyList + +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: KeyList = project.list_keys( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/list-mock-phones.md b/examples/2.3.x/server-python/examples/project/list-mock-phones.md new file mode 100644 index 000000000..6a73776b9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/list-mock-phones.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import MockNumberList + +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: MockNumberList = project.list_mock_phones( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-python/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..fbe6791a9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2ProviderList + +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: OAuth2ProviderList = project.list_o_auth2_providers( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/list-platforms.md b/examples/2.3.x/server-python/examples/project/list-platforms.md new file mode 100644 index 000000000..690f7a798 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/list-platforms.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformList + +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: PlatformList = project.list_platforms( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/list-policies.md b/examples/2.3.x/server-python/examples/project/list-policies.md new file mode 100644 index 000000000..e150a3f6c --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/list-policies.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PolicyList + +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: PolicyList = project.list_policies( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/list-variables.md b/examples/2.3.x/server-python/examples/project/list-variables.md new file mode 100644 index 000000000..4316f7c3e --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/list-variables.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import VariableList + +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: VariableList = project.list_variables( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-android-platform.md b/examples/2.3.x/server-python/examples/project/update-android-platform.md new file mode 100644 index 000000000..1c915ac47 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-android-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformAndroid + +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: PlatformAndroid = project.update_android_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + application_id = '<APPLICATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-apple-platform.md b/examples/2.3.x/server-python/examples/project/update-apple-platform.md new file mode 100644 index 000000000..33fd9c745 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-apple-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformApple + +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: PlatformApple = project.update_apple_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + bundle_identifier = '<BUNDLE_IDENTIFIER>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-auth-method.md b/examples/2.3.x/server-python/examples/project/update-auth-method.md new file mode 100644 index 000000000..d9e4c6430 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-auth-method.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel +from appwrite.enums import ProjectAuthMethodId + +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: ProjectModel = project.update_auth_method( + method_id = ProjectAuthMethodId.EMAIL_PASSWORD, + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-python/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..02d1f7d47 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_deny_aliased_email_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-python/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..21f4f8a69 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_deny_corporate_email_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-python/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..2dbeaf5e9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_deny_disposable_email_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-python/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..e9af632bf --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_deny_free_email_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-email-template.md b/examples/2.3.x/server-python/examples/project/update-email-template.md new file mode 100644 index 000000000..d5548fdbb --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-email-template.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import EmailTemplate +from appwrite.enums import ProjectEmailTemplateId +from appwrite.enums import ProjectEmailTemplateLocale + +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: EmailTemplate = project.update_email_template( + template_id = ProjectEmailTemplateId.VERIFICATION, + locale = ProjectEmailTemplateLocale.AF, # optional + subject = '<SUBJECT>', # optional + message = '<MESSAGE>', # optional + sender_name = '<SENDER_NAME>', # optional + sender_email = 'email@example.com', # optional + reply_to_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..e1ecc201a --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-key.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Key +from appwrite.enums import ProjectKeyScopes + +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: Key = project.update_key( + key_id = '<KEY_ID>', + name = '<NAME>', + scopes = [ProjectKeyScopes.PROJECT_READ], + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..4fedceb18 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-labels.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_labels( + labels = [] +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-linux-platform.md b/examples/2.3.x/server-python/examples/project/update-linux-platform.md new file mode 100644 index 000000000..661286919 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-linux-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformLinux + +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: PlatformLinux = project.update_linux_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + package_name = '<PACKAGE_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-python/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..f6878ee47 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_membership_privacy_policy( + user_id = False, # optional + user_email = False, # optional + user_phone = False, # optional + user_name = False, # optional + user_mfa = False, # optional + user_accessed_at = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-python/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..67f75688e --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-mfa-factors-policy.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_mfa_factors_policy( + totp = False, # optional + email = False, # optional + phone = False, # optional + custom = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-mock-phone.md b/examples/2.3.x/server-python/examples/project/update-mock-phone.md new file mode 100644 index 000000000..8a9a96c36 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-mock-phone.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import MockNumber + +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: MockNumber = project.update_mock_phone( + number = '+12065550100', + otp = '<OTP>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..61459693a --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-amazon.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Amazon + +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: OAuth2Amazon = project.update_o_auth2_amazon( + 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-apple.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..1e0b8ff7b --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Apple + +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: OAuth2Apple = project.update_o_auth2_apple( + service_id = '<SERVICE_ID>', # optional + key_id = '<KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + p8_file = '<P8_FILE>', # optional + native_client_ids = [], # optional + enabled = False, # optional + native_enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..7b7659218 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-appwrite.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Appwrite + +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: OAuth2Appwrite = project.update_o_auth2_appwrite( + 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-auth-0.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..568bb9bb4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-auth-0.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Auth0 + +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: OAuth2Auth0 = project.update_o_auth2_auth0( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + endpoint = '<ENDPOINT>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..2fbc09900 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-authentik.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Authentik + +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: OAuth2Authentik = project.update_o_auth2_authentik( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + endpoint = '<ENDPOINT>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..cff31e1ef --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-autodesk.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Autodesk + +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: OAuth2Autodesk = project.update_o_auth2_autodesk( + 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-bitbucket.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..a2099d1bd --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-bitbucket.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Bitbucket + +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: OAuth2Bitbucket = project.update_o_auth2_bitbucket( + key = '<KEY>', # optional + secret = '<SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..1f026038e --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-bitly.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Bitly + +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: OAuth2Bitly = project.update_o_auth2_bitly( + 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-box.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..363cd0609 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-box.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Box + +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: OAuth2Box = project.update_o_auth2_box( + 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-cloudflare.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..1044a61b8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-cloudflare.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Cloudflare + +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: OAuth2Cloudflare = project.update_o_auth2_cloudflare( + 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-dailymotion.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..53449cd1b --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-dailymotion.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Dailymotion + +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: OAuth2Dailymotion = project.update_o_auth2_dailymotion( + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..a95cc4961 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-discord.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Discord + +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: OAuth2Discord = project.update_o_auth2_discord( + 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-disqus.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..f2af447f9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-disqus.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Disqus + +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: OAuth2Disqus = project.update_o_auth2_disqus( + public_key = '<PUBLIC_KEY>', # optional + secret_key = '<SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..50e301197 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-dropbox.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Dropbox + +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: OAuth2Dropbox = project.update_o_auth2_dropbox( + app_key = '<APP_KEY>', # optional + app_secret = '<APP_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..4a0a20eaa --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-etsy.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Etsy + +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: OAuth2Etsy = project.update_o_auth2_etsy( + key_string = '<KEY_STRING>', # optional + shared_secret = '<SHARED_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..5b536dbbf --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-facebook.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Facebook + +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: OAuth2Facebook = project.update_o_auth2_facebook( + app_id = '<APP_ID>', # optional + app_secret = '<APP_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..eb2a2d252 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-figma.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Figma + +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: OAuth2Figma = project.update_o_auth2_figma( + 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-fusion-auth.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..fb4d25dff --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2FusionAuth + +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: OAuth2FusionAuth = project.update_o_auth2_fusion_auth( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + endpoint = '<ENDPOINT>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..36664b851 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-git-hub.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Github + +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: OAuth2Github = project.update_o_auth2_git_hub( + 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-gitlab.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..05905fdce --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-gitlab.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Gitlab + +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: OAuth2Gitlab = project.update_o_auth2_gitlab( + application_id = '<APPLICATION_ID>', # optional + secret = '<SECRET>', # optional + endpoint = 'https://example.com', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..a2262e8fd --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-google.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Google +from appwrite.enums import ProjectOAuth2GooglePrompt + +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: OAuth2Google = project.update_o_auth2_google( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2GooglePrompt.NONE], # optional + native_client_ids = [], # optional + enabled = False, # optional + native_enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..932d4af87 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-hugging-face.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2HuggingFace + +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: OAuth2HuggingFace = project.update_o_auth2_hugging_face( + 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-kakao.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..ce8e36a90 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-kakao.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Kakao + +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: OAuth2Kakao = project.update_o_auth2_kakao( + 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-keycloak.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..11a0defb5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Keycloak + +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: OAuth2Keycloak = project.update_o_auth2_keycloak( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + endpoint = '<ENDPOINT>', # optional + realm_name = '<REALM_NAME>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..bc73e0637 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-kick.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Kick + +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: OAuth2Kick = project.update_o_auth2_kick( + 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-linkedin.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..4b6eec3be --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-linkedin.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Linkedin + +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: OAuth2Linkedin = project.update_o_auth2_linkedin( + client_id = '<CLIENT_ID>', # optional + primary_client_secret = '<PRIMARY_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-microsoft.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-microsoft.md new file mode 100644 index 000000000..aeeefa9ec --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-microsoft.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Microsoft + +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: OAuth2Microsoft = project.update_o_auth2_microsoft( + application_id = '<APPLICATION_ID>', # optional + application_secret = '<APPLICATION_SECRET>', # optional + tenant = '<TENANT>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..0ba765ea9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-notion.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Notion + +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: OAuth2Notion = project.update_o_auth2_notion( + oauth_client_id = '<OAUTH_CLIENT_ID>', # optional + oauth_client_secret = '<OAUTH_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-oidc.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..e2df2e3ca --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Oidc +from appwrite.enums import ProjectOAuth2OidcPrompt + +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: OAuth2Oidc = project.update_o_auth2_oidc( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + well_known_url = 'https://example.com', # optional + authorization_url = 'https://example.com', # optional + token_url = 'https://example.com', # optional + user_info_url = 'https://example.com', # optional + prompt = [ProjectOAuth2OidcPrompt.NONE], # optional + max_age = 0, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..0b4fc5329 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Okta + +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: OAuth2Okta = project.update_o_auth2_okta( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + domain = 'example.com', # optional + authorization_server_id = '<AUTHORIZATION_SERVER_ID>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..f31dc2855 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-paypal-sandbox.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Paypal + +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: OAuth2Paypal = project.update_o_auth2_paypal_sandbox( + client_id = '<CLIENT_ID>', # optional + secret_key = '<SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..450e95925 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-paypal.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Paypal + +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: OAuth2Paypal = project.update_o_auth2_paypal( + client_id = '<CLIENT_ID>', # optional + secret_key = '<SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..992ecdcea --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-podio.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Podio + +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: OAuth2Podio = project.update_o_auth2_podio( + 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-resend.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..8ce174189 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-resend.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Resend + +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: OAuth2Resend = project.update_o_auth2_resend( + 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-salesforce.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..a3cb63772 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-salesforce.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Salesforce + +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: OAuth2Salesforce = project.update_o_auth2_salesforce( + customer_key = '<CUSTOMER_KEY>', # optional + customer_secret = '<CUSTOMER_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..338ebf334 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-server.md @@ -0,0 +1,33 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_o_auth2_server( + enabled = False, + authorization_url = 'https://example.com', + scopes = [], # optional + authorization_details_types = [], # optional + access_token_duration = 60, # optional + refresh_token_duration = 60, # optional + public_access_token_duration = 60, # optional + public_refresh_token_duration = 60, # optional + installation_access_token_duration = 60, # optional + confidential_pkce = False, # optional + verification_url = 'https://example.com', # optional + user_code_length = 6, # optional + user_code_format = 'numeric', # optional + device_code_duration = 60, # optional + default_scopes = [], # optional + installation_scopes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..65cc30995 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-slack.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Slack + +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: OAuth2Slack = project.update_o_auth2_slack( + 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-spotify.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..257f45d04 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-spotify.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Spotify + +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: OAuth2Spotify = project.update_o_auth2_spotify( + 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-stripe.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..7207a897e --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-stripe.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Stripe + +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: OAuth2Stripe = project.update_o_auth2_stripe( + client_id = '<CLIENT_ID>', # optional + api_secret_key = '<API_SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..3a7c9cb77 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-tik-tok.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2TikTok + +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: OAuth2TikTok = project.update_o_auth2_tik_tok( + 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-tradeshift-sandbox.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..2aaf7e642 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-tradeshift-sandbox.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Tradeshift + +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: OAuth2Tradeshift = project.update_o_auth2_tradeshift_sandbox( + oauth2_client_id = '<OAUTH2_CLIENT_ID>', # optional + oauth2_client_secret = '<OAUTH2_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-tradeshift.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..6ed5baccd --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-tradeshift.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Tradeshift + +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: OAuth2Tradeshift = project.update_o_auth2_tradeshift( + oauth2_client_id = '<OAUTH2_CLIENT_ID>', # optional + oauth2_client_secret = '<OAUTH2_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-twitch.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..7c4027897 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-twitch.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Twitch + +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: OAuth2Twitch = project.update_o_auth2_twitch( + 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-word-press.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..c7b406b95 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-word-press.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2WordPress + +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: OAuth2WordPress = project.update_o_auth2_word_press( + 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-yahoo.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..6ea825b57 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-yahoo.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Yahoo + +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: OAuth2Yahoo = project.update_o_auth2_yahoo( + 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-yandex.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..c8604ede3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-yandex.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Yandex + +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: OAuth2Yandex = project.update_o_auth2_yandex( + 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 new file mode 100644 index 000000000..069a9645b --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-zoho.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Zoho + +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: OAuth2Zoho = project.update_o_auth2_zoho( + 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-zoom.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..e779a0c09 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-zoom.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Zoom + +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: OAuth2Zoom = project.update_o_auth2_zoom( + 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-2x.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..5637fd6a7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2x.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2X + +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: OAuth2X = project.update_o_auth2_x( + customer_key = '<CUSTOMER_KEY>', # optional + secret_key = '<SECRET_KEY>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-python/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..93e652be4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_password_dictionary_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-password-history-policy.md b/examples/2.3.x/server-python/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..5e3c1406a --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-password-history-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_password_history_policy( + total = 1 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-python/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..507bdac4d --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_password_personal_data_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-python/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..53d2130c5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-password-pwned-policy.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_password_pwned_policy( + enabled = False, # optional + sessions = False, # optional + users = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-python/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..c87aeaf3f --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-password-strength-policy.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PolicyPasswordStrength + +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: PolicyPasswordStrength = project.update_password_strength_policy( + min = 8, # optional + uppercase = False, # optional + lowercase = False, # optional + number = False, # optional + symbols = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-protocol.md b/examples/2.3.x/server-python/examples/project/update-protocol.md new file mode 100644 index 000000000..db26644d6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-protocol.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel +from appwrite.enums import ProjectProtocolId + +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: ProjectModel = project.update_protocol( + protocol_id = ProjectProtocolId.REST, + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-service.md b/examples/2.3.x/server-python/examples/project/update-service.md new file mode 100644 index 000000000..17c003c09 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-service.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel +from appwrite.enums import ProjectServiceId + +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: ProjectModel = project.update_service( + service_id = ProjectServiceId.ACCOUNT, + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-python/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..382f694d0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-session-alert-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_session_alert_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-python/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..817947e45 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-session-duration-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_session_duration_policy( + duration = 60 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-python/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..6e8417d34 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_session_invalidation_policy( + enabled = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-python/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..bcfd671af --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-session-limit-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_session_limit_policy( + total = 1 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-smtp.md b/examples/2.3.x/server-python/examples/project/update-smtp.md new file mode 100644 index 000000000..772bafeaa --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-smtp.md @@ -0,0 +1,28 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel +from appwrite.enums import ProjectSMTPSecure + +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: ProjectModel = project.update_smtp( + host = 'example.com', # optional + port = 587, # optional + username = '<USERNAME>', # optional + password = 'password', # optional + sender_email = 'email@example.com', # optional + sender_name = '<SENDER_NAME>', # optional + reply_to_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + secure = ProjectSMTPSecure.TLS, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-python/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..42d66de30 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-user-limit-policy.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Project as ProjectModel + +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: ProjectModel = project.update_user_limit_policy( + total = 0 +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-variable.md b/examples/2.3.x/server-python/examples/project/update-variable.md new file mode 100644 index 000000000..3f4dac0fc --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-variable.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import Variable + +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: Variable = project.update_variable( + variable_id = '<VARIABLE_ID>', + key = '<KEY>', # optional + value = '<VALUE>', # optional + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-web-platform.md b/examples/2.3.x/server-python/examples/project/update-web-platform.md new file mode 100644 index 000000000..19f10b4b5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-web-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformWeb + +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: PlatformWeb = project.update_web_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + hostname = 'app.example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-windows-platform.md b/examples/2.3.x/server-python/examples/project/update-windows-platform.md new file mode 100644 index 000000000..cf154e045 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-windows-platform.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import PlatformWindows + +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: PlatformWindows = project.update_windows_platform( + platform_id = '<PLATFORM_ID>', + name = '<NAME>', + package_identifier_name = '<PACKAGE_IDENTIFIER_NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/create-api-rule.md b/examples/2.3.x/server-python/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..7baf360c4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/create-api-rule.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy +from appwrite.models import ProxyRule + +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 + +proxy = Proxy(client) + +result: ProxyRule = proxy.create_api_rule( + domain = 'example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/create-function-rule.md b/examples/2.3.x/server-python/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..0abc59264 --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/create-function-rule.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy +from appwrite.models import ProxyRule + +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 + +proxy = Proxy(client) + +result: ProxyRule = proxy.create_function_rule( + domain = 'example.com', + function_id = '<FUNCTION_ID>', + branch = '<BRANCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/create-invalidation.md b/examples/2.3.x/server-python/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..413beb6fb --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/create-invalidation.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy +from appwrite.models import ProxyInvalidation +from appwrite.enums import InvalidationType + +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 + +proxy = Proxy(client) + +result: ProxyInvalidation = proxy.create_invalidation( + domain = 'example.com', + type = InvalidationType.TAG, + reference = '<REFERENCE>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-python/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..7a44bac02 --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/create-redirect-rule.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy +from appwrite.models import ProxyRule +from appwrite.enums import StatusCode +from appwrite.enums import ProxyResourceType + +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 + +proxy = Proxy(client) + +result: ProxyRule = proxy.create_redirect_rule( + domain = 'example.com', + url = 'https://example.com', + status_code = StatusCode.MOVEDPERMANENTLY, + resource_id = '<RESOURCE_ID>', + resource_type = ProxyResourceType.SITE +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/create-site-rule.md b/examples/2.3.x/server-python/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..c108dca6c --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/create-site-rule.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy +from appwrite.models import ProxyRule + +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 + +proxy = Proxy(client) + +result: ProxyRule = proxy.create_site_rule( + domain = 'example.com', + site_id = '<SITE_ID>', + branch = '<BRANCH>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/delete-rule.md b/examples/2.3.x/server-python/examples/proxy/delete-rule.md new file mode 100644 index 000000000..c5a76ee5e --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/delete-rule.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy + +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 + +proxy = Proxy(client) + +result = proxy.delete_rule( + rule_id = '<RULE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/get-rule.md b/examples/2.3.x/server-python/examples/proxy/get-rule.md new file mode 100644 index 000000000..becc4c360 --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/get-rule.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy +from appwrite.models import ProxyRule + +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 + +proxy = Proxy(client) + +result: ProxyRule = proxy.get_rule( + rule_id = '<RULE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/list-rules.md b/examples/2.3.x/server-python/examples/proxy/list-rules.md new file mode 100644 index 000000000..4cf085f4b --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/list-rules.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy +from appwrite.models import ProxyRuleList + +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 + +proxy = Proxy(client) + +result: ProxyRuleList = proxy.list_rules( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/proxy/update-rule-status.md b/examples/2.3.x/server-python/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..f317926da --- /dev/null +++ b/examples/2.3.x/server-python/examples/proxy/update-rule-status.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.proxy import Proxy +from appwrite.models import ProxyRule + +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 + +proxy = Proxy(client) + +result: ProxyRule = proxy.update_rule_status( + rule_id = '<RULE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/create-deployment.md b/examples/2.3.x/server-python/examples/sites/create-deployment.md new file mode 100644 index 000000000..8abb038e3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/create-deployment.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.input_file import InputFile +from appwrite.models import Deployment + +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 + +sites = Sites(client) + +result: Deployment = sites.create_deployment( + site_id = '<SITE_ID>', + code = InputFile.from_path('file.png'), + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-python/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..35b52564b --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Deployment + +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 + +sites = Sites(client) + +result: Deployment = sites.create_duplicate_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/create-template-deployment.md b/examples/2.3.x/server-python/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..f65b153b5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/create-template-deployment.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Deployment +from appwrite.enums import TemplateReferenceType + +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 + +sites = Sites(client) + +result: Deployment = sites.create_template_deployment( + site_id = '<SITE_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + type = TemplateReferenceType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/create-variable.md b/examples/2.3.x/server-python/examples/sites/create-variable.md new file mode 100644 index 000000000..ca6d9e578 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/create-variable.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Variable + +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 + +sites = Sites(client) + +result: Variable = sites.create_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-python/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..1846cefc3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/create-vcs-deployment.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Deployment +from appwrite.enums import VCSReferenceType + +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 + +sites = Sites(client) + +result: Deployment = sites.create_vcs_deployment( + site_id = '<SITE_ID>', + type = VCSReferenceType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/create.md b/examples/2.3.x/server-python/examples/sites/create.md new file mode 100644 index 000000000..8fd41e725 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/create.md @@ -0,0 +1,45 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Site +from appwrite.enums import Framework +from appwrite.enums import BuildRuntime +from appwrite.enums import Adapter +from appwrite.enums import ProjectKeyScopes + +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 + +sites = Sites(client) + +result: Site = sites.create( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = Framework.ANALOG, + build_runtime = BuildRuntime.NODE_14_5, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + start_command = '<START_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + adapter = Adapter.STATIC, # optional + installation_id = '<INSTALLATION_ID>', # optional + fallback_file = '<FALLBACK_FILE>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches = [], # optional + provider_paths = [], # optional + build_specification = 's-1vcpu-512mb', # optional + runtime_specification = 's-1vcpu-512mb', # optional + deployment_retention = 0, # optional + scopes = [ProjectKeyScopes.PROJECT_READ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/delete-deployment.md b/examples/2.3.x/server-python/examples/sites/delete-deployment.md new file mode 100644 index 000000000..ee2f14915 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/delete-deployment.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites + +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 + +sites = Sites(client) + +result = sites.delete_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/sites/delete-log.md b/examples/2.3.x/server-python/examples/sites/delete-log.md new file mode 100644 index 000000000..26c631240 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/delete-log.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites + +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 + +sites = Sites(client) + +result = sites.delete_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/sites/delete-variable.md b/examples/2.3.x/server-python/examples/sites/delete-variable.md new file mode 100644 index 000000000..97e77cd65 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/delete-variable.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites + +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 + +sites = Sites(client) + +result = sites.delete_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/sites/delete.md b/examples/2.3.x/server-python/examples/sites/delete.md new file mode 100644 index 000000000..41e3eafb6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites + +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 + +sites = Sites(client) + +result = sites.delete( + site_id = '<SITE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/sites/get-deployment-download.md b/examples/2.3.x/server-python/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..7d6ae537d --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/get-deployment-download.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import DeploymentDownloadType + +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 + +sites = Sites(client) + +result: bytes = sites.get_deployment_download( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE, # optional + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/sites/get-deployment.md b/examples/2.3.x/server-python/examples/sites/get-deployment.md new file mode 100644 index 000000000..5291928c3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/get-deployment.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Deployment + +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 + +sites = Sites(client) + +result: Deployment = sites.get_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/get-log.md b/examples/2.3.x/server-python/examples/sites/get-log.md new file mode 100644 index 000000000..aa718daad --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/get-log.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Execution + +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 + +sites = Sites(client) + +result: Execution = sites.get_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/get-variable.md b/examples/2.3.x/server-python/examples/sites/get-variable.md new file mode 100644 index 000000000..9eb30dd91 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/get-variable.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Variable + +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 + +sites = Sites(client) + +result: Variable = sites.get_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/get.md b/examples/2.3.x/server-python/examples/sites/get.md new file mode 100644 index 000000000..c792987a1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Site + +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 + +sites = Sites(client) + +result: Site = sites.get( + site_id = '<SITE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/list-deployments.md b/examples/2.3.x/server-python/examples/sites/list-deployments.md new file mode 100644 index 000000000..70b2a0b3c --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/list-deployments.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import DeploymentList + +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 + +sites = Sites(client) + +result: DeploymentList = sites.list_deployments( + site_id = '<SITE_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..84996b3f7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/list-frameworks.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import FrameworkList + +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 + +sites = Sites(client) + +result: FrameworkList = sites.list_frameworks() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/list-logs.md b/examples/2.3.x/server-python/examples/sites/list-logs.md new file mode 100644 index 000000000..4543f2323 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/list-logs.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import ExecutionList + +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 + +sites = Sites(client) + +result: ExecutionList = sites.list_logs( + site_id = '<SITE_ID>', + queries = [], # optional + 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 new file mode 100644 index 000000000..2f04ddf48 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/list-specifications.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import SpecificationList + +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 + +sites = Sites(client) + +result: SpecificationList = sites.list_specifications( + type = 'runtimes' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/list-variables.md b/examples/2.3.x/server-python/examples/sites/list-variables.md new file mode 100644 index 000000000..4a2c2c5a6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/list-variables.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import VariableList + +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 + +sites = Sites(client) + +result: VariableList = sites.list_variables( + site_id = '<SITE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/list.md b/examples/2.3.x/server-python/examples/sites/list.md new file mode 100644 index 000000000..0a5648271 --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import SiteList + +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 + +sites = Sites(client) + +result: SiteList = sites.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/update-deployment-status.md b/examples/2.3.x/server-python/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..8ab82d4ad --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/update-deployment-status.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Deployment + +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 + +sites = Sites(client) + +result: Deployment = sites.update_deployment_status( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/update-site-deployment.md b/examples/2.3.x/server-python/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..507923e9d --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/update-site-deployment.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Site + +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 + +sites = Sites(client) + +result: Site = sites.update_site_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/update-variable.md b/examples/2.3.x/server-python/examples/sites/update-variable.md new file mode 100644 index 000000000..637d2220e --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/update-variable.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Variable + +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 + +sites = Sites(client) + +result: Variable = sites.update_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', # optional + value = '<VALUE>', # optional + secret = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/sites/update.md b/examples/2.3.x/server-python/examples/sites/update.md new file mode 100644 index 000000000..0065e89fd --- /dev/null +++ b/examples/2.3.x/server-python/examples/sites/update.md @@ -0,0 +1,45 @@ +```python +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.models import Site +from appwrite.enums import Framework +from appwrite.enums import BuildRuntime +from appwrite.enums import Adapter +from appwrite.enums import ProjectKeyScopes + +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 + +sites = Sites(client) + +result: Site = sites.update( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = Framework.ANALOG, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + start_command = '<START_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + build_runtime = BuildRuntime.NODE_14_5, # optional + adapter = Adapter.STATIC, # optional + fallback_file = '<FALLBACK_FILE>', # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches = [], # optional + provider_paths = [], # optional + build_specification = 's-1vcpu-512mb', # optional + runtime_specification = 's-1vcpu-512mb', # optional + deployment_retention = 0, # optional + scopes = [ProjectKeyScopes.PROJECT_READ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/storage/create-bucket.md b/examples/2.3.x/server-python/examples/storage/create-bucket.md new file mode 100644 index 000000000..418f8ecb1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/create-bucket.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.models import Bucket +from appwrite.enums import Compression +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +storage = Storage(client) + +result: Bucket = storage.create_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = Compression.NONE, # optional + encryption = False, # optional + antivirus = False, # optional + transformations = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/storage/create-file.md b/examples/2.3.x/server-python/examples/storage/create-file.md new file mode 100644 index 000000000..9adb89cf8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/create-file.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.input_file import InputFile +from appwrite.models import File +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +storage = Storage(client) + +result: File = storage.create_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + file = InputFile.from_path('file.png'), + permissions = [Permission.read(Role.any())], # optional + folder = 'photos/2026' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/storage/delete-bucket.md b/examples/2.3.x/server-python/examples/storage/delete-bucket.md new file mode 100644 index 000000000..ae71a793a --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/delete-bucket.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage + +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 + +storage = Storage(client) + +result = storage.delete_bucket( + bucket_id = '<BUCKET_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/storage/delete-file.md b/examples/2.3.x/server-python/examples/storage/delete-file.md new file mode 100644 index 000000000..ce1d26044 --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage + +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 + +storage = Storage(client) + +result = storage.delete_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/storage/get-bucket.md b/examples/2.3.x/server-python/examples/storage/get-bucket.md new file mode 100644 index 000000000..eaa707ced --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/get-bucket.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.models import Bucket + +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 + +storage = Storage(client) + +result: Bucket = storage.get_bucket( + bucket_id = '<BUCKET_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/storage/get-file-download.md b/examples/2.3.x/server-python/examples/storage/get-file-download.md new file mode 100644 index 000000000..ac6f9424d --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/get-file-download.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage + +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 + +storage = Storage(client) + +result: bytes = storage.get_file_download( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/storage/get-file-preview.md b/examples/2.3.x/server-python/examples/storage/get-file-preview.md new file mode 100644 index 000000000..779153103 --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/get-file-preview.md @@ -0,0 +1,30 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.enums import ImageGravity +from appwrite.enums import ImageFormat + +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 + +storage = Storage(client) + +result: bytes = storage.get_file_preview( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + width = 0, # optional + height = 0, # optional + gravity = ImageGravity.AUTO, # optional + quality = -1, # optional + border_width = 0, # optional + border_color = 'FFFFFF', # optional + border_radius = 0, # optional + opacity = 0, # optional + rotation = -360, # optional + background = 'FFFFFF', # optional + output = ImageFormat.JPG, # optional + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/storage/get-file-view.md b/examples/2.3.x/server-python/examples/storage/get-file-view.md new file mode 100644 index 000000000..5cceef6ff --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/get-file-view.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage + +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 + +storage = Storage(client) + +result: bytes = storage.get_file_view( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + token = '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/storage/get-file.md b/examples/2.3.x/server-python/examples/storage/get-file.md new file mode 100644 index 000000000..fb1435115 --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/get-file.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.models import File + +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 + +storage = Storage(client) + +result: File = storage.get_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/storage/list-buckets.md b/examples/2.3.x/server-python/examples/storage/list-buckets.md new file mode 100644 index 000000000..aebd50b6b --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/list-buckets.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.models import BucketList + +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 + +storage = Storage(client) + +result: BucketList = storage.list_buckets( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/storage/list-files.md b/examples/2.3.x/server-python/examples/storage/list-files.md new file mode 100644 index 000000000..a676c3136 --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/list-files.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.models import FileList + +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 + +storage = Storage(client) + +result: FileList = storage.list_files( + bucket_id = '<BUCKET_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/storage/update-bucket.md b/examples/2.3.x/server-python/examples/storage/update-bucket.md new file mode 100644 index 000000000..ecb1ada62 --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/update-bucket.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.models import Bucket +from appwrite.enums import Compression +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +storage = Storage(client) + +result: Bucket = storage.update_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = Compression.NONE, # optional + encryption = False, # optional + antivirus = False, # optional + transformations = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/storage/update-file.md b/examples/2.3.x/server-python/examples/storage/update-file.md new file mode 100644 index 000000000..b0fad8d47 --- /dev/null +++ b/examples/2.3.x/server-python/examples/storage/update-file.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.models import File +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +storage = Storage(client) + +result: File = storage.update_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + name = '<NAME>', # optional + permissions = [Permission.read(Role.any())] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..cff669600 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnBigint + +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 + +tables_db = TablesDB(client) + +result: ColumnBigint = tables_db.create_big_int_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 1000000, # optional + default = 0, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..b325095d7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnBoolean + +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 + +tables_db = TablesDB(client) + +result: ColumnBoolean = tables_db.create_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = False, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-python/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..a179bb198 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-cutover.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DatabaseMigration + +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 + +tables_db = TablesDB(client) + +result: DatabaseMigration = tables_db.create_cutover( + database_id = '<DATABASE_ID>', + migration_id = '<MIGRATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..a4a565d09 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnDatetime + +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 + +tables_db = TablesDB(client) + +result: ColumnDatetime = tables_db.create_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = '2020-10-15T06:38:00.000+00:00', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..7315689cd --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-email-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnEmail + +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 + +tables_db = TablesDB(client) + +result: ColumnEmail = tables_db.create_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'email@example.com', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..3e4cb1b97 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-enum-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnEnum + +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 + +tables_db = TablesDB(client) + +result: ColumnEnum = tables_db.create_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + elements = ["active", "inactive"], + required = False, + default = 'active', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-failover.md b/examples/2.3.x/server-python/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..839f8bafa --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-failover.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DedicatedDatabase + +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 + +tables_db = TablesDB(client) + +result: DedicatedDatabase = tables_db.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..0edd6a260 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-float-column.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnFloat + +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 + +tables_db = TablesDB(client) + +result: ColumnFloat = tables_db.create_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 100, # optional + default = 10.5, # optional + array = 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 new file mode 100644 index 000000000..5de707fed --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-index.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnIndex +from appwrite.enums import TablesDBIndexType +from appwrite.enums import OrderBy + +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 + +tables_db = TablesDB(client) + +result: ColumnIndex = tables_db.create_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + type = TablesDBIndexType.KEY, + columns = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..bbe768891 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-integer-column.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnInteger + +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 + +tables_db = TablesDB(client) + +result: ColumnInteger = tables_db.create_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + min = 0, # optional + max = 100, # optional + default = 10, # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..a0a47e67a --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-ip-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnIp + +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 + +tables_db = TablesDB(client) + +result: ColumnIp = tables_db.create_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = '192.0.2.0', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..2fc64c4f5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-line-column.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnLine + +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 + +tables_db = TablesDB(client) + +result: ColumnLine = tables_db.create_line_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [[1, 2], [3, 4], [5, 6]] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..1438ff8a8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnLongtext + +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 + +tables_db = TablesDB(client) + +result: ColumnLongtext = tables_db.create_longtext_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..6729b3292 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnMediumtext + +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 + +tables_db = TablesDB(client) + +result: ColumnMediumtext = tables_db.create_mediumtext_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-migration.md b/examples/2.3.x/server-python/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..46dd29bc9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-migration.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DatabaseMigration + +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 + +tables_db = TablesDB(client) + +result: DatabaseMigration = tables_db.create_migration( + database_id = '<DATABASE_ID>', + specification = 's-1vcpu-1gb', + auto_cutover = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-operations.md b/examples/2.3.x/server-python/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..cb2a8c920 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-operations.md @@ -0,0 +1,29 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Transaction + +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 + +tables_db = TablesDB(client) + +result: Transaction = tables_db.create_operations( + transaction_id = '<TRANSACTION_ID>', + operations = [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..17c1e4472 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-point-column.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnPoint + +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 + +tables_db = TablesDB(client) + +result: ColumnPoint = tables_db.create_point_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [1, 2] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..86fca3047 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnPolygon + +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 + +tables_db = TablesDB(client) + +result: ColumnPolygon = tables_db.create_polygon_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..ffad0db40 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnRelationship +from appwrite.enums import RelationshipType +from appwrite.enums import RelationMutate + +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 + +tables_db = TablesDB(client) + +result: ColumnRelationship = tables_db.create_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + related_table_id = '<RELATED_TABLE_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '<KEY>', # optional + two_way_key = '<TWO_WAY_KEY>', # optional + on_delete = RelationMutate.CASCADE # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-row.md b/examples/2.3.x/server-python/examples/tablesdb/create-row.md new file mode 100644 index 000000000..aa8a9fe67 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-row.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Row +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +tables_db = TablesDB(client) + +result: Row = tables_db.create_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..9e741fe4c --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-rows.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import RowList + +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 + +tables_db = TablesDB(client) + +result: RowList = tables_db.create_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..85decfdec --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-string-column.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnString + +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 + +tables_db = TablesDB(client) + +result: ColumnString = tables_db.create_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + size = 1, + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-table.md b/examples/2.3.x/server-python/examples/tablesdb/create-table.md new file mode 100644 index 000000000..029fb281e --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-table.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Table +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +tables_db = TablesDB(client) + +result: Table = tables_db.create_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = [Permission.read(Role.any())], # optional + row_security = False, # optional + enabled = False, # optional + columns = [], # optional + indexes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..f3c8df3d8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-text-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnText + +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 + +tables_db = TablesDB(client) + +result: ColumnText = tables_db.create_text_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-python/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..b48e262fd --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Transaction + +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 + +tables_db = TablesDB(client) + +result: Transaction = tables_db.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..4bfb858fb --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-url-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnUrl + +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 + +tables_db = TablesDB(client) + +result: ColumnUrl = tables_db.create_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'https://example.com', # optional + array = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-python/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..2fb6338c5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnVarchar + +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 + +tables_db = TablesDB(client) + +result: ColumnVarchar = tables_db.create_varchar_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + size = 1, + required = False, + default = 'Hello World', # optional + array = False, # optional + encrypt = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/create.md b/examples/2.3.x/server-python/examples/tablesdb/create.md new file mode 100644 index 000000000..ca6688758 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/create.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Database + +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 + +tables_db = TablesDB(client) + +result: Database = tables_db.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-python/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..6ee2f9020 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Row + +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 + +tables_db = TablesDB(client) + +result: Row = tables_db.decrement_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '<COLUMN>', + value = 1, # optional + min = 0, # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/delete-column.md b/examples/2.3.x/server-python/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..110fb17f6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/delete-column.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB + +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 + +tables_db = TablesDB(client) + +result = tables_db.delete_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/delete-index.md b/examples/2.3.x/server-python/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..8d9e2adf9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/delete-index.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB + +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 + +tables_db = TablesDB(client) + +result = tables_db.delete_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-python/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..9442ae347 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/delete-migration.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB + +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 + +tables_db = TablesDB(client) + +result = tables_db.delete_migration( + database_id = '<DATABASE_ID>', + migration_id = '<MIGRATION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/delete-row.md b/examples/2.3.x/server-python/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..7615459e7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/delete-row.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB + +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 + +tables_db = TablesDB(client) + +result = tables_db.delete_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + 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 new file mode 100644 index 000000000..2a3a89ca0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/delete-rows.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import RowList + +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 + +tables_db = TablesDB(client) + +result: RowList = tables_db.delete_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/delete-table.md b/examples/2.3.x/server-python/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..599753706 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/delete-table.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB + +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 + +tables_db = TablesDB(client) + +result = tables_db.delete_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-python/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..cbbbc5d97 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/delete-transaction.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB + +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 + +tables_db = TablesDB(client) + +result = tables_db.delete_transaction( + transaction_id = '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/delete.md b/examples/2.3.x/server-python/examples/tablesdb/delete.md new file mode 100644 index 000000000..9859c1e9c --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB + +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 + +tables_db = TablesDB(client) + +result = tables_db.delete( + database_id = '<DATABASE_ID>' +) +``` 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 new file mode 100644 index 000000000..6d2b82551 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get-column.md @@ -0,0 +1,30 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnBoolean +from appwrite.models import ColumnInteger +from appwrite.models import ColumnFloat +from appwrite.models import ColumnEmail +from appwrite.models import ColumnEnum +from appwrite.models import ColumnUrl +from appwrite.models import ColumnIp +from appwrite.models import ColumnDatetime +from appwrite.models import ColumnRelationship +from appwrite.models import ColumnString +from typing import Union + +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 + +tables_db = TablesDB(client) + +result: Union[ColumnBoolean, ColumnInteger, ColumnFloat, ColumnEmail, ColumnEnum, ColumnUrl, ColumnIp, ColumnDatetime, ColumnRelationship, ColumnString] = tables_db.get_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/get-index.md b/examples/2.3.x/server-python/examples/tablesdb/get-index.md new file mode 100644 index 000000000..2bce205d2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get-index.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnIndex + +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 + +tables_db = TablesDB(client) + +result: ColumnIndex = tables_db.get_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/get-migration.md b/examples/2.3.x/server-python/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..2efe0b63e --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get-migration.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DatabaseMigration + +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 + +tables_db = TablesDB(client) + +result: DatabaseMigration = tables_db.get_migration( + database_id = '<DATABASE_ID>', + migration_id = '<MIGRATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-python/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..abd5df1b4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get-replicas.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DedicatedDatabaseReplicas + +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 + +tables_db = TablesDB(client) + +result: DedicatedDatabaseReplicas = tables_db.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/get-row.md b/examples/2.3.x/server-python/examples/tablesdb/get-row.md new file mode 100644 index 000000000..55609e257 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get-row.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Row + +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 + +tables_db = TablesDB(client) + +result: Row = tables_db.get_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/get-status.md b/examples/2.3.x/server-python/examples/tablesdb/get-status.md new file mode 100644 index 000000000..0695da1fd --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get-status.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DatabaseStatus + +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 + +tables_db = TablesDB(client) + +result: DatabaseStatus = tables_db.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/get-table.md b/examples/2.3.x/server-python/examples/tablesdb/get-table.md new file mode 100644 index 000000000..da6a4bcb4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get-table.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Table + +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 + +tables_db = TablesDB(client) + +result: Table = tables_db.get_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-python/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..b51fcc268 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Transaction + +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 + +tables_db = TablesDB(client) + +result: Transaction = tables_db.get_transaction( + transaction_id = '<TRANSACTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/get.md b/examples/2.3.x/server-python/examples/tablesdb/get.md new file mode 100644 index 000000000..036deeec9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Database + +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 + +tables_db = TablesDB(client) + +result: Database = tables_db.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-python/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..ae25a0b69 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/increment-row-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Row + +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 + +tables_db = TablesDB(client) + +result: Row = tables_db.increment_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '<COLUMN>', + value = 1, # optional + max = 100, # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/list-columns.md b/examples/2.3.x/server-python/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..3a450487e --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list-columns.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnList + +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 + +tables_db = TablesDB(client) + +result: ColumnList = tables_db.list_columns( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-python/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..b1ccf1a42 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list-indexes.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnIndexList + +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 + +tables_db = TablesDB(client) + +result: ColumnIndexList = tables_db.list_indexes( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-python/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..99665efa6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list-migrations.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DatabaseMigrationList + +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 + +tables_db = TablesDB(client) + +result: DatabaseMigrationList = tables_db.list_migrations( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/list-operations.md b/examples/2.3.x/server-python/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..aa3754a57 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list-operations.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DedicatedDatabaseOperationList + +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 + +tables_db = TablesDB(client) + +result: DedicatedDatabaseOperationList = tables_db.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/list-rows.md b/examples/2.3.x/server-python/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..0ef941040 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list-rows.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import RowList + +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 + +tables_db = TablesDB(client) + +result: RowList = tables_db.list_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-python/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..c0fc0f8bc --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list-specifications.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DedicatedDatabaseSpecificationList + +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 + +tables_db = TablesDB(client) + +result: DedicatedDatabaseSpecificationList = tables_db.list_specifications() + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/list-tables.md b/examples/2.3.x/server-python/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..589aaa989 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list-tables.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import TableList + +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 + +tables_db = TablesDB(client) + +result: TableList = tables_db.list_tables( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..b4384e67c --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list-transactions.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import TransactionList + +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 + +tables_db = TablesDB(client) + +result: TransactionList = tables_db.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/list.md b/examples/2.3.x/server-python/examples/tablesdb/list.md new file mode 100644 index 000000000..cfc352d1b --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import DatabaseList + +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 + +tables_db = TablesDB(client) + +result: DatabaseList = tables_db.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..f4e6e90d3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnBigint + +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 + +tables_db = TablesDB(client) + +result: ColumnBigint = tables_db.update_big_int_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 0, + min = 0, # optional + max = 1000000, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..9352362c7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnBoolean + +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 + +tables_db = TablesDB(client) + +result: ColumnBoolean = tables_db.update_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = False, + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..70cd57545 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnDatetime + +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 + +tables_db = TablesDB(client) + +result: ColumnDatetime = tables_db.update_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = '2020-10-15T06:38:00.000+00:00', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..94036baf2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-email-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnEmail + +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 + +tables_db = TablesDB(client) + +result: ColumnEmail = tables_db.update_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'email@example.com', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..0ac9ac919 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-enum-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnEnum + +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 + +tables_db = TablesDB(client) + +result: ColumnEnum = tables_db.update_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + elements = ["active", "inactive"], + required = False, + default = 'active', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..08e39be5a --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-float-column.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnFloat + +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 + +tables_db = TablesDB(client) + +result: ColumnFloat = tables_db.update_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 10.5, + min = 0, # optional + max = 100, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..cd6831fc2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-integer-column.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnInteger + +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 + +tables_db = TablesDB(client) + +result: ColumnInteger = tables_db.update_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 10, + min = 0, # optional + max = 100, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..c3570fb1b --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-ip-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnIp + +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 + +tables_db = TablesDB(client) + +result: ColumnIp = tables_db.update_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = '192.0.2.0', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..052a12c0f --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-line-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnLine + +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 + +tables_db = TablesDB(client) + +result: ColumnLine = tables_db.update_line_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [[1, 2], [3, 4], [5, 6]], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..8e44bd032 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnLongtext + +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 + +tables_db = TablesDB(client) + +result: ColumnLongtext = tables_db.update_longtext_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..2412dc84f --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnMediumtext + +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 + +tables_db = TablesDB(client) + +result: ColumnMediumtext = tables_db.update_mediumtext_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..5368394e2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-point-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnPoint + +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 + +tables_db = TablesDB(client) + +result: ColumnPoint = tables_db.update_point_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [1, 2], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..b7af58ae6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnPolygon + +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 + +tables_db = TablesDB(client) + +result: ColumnPolygon = tables_db.update_polygon_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..4932a8a92 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnRelationship +from appwrite.enums import RelationMutate + +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 + +tables_db = TablesDB(client) + +result: ColumnRelationship = tables_db.update_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + on_delete = RelationMutate.CASCADE, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-row.md b/examples/2.3.x/server-python/examples/tablesdb/update-row.md new file mode 100644 index 000000000..30522e7bc --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-row.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Row +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +tables_db = TablesDB(client) + +result: Row = tables_db.update_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-rows.md b/examples/2.3.x/server-python/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..dc3641b3e --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-rows.md @@ -0,0 +1,28 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import RowList + +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 + +tables_db = TablesDB(client) + +result: RowList = tables_db.update_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..f33752373 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-string-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnString + +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 + +tables_db = TablesDB(client) + +result: ColumnString = tables_db.update_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + size = 1, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-table.md b/examples/2.3.x/server-python/examples/tablesdb/update-table.md new file mode 100644 index 000000000..ee6bba024 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-table.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Table +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +tables_db = TablesDB(client) + +result: Table = tables_db.update_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', # optional + permissions = [Permission.read(Role.any())], # optional + row_security = False, # optional + enabled = False, # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..21e039443 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-text-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnText + +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 + +tables_db = TablesDB(client) + +result: ColumnText = tables_db.update_text_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-python/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..999f53b18 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-transaction.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Transaction + +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 + +tables_db = TablesDB(client) + +result: Transaction = tables_db.update_transaction( + transaction_id = '<TRANSACTION_ID>', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..2553957d6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-url-column.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnUrl + +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 + +tables_db = TablesDB(client) + +result: ColumnUrl = tables_db.update_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'https://example.com', + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-python/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..3f03b42f2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import ColumnVarchar + +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 + +tables_db = TablesDB(client) + +result: ColumnVarchar = tables_db.update_varchar_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '<KEY>', + required = False, + default = 'Hello World', + size = 1, # optional + new_key = '<NEW_KEY>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/update.md b/examples/2.3.x/server-python/examples/tablesdb/update.md new file mode 100644 index 000000000..7fc0c9306 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/update.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Database + +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 + +tables_db = TablesDB(client) + +result: Database = tables_db.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', # optional + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-python/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..c511545c3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/upsert-row.md @@ -0,0 +1,31 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import Row +from appwrite.permission import Permission +from appwrite.role import Role + +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 + +tables_db = TablesDB(client) + +result: Row = tables_db.upsert_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": False + }, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..0b6a754e3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tablesdb/upsert-rows.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.tables_db import TablesDB +from appwrite.models import RowList + +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 + +tables_db = TablesDB(client) + +result: RowList = tables_db.upsert_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/create-installation.md b/examples/2.3.x/server-python/examples/teams/create-installation.md new file mode 100644 index 000000000..185e379fd --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/create-installation.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://<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 + +teams = Teams(client) + +result: AppInstallation = teams.create_installation( + team_id = '<TEAM_ID>', + app_id = '<APP_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..313bf5f6a --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/create-membership.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Membership + +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 + +teams = Teams(client) + +result: Membership = teams.create_membership( + team_id = '<TEAM_ID>', + roles = [], + email = 'email@example.com', # optional + user_id = '<USER_ID>', # optional + phone = '+12065550100', # optional + url = 'https://example.com', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/create.md b/examples/2.3.x/server-python/examples/teams/create.md new file mode 100644 index 000000000..965d854a2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/create.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Team + +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 + +teams = Teams(client) + +result: Team = teams.create( + team_id = '<TEAM_ID>', + name = '<NAME>', + roles = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/delete-installation.md b/examples/2.3.x/server-python/examples/teams/delete-installation.md new file mode 100644 index 000000000..912195d36 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<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 + +teams = Teams(client) + +result = teams.delete_installation( + team_id = '<TEAM_ID>', + installation_id = '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/teams/delete-membership.md b/examples/2.3.x/server-python/examples/teams/delete-membership.md new file mode 100644 index 000000000..2ed97d15b --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams + +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 + +teams = Teams(client) + +result = teams.delete_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/teams/delete.md b/examples/2.3.x/server-python/examples/teams/delete.md new file mode 100644 index 000000000..c9a65b370 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams + +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 + +teams = Teams(client) + +result = teams.delete( + team_id = '<TEAM_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/teams/get-installation.md b/examples/2.3.x/server-python/examples/teams/get-installation.md new file mode 100644 index 000000000..06ad5f01f --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/get-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://<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 + +teams = Teams(client) + +result: AppInstallation = teams.get_installation( + team_id = '<TEAM_ID>', + installation_id = '<INSTALLATION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/get-membership.md b/examples/2.3.x/server-python/examples/teams/get-membership.md new file mode 100644 index 000000000..54ad0cd34 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/get-membership.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Membership + +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 + +teams = Teams(client) + +result: Membership = teams.get_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/get-prefs.md b/examples/2.3.x/server-python/examples/teams/get-prefs.md new file mode 100644 index 000000000..20ae59624 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/get-prefs.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Preferences + +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 + +teams = Teams(client) + +result: Preferences = teams.get_prefs( + team_id = '<TEAM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/get.md b/examples/2.3.x/server-python/examples/teams/get.md new file mode 100644 index 000000000..3b5116c9e --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Team + +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 + +teams = Teams(client) + +result: Team = teams.get( + team_id = '<TEAM_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/list-installations.md b/examples/2.3.x/server-python/examples/teams/list-installations.md new file mode 100644 index 000000000..fbc9485b4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/list-installations.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import AppInstallationList + +client = Client() +client.set_endpoint('https://<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 + +teams = Teams(client) + +result: AppInstallationList = teams.list_installations( + team_id = '<TEAM_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/list-memberships.md b/examples/2.3.x/server-python/examples/teams/list-memberships.md new file mode 100644 index 000000000..8acc9d14b --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/list-memberships.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import MembershipList + +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 + +teams = Teams(client) + +result: MembershipList = teams.list_memberships( + team_id = '<TEAM_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/list.md b/examples/2.3.x/server-python/examples/teams/list.md new file mode 100644 index 000000000..9fcd1ddb3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import TeamList + +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 + +teams = Teams(client) + +result: TeamList = teams.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/update-installation.md b/examples/2.3.x/server-python/examples/teams/update-installation.md new file mode 100644 index 000000000..a5df12133 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/update-installation.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://<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 + +teams = Teams(client) + +result: AppInstallation = teams.update_installation( + team_id = '<TEAM_ID>', + installation_id = '<INSTALLATION_ID>', + authorization_details = '<AUTHORIZATION_DETAILS>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/update-membership-status.md b/examples/2.3.x/server-python/examples/teams/update-membership-status.md new file mode 100644 index 000000000..b836d8204 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/update-membership-status.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Membership + +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 + +teams = Teams(client) + +result: Membership = teams.update_membership_status( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + user_id = '<USER_ID>', + secret = '<SECRET>' +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..4425ae58d --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/update-membership.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Membership + +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 + +teams = Teams(client) + +result: Membership = teams.update_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + roles = [] +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/update-name.md b/examples/2.3.x/server-python/examples/teams/update-name.md new file mode 100644 index 000000000..376d6c3fe --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/update-name.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Team + +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 + +teams = Teams(client) + +result: Team = teams.update_name( + team_id = '<TEAM_ID>', + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/teams/update-prefs.md b/examples/2.3.x/server-python/examples/teams/update-prefs.md new file mode 100644 index 000000000..23f487891 --- /dev/null +++ b/examples/2.3.x/server-python/examples/teams/update-prefs.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import Preferences + +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 + +teams = Teams(client) + +result: Preferences = teams.update_prefs( + team_id = '<TEAM_ID>', + prefs = {} +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tokens/create-file-token.md b/examples/2.3.x/server-python/examples/tokens/create-file-token.md new file mode 100644 index 000000000..73ad13559 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tokens/create-file-token.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.tokens import Tokens +from appwrite.models import ResourceToken + +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 + +tokens = Tokens(client) + +result: ResourceToken = tokens.create_file_token( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tokens/delete.md b/examples/2.3.x/server-python/examples/tokens/delete.md new file mode 100644 index 000000000..80777fd0d --- /dev/null +++ b/examples/2.3.x/server-python/examples/tokens/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +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 + +tokens = Tokens(client) + +result = tokens.delete( + token_id = '<TOKEN_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/tokens/get.md b/examples/2.3.x/server-python/examples/tokens/get.md new file mode 100644 index 000000000..83a9649a2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tokens/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.tokens import Tokens +from appwrite.models import ResourceToken + +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 + +tokens = Tokens(client) + +result: ResourceToken = tokens.get( + token_id = '<TOKEN_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tokens/list.md b/examples/2.3.x/server-python/examples/tokens/list.md new file mode 100644 index 000000000..d5700165a --- /dev/null +++ b/examples/2.3.x/server-python/examples/tokens/list.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.tokens import Tokens +from appwrite.models import ResourceTokenList + +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 + +tokens = Tokens(client) + +result: ResourceTokenList = tokens.list( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/tokens/update.md b/examples/2.3.x/server-python/examples/tokens/update.md new file mode 100644 index 000000000..6b5ad4b43 --- /dev/null +++ b/examples/2.3.x/server-python/examples/tokens/update.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.tokens import Tokens +from appwrite.models import ResourceToken + +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 + +tokens = Tokens(client) + +result: ResourceToken = tokens.update( + token_id = '<TOKEN_ID>', + expire = '2020-10-15T06:38:00.000+00:00' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-argon-2-user.md b/examples/2.3.x/server-python/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..cd3e2bc9e --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-argon-2-user.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.create_argon2_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-python/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..d3ab13e69 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-bcrypt-user.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.create_bcrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-jwt.md b/examples/2.3.x/server-python/examples/users/create-jwt.md new file mode 100644 index 000000000..109ad50a1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-jwt.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import Jwt + +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 + +users = Users(client) + +result: Jwt = users.create_jwt( + user_id = '<USER_ID>', + session_id = 'recent()', # optional + duration = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-md-5-user.md b/examples/2.3.x/server-python/examples/users/create-md-5-user.md new file mode 100644 index 000000000..53b45bfed --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-md-5-user.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.create_md5_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-python/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..0c83df496 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import MfaRecoveryCodes + +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 + +users = Users(client) + +result: MfaRecoveryCodes = users.create_mfa_recovery_codes( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-python/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..456a04b00 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-ph-pass-user.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.create_ph_pass_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-python/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..e802270b7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.create_scrypt_modified_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_salt_separator = '<PASSWORD_SALT_SEPARATOR>', + password_signer_key = '<PASSWORD_SIGNER_KEY>', + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-scrypt-user.md b/examples/2.3.x/server-python/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..ecfa60298 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-scrypt-user.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.create_scrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_cpu = 8, + password_memory = 65536, + password_parallel = 1, + password_length = 64, + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-session.md b/examples/2.3.x/server-python/examples/users/create-session.md new file mode 100644 index 000000000..38a6dbccb --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-session.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import Session + +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 + +users = Users(client) + +result: Session = users.create_session( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-sha-user.md b/examples/2.3.x/server-python/examples/users/create-sha-user.md new file mode 100644 index 000000000..9d42300a7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-sha-user.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User +from appwrite.enums import PasswordHash + +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 + +users = Users(client) + +result: User = users.create_sha_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_version = PasswordHash.SHA1, # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-target.md b/examples/2.3.x/server-python/examples/users/create-target.md new file mode 100644 index 000000000..fcfd394a3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-target.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import Target +from appwrite.enums import MessagingProviderType + +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 + +users = Users(client) + +result: Target = users.create_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + provider_type = MessagingProviderType.EMAIL, + identifier = '<IDENTIFIER>', + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create-token.md b/examples/2.3.x/server-python/examples/users/create-token.md new file mode 100644 index 000000000..d7520f5ef --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create-token.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import Token + +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 + +users = Users(client) + +result: Token = users.create_token( + user_id = '<USER_ID>', + length = 4, # optional + expire = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/create.md b/examples/2.3.x/server-python/examples/users/create.md new file mode 100644 index 000000000..0a7a7eeeb --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/create.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.create( + user_id = '<USER_ID>', + email = 'email@example.com', # optional + phone = '+12065550100', # optional + password = 'password', # optional + name = '<NAME>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/delete-identity.md b/examples/2.3.x/server-python/examples/users/delete-identity.md new file mode 100644 index 000000000..06af66819 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/delete-identity.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users + +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 + +users = Users(client) + +result = users.delete_identity( + identity_id = '<IDENTITY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-python/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..67ab6b788 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.enums import AuthenticatorType + +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 + +users = Users(client) + +result = users.delete_mfa_authenticator( + user_id = '<USER_ID>', + type = AuthenticatorType.TOTP +) +``` diff --git a/examples/2.3.x/server-python/examples/users/delete-session.md b/examples/2.3.x/server-python/examples/users/delete-session.md new file mode 100644 index 000000000..31ac5246f --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/delete-session.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users + +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 + +users = Users(client) + +result = users.delete_session( + user_id = '<USER_ID>', + session_id = '<SESSION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/users/delete-sessions.md b/examples/2.3.x/server-python/examples/users/delete-sessions.md new file mode 100644 index 000000000..c600d4c30 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/delete-sessions.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users + +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 + +users = Users(client) + +result = users.delete_sessions( + user_id = '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/users/delete-target.md b/examples/2.3.x/server-python/examples/users/delete-target.md new file mode 100644 index 000000000..6dfbc7e53 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/delete-target.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users + +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 + +users = Users(client) + +result = users.delete_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/users/delete.md b/examples/2.3.x/server-python/examples/users/delete.md new file mode 100644 index 000000000..8d236b4f7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users + +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 + +users = Users(client) + +result = users.delete( + user_id = '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-python/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..8dde75a73 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/get-mfa-challenge.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import MfaChallengeSecret + +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 + +users = Users(client) + +result: MfaChallengeSecret = users.get_mfa_challenge( + user_id = '<USER_ID>', + challenge_id = '<CHALLENGE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-python/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..058aedde1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import MfaRecoveryCodes + +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 + +users = Users(client) + +result: MfaRecoveryCodes = users.get_mfa_recovery_codes( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/get-prefs.md b/examples/2.3.x/server-python/examples/users/get-prefs.md new file mode 100644 index 000000000..093b92013 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/get-prefs.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import Preferences + +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 + +users = Users(client) + +result: Preferences = users.get_prefs( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/get-target.md b/examples/2.3.x/server-python/examples/users/get-target.md new file mode 100644 index 000000000..38a7d63d7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/get-target.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import Target + +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 + +users = Users(client) + +result: Target = users.get_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/get.md b/examples/2.3.x/server-python/examples/users/get.md new file mode 100644 index 000000000..941d428ae --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.get( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/list-identities.md b/examples/2.3.x/server-python/examples/users/list-identities.md new file mode 100644 index 000000000..c6e7d8dcb --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/list-identities.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import IdentityList + +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 + +users = Users(client) + +result: IdentityList = users.list_identities( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/list-memberships.md b/examples/2.3.x/server-python/examples/users/list-memberships.md new file mode 100644 index 000000000..c64d7ba55 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/list-memberships.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import MembershipList + +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 + +users = Users(client) + +result: MembershipList = users.list_memberships( + user_id = '<USER_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/list-mfa-factors.md b/examples/2.3.x/server-python/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..69f5a56ff --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/list-mfa-factors.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import MfaFactors + +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 + +users = Users(client) + +result: MfaFactors = users.list_mfa_factors( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/list-sessions.md b/examples/2.3.x/server-python/examples/users/list-sessions.md new file mode 100644 index 000000000..e8abced45 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/list-sessions.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import SessionList + +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 + +users = Users(client) + +result: SessionList = users.list_sessions( + user_id = '<USER_ID>', + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/list-targets.md b/examples/2.3.x/server-python/examples/users/list-targets.md new file mode 100644 index 000000000..e043866f3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/list-targets.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import TargetList + +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 + +users = Users(client) + +result: TargetList = users.list_targets( + user_id = '<USER_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/list.md b/examples/2.3.x/server-python/examples/users/list.md new file mode 100644 index 000000000..0d623a776 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import UserList + +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 + +users = Users(client) + +result: UserList = users.list( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-email-verification.md b/examples/2.3.x/server-python/examples/users/update-email-verification.md new file mode 100644 index 000000000..8fd05134e --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-email-verification.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_email_verification( + user_id = '<USER_ID>', + email_verification = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-email.md b/examples/2.3.x/server-python/examples/users/update-email.md new file mode 100644 index 000000000..7dcf066f3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-email.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_email( + user_id = '<USER_ID>', + email = 'email@example.com' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-impersonator.md b/examples/2.3.x/server-python/examples/users/update-impersonator.md new file mode 100644 index 000000000..38fae13ca --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-impersonator.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_impersonator( + user_id = '<USER_ID>', + impersonator = False +) + +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 new file mode 100644 index 000000000..bffba0c1e --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-labels.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_labels( + user_id = '<USER_ID>', + labels = [] +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-python/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..c9090ee85 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import MfaRecoveryCodes + +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 + +users = Users(client) + +result: MfaRecoveryCodes = users.update_mfa_recovery_codes( + user_id = '<USER_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-mfa.md b/examples/2.3.x/server-python/examples/users/update-mfa.md new file mode 100644 index 000000000..4dda390c2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-mfa.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_mfa( + user_id = '<USER_ID>', + mfa = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-name.md b/examples/2.3.x/server-python/examples/users/update-name.md new file mode 100644 index 000000000..248411be2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-name.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_name( + user_id = '<USER_ID>', + name = '<NAME>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-password.md b/examples/2.3.x/server-python/examples/users/update-password.md new file mode 100644 index 000000000..d0238ec38 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-password.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_password( + user_id = '<USER_ID>', + password = 'password' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-phone-verification.md b/examples/2.3.x/server-python/examples/users/update-phone-verification.md new file mode 100644 index 000000000..6b3120221 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-phone-verification.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_phone_verification( + user_id = '<USER_ID>', + phone_verification = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-phone.md b/examples/2.3.x/server-python/examples/users/update-phone.md new file mode 100644 index 000000000..82f8e15fe --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-phone.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_phone( + user_id = '<USER_ID>', + number = '+12065550100' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-prefs.md b/examples/2.3.x/server-python/examples/users/update-prefs.md new file mode 100644 index 000000000..6d1f043b1 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-prefs.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import Preferences + +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 + +users = Users(client) + +result: Preferences = users.update_prefs( + user_id = '<USER_ID>', + prefs = {} +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-status.md b/examples/2.3.x/server-python/examples/users/update-status.md new file mode 100644 index 000000000..fcf8d0e5e --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-status.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import User + +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 + +users = Users(client) + +result: User = users.update_status( + user_id = '<USER_ID>', + status = False +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/users/update-target.md b/examples/2.3.x/server-python/examples/users/update-target.md new file mode 100644 index 000000000..1a7c5f107 --- /dev/null +++ b/examples/2.3.x/server-python/examples/users/update-target.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.models import Target + +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 + +users = Users(client) + +result: Target = users.update_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + identifier = '<IDENTIFIER>', # optional + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) + +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 new file mode 100644 index 000000000..793aa3f5d --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import VectorsdbCollection +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.create_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + dimension = 1, + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create-document.md b/examples/2.3.x/server-python/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..d5675d864 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-document.md @@ -0,0 +1,35 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.create_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..b84eea6d5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.create_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-python/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..bd8fe7bb0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-failover.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DedicatedDatabase + +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 + +vectors_db = VectorsDB(client) + +result: DedicatedDatabase = vectors_db.create_failover( + database_id = '<DATABASE_ID>', + target_replica_id = '<TARGET_REPLICA_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..2f5bf2564 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-index.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Index +from appwrite.enums import VectorsDBIndexType +from appwrite.enums import OrderBy + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Index = vectors_db.create_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>', + type = VectorsDBIndexType.HNSW_EUCLIDEAN, + attributes = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..e19a89363 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-operations.md @@ -0,0 +1,29 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.create_operations( + transaction_id = '<TRANSACTION_ID>', + operations = [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create-query.md b/examples/2.3.x/server-python/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..093a4653f --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-query.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.create_query( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-python/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..6b6cd6316 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create.md b/examples/2.3.x/server-python/examples/vectorsdb/create.md new file mode 100644 index 000000000..a77a3a380 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/create.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Database + +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 + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-python/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..b96a628bb --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/delete-collection.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-python/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..3915b9379 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + transaction_id = '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..f1bee6ee3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/delete-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.delete_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-python/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..834b45ccf --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/delete-index.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-python/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..58a367f73 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_transaction( + transaction_id = '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/delete.md b/examples/2.3.x/server-python/examples/vectorsdb/delete.md new file mode 100644 index 000000000..da1c5a491 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result = vectors_db.delete( + database_id = '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-python/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..2616d72a2 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/get-collection.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import VectorsdbCollection + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.get_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/get-document.md b/examples/2.3.x/server-python/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..a484c5ddb --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/get-document.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Document + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.get_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/get-index.md b/examples/2.3.x/server-python/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..b7a8726b0 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/get-index.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Index + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Index = vectors_db.get_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '<KEY>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-python/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..af8e01ab5 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/get-replicas.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DedicatedDatabaseReplicas + +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 + +vectors_db = VectorsDB(client) + +result: DedicatedDatabaseReplicas = vectors_db.get_replicas( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/get-status.md b/examples/2.3.x/server-python/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..8d34903e4 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/get-status.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DatabaseStatus + +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 + +vectors_db = VectorsDB(client) + +result: DatabaseStatus = vectors_db.get_status( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-python/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..601ed0b04 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/get-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.get_transaction( + transaction_id = '<TRANSACTION_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/get.md b/examples/2.3.x/server-python/examples/vectorsdb/get.md new file mode 100644 index 000000000..b251b427e --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Database + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.get( + database_id = '<DATABASE_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-python/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..184c3c3f6 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/list-collections.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import VectorsdbCollectionList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: VectorsdbCollectionList = vectors_db.list_collections( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-python/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..5ac3ab2fe --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/list-documents.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.list_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + transaction_id = '<TRANSACTION_ID>', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-python/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..c72e98002 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/list-indexes.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import IndexList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: IndexList = vectors_db.list_indexes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-python/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..14f399b7b --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/list-operations.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DedicatedDatabaseOperationList + +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 + +vectors_db = VectorsDB(client) + +result: DedicatedDatabaseOperationList = vectors_db.list_operations( + database_id = '<DATABASE_ID>', + status = 'queued', # optional + limit = 1, # optional + offset = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-python/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..fdff8182e --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/list-specifications.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DedicatedDatabaseSpecificationList + +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 + +vectors_db = VectorsDB(client) + +result: DedicatedDatabaseSpecificationList = vectors_db.list_specifications() + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..d21db0122 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/list-transactions.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import TransactionList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: TransactionList = vectors_db.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/list.md b/examples/2.3.x/server-python/examples/vectorsdb/list.md new file mode 100644 index 000000000..d7cd9298a --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/list.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DatabaseList + +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 + +vectors_db = VectorsDB(client) + +result: DatabaseList = vectors_db.list( + 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 new file mode 100644 index 000000000..3dcf8903e --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/update-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import VectorsdbCollection +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.update_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + dimension = 1, # optional + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/update-document.md b/examples/2.3.x/server-python/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..c70c2bc16 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/update-document.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.update_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-python/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..5c947cd1a --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/update-documents.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.update_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + data = {}, # optional + queries = [], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-python/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..276c25c85 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/update-transaction.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.update_transaction( + transaction_id = '<TRANSACTION_ID>', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/update.md b/examples/2.3.x/server-python/examples/vectorsdb/update.md new file mode 100644 index 000000000..23ae94294 --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/update.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Database + +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 + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False, # optional + specification = 'serverless', # optional + replicas = 0, # optional + sync_mode = 'async' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-python/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..95f916d3e --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/upsert-document.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.upsert_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` 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 new file mode 100644 index 000000000..5eb3d2d1a --- /dev/null +++ b/examples/2.3.x/server-python/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://<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 + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.upsert_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [], + transaction_id = '<TRANSACTION_ID>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/webhooks/create.md b/examples/2.3.x/server-python/examples/webhooks/create.md new file mode 100644 index 000000000..ed957a41e --- /dev/null +++ b/examples/2.3.x/server-python/examples/webhooks/create.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.webhooks import Webhooks +from appwrite.models import Webhook + +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 + +webhooks = Webhooks(client) + +result: Webhook = webhooks.create( + webhook_id = '<WEBHOOK_ID>', + url = 'https://example.com/webhook', + name = '<NAME>', + events = [], + enabled = False, # optional + tls = False, # optional + auth_username = '<AUTH_USERNAME>', # optional + auth_password = 'password', # optional + secret = '<SECRET>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/webhooks/delete.md b/examples/2.3.x/server-python/examples/webhooks/delete.md new file mode 100644 index 000000000..1b6cbdb38 --- /dev/null +++ b/examples/2.3.x/server-python/examples/webhooks/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.webhooks import Webhooks + +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 + +webhooks = Webhooks(client) + +result = webhooks.delete( + webhook_id = '<WEBHOOK_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/webhooks/get.md b/examples/2.3.x/server-python/examples/webhooks/get.md new file mode 100644 index 000000000..e24808ce3 --- /dev/null +++ b/examples/2.3.x/server-python/examples/webhooks/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.webhooks import Webhooks +from appwrite.models import Webhook + +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 + +webhooks = Webhooks(client) + +result: Webhook = webhooks.get( + webhook_id = '<WEBHOOK_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/webhooks/list.md b/examples/2.3.x/server-python/examples/webhooks/list.md new file mode 100644 index 000000000..0bb232043 --- /dev/null +++ b/examples/2.3.x/server-python/examples/webhooks/list.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.webhooks import Webhooks +from appwrite.models import WebhookList + +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 + +webhooks = Webhooks(client) + +result: WebhookList = webhooks.list( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/webhooks/update-secret.md b/examples/2.3.x/server-python/examples/webhooks/update-secret.md new file mode 100644 index 000000000..5e38b24b9 --- /dev/null +++ b/examples/2.3.x/server-python/examples/webhooks/update-secret.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.webhooks import Webhooks +from appwrite.models import Webhook + +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 + +webhooks = Webhooks(client) + +result: Webhook = webhooks.update_secret( + webhook_id = '<WEBHOOK_ID>', + secret = '<SECRET>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/webhooks/update.md b/examples/2.3.x/server-python/examples/webhooks/update.md new file mode 100644 index 000000000..a6d3ac7b7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/webhooks/update.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.webhooks import Webhooks +from appwrite.models import Webhook + +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 + +webhooks = Webhooks(client) + +result: Webhook = webhooks.update( + webhook_id = '<WEBHOOK_ID>', + name = '<NAME>', + url = 'https://example.com/webhook', + events = [], + enabled = False, # optional + tls = False, # optional + auth_username = '<AUTH_USERNAME>', # optional + auth_password = 'password' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-anonymous-session.md b/examples/2.3.x/server-rest/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..da7ca670a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +```http +POST /v1/account/sessions/anonymous 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/account/create-email-password-session.md b/examples/2.3.x/server-rest/examples/account/create-email-password-session.md new file mode 100644 index 000000000..bd8c32a48 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/sessions/email 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> + +{ + "email": "email@example.com", + "password": "password" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-email-token.md b/examples/2.3.x/server-rest/examples/account/create-email-token.md new file mode 100644 index 000000000..4d23eba86 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +```http +POST /v1/account/tokens/email 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "phrase": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-rest/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..d421b844e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-email-verification-otp.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/verifications/email/otp 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> + +{ + "phrase": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-email-verification.md b/examples/2.3.x/server-rest/examples/account/create-email-verification.md new file mode 100644 index 000000000..15d915105 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-email-verification.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/verifications/email 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> + +{ + "url": "https://example.com" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-id-token-session.md b/examples/2.3.x/server-rest/examples/account/create-id-token-session.md new file mode 100644 index 000000000..071fb8671 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-id-token-session.md @@ -0,0 +1,17 @@ +```http +POST /v1/account/sessions/id-token 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> + +{ + "provider": "apple", + "idToken": "<ID_TOKEN>", + "nonce": "<NONCE>", + "accessToken": "<ACCESS_TOKEN>", + "accessTokenExpiry": 0, + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-magic-url-token.md b/examples/2.3.x/server-rest/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..ec06742ed --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-magic-url-token.md @@ -0,0 +1,15 @@ +```http +POST /v1/account/tokens/magic-url 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "url": "https://example.com", + "phrase": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-rest/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..ec9fdd1c2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-mfa-authenticator.md @@ -0,0 +1,9 @@ +```http +POST /v1/account/mfa/authenticators/{type} 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/account/create-mfa-challenge.md b/examples/2.3.x/server-rest/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..433721513 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-mfa-challenge.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/mfa/challenges 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> + +{ + "factor": "email" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-rest/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..336eaac4d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```http +POST /v1/account/mfa/recovery-codes 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/account/create-o-auth-2-token.md b/examples/2.3.x/server-rest/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..b08d6fb23 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-o-auth-2-token.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +Accept: text/html +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-phone-token.md b/examples/2.3.x/server-rest/examples/account/create-phone-token.md new file mode 100644 index 000000000..460bbf349 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/tokens/phone 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> + +{ + "userId": "<USER_ID>", + "phone": "+12065550100" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-phone-verification.md b/examples/2.3.x/server-rest/examples/account/create-phone-verification.md new file mode 100644 index 000000000..7a88ab610 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-phone-verification.md @@ -0,0 +1,9 @@ +```http +POST /v1/account/verifications/phone 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/account/create-recovery-otp.md b/examples/2.3.x/server-rest/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..74da36ea9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-recovery-otp.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/recovery/otp 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> + +{ + "email": "email@example.com", + "phrase": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-recovery.md b/examples/2.3.x/server-rest/examples/account/create-recovery.md new file mode 100644 index 000000000..8e11c70e2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/recovery 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> + +{ + "email": "email@example.com", + "url": "https://example.com" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-session.md b/examples/2.3.x/server-rest/examples/account/create-session.md new file mode 100644 index 000000000..5ad02ccdc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-session.md @@ -0,0 +1,13 @@ +```http +POST /v1/account/sessions/token 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create-verification.md b/examples/2.3.x/server-rest/examples/account/create-verification.md new file mode 100644 index 000000000..15d915105 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create-verification.md @@ -0,0 +1,12 @@ +```http +POST /v1/account/verifications/email 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> + +{ + "url": "https://example.com" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/create.md b/examples/2.3.x/server-rest/examples/account/create.md new file mode 100644 index 000000000..b61fd268c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/create.md @@ -0,0 +1,15 @@ +```http +POST /v1/account 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/delete-consent-token.md b/examples/2.3.x/server-rest/examples/account/delete-consent-token.md new file mode 100644 index 000000000..be7e1e558 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/delete-consent-token.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/consents/{consentId}/tokens/{tokenId} 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/account/delete-consent.md b/examples/2.3.x/server-rest/examples/account/delete-consent.md new file mode 100644 index 000000000..a05664502 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/delete-consent.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/consents/{consentId} 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/account/delete-identity.md b/examples/2.3.x/server-rest/examples/account/delete-identity.md new file mode 100644 index 000000000..0d66a32ad --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/delete-identity.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/identities/{identityId} 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/account/delete-mfa-authenticator.md b/examples/2.3.x/server-rest/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..8b234af52 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/mfa/authenticators/{type} 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/account/delete-session.md b/examples/2.3.x/server-rest/examples/account/delete-session.md new file mode 100644 index 000000000..208f07822 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/delete-session.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/sessions/{sessionId} 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/account/delete-sessions.md b/examples/2.3.x/server-rest/examples/account/delete-sessions.md new file mode 100644 index 000000000..5cffb6a79 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/delete-sessions.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/account/sessions 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/account/get-consent-token.md b/examples/2.3.x/server-rest/examples/account/get-consent-token.md new file mode 100644 index 000000000..68ea281a4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/get-consent-token.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/consents/{consentId}/tokens/{tokenId} 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/account/get-consent.md b/examples/2.3.x/server-rest/examples/account/get-consent.md new file mode 100644 index 000000000..a817f312f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/get-consent.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/consents/{consentId} 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/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-rest/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..7eeb0659b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/mfa/recovery-codes 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/account/get-prefs.md b/examples/2.3.x/server-rest/examples/account/get-prefs.md new file mode 100644 index 000000000..5a7a22bd8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/get-prefs.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/prefs 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/account/get-session.md b/examples/2.3.x/server-rest/examples/account/get-session.md new file mode 100644 index 000000000..bfe859f6b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/get-session.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/sessions/{sessionId} 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/account/get.md b/examples/2.3.x/server-rest/examples/account/get.md new file mode 100644 index 000000000..c59eb46eb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/account 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/account/list-consent-tokens.md b/examples/2.3.x/server-rest/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..c68cac352 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/list-consent-tokens.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/consents/{consentId}/tokens 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/account/list-consents.md b/examples/2.3.x/server-rest/examples/account/list-consents.md new file mode 100644 index 000000000..4ce873930 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/list-consents.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/consents 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/account/list-identities.md b/examples/2.3.x/server-rest/examples/account/list-identities.md new file mode 100644 index 000000000..38b27ad4f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/list-identities.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/identities 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/account/list-mfa-factors.md b/examples/2.3.x/server-rest/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..72a32ac4e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/list-mfa-factors.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/mfa/factors 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/account/list-sessions.md b/examples/2.3.x/server-rest/examples/account/list-sessions.md new file mode 100644 index 000000000..30a533aa3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/list-sessions.md @@ -0,0 +1,7 @@ +```http +GET /v1/account/sessions 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/account/update-email-verification-otp.md b/examples/2.3.x/server-rest/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..0cacdbf15 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-email-verification-otp.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/verifications/email/otp 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-email-verification.md b/examples/2.3.x/server-rest/examples/account/update-email-verification.md new file mode 100644 index 000000000..4337185e9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-email-verification.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/verifications/email 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-email.md b/examples/2.3.x/server-rest/examples/account/update-email.md new file mode 100644 index 000000000..5ee0833fb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-email.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/account/email 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> + +{ + "email": "email@example.com", + "password": "password" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-magic-url-session.md b/examples/2.3.x/server-rest/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..7f9a3152a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-magic-url-session.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/sessions/magic-url 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-rest/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..d8e514901 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-mfa-authenticator.md @@ -0,0 +1,12 @@ +```http +PUT /v1/account/mfa/authenticators/{type} 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> + +{ + "otp": "<OTP>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-rest/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..e99f2e12c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/mfa/challenges 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> + +{ + "challengeId": "<CHALLENGE_ID>", + "otp": "<OTP>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-rest/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..c2e49f97b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/account/mfa/recovery-codes 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/account/update-mfa.md b/examples/2.3.x/server-rest/examples/account/update-mfa.md new file mode 100644 index 000000000..99eda3b60 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-mfa.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/account/mfa 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> + +{ + "mfa": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-name.md b/examples/2.3.x/server-rest/examples/account/update-name.md new file mode 100644 index 000000000..922865105 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-name.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/account/name 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>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-password.md b/examples/2.3.x/server-rest/examples/account/update-password.md new file mode 100644 index 000000000..a18cdf9ba --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-password.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/account/password 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> + +{ + "password": "password", + "oldPassword": "password" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-phone-session.md b/examples/2.3.x/server-rest/examples/account/update-phone-session.md new file mode 100644 index 000000000..b345acc0a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/sessions/phone 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-phone-verification.md b/examples/2.3.x/server-rest/examples/account/update-phone-verification.md new file mode 100644 index 000000000..0fc920d28 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/verifications/phone 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-phone.md b/examples/2.3.x/server-rest/examples/account/update-phone.md new file mode 100644 index 000000000..41518a1d3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-phone.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/account/phone 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> + +{ + "phone": "+12065550100", + "password": "password" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-prefs.md b/examples/2.3.x/server-rest/examples/account/update-prefs.md new file mode 100644 index 000000000..596c84fe0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-prefs.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/account/prefs 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> + +{ + "prefs": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-recovery-otp.md b/examples/2.3.x/server-rest/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..e9f7e598e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-recovery-otp.md @@ -0,0 +1,14 @@ +```http +PUT /v1/account/recovery/otp 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>", + "password": "password" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-recovery.md b/examples/2.3.x/server-rest/examples/account/update-recovery.md new file mode 100644 index 000000000..e94a20600 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +```http +PUT /v1/account/recovery 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>", + "password": "password" +} +``` diff --git a/examples/2.3.x/server-rest/examples/account/update-session.md b/examples/2.3.x/server-rest/examples/account/update-session.md new file mode 100644 index 000000000..24f2398d5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-session.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/account/sessions/{sessionId} 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/account/update-status.md b/examples/2.3.x/server-rest/examples/account/update-status.md new file mode 100644 index 000000000..bb32e42c9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-status.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/account/status 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/account/update-verification.md b/examples/2.3.x/server-rest/examples/account/update-verification.md new file mode 100644 index 000000000..4337185e9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/account/update-verification.md @@ -0,0 +1,13 @@ +```http +PUT /v1/account/verifications/email 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/activities/get-event.md b/examples/2.3.x/server-rest/examples/activities/get-event.md new file mode 100644 index 000000000..b34c434fc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/activities/get-event.md @@ -0,0 +1,7 @@ +```http +GET /v1/activities/events/{eventId} 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/activities/list-events.md b/examples/2.3.x/server-rest/examples/activities/list-events.md new file mode 100644 index 000000000..187b0a292 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/activities/list-events.md @@ -0,0 +1,7 @@ +```http +GET /v1/activities/events 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/advisor/delete-report.md b/examples/2.3.x/server-rest/examples/advisor/delete-report.md new file mode 100644 index 000000000..29daf2a34 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/advisor/delete-report.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/reports/{reportId} 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/advisor/get-insight.md b/examples/2.3.x/server-rest/examples/advisor/get-insight.md new file mode 100644 index 000000000..2a23e3ad0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/advisor/get-insight.md @@ -0,0 +1,7 @@ +```http +GET /v1/reports/{reportId}/insights/{insightId} 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/advisor/get-report.md b/examples/2.3.x/server-rest/examples/advisor/get-report.md new file mode 100644 index 000000000..da2a2d425 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/advisor/get-report.md @@ -0,0 +1,7 @@ +```http +GET /v1/reports/{reportId} 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/advisor/list-insights.md b/examples/2.3.x/server-rest/examples/advisor/list-insights.md new file mode 100644 index 000000000..e38a0ae7a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/advisor/list-insights.md @@ -0,0 +1,7 @@ +```http +GET /v1/reports/{reportId}/insights 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/advisor/list-reports.md b/examples/2.3.x/server-rest/examples/advisor/list-reports.md new file mode 100644 index 000000000..498a99ee4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/advisor/list-reports.md @@ -0,0 +1,7 @@ +```http +GET /v1/reports 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/apps/create-installation-token.md b/examples/2.3.x/server-rest/examples/apps/create-installation-token.md new file mode 100644 index 000000000..4de00ce8c --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/apps/create-key.md b/examples/2.3.x/server-rest/examples/apps/create-key.md new file mode 100644 index 000000000..4cde099e7 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/apps/create-secret.md b/examples/2.3.x/server-rest/examples/apps/create-secret.md new file mode 100644 index 000000000..bf47e198d --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/apps/create.md b/examples/2.3.x/server-rest/examples/apps/create.md new file mode 100644 index 000000000..cbf6e809b --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +{ + "appId": "<APP_ID>", + "name": "<NAME>", + "description": "<DESCRIPTION>", + "clientUri": "https://example.com", + "logoUri": "https://example.com", + "privacyPolicyUrl": "https://example.com", + "termsUrl": "https://example.com", + "contacts": [], + "tagline": "<TAGLINE>", + "tags": [], + "images": [], + "supportUrl": "https://example.com", + "dataDeletionUrl": "https://example.com", + "redirectUris": [], + "postLogoutRedirectUris": [], + "enabled": false, + "type": "public", + "deviceFlow": false, + "teamId": "<TEAM_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/apps/delete-installation.md b/examples/2.3.x/server-rest/examples/apps/delete-installation.md new file mode 100644 index 000000000..aea259673 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/apps/delete-key.md b/examples/2.3.x/server-rest/examples/apps/delete-key.md new file mode 100644 index 000000000..d9035c0b7 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/apps/delete-secret.md b/examples/2.3.x/server-rest/examples/apps/delete-secret.md new file mode 100644 index 000000000..2e4ae9a25 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/apps/delete-tokens.md b/examples/2.3.x/server-rest/examples/apps/delete-tokens.md new file mode 100644 index 000000000..5bfc608c0 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/apps/delete.md b/examples/2.3.x/server-rest/examples/apps/delete.md new file mode 100644 index 000000000..cc52e59b9 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/apps/get-installation.md b/examples/2.3.x/server-rest/examples/apps/get-installation.md new file mode 100644 index 000000000..0f6b4a05d --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/get-key.md b/examples/2.3.x/server-rest/examples/apps/get-key.md new file mode 100644 index 000000000..bfe359869 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/get-secret.md b/examples/2.3.x/server-rest/examples/apps/get-secret.md new file mode 100644 index 000000000..53b7c8531 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/get.md b/examples/2.3.x/server-rest/examples/apps/get.md new file mode 100644 index 000000000..869a639a9 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-rest/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..e758a4dfa --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/list-installations.md b/examples/2.3.x/server-rest/examples/apps/list-installations.md new file mode 100644 index 000000000..8f7e64009 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/list-keys.md b/examples/2.3.x/server-rest/examples/apps/list-keys.md new file mode 100644 index 000000000..0e75e1350 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-rest/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..9de4b7b4e --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/list-secrets.md b/examples/2.3.x/server-rest/examples/apps/list-secrets.md new file mode 100644 index 000000000..b9cba54b3 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/list.md b/examples/2.3.x/server-rest/examples/apps/list.md new file mode 100644 index 000000000..2002bbac3 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/apps/update-labels.md b/examples/2.3.x/server-rest/examples/apps/update-labels.md new file mode 100644 index 000000000..119d547dd --- /dev/null +++ b/examples/2.3.x/server-rest/examples/apps/update-labels.md @@ -0,0 +1,12 @@ +```http +PUT /v1/apps/{appId}/labels 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> + +{ + "labels": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/apps/update-team.md b/examples/2.3.x/server-rest/examples/apps/update-team.md new file mode 100644 index 000000000..36db6e7b2 --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +{ + "teamId": "<TEAM_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/apps/update.md b/examples/2.3.x/server-rest/examples/apps/update.md new file mode 100644 index 000000000..b531f1a6f --- /dev/null +++ b/examples/2.3.x/server-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: <YOUR_PROJECT_ID> + +{ + "name": "<NAME>", + "description": "<DESCRIPTION>", + "clientUri": "https://example.com", + "logoUri": "https://example.com", + "privacyPolicyUrl": "https://example.com", + "termsUrl": "https://example.com", + "contacts": [], + "tagline": "<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/server-rest/examples/avatars/get-browser.md b/examples/2.3.x/server-rest/examples/avatars/get-browser.md new file mode 100644 index 000000000..8d54b1773 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-browser.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/get-credit-card.md b/examples/2.3.x/server-rest/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..77de1b29a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/get-favicon.md b/examples/2.3.x/server-rest/examples/avatars/get-favicon.md new file mode 100644 index 000000000..01d1d0e6b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/favicon HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/get-flag.md b/examples/2.3.x/server-rest/examples/avatars/get-flag.md new file mode 100644 index 000000000..38968e37f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-flag.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/get-image.md b/examples/2.3.x/server-rest/examples/avatars/get-image.md new file mode 100644 index 000000000..bb4ae20d4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-image.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/image HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/get-initials.md b/examples/2.3.x/server-rest/examples/avatars/get-initials.md new file mode 100644 index 000000000..2f2d34c42 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-initials.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/initials HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/get-photo.md b/examples/2.3.x/server-rest/examples/avatars/get-photo.md new file mode 100644 index 000000000..e5b593919 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-photo.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/photo HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/get-qr.md b/examples/2.3.x/server-rest/examples/avatars/get-qr.md new file mode 100644 index 000000000..088b3970b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-qr.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/qr HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/get-screenshot.md b/examples/2.3.x/server-rest/examples/avatars/get-screenshot.md new file mode 100644 index 000000000..82f4a41cf --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/get-screenshot.md @@ -0,0 +1,7 @@ +```http +GET /v1/avatars/screenshots HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/png +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/backups/create-archive.md b/examples/2.3.x/server-rest/examples/backups/create-archive.md new file mode 100644 index 000000000..e740e2e0c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/create-archive.md @@ -0,0 +1,13 @@ +```http +POST /v1/backups/archives 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> + +{ + "services": [], + "resourceId": "<RESOURCE_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/backups/create-policy.md b/examples/2.3.x/server-rest/examples/backups/create-policy.md new file mode 100644 index 000000000..5f4093a94 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/create-policy.md @@ -0,0 +1,18 @@ +```http +POST /v1/backups/policies 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> + +{ + "policyId": "<POLICY_ID>", + "name": "<NAME>", + "services": [], + "resourceId": "<RESOURCE_ID>", + "enabled": false, + "retention": 1, + "schedule": "" +} +``` diff --git a/examples/2.3.x/server-rest/examples/backups/create-restoration.md b/examples/2.3.x/server-rest/examples/backups/create-restoration.md new file mode 100644 index 000000000..a84f7f804 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/create-restoration.md @@ -0,0 +1,15 @@ +```http +POST /v1/backups/restoration 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> + +{ + "archiveId": "<ARCHIVE_ID>", + "services": [], + "newResourceId": "<NEW_RESOURCE_ID>", + "newResourceName": "<NEW_RESOURCE_NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/backups/delete-archive.md b/examples/2.3.x/server-rest/examples/backups/delete-archive.md new file mode 100644 index 000000000..d95b4c3ee --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/delete-archive.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/backups/archives/{archiveId} 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/backups/delete-policy.md b/examples/2.3.x/server-rest/examples/backups/delete-policy.md new file mode 100644 index 000000000..47e3e587b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/delete-policy.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/backups/policies/{policyId} 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/backups/get-archive.md b/examples/2.3.x/server-rest/examples/backups/get-archive.md new file mode 100644 index 000000000..045679532 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/get-archive.md @@ -0,0 +1,7 @@ +```http +GET /v1/backups/archives/{archiveId} 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/backups/get-policy.md b/examples/2.3.x/server-rest/examples/backups/get-policy.md new file mode 100644 index 000000000..4f18d1252 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/get-policy.md @@ -0,0 +1,7 @@ +```http +GET /v1/backups/policies/{policyId} 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/backups/get-restoration.md b/examples/2.3.x/server-rest/examples/backups/get-restoration.md new file mode 100644 index 000000000..6a7d7130f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/get-restoration.md @@ -0,0 +1,7 @@ +```http +GET /v1/backups/restorations/{restorationId} 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/backups/list-archives.md b/examples/2.3.x/server-rest/examples/backups/list-archives.md new file mode 100644 index 000000000..18761e131 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/list-archives.md @@ -0,0 +1,7 @@ +```http +GET /v1/backups/archives 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/backups/list-policies.md b/examples/2.3.x/server-rest/examples/backups/list-policies.md new file mode 100644 index 000000000..c6924874b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/list-policies.md @@ -0,0 +1,7 @@ +```http +GET /v1/backups/policies 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/backups/list-restorations.md b/examples/2.3.x/server-rest/examples/backups/list-restorations.md new file mode 100644 index 000000000..4f610b9a6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/list-restorations.md @@ -0,0 +1,7 @@ +```http +GET /v1/backups/restorations 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/backups/update-policy.md b/examples/2.3.x/server-rest/examples/backups/update-policy.md new file mode 100644 index 000000000..0f0424447 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/backups/update-policy.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/backups/policies/{policyId} 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>", + "retention": 1, + "schedule": "", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..ea40d305c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-big-int-attribute.md @@ -0,0 +1,17 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/bigint 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> + +{ + "key": "<KEY>", + "required": false, + "min": 0, + "max": 1000000, + "default": 0, + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..34f78b964 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-boolean-attribute.md @@ -0,0 +1,15 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean 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> + +{ + "key": "<KEY>", + "required": false, + "default": false, + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-collection.md b/examples/2.3.x/server-rest/examples/databases/create-collection.md new file mode 100644 index 000000000..ccfd8ed61 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +```http +POST /v1/databases/{databaseId}/collections 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> + +{ + "collectionId": "<COLLECTION_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false, + "attributes": [], + "indexes": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..e7c65e93a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-datetime-attribute.md @@ -0,0 +1,15 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime 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> + +{ + "key": "<KEY>", + "required": false, + "default": "2020-10-15T06:38:00.000+00:00", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-document.md b/examples/2.3.x/server-rest/examples/databases/create-document.md new file mode 100644 index 000000000..96ce28eda --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-document.md @@ -0,0 +1,21 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/documents 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> + +{ + "documentId": "<DOCUMENT_ID>", + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` 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 new file mode 100644 index 000000000..e367fe405 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-documents.md @@ -0,0 +1,13 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/documents 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> + +{ + "documents": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-email-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..878409f1c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-email-attribute.md @@ -0,0 +1,15 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/email 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> + +{ + "key": "<KEY>", + "required": false, + "default": "email@example.com", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..af894f31e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-enum-attribute.md @@ -0,0 +1,16 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum 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> + +{ + "key": "<KEY>", + "elements": ["active", "inactive"], + "required": false, + "default": "active", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-float-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..050a33d76 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-float-attribute.md @@ -0,0 +1,17 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/float 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> + +{ + "key": "<KEY>", + "required": false, + "min": 0, + "max": 100, + "default": 10.5, + "array": false +} +``` 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 new file mode 100644 index 000000000..d74b95b1b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-index.md @@ -0,0 +1,16 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/indexes 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> + +{ + "key": "<KEY>", + "type": "key", + "attributes": [], + "orders": [], + "lengths": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..06032cb3d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-integer-attribute.md @@ -0,0 +1,17 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer 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> + +{ + "key": "<KEY>", + "required": false, + "min": 0, + "max": 100, + "default": 10, + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..28b0cd89b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-ip-attribute.md @@ -0,0 +1,15 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip 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> + +{ + "key": "<KEY>", + "required": false, + "default": "192.0.2.0", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-line-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..fa0b8d658 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-line-attribute.md @@ -0,0 +1,14 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/line 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> + +{ + "key": "<KEY>", + "required": false, + "default": [[1, 2], [3, 4], [5, 6]] +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..29801f302 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-longtext-attribute.md @@ -0,0 +1,16 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/longtext 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> + +{ + "key": "<KEY>", + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..e4340d5bc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,16 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext 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> + +{ + "key": "<KEY>", + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-operations.md b/examples/2.3.x/server-rest/examples/databases/create-operations.md new file mode 100644 index 000000000..026d252a2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-operations.md @@ -0,0 +1,22 @@ +```http +POST /v1/databases/transactions/{transactionId}/operations 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> + +{ + "operations": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-point-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..5214a8cfc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-point-attribute.md @@ -0,0 +1,14 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/point 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> + +{ + "key": "<KEY>", + "required": false, + "default": [1, 2] +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..d5c74e47c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-polygon-attribute.md @@ -0,0 +1,14 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/polygon 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> + +{ + "key": "<KEY>", + "required": false, + "default": [[[1, 2], [3, 4], [5, 6], [1, 2]]] +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..26289e7c0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-relationship-attribute.md @@ -0,0 +1,17 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship 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> + +{ + "relatedCollectionId": "<RELATED_COLLECTION_ID>", + "type": "oneToOne", + "twoWay": false, + "key": "<KEY>", + "twoWayKey": "<TWO_WAY_KEY>", + "onDelete": "cascade" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-string-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..a3e4c8019 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-string-attribute.md @@ -0,0 +1,17 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/string 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> + +{ + "key": "<KEY>", + "size": 1, + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-text-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..b6ca51fb4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-text-attribute.md @@ -0,0 +1,16 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/text 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> + +{ + "key": "<KEY>", + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-transaction.md b/examples/2.3.x/server-rest/examples/databases/create-transaction.md new file mode 100644 index 000000000..9dcfe857d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-transaction.md @@ -0,0 +1,12 @@ +```http +POST /v1/databases/transactions 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> + +{ + "ttl": 60 +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-url-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..4f67eb380 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-url-attribute.md @@ -0,0 +1,15 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/url 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> + +{ + "key": "<KEY>", + "required": false, + "default": "https://example.com", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-rest/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..d69e1fb12 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create-varchar-attribute.md @@ -0,0 +1,17 @@ +```http +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/varchar 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> + +{ + "key": "<KEY>", + "size": 1, + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create.md b/examples/2.3.x/server-rest/examples/databases/create.md new file mode 100644 index 000000000..755a93eea --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/create.md @@ -0,0 +1,14 @@ +```http +POST /v1/databases 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> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-rest/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..1cbb1574a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/decrement-document-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "value": 1, + "min": 0, + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/delete-attribute.md b/examples/2.3.x/server-rest/examples/databases/delete-attribute.md new file mode 100644 index 000000000..a1af73798 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/delete-attribute.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} 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/databases/delete-collection.md b/examples/2.3.x/server-rest/examples/databases/delete-collection.md new file mode 100644 index 000000000..1ed84e320 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/delete-collection.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/{databaseId}/collections/{collectionId} 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/databases/delete-document.md b/examples/2.3.x/server-rest/examples/databases/delete-document.md new file mode 100644 index 000000000..b21e233a8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} 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/databases/delete-documents.md b/examples/2.3.x/server-rest/examples/databases/delete-documents.md new file mode 100644 index 000000000..2974dc3d2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/delete-documents.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents 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/databases/delete-index.md b/examples/2.3.x/server-rest/examples/databases/delete-index.md new file mode 100644 index 000000000..a5618b8a9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/delete-index.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} 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/databases/delete-transaction.md b/examples/2.3.x/server-rest/examples/databases/delete-transaction.md new file mode 100644 index 000000000..b998e9152 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/delete-transaction.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/transactions/{transactionId} 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/databases/delete.md b/examples/2.3.x/server-rest/examples/databases/delete.md new file mode 100644 index 000000000..01d423562 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/databases/{databaseId} 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/databases/get-attribute.md b/examples/2.3.x/server-rest/examples/databases/get-attribute.md new file mode 100644 index 000000000..34e41f393 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/get-attribute.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} 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/databases/get-collection.md b/examples/2.3.x/server-rest/examples/databases/get-collection.md new file mode 100644 index 000000000..b28b3dc2c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/get-collection.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId} 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/databases/get-document.md b/examples/2.3.x/server-rest/examples/databases/get-document.md new file mode 100644 index 000000000..a46fafbf4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/get-document.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} 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/databases/get-index.md b/examples/2.3.x/server-rest/examples/databases/get-index.md new file mode 100644 index 000000000..d37577bf1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/get-index.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} 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/databases/get-transaction.md b/examples/2.3.x/server-rest/examples/databases/get-transaction.md new file mode 100644 index 000000000..5cd851998 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/get-transaction.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/transactions/{transactionId} 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/databases/get.md b/examples/2.3.x/server-rest/examples/databases/get.md new file mode 100644 index 000000000..d03813d9b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId} 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/databases/increment-document-attribute.md b/examples/2.3.x/server-rest/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..10cf8831e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/increment-document-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "value": 1, + "max": 100, + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/list-attributes.md b/examples/2.3.x/server-rest/examples/databases/list-attributes.md new file mode 100644 index 000000000..e0ebcb438 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/list-attributes.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes 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/databases/list-collections.md b/examples/2.3.x/server-rest/examples/databases/list-collections.md new file mode 100644 index 000000000..f389330e3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/list-collections.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections 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/databases/list-documents.md b/examples/2.3.x/server-rest/examples/databases/list-documents.md new file mode 100644 index 000000000..c2786da53 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/list-documents.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId}/documents 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/databases/list-indexes.md b/examples/2.3.x/server-rest/examples/databases/list-indexes.md new file mode 100644 index 000000000..02ee4bb89 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/list-indexes.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes 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/databases/list-transactions.md b/examples/2.3.x/server-rest/examples/databases/list-transactions.md new file mode 100644 index 000000000..97f91e7e5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/list-transactions.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases/transactions 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/databases/list.md b/examples/2.3.x/server-rest/examples/databases/list.md new file mode 100644 index 000000000..6f6e9968b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/databases 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/databases/update-big-int-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..454dff5d5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-big-int-attribute.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/bigint/{key} 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> + +{ + "required": false, + "min": 0, + "max": 1000000, + "default": 0, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..03ad53a1d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-boolean-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} 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> + +{ + "required": false, + "default": false, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-collection.md b/examples/2.3.x/server-rest/examples/databases/update-collection.md new file mode 100644 index 000000000..140e6ee0c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-collection.md @@ -0,0 +1,16 @@ +```http +PUT /v1/databases/{databaseId}/collections/{collectionId} 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>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false, + "purge": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..632d4b99f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-datetime-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} 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> + +{ + "required": false, + "default": "2020-10-15T06:38:00.000+00:00", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-document.md b/examples/2.3.x/server-rest/examples/databases/update-document.md new file mode 100644 index 000000000..c83352f49 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-document.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} 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> + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-documents.md b/examples/2.3.x/server-rest/examples/databases/update-documents.md new file mode 100644 index 000000000..f91f218d6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-documents.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents 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> + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, + "queries": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-email-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..6c5f2892d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-email-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} 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> + +{ + "required": false, + "default": "email@example.com", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..1e4733cc2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-enum-attribute.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} 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> + +{ + "elements": ["active", "inactive"], + "required": false, + "default": "active", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-float-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..4175b542a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-float-attribute.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} 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> + +{ + "required": false, + "min": 0, + "max": 100, + "default": 10.5, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..cabe24395 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-integer-attribute.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} 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> + +{ + "required": false, + "min": 0, + "max": 100, + "default": 10, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..33e69da64 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-ip-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} 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> + +{ + "required": false, + "default": "192.0.2.0", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-line-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..f8234cb93 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-line-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/line/{key} 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> + +{ + "required": false, + "default": [[1, 2], [3, 4], [5, 6]], + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..b715be1e5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-longtext-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key} 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> + +{ + "required": false, + "default": "Hello World", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..a3dac9cb5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key} 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> + +{ + "required": false, + "default": "Hello World", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-point-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..4dd12ec4b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-point-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/point/{key} 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> + +{ + "required": false, + "default": [1, 2], + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..a8e5211d5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-polygon-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key} 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> + +{ + "required": false, + "default": [[[1, 2], [3, 4], [5, 6], [1, 2]]], + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..6ff7e7e99 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-relationship-attribute.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key} 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> + +{ + "onDelete": "cascade", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-string-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..e55332e7b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-string-attribute.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} 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> + +{ + "required": false, + "default": "Hello World", + "size": 1, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-text-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..3b38d8806 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-text-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/text/{key} 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> + +{ + "required": false, + "default": "Hello World", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-transaction.md b/examples/2.3.x/server-rest/examples/databases/update-transaction.md new file mode 100644 index 000000000..eedd39518 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-transaction.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/databases/transactions/{transactionId} 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> + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-url-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..5d8653e36 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-url-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} 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> + +{ + "required": false, + "default": "https://example.com", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-rest/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..28abaaa2f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update-varchar-attribute.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key} 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> + +{ + "required": false, + "default": "Hello World", + "size": 1, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/update.md b/examples/2.3.x/server-rest/examples/databases/update.md new file mode 100644 index 000000000..d10794f6d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/update.md @@ -0,0 +1,13 @@ +```http +PUT /v1/databases/{databaseId} 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>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/databases/upsert-document.md b/examples/2.3.x/server-rest/examples/databases/upsert-document.md new file mode 100644 index 000000000..144890b55 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/upsert-document.md @@ -0,0 +1,20 @@ +```http +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} 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> + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` 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 new file mode 100644 index 000000000..df6c8f7c3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/databases/upsert-documents.md @@ -0,0 +1,13 @@ +```http +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents 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> + +{ + "documents": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/create-collection.md b/examples/2.3.x/server-rest/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..7ec2f85dc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-collection.md @@ -0,0 +1,18 @@ +```http +POST /v1/documentsdb/{databaseId}/collections 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> + +{ + "collectionId": "<COLLECTION_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false, + "attributes": [], + "indexes": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/create-document.md b/examples/2.3.x/server-rest/examples/documentsdb/create-document.md new file mode 100644 index 000000000..ba48e0e19 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-document.md @@ -0,0 +1,21 @@ +```http +POST /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "documentId": "<DOCUMENT_ID>", + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "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 new file mode 100644 index 000000000..8ab99545a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-documents.md @@ -0,0 +1,13 @@ +```http +POST /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "documents": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/create-failover.md b/examples/2.3.x/server-rest/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..9520ac33d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-failover.md @@ -0,0 +1,12 @@ +```http +POST /v1/documentsdb/{databaseId}/failovers 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> + +{ + "targetReplicaId": "<TARGET_REPLICA_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 new file mode 100644 index 000000000..36d448ffe --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-index.md @@ -0,0 +1,16 @@ +```http +POST /v1/documentsdb/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "key": "<KEY>", + "type": "key", + "attributes": [], + "orders": [], + "lengths": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/create-operations.md b/examples/2.3.x/server-rest/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..07237f7d5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-operations.md @@ -0,0 +1,22 @@ +```http +POST /v1/documentsdb/transactions/{transactionId}/operations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "operations": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-rest/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..eba3f1c9c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-transaction.md @@ -0,0 +1,12 @@ +```http +POST /v1/documentsdb/transactions 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> + +{ + "ttl": 60 +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/create.md b/examples/2.3.x/server-rest/examples/documentsdb/create.md new file mode 100644 index 000000000..14f796814 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/create.md @@ -0,0 +1,17 @@ +```http +POST /v1/documentsdb 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> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false, + "specification": "serverless", + "replicas": 0, + "syncMode": "async" +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-rest/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..272ecfc7e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "value": 1, + "min": 0, + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-rest/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..5d5791634 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/delete-collection.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId} 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/documentsdb/delete-document.md b/examples/2.3.x/server-rest/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..3e0963a78 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/delete-document.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-rest/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..328602459 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/delete-documents.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/delete-index.md b/examples/2.3.x/server-rest/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..797959555 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/delete-index.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId}/indexes/{key} 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/documentsdb/delete-transaction.md b/examples/2.3.x/server-rest/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..49dcf3aa1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/documentsdb/transactions/{transactionId} 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/documentsdb/delete.md b/examples/2.3.x/server-rest/examples/documentsdb/delete.md new file mode 100644 index 000000000..4147bd1f9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/documentsdb/{databaseId} 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/documentsdb/get-collection.md b/examples/2.3.x/server-rest/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..cfed26999 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/get-collection.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId} 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/documentsdb/get-document.md b/examples/2.3.x/server-rest/examples/documentsdb/get-document.md new file mode 100644 index 000000000..0fd825fea --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/get-document.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} 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/documentsdb/get-index.md b/examples/2.3.x/server-rest/examples/documentsdb/get-index.md new file mode 100644 index 000000000..9a19cb9eb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/get-index.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/indexes/{key} 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/documentsdb/get-replicas.md b/examples/2.3.x/server-rest/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..3e6a03ef0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/get-replicas.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/replicas 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/documentsdb/get-status.md b/examples/2.3.x/server-rest/examples/documentsdb/get-status.md new file mode 100644 index 000000000..7aea5b9c8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/get-status.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/status 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/documentsdb/get-transaction.md b/examples/2.3.x/server-rest/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..e2c0c1efa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/get-transaction.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/transactions/{transactionId} 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/documentsdb/get.md b/examples/2.3.x/server-rest/examples/documentsdb/get.md new file mode 100644 index 000000000..54b412fc3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId} 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/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-rest/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..b49c29ce5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "value": 1, + "max": 100, + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/list-collections.md b/examples/2.3.x/server-rest/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..2f9c21ffc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/list-collections.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/collections 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/documentsdb/list-documents.md b/examples/2.3.x/server-rest/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..c4d6ce409 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/list-documents.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/documents 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/documentsdb/list-indexes.md b/examples/2.3.x/server-rest/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..739c3aaf1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/list-indexes.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/indexes 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/documentsdb/list-operations.md b/examples/2.3.x/server-rest/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..3489b9e64 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/list-operations.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/{databaseId}/operations 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/documentsdb/list-specifications.md b/examples/2.3.x/server-rest/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..d0aa15ed5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/list-specifications.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/specifications 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/documentsdb/list-transactions.md b/examples/2.3.x/server-rest/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..7b6db4f87 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/list-transactions.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb/transactions 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/documentsdb/list.md b/examples/2.3.x/server-rest/examples/documentsdb/list.md new file mode 100644 index 000000000..23aa1e3d4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/documentsdb 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/documentsdb/update-collection.md b/examples/2.3.x/server-rest/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..260e2b735 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/update-collection.md @@ -0,0 +1,16 @@ +```http +PUT /v1/documentsdb/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false, + "purge": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/update-document.md b/examples/2.3.x/server-rest/examples/documentsdb/update-document.md new file mode 100644 index 000000000..7cce98ab1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/update-document.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/update-documents.md b/examples/2.3.x/server-rest/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..8adab3142 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/update-documents.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "data": {}, + "queries": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-rest/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..ef88f9cd7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/update-transaction.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/documentsdb/transactions/{transactionId} 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> + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/update.md b/examples/2.3.x/server-rest/examples/documentsdb/update.md new file mode 100644 index 000000000..36fbb0063 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/update.md @@ -0,0 +1,16 @@ +```http +PUT /v1/documentsdb/{databaseId} 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>", + "enabled": false, + "specification": "serverless", + "replicas": 0, + "syncMode": "async" +} +``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-rest/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..3c5de683b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/upsert-document.md @@ -0,0 +1,14 @@ +```http +PUT /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` 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 new file mode 100644 index 000000000..ca8043608 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/documentsdb/upsert-documents.md @@ -0,0 +1,13 @@ +```http +PUT /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "documents": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-rest/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..c90411ae5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,9 @@ +```http +POST /v1/domains/{domainId}/presets/google-workspace 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/domains/create-preset-i-cloud.md b/examples/2.3.x/server-rest/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..23c60013e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,9 @@ +```http +POST /v1/domains/{domainId}/presets/icloud 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/domains/create-preset-mailgun.md b/examples/2.3.x/server-rest/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..8fa65eefe --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-preset-mailgun.md @@ -0,0 +1,9 @@ +```http +POST /v1/domains/{domainId}/presets/mailgun 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/domains/create-preset-outlook.md b/examples/2.3.x/server-rest/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..77ad67a84 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-preset-outlook.md @@ -0,0 +1,9 @@ +```http +POST /v1/domains/{domainId}/presets/outlook 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/domains/create-preset-proton-mail.md b/examples/2.3.x/server-rest/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..482a855c2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,9 @@ +```http +POST /v1/domains/{domainId}/presets/proton-mail 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/domains/create-preset-zoho.md b/examples/2.3.x/server-rest/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..d925606b3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-preset-zoho.md @@ -0,0 +1,9 @@ +```http +POST /v1/domains/{domainId}/presets/zoho 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/domains/create-record-a.md b/examples/2.3.x/server-rest/examples/domains/create-record-a.md new file mode 100644 index 000000000..18cac4bfe --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-a.md @@ -0,0 +1,15 @@ +```http +POST /v1/domains/{domainId}/records/a 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": "", + "value": "", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-rest/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..7011bc770 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-aaaa.md @@ -0,0 +1,15 @@ +```http +POST /v1/domains/{domainId}/records/aaaa 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": "", + "value": "", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-alias.md b/examples/2.3.x/server-rest/examples/domains/create-record-alias.md new file mode 100644 index 000000000..e1bc231f8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-alias.md @@ -0,0 +1,15 @@ +```http +POST /v1/domains/{domainId}/records/alias 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-caa.md b/examples/2.3.x/server-rest/examples/domains/create-record-caa.md new file mode 100644 index 000000000..66cf358eb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-caa.md @@ -0,0 +1,15 @@ +```http +POST /v1/domains/{domainId}/records/caa 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": "", + "value": "", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-cname.md b/examples/2.3.x/server-rest/examples/domains/create-record-cname.md new file mode 100644 index 000000000..46cc21338 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-cname.md @@ -0,0 +1,15 @@ +```http +POST /v1/domains/{domainId}/records/cname 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-https.md b/examples/2.3.x/server-rest/examples/domains/create-record-https.md new file mode 100644 index 000000000..21ed4d5a5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-https.md @@ -0,0 +1,15 @@ +```http +POST /v1/domains/{domainId}/records/https 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-mx.md b/examples/2.3.x/server-rest/examples/domains/create-record-mx.md new file mode 100644 index 000000000..57c476893 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-mx.md @@ -0,0 +1,16 @@ +```http +POST /v1/domains/{domainId}/records/mx 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": "", + "value": "<VALUE>", + "ttl": 1, + "priority": 0, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-ns.md b/examples/2.3.x/server-rest/examples/domains/create-record-ns.md new file mode 100644 index 000000000..1ee9c8aa4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-ns.md @@ -0,0 +1,15 @@ +```http +POST /v1/domains/{domainId}/records/ns 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-srv.md b/examples/2.3.x/server-rest/examples/domains/create-record-srv.md new file mode 100644 index 000000000..58b419055 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-srv.md @@ -0,0 +1,18 @@ +```http +POST /v1/domains/{domainId}/records/srv 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": "", + "value": "<VALUE>", + "ttl": 1, + "priority": 0, + "weight": 0, + "port": 0, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create-record-txt.md b/examples/2.3.x/server-rest/examples/domains/create-record-txt.md new file mode 100644 index 000000000..78906f300 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create-record-txt.md @@ -0,0 +1,15 @@ +```http +POST /v1/domains/{domainId}/records/txt 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/create.md b/examples/2.3.x/server-rest/examples/domains/create.md new file mode 100644 index 000000000..75a607562 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/create.md @@ -0,0 +1,13 @@ +```http +POST /v1/domains 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> + +{ + "teamId": "<TEAM_ID>", + "domain": "example.com" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/delete-record.md b/examples/2.3.x/server-rest/examples/domains/delete-record.md new file mode 100644 index 000000000..7f2b2c1f5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/delete-record.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/domains/{domainId}/records/{recordId} 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/domains/delete.md b/examples/2.3.x/server-rest/examples/domains/delete.md new file mode 100644 index 000000000..6164560ea --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/domains/{domainId} 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/domains/get-preset-google-workspace.md b/examples/2.3.x/server-rest/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..eaaf8506f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/presets/google-workspace 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/domains/get-preset-i-cloud.md b/examples/2.3.x/server-rest/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..5ed2fa7c7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/presets/icloud 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/domains/get-preset-mailgun.md b/examples/2.3.x/server-rest/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..7d96cd8ba --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-preset-mailgun.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/presets/mailgun 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/domains/get-preset-outlook.md b/examples/2.3.x/server-rest/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..b17f5e890 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-preset-outlook.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/presets/outlook 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/domains/get-preset-proton-mail.md b/examples/2.3.x/server-rest/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..bba02db91 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/presets/proton-mail 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/domains/get-preset-zoho.md b/examples/2.3.x/server-rest/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..cfe1b079e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-preset-zoho.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/presets/zoho 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/domains/get-price.md b/examples/2.3.x/server-rest/examples/domains/get-price.md new file mode 100644 index 000000000..41e25f499 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-price.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/price 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/domains/get-record.md b/examples/2.3.x/server-rest/examples/domains/get-record.md new file mode 100644 index 000000000..f91fbd1a2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-record.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/records/{recordId} 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/domains/get-transfer-status.md b/examples/2.3.x/server-rest/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..3ce370fd5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-transfer-status.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/transfers/status 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/domains/get-zone.md b/examples/2.3.x/server-rest/examples/domains/get-zone.md new file mode 100644 index 000000000..96a028f98 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get-zone.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/zone HTTP/1.1 +Host: cloud.appwrite.io +Accept: text/plain +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/domains/get.md b/examples/2.3.x/server-rest/examples/domains/get.md new file mode 100644 index 000000000..a1b4f22db --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId} 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/domains/list-prices.md b/examples/2.3.x/server-rest/examples/domains/list-prices.md new file mode 100644 index 000000000..7d6d1ab62 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/list-prices.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/prices 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/domains/list-records.md b/examples/2.3.x/server-rest/examples/domains/list-records.md new file mode 100644 index 000000000..df9d26a67 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/list-records.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains/{domainId}/records 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/domains/list.md b/examples/2.3.x/server-rest/examples/domains/list.md new file mode 100644 index 000000000..5acee01c1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/domains 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/domains/update-nameservers.md b/examples/2.3.x/server-rest/examples/domains/update-nameservers.md new file mode 100644 index 000000000..3623ed614 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-nameservers.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/domains/{domainId}/nameservers 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> + +{ + "nameservers": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-a.md b/examples/2.3.x/server-rest/examples/domains/update-record-a.md new file mode 100644 index 000000000..f5cb180d8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-a.md @@ -0,0 +1,15 @@ +```http +PUT /v1/domains/{domainId}/records/a/{recordId} 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": "", + "value": "", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-rest/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..b0dcce379 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-aaaa.md @@ -0,0 +1,15 @@ +```http +PUT /v1/domains/{domainId}/records/aaaa/{recordId} 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": "", + "value": "", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-alias.md b/examples/2.3.x/server-rest/examples/domains/update-record-alias.md new file mode 100644 index 000000000..404347f2b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-alias.md @@ -0,0 +1,15 @@ +```http +PUT /v1/domains/{domainId}/records/alias/{recordId} 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-caa.md b/examples/2.3.x/server-rest/examples/domains/update-record-caa.md new file mode 100644 index 000000000..ae7d286a4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-caa.md @@ -0,0 +1,15 @@ +```http +PUT /v1/domains/{domainId}/records/caa/{recordId} 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": "", + "value": "", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-cname.md b/examples/2.3.x/server-rest/examples/domains/update-record-cname.md new file mode 100644 index 000000000..aaaf40965 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-cname.md @@ -0,0 +1,15 @@ +```http +PUT /v1/domains/{domainId}/records/cname/{recordId} 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-https.md b/examples/2.3.x/server-rest/examples/domains/update-record-https.md new file mode 100644 index 000000000..785eebfcf --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-https.md @@ -0,0 +1,15 @@ +```http +PUT /v1/domains/{domainId}/records/https/{recordId} 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-mx.md b/examples/2.3.x/server-rest/examples/domains/update-record-mx.md new file mode 100644 index 000000000..8dbdc6a3e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-mx.md @@ -0,0 +1,16 @@ +```http +PUT /v1/domains/{domainId}/records/mx/{recordId} 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": "", + "value": "<VALUE>", + "ttl": 1, + "priority": 0, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-ns.md b/examples/2.3.x/server-rest/examples/domains/update-record-ns.md new file mode 100644 index 000000000..beec2f99d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-ns.md @@ -0,0 +1,15 @@ +```http +PUT /v1/domains/{domainId}/records/ns/{recordId} 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-srv.md b/examples/2.3.x/server-rest/examples/domains/update-record-srv.md new file mode 100644 index 000000000..9df5ed04a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-srv.md @@ -0,0 +1,18 @@ +```http +PUT /v1/domains/{domainId}/records/srv/{recordId} 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": "", + "value": "<VALUE>", + "ttl": 1, + "priority": 0, + "weight": 0, + "port": 0, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-record-txt.md b/examples/2.3.x/server-rest/examples/domains/update-record-txt.md new file mode 100644 index 000000000..3a2b9b58f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-record-txt.md @@ -0,0 +1,15 @@ +```http +PUT /v1/domains/{domainId}/records/txt/{recordId} 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": "", + "value": "<VALUE>", + "ttl": 1, + "comment": "<COMMENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-team.md b/examples/2.3.x/server-rest/examples/domains/update-team.md new file mode 100644 index 000000000..1a846c15d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-team.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/domains/{domainId}/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: <YOUR_PROJECT_ID> + +{ + "teamId": "<TEAM_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/update-zone.md b/examples/2.3.x/server-rest/examples/domains/update-zone.md new file mode 100644 index 000000000..8b326cefa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/update-zone.md @@ -0,0 +1,12 @@ +```http +PUT /v1/domains/{domainId}/zone 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> + +{ + "content": "<CONTENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/domains/verify-nameservers.md b/examples/2.3.x/server-rest/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..d93ce4e00 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/domains/verify-nameservers.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/domains/{domainId}/nameservers/verification 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/embeddings/create-text-embeddings.md b/examples/2.3.x/server-rest/examples/embeddings/create-text-embeddings.md new file mode 100644 index 000000000..2634ba7ee --- /dev/null +++ b/examples/2.3.x/server-rest/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,13 @@ +```http +POST /v1/embeddings/text 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> + +{ + "texts": [], + "model": "nomic-embed-text" +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/create-deployment.md b/examples/2.3.x/server-rest/examples/functions/create-deployment.md new file mode 100644 index 000000000..f2f36ea65 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/create-deployment.md @@ -0,0 +1,31 @@ +```http +POST /v1/functions/{functionId}/deployments 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="entrypoint" + +"<ENTRYPOINT>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="commands" + +"<COMMANDS>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +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 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/server-rest/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-rest/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..792268d20 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +```http +POST /v1/functions/{functionId}/deployments/duplicate 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> + +{ + "deploymentId": "<DEPLOYMENT_ID>", + "buildId": "<BUILD_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/create-execution.md b/examples/2.3.x/server-rest/examples/functions/create-execution.md new file mode 100644 index 000000000..67d0f4a14 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/create-execution.md @@ -0,0 +1,17 @@ +```http +POST /v1/functions/{functionId}/executions 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> + +{ + "body": "<BODY>", + "async": false, + "path": "<PATH>", + "method": "GET", + "headers": {}, + "scheduledAt": "<SCHEDULED_AT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/create-template-deployment.md b/examples/2.3.x/server-rest/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..18ec55fe8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +```http +POST /v1/functions/{functionId}/deployments/template 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> + +{ + "repository": "<REPOSITORY>", + "owner": "<OWNER>", + "rootDirectory": "<ROOT_DIRECTORY>", + "type": "commit", + "reference": "<REFERENCE>", + "activate": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/create-variable.md b/examples/2.3.x/server-rest/examples/functions/create-variable.md new file mode 100644 index 000000000..5fa9883a7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +```http +POST /v1/functions/{functionId}/variables 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> + +{ + "variableId": "<VARIABLE_ID>", + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-rest/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..93340f314 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/create-vcs-deployment.md @@ -0,0 +1,14 @@ +```http +POST /v1/functions/{functionId}/deployments/vcs 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> + +{ + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/create.md b/examples/2.3.x/server-rest/examples/functions/create.md new file mode 100644 index 000000000..146d4f88b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/create.md @@ -0,0 +1,33 @@ +```http +POST /v1/functions 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> + +{ + "functionId": "<FUNCTION_ID>", + "name": "<NAME>", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": "0 0 * * *", + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "<ENTRYPOINT>", + "commands": "<COMMANDS>", + "scopes": [], + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "providerBranches": [], + "providerPaths": [], + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "deploymentRetention": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/delete-deployment.md b/examples/2.3.x/server-rest/examples/functions/delete-deployment.md new file mode 100644 index 000000000..1f3b2e5b4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/delete-deployment.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/functions/{functionId}/deployments/{deploymentId} 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/functions/delete-execution.md b/examples/2.3.x/server-rest/examples/functions/delete-execution.md new file mode 100644 index 000000000..73e89a8af --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/delete-execution.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/functions/{functionId}/executions/{executionId} 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/functions/delete-variable.md b/examples/2.3.x/server-rest/examples/functions/delete-variable.md new file mode 100644 index 000000000..1c92145ee --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/delete-variable.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/functions/{functionId}/variables/{variableId} 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/functions/delete.md b/examples/2.3.x/server-rest/examples/functions/delete.md new file mode 100644 index 000000000..e4e78093c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/functions/{functionId} 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/functions/get-deployment-download.md b/examples/2.3.x/server-rest/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..8efac0256 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/get-deployment-download.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1 +Host: cloud.appwrite.io +Accept: */* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/functions/get-deployment.md b/examples/2.3.x/server-rest/examples/functions/get-deployment.md new file mode 100644 index 000000000..b1036d547 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/get-deployment.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/deployments/{deploymentId} 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/functions/get-execution.md b/examples/2.3.x/server-rest/examples/functions/get-execution.md new file mode 100644 index 000000000..724d02488 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/get-execution.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/executions/{executionId} 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/functions/get-variable.md b/examples/2.3.x/server-rest/examples/functions/get-variable.md new file mode 100644 index 000000000..12287f943 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/get-variable.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/variables/{variableId} 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/functions/get.md b/examples/2.3.x/server-rest/examples/functions/get.md new file mode 100644 index 000000000..97a841167 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId} 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/functions/list-deployments.md b/examples/2.3.x/server-rest/examples/functions/list-deployments.md new file mode 100644 index 000000000..6809520cc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/list-deployments.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/deployments 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/functions/list-executions.md b/examples/2.3.x/server-rest/examples/functions/list-executions.md new file mode 100644 index 000000000..1b1449aad --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/list-executions.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/executions 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/functions/list-runtimes.md b/examples/2.3.x/server-rest/examples/functions/list-runtimes.md new file mode 100644 index 000000000..712861518 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/list-runtimes.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/runtimes 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/functions/list-specifications.md b/examples/2.3.x/server-rest/examples/functions/list-specifications.md new file mode 100644 index 000000000..c5e2a0fbf --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/list-specifications.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/specifications 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/functions/list-variables.md b/examples/2.3.x/server-rest/examples/functions/list-variables.md new file mode 100644 index 000000000..fad748e03 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/list-variables.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions/{functionId}/variables 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/functions/list.md b/examples/2.3.x/server-rest/examples/functions/list.md new file mode 100644 index 000000000..889f878d4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/functions 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/functions/update-deployment-status.md b/examples/2.3.x/server-rest/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..c220daa95 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/update-deployment-status.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/functions/{functionId}/deployments/{deploymentId}/status 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/functions/update-function-deployment.md b/examples/2.3.x/server-rest/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..6a21b1765 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/update-function-deployment.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/functions/{functionId}/deployment 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> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/update-variable.md b/examples/2.3.x/server-rest/examples/functions/update-variable.md new file mode 100644 index 000000000..4aeaaf90b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/update-variable.md @@ -0,0 +1,14 @@ +```http +PUT /v1/functions/{functionId}/variables/{variableId} 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> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/functions/update.md b/examples/2.3.x/server-rest/examples/functions/update.md new file mode 100644 index 000000000..75fc4cbdc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/functions/update.md @@ -0,0 +1,32 @@ +```http +PUT /v1/functions/{functionId} 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>", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": "0 0 * * *", + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "<ENTRYPOINT>", + "commands": "<COMMANDS>", + "scopes": [], + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "providerBranches": [], + "providerPaths": [], + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "deploymentRetention": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/graphql/mutation.md b/examples/2.3.x/server-rest/examples/graphql/mutation.md new file mode 100644 index 000000000..2ad4b0d6d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +```http +POST /v1/graphql/mutation HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "query": {} +} +``` diff --git a/examples/2.3.x/server-rest/examples/graphql/query.md b/examples/2.3.x/server-rest/examples/graphql/query.md new file mode 100644 index 000000000..98a401e63 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/graphql/query.md @@ -0,0 +1,13 @@ +```http +POST /v1/graphql HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "query": {} +} +``` diff --git a/examples/2.3.x/server-rest/examples/locale/get.md b/examples/2.3.x/server-rest/examples/locale/get.md new file mode 100644 index 000000000..09e338076 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/locale/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale 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/locale/list-codes.md b/examples/2.3.x/server-rest/examples/locale/list-codes.md new file mode 100644 index 000000000..ee12c3e61 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/locale/list-codes.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/codes 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/locale/list-continents.md b/examples/2.3.x/server-rest/examples/locale/list-continents.md new file mode 100644 index 000000000..0a9f602e5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/locale/list-continents.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/continents 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/locale/list-countries-eu.md b/examples/2.3.x/server-rest/examples/locale/list-countries-eu.md new file mode 100644 index 000000000..ee04befd5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/locale/list-countries-eu.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/countries/eu 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/locale/list-countries-phones.md b/examples/2.3.x/server-rest/examples/locale/list-countries-phones.md new file mode 100644 index 000000000..e4a4c36c1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/countries/phones 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/locale/list-countries.md b/examples/2.3.x/server-rest/examples/locale/list-countries.md new file mode 100644 index 000000000..c90f2d43b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/locale/list-countries.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/countries 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/locale/list-currencies.md b/examples/2.3.x/server-rest/examples/locale/list-currencies.md new file mode 100644 index 000000000..0684e9c83 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/locale/list-currencies.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/currencies 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/locale/list-languages.md b/examples/2.3.x/server-rest/examples/locale/list-languages.md new file mode 100644 index 000000000..1ae858c81 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/locale/list-languages.md @@ -0,0 +1,7 @@ +```http +GET /v1/locale/languages 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/messaging/create-apns-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..c4fa085eb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +```http +POST /v1/messaging/providers/apns 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "authKey": "<AUTH_KEY>", + "authKeyId": "<AUTH_KEY_ID>", + "teamId": "<TEAM_ID>", + "bundleId": "<BUNDLE_ID>", + "sandbox": false, + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..cc11c74ec --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,16 @@ +```http +POST /v1/messaging/providers/appwrite 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "enabled": false, + "qos": 0, + "expiry": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-email.md b/examples/2.3.x/server-rest/examples/messaging/create-email.md new file mode 100644 index 000000000..6f57d65e8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-email.md @@ -0,0 +1,25 @@ +```http +POST /v1/messaging/messages/email 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> + +{ + "messageId": "<MESSAGE_ID>", + "subject": "<SUBJECT>", + "content": "<CONTENT>", + "topics": [], + "users": [], + "targets": [], + "cc": [], + "bcc": [], + "attachments": [], + "replyToEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "draft": false, + "html": false, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..76ad3c0d2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +```http +POST /v1/messaging/providers/fcm 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "serviceAccountJSON": {}, + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..b46ed3690 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +```http +POST /v1/messaging/providers/mailgun 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "domain": "example.com", + "isEuRegion": false, + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..3c57de2e6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,17 @@ +```http +POST /v1/messaging/providers/msg91 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "templateId": "<TEMPLATE_ID>", + "senderId": "<SENDER_ID>", + "authKey": "<AUTH_KEY>", + "enabled": false +} +``` 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 new file mode 100644 index 000000000..8152d8a6e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +```http +POST /v1/messaging/messages/push 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> + +{ + "messageId": "<MESSAGE_ID>", + "title": "<TITLE>", + "body": "<BODY>", + "topics": [], + "users": [], + "targets": [], + "data": {}, + "action": "<ACTION>", + "image": "<ID1:ID2>", + "icon": "<ICON>", + "sound": "<SOUND>", + "color": "<COLOR>", + "tag": "<TAG>", + "badge": 1, + "draft": false, + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "contentAvailable": false, + "critical": false, + "priority": "normal" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..0bd0b8cec --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-resend-provider.md @@ -0,0 +1,19 @@ +```http +POST /v1/messaging/providers/resend 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..f6f10d0b4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +```http +POST /v1/messaging/providers/sendgrid 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..7916b172b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-ses-provider.md @@ -0,0 +1,21 @@ +```http +POST /v1/messaging/providers/ses 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "accessKey": "<ACCESS_KEY>", + "secretKey": "<SECRET_KEY>", + "region": "<REGION>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-sms.md b/examples/2.3.x/server-rest/examples/messaging/create-sms.md new file mode 100644 index 000000000..8600c6cc1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +```http +POST /v1/messaging/messages/sms 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> + +{ + "messageId": "<MESSAGE_ID>", + "content": "<CONTENT>", + "topics": [], + "users": [], + "targets": [], + "draft": false, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..f59327e0d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +```http +POST /v1/messaging/providers/smtp 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "host": "<HOST>", + "port": 587, + "username": "<USERNAME>", + "password": "password", + "encryption": "none", + "autoTLS": false, + "mailer": "<MAILER>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-subscriber.md b/examples/2.3.x/server-rest/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..05eb943b7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-subscriber.md @@ -0,0 +1,13 @@ +```http +POST /v1/messaging/topics/{topicId}/subscribers 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> + +{ + "subscriberId": "<SUBSCRIBER_ID>", + "targetId": "<TARGET_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..a910650d3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +```http +POST /v1/messaging/providers/telesign 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "customerId": "<CUSTOMER_ID>", + "apiKey": "<API_KEY>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..4962a2d0d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +```http +POST /v1/messaging/providers/textmagic 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "username": "<USERNAME>", + "apiKey": "<API_KEY>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-topic.md b/examples/2.3.x/server-rest/examples/messaging/create-topic.md new file mode 100644 index 000000000..6d3e97c55 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +```http +POST /v1/messaging/topics 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> + +{ + "topicId": "<TOPIC_ID>", + "name": "<NAME>", + "subscribe": ["any"], + "qos": 0, + "expiry": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..e35bee110 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +```http +POST /v1/messaging/providers/twilio 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "<FROM>", + "accountSid": "<ACCOUNT_SID>", + "authToken": "<AUTH_TOKEN>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-rest/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..f7439d8b5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +```http +POST /v1/messaging/providers/vonage 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> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/delete-provider.md b/examples/2.3.x/server-rest/examples/messaging/delete-provider.md new file mode 100644 index 000000000..52656d482 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/delete-provider.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/messaging/providers/{providerId} 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/messaging/delete-subscriber.md b/examples/2.3.x/server-rest/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..240d535b3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/delete-subscriber.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} 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/messaging/delete-topic.md b/examples/2.3.x/server-rest/examples/messaging/delete-topic.md new file mode 100644 index 000000000..496eb7562 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/delete-topic.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/messaging/topics/{topicId} 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/messaging/delete.md b/examples/2.3.x/server-rest/examples/messaging/delete.md new file mode 100644 index 000000000..5baedc0a1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/messaging/messages/{messageId} 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/messaging/get-message.md b/examples/2.3.x/server-rest/examples/messaging/get-message.md new file mode 100644 index 000000000..5483aae58 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/get-message.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/messages/{messageId} 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/messaging/get-provider.md b/examples/2.3.x/server-rest/examples/messaging/get-provider.md new file mode 100644 index 000000000..523947278 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/get-provider.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/providers/{providerId} 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/messaging/get-subscriber.md b/examples/2.3.x/server-rest/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..3dcff885f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/get-subscriber.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/topics/{topicId}/subscribers/{subscriberId} 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/messaging/get-topic.md b/examples/2.3.x/server-rest/examples/messaging/get-topic.md new file mode 100644 index 000000000..e371852b7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/get-topic.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/topics/{topicId} 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/messaging/list-messages.md b/examples/2.3.x/server-rest/examples/messaging/list-messages.md new file mode 100644 index 000000000..c68aaa49a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/list-messages.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/messages 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/messaging/list-providers.md b/examples/2.3.x/server-rest/examples/messaging/list-providers.md new file mode 100644 index 000000000..571fed645 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/list-providers.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/providers 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/messaging/list-subscribers.md b/examples/2.3.x/server-rest/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..731dc127c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/list-subscribers.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/topics/{topicId}/subscribers 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/messaging/list-targets.md b/examples/2.3.x/server-rest/examples/messaging/list-targets.md new file mode 100644 index 000000000..f730b09af --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/list-targets.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/messages/{messageId}/targets 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/messaging/list-topics.md b/examples/2.3.x/server-rest/examples/messaging/list-topics.md new file mode 100644 index 000000000..035edd4f8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/list-topics.md @@ -0,0 +1,7 @@ +```http +GET /v1/messaging/topics 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/messaging/update-apns-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..1e673ca14 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-apns-provider.md @@ -0,0 +1,18 @@ +```http +PATCH /v1/messaging/providers/apns/{providerId} 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>", + "enabled": false, + "authKey": "<AUTH_KEY>", + "authKeyId": "<AUTH_KEY_ID>", + "teamId": "<TEAM_ID>", + "bundleId": "<BUNDLE_ID>", + "sandbox": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..6199abf82 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/messaging/providers/appwrite/{providerId} 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>", + "enabled": false, + "qos": 0, + "expiry": 0 +} +``` 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 new file mode 100644 index 000000000..c6759d8da --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +```http +PATCH /v1/messaging/messages/email/{messageId} 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> + +{ + "topics": [], + "users": [], + "targets": [], + "subject": "<SUBJECT>", + "content": "<CONTENT>", + "draft": false, + "html": false, + "cc": [], + "bcc": [], + "replyToEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "attachments": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-fcm-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..8330d06e7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-fcm-provider.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/messaging/providers/fcm/{providerId} 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>", + "enabled": false, + "serviceAccountJSON": {} +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..163b0d802 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/messaging/providers/mailgun/{providerId} 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>", + "apiKey": "<API_KEY>", + "domain": "example.com", + "isEuRegion": false, + "enabled": false, + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..db6624cdd --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/messaging/providers/msg91/{providerId} 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>", + "enabled": false, + "templateId": "<TEMPLATE_ID>", + "senderId": "<SENDER_ID>", + "authKey": "<AUTH_KEY>" +} +``` 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 new file mode 100644 index 000000000..5515827b8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-push.md @@ -0,0 +1,29 @@ +```http +PATCH /v1/messaging/messages/push/{messageId} 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> + +{ + "topics": [], + "users": [], + "targets": [], + "title": "<TITLE>", + "body": "<BODY>", + "data": {}, + "action": "<ACTION>", + "image": "<ID1:ID2>", + "icon": "<ICON>", + "sound": "<SOUND>", + "color": "<COLOR>", + "tag": "<TAG>", + "badge": 1, + "draft": false, + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "contentAvailable": false, + "critical": false, + "priority": "normal" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..b010c9508 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-resend-provider.md @@ -0,0 +1,18 @@ +```http +PATCH /v1/messaging/providers/resend/{providerId} 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>", + "enabled": false, + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..28ec13a7a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,18 @@ +```http +PATCH /v1/messaging/providers/sendgrid/{providerId} 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>", + "enabled": false, + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..9f305c064 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-ses-provider.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/messaging/providers/ses/{providerId} 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>", + "enabled": false, + "accessKey": "<ACCESS_KEY>", + "secretKey": "<SECRET_KEY>", + "region": "<REGION>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} +``` 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 new file mode 100644 index 000000000..589235626 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-sms.md @@ -0,0 +1,17 @@ +```http +PATCH /v1/messaging/messages/sms/{messageId} 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> + +{ + "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/messaging/update-smtp-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..bd4b572ef --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-smtp-provider.md @@ -0,0 +1,24 @@ +```http +PATCH /v1/messaging/providers/smtp/{providerId} 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>", + "host": "<HOST>", + "port": 1, + "username": "<USERNAME>", + "password": "password", + "encryption": "none", + "autoTLS": false, + "mailer": "<MAILER>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..e9b2bba6a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-telesign-provider.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/messaging/providers/telesign/{providerId} 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>", + "enabled": false, + "customerId": "<CUSTOMER_ID>", + "apiKey": "<API_KEY>", + "from": "<FROM>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..93885bdc3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/messaging/providers/textmagic/{providerId} 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>", + "enabled": false, + "username": "<USERNAME>", + "apiKey": "<API_KEY>", + "from": "<FROM>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-topic.md b/examples/2.3.x/server-rest/examples/messaging/update-topic.md new file mode 100644 index 000000000..2bf7ec2bb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/messaging/topics/{topicId} 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>", + "subscribe": ["any"], + "qos": 0, + "expiry": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..2bf291fa3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-twilio-provider.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/messaging/providers/twilio/{providerId} 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>", + "enabled": false, + "accountSid": "<ACCOUNT_SID>", + "authToken": "<AUTH_TOKEN>", + "from": "<FROM>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-rest/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..dcc71b6ed --- /dev/null +++ b/examples/2.3.x/server-rest/examples/messaging/update-vonage-provider.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/messaging/providers/vonage/{providerId} 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>", + "enabled": false, + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "from": "<FROM>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-rest/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..527849be4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/create-backup-policy.md @@ -0,0 +1,17 @@ +```http +POST /v1/mongo/{databaseId}/backups/policies 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> + +{ + "policyId": "<POLICY_ID>", + "name": "<NAME>", + "schedule": "", + "retention": 1, + "type": "full", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/create-backup.md b/examples/2.3.x/server-rest/examples/mongo/create-backup.md new file mode 100644 index 000000000..4f18c9677 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/create-backup.md @@ -0,0 +1,12 @@ +```http +POST /v1/mongo/{databaseId}/backups 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> + +{ + "type": "full" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/create-branch.md b/examples/2.3.x/server-rest/examples/mongo/create-branch.md new file mode 100644 index 000000000..ebd556408 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/create-branch.md @@ -0,0 +1,13 @@ +```http +POST /v1/mongo/{databaseId}/branches 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> + +{ + "branchId": "<BRANCH_ID>", + "ttl": 300 +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/create-failover.md b/examples/2.3.x/server-rest/examples/mongo/create-failover.md new file mode 100644 index 000000000..d3e2b6b01 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/create-failover.md @@ -0,0 +1,12 @@ +```http +POST /v1/mongo/{databaseId}/failovers 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> + +{ + "targetReplicaId": "<TARGET_REPLICA_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/create-migration.md b/examples/2.3.x/server-rest/examples/mongo/create-migration.md new file mode 100644 index 000000000..9c69e3f6c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/create-migration.md @@ -0,0 +1,13 @@ +```http +POST /v1/mongo/{databaseId}/migrations 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> + +{ + "targetType": "shared", + "specification": "<SPECIFICATION>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/create-restoration.md b/examples/2.3.x/server-rest/examples/mongo/create-restoration.md new file mode 100644 index 000000000..1a3dd74a7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/create-restoration.md @@ -0,0 +1,15 @@ +```http +POST /v1/mongo/{databaseId}/restorations 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> + +{ + "type": "backup", + "backupId": "<BACKUP_ID>", + "targetDatabaseId": "<TARGET_DATABASE_ID>", + "targetTime": "2020-10-15T06:38:00.000+00:00" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/create-upgrade.md b/examples/2.3.x/server-rest/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..1e1e43a4a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/create-upgrade.md @@ -0,0 +1,12 @@ +```http +POST /v1/mongo/{databaseId}/upgrades 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> + +{ + "targetVersion": "<TARGET_VERSION>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/create.md b/examples/2.3.x/server-rest/examples/mongo/create.md new file mode 100644 index 000000000..4bc6df886 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/create.md @@ -0,0 +1,25 @@ +```http +POST /v1/mongo 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> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "version": "17", + "specification": "<SPECIFICATION>", + "replicas": 0, + "syncMode": "async", + "networkIdleTimeoutSeconds": 60, + "networkIPAllowlist": [], + "idleTimeoutMinutes": 5, + "pitr": false, + "pitrRetentionDays": 1, + "storageAutoscaling": false, + "storageAutoscalingThresholdPercent": 50, + "storageAutoscalingMaxGb": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-rest/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..3bdf10ff1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/delete-backup-policy.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/mongo/{databaseId}/backups/policies/{policyId} 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/mongo/delete-backup.md b/examples/2.3.x/server-rest/examples/mongo/delete-backup.md new file mode 100644 index 000000000..5ad66fa7b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/delete-backup.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/mongo/{databaseId}/backups/{backupId} 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/mongo/delete-branch.md b/examples/2.3.x/server-rest/examples/mongo/delete-branch.md new file mode 100644 index 000000000..c96418f4d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/delete-branch.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/mongo/{databaseId}/branches/{branchId} 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/mongo/delete.md b/examples/2.3.x/server-rest/examples/mongo/delete.md new file mode 100644 index 000000000..0b274506f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/mongo/{databaseId} 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/mongo/get-backup-policy.md b/examples/2.3.x/server-rest/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..e2816a90e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/get-backup-policy.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/backups/policies/{policyId} 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/mongo/get-backup.md b/examples/2.3.x/server-rest/examples/mongo/get-backup.md new file mode 100644 index 000000000..669e6d964 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/get-backup.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/backups/{backupId} 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/mongo/get-pitr.md b/examples/2.3.x/server-rest/examples/mongo/get-pitr.md new file mode 100644 index 000000000..55a97837d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/get-pitr.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/pitr 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/mongo/get-replicas.md b/examples/2.3.x/server-rest/examples/mongo/get-replicas.md new file mode 100644 index 000000000..d5f67985d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/get-replicas.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/replicas 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/mongo/get-restoration.md b/examples/2.3.x/server-rest/examples/mongo/get-restoration.md new file mode 100644 index 000000000..0aa26ec3d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/get-restoration.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/restorations/{restorationId} 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/mongo/get-status.md b/examples/2.3.x/server-rest/examples/mongo/get-status.md new file mode 100644 index 000000000..3290baaeb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/get-status.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/status 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/mongo/get.md b/examples/2.3.x/server-rest/examples/mongo/get.md new file mode 100644 index 000000000..a8b7ef6f9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId} 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/mongo/list-backup-policies.md b/examples/2.3.x/server-rest/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..a37688847 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/list-backup-policies.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/backups/policies 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/mongo/list-backups.md b/examples/2.3.x/server-rest/examples/mongo/list-backups.md new file mode 100644 index 000000000..f33b1b4a7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/list-backups.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/backups 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/mongo/list-branches.md b/examples/2.3.x/server-rest/examples/mongo/list-branches.md new file mode 100644 index 000000000..f00837129 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/list-branches.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/branches 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/mongo/list-operations.md b/examples/2.3.x/server-rest/examples/mongo/list-operations.md new file mode 100644 index 000000000..fa9c836bc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/list-operations.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/operations 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/mongo/list-restorations.md b/examples/2.3.x/server-rest/examples/mongo/list-restorations.md new file mode 100644 index 000000000..603cad90c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/list-restorations.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/{databaseId}/restorations 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/mongo/list-specifications.md b/examples/2.3.x/server-rest/examples/mongo/list-specifications.md new file mode 100644 index 000000000..e4bec7aa8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/list-specifications.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo/specifications 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/mongo/list.md b/examples/2.3.x/server-rest/examples/mongo/list.md new file mode 100644 index 000000000..f35bcc74f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/mongo 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/mongo/update-backup-policy.md b/examples/2.3.x/server-rest/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..c12185ce3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/update-backup-policy.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/mongo/{databaseId}/backups/policies/{policyId} 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>", + "schedule": "", + "retention": 1, + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-rest/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..0e03a4512 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/update-backup-storage.md @@ -0,0 +1,18 @@ +```http +PUT /v1/mongo/{databaseId}/backups/storage 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> + +{ + "provider": "s3", + "bucket": "<BUCKET>", + "region": "<REGION>", + "prefix": "<PREFIX>", + "endpoint": "<ENDPOINT>", + "accessKey": "<ACCESS_KEY>", + "secretKey": "<SECRET_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/update-credentials.md b/examples/2.3.x/server-rest/examples/mongo/update-credentials.md new file mode 100644 index 000000000..8e84ceae8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/update-credentials.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/mongo/{databaseId}/credentials 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/mongo/update-maintenance.md b/examples/2.3.x/server-rest/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..47fc59fa1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/update-maintenance.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/mongo/{databaseId}/maintenance 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> + +{ + "day": "sun", + "hourUtc": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/mongo/update.md b/examples/2.3.x/server-rest/examples/mongo/update.md new file mode 100644 index 000000000..2d062c6c5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mongo/update.md @@ -0,0 +1,31 @@ +```http +PATCH /v1/mongo/{databaseId} 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>", + "status": "ready", + "specification": "<SPECIFICATION>", + "replicas": 0, + "syncMode": "async", + "networkIdleTimeoutSeconds": 60, + "networkIPAllowlist": [], + "idleTimeoutMinutes": 5, + "pitr": false, + "pitrRetentionDays": 1, + "storageAutoscaling": false, + "storageAutoscalingThresholdPercent": 50, + "storageAutoscalingMaxGb": 0, + "metricsTraceSampleRate": 0, + "metricsSlowQueryLogThresholdMs": 0, + "sqlApiEnabled": false, + "sqlApiAllowedStatements": [], + "sqlApiMaxRows": 1, + "sqlApiMaxBytes": 1024, + "sqlApiTimeoutSeconds": 1 +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-rest/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..bbb985793 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create-backup-policy.md @@ -0,0 +1,17 @@ +```http +POST /v1/mysql/{databaseId}/backups/policies 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> + +{ + "policyId": "<POLICY_ID>", + "name": "<NAME>", + "schedule": "", + "retention": 1, + "type": "full", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create-backup.md b/examples/2.3.x/server-rest/examples/mysql/create-backup.md new file mode 100644 index 000000000..d3f80e709 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create-backup.md @@ -0,0 +1,12 @@ +```http +POST /v1/mysql/{databaseId}/backups 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> + +{ + "type": "full" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create-branch.md b/examples/2.3.x/server-rest/examples/mysql/create-branch.md new file mode 100644 index 000000000..3d1dd4589 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create-branch.md @@ -0,0 +1,13 @@ +```http +POST /v1/mysql/{databaseId}/branches 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> + +{ + "branchId": "<BRANCH_ID>", + "ttl": 300 +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create-execution.md b/examples/2.3.x/server-rest/examples/mysql/create-execution.md new file mode 100644 index 000000000..3a8921ae1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create-execution.md @@ -0,0 +1,14 @@ +```http +POST /v1/mysql/{databaseId}/executions 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> + +{ + "sql": "<SQL>", + "bindings": {}, + "timeoutSeconds": 1 +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create-failover.md b/examples/2.3.x/server-rest/examples/mysql/create-failover.md new file mode 100644 index 000000000..d642de037 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create-failover.md @@ -0,0 +1,12 @@ +```http +POST /v1/mysql/{databaseId}/failovers 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> + +{ + "targetReplicaId": "<TARGET_REPLICA_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create-migration.md b/examples/2.3.x/server-rest/examples/mysql/create-migration.md new file mode 100644 index 000000000..a09e729ac --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create-migration.md @@ -0,0 +1,13 @@ +```http +POST /v1/mysql/{databaseId}/migrations 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> + +{ + "targetType": "shared", + "specification": "<SPECIFICATION>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create-restoration.md b/examples/2.3.x/server-rest/examples/mysql/create-restoration.md new file mode 100644 index 000000000..8289e9b2e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create-restoration.md @@ -0,0 +1,15 @@ +```http +POST /v1/mysql/{databaseId}/restorations 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> + +{ + "type": "backup", + "backupId": "<BACKUP_ID>", + "targetDatabaseId": "<TARGET_DATABASE_ID>", + "targetTime": "2020-10-15T06:38:00.000+00:00" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create-upgrade.md b/examples/2.3.x/server-rest/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..167cf3880 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create-upgrade.md @@ -0,0 +1,12 @@ +```http +POST /v1/mysql/{databaseId}/upgrades 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> + +{ + "targetVersion": "<TARGET_VERSION>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/create.md b/examples/2.3.x/server-rest/examples/mysql/create.md new file mode 100644 index 000000000..98675a6f1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/create.md @@ -0,0 +1,25 @@ +```http +POST /v1/mysql 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> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "version": "17", + "specification": "<SPECIFICATION>", + "replicas": 0, + "syncMode": "async", + "networkIdleTimeoutSeconds": 60, + "networkIPAllowlist": [], + "idleTimeoutMinutes": 5, + "pitr": false, + "pitrRetentionDays": 1, + "storageAutoscaling": false, + "storageAutoscalingThresholdPercent": 50, + "storageAutoscalingMaxGb": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-rest/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..425135384 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/delete-backup-policy.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/mysql/{databaseId}/backups/policies/{policyId} 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/mysql/delete-backup.md b/examples/2.3.x/server-rest/examples/mysql/delete-backup.md new file mode 100644 index 000000000..24101e44a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/delete-backup.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/mysql/{databaseId}/backups/{backupId} 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/mysql/delete-branch.md b/examples/2.3.x/server-rest/examples/mysql/delete-branch.md new file mode 100644 index 000000000..bbd223bd9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/delete-branch.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/mysql/{databaseId}/branches/{branchId} 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/mysql/delete.md b/examples/2.3.x/server-rest/examples/mysql/delete.md new file mode 100644 index 000000000..838894902 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/mysql/{databaseId} 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/mysql/get-backup-policy.md b/examples/2.3.x/server-rest/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..5656b2a1b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/get-backup-policy.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/backups/policies/{policyId} 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/mysql/get-backup.md b/examples/2.3.x/server-rest/examples/mysql/get-backup.md new file mode 100644 index 000000000..36065fa10 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/get-backup.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/backups/{backupId} 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/mysql/get-pitr.md b/examples/2.3.x/server-rest/examples/mysql/get-pitr.md new file mode 100644 index 000000000..99cd67301 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/get-pitr.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/pitr 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/mysql/get-pooler.md b/examples/2.3.x/server-rest/examples/mysql/get-pooler.md new file mode 100644 index 000000000..8f7b45701 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/get-pooler.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/pooler 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/mysql/get-replicas.md b/examples/2.3.x/server-rest/examples/mysql/get-replicas.md new file mode 100644 index 000000000..d2d50711a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/get-replicas.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/replicas 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/mysql/get-restoration.md b/examples/2.3.x/server-rest/examples/mysql/get-restoration.md new file mode 100644 index 000000000..396b78afa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/get-restoration.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/restorations/{restorationId} 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/mysql/get-status.md b/examples/2.3.x/server-rest/examples/mysql/get-status.md new file mode 100644 index 000000000..094d1a878 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/get-status.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/status 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/mysql/get.md b/examples/2.3.x/server-rest/examples/mysql/get.md new file mode 100644 index 000000000..8af460c17 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId} 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/mysql/list-backup-policies.md b/examples/2.3.x/server-rest/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..36af970fd --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/list-backup-policies.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/backups/policies 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/mysql/list-backups.md b/examples/2.3.x/server-rest/examples/mysql/list-backups.md new file mode 100644 index 000000000..433d75b0b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/list-backups.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/backups 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/mysql/list-branches.md b/examples/2.3.x/server-rest/examples/mysql/list-branches.md new file mode 100644 index 000000000..cb03961b7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/list-branches.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/branches 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/mysql/list-operations.md b/examples/2.3.x/server-rest/examples/mysql/list-operations.md new file mode 100644 index 000000000..f6b08716d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/list-operations.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/operations 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/mysql/list-restorations.md b/examples/2.3.x/server-rest/examples/mysql/list-restorations.md new file mode 100644 index 000000000..276b5a10b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/list-restorations.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/{databaseId}/restorations 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/mysql/list-specifications.md b/examples/2.3.x/server-rest/examples/mysql/list-specifications.md new file mode 100644 index 000000000..d38c47ec4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/list-specifications.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql/specifications 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/mysql/list.md b/examples/2.3.x/server-rest/examples/mysql/list.md new file mode 100644 index 000000000..e40d2e1d0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/mysql 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/mysql/update-backup-policy.md b/examples/2.3.x/server-rest/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..b94f9a58d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/update-backup-policy.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/mysql/{databaseId}/backups/policies/{policyId} 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>", + "schedule": "", + "retention": 1, + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-rest/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..fbf619764 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/update-backup-storage.md @@ -0,0 +1,18 @@ +```http +PUT /v1/mysql/{databaseId}/backups/storage 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> + +{ + "provider": "s3", + "bucket": "<BUCKET>", + "region": "<REGION>", + "prefix": "<PREFIX>", + "endpoint": "<ENDPOINT>", + "accessKey": "<ACCESS_KEY>", + "secretKey": "<SECRET_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/update-credentials.md b/examples/2.3.x/server-rest/examples/mysql/update-credentials.md new file mode 100644 index 000000000..fec239e9b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/update-credentials.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/mysql/{databaseId}/credentials 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/mysql/update-maintenance.md b/examples/2.3.x/server-rest/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..635bead0d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/update-maintenance.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/mysql/{databaseId}/maintenance 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> + +{ + "day": "sun", + "hourUtc": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/update-pooler.md b/examples/2.3.x/server-rest/examples/mysql/update-pooler.md new file mode 100644 index 000000000..02483751b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/update-pooler.md @@ -0,0 +1,19 @@ +```http +PATCH /v1/mysql/{databaseId}/pooler 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> + +{ + "mode": "transaction", + "maxConnections": 10, + "defaultPoolSize": 1, + "readWriteSplitting": false, + "poolerCpuRequest": "<POOLER_CPU_REQUEST>", + "poolerCpuLimit": "<POOLER_CPU_LIMIT>", + "poolerMemoryRequest": "<POOLER_MEMORY_REQUEST>", + "poolerMemoryLimit": "<POOLER_MEMORY_LIMIT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/mysql/update.md b/examples/2.3.x/server-rest/examples/mysql/update.md new file mode 100644 index 000000000..3db1b7980 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/mysql/update.md @@ -0,0 +1,31 @@ +```http +PATCH /v1/mysql/{databaseId} 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>", + "status": "ready", + "specification": "<SPECIFICATION>", + "replicas": 0, + "syncMode": "async", + "networkIdleTimeoutSeconds": 60, + "networkIPAllowlist": [], + "idleTimeoutMinutes": 5, + "pitr": false, + "pitrRetentionDays": 1, + "storageAutoscaling": false, + "storageAutoscalingThresholdPercent": 50, + "storageAutoscalingMaxGb": 0, + "metricsTraceSampleRate": 0, + "metricsSlowQueryLogThresholdMs": 0, + "sqlApiEnabled": false, + "sqlApiAllowedStatements": [], + "sqlApiMaxRows": 1, + "sqlApiMaxBytes": 1024, + "sqlApiTimeoutSeconds": 1 +} +``` diff --git a/examples/2.3.x/server-rest/examples/oauth2/approve.md b/examples/2.3.x/server-rest/examples/oauth2/approve.md new file mode 100644 index 000000000..8d5dabc69 --- /dev/null +++ b/examples/2.3.x/server-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": "<GRANT_ID>", + "authorization_details": "<AUTHORIZATION_DETAILS>", + "scope": "<SCOPE>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/oauth2/authorize-post.md b/examples/2.3.x/server-rest/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..e0974827b --- /dev/null +++ b/examples/2.3.x/server-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": "<CLIENT_ID>", + "redirect_uri": "https://example.com", + "response_type": "", + "scope": "<SCOPE>", + "state": "<STATE>", + "nonce": "<NONCE>", + "code_challenge": "<CODE_CHALLENGE>", + "code_challenge_method": "s256", + "prompt": "<PROMPT>", + "max_age": 0, + "authorization_details": "<AUTHORIZATION_DETAILS>", + "resource": "", + "audience": "<AUDIENCE>", + "request_uri": "<REQUEST_URI>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/oauth2/authorize.md b/examples/2.3.x/server-rest/examples/oauth2/authorize.md new file mode 100644 index 000000000..eb58df4e3 --- /dev/null +++ b/examples/2.3.x/server-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/server-rest/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-rest/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..dc24bd063 --- /dev/null +++ b/examples/2.3.x/server-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": "<CLIENT_ID>", + "scope": "<SCOPE>", + "authorization_details": "<AUTHORIZATION_DETAILS>", + "resource": "", + "audience": "<AUDIENCE>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/oauth2/create-grant.md b/examples/2.3.x/server-rest/examples/oauth2/create-grant.md new file mode 100644 index 000000000..871c28106 --- /dev/null +++ b/examples/2.3.x/server-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": "<USER_CODE>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/oauth2/create-par.md b/examples/2.3.x/server-rest/examples/oauth2/create-par.md new file mode 100644 index 000000000..9e8c4c71f --- /dev/null +++ b/examples/2.3.x/server-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": "<CLIENT_ID>", + "redirect_uri": "https://example.com", + "response_type": "code", + "scope": "<SCOPE>", + "state": "<STATE>", + "nonce": "<NONCE>", + "code_challenge": "<CODE_CHALLENGE>", + "code_challenge_method": "s256", + "prompt": "<PROMPT>", + "max_age": 0, + "authorization_details": "<AUTHORIZATION_DETAILS>", + "resource": "", + "audience": "<AUDIENCE>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/oauth2/create-token.md b/examples/2.3.x/server-rest/examples/oauth2/create-token.md new file mode 100644 index 000000000..676439533 --- /dev/null +++ b/examples/2.3.x/server-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": "<GRANT_TYPE>", + "code": "<CODE>", + "refresh_token": "<REFRESH_TOKEN>", + "device_code": "<DEVICE_CODE>", + "client_id": "<CLIENT_ID>", + "client_secret": "<CLIENT_SECRET>", + "code_verifier": "<CODE_VERIFIER>", + "redirect_uri": "https://example.com", + "resource": "", + "audience": "<AUDIENCE>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/oauth2/get-grant.md b/examples/2.3.x/server-rest/examples/oauth2/get-grant.md new file mode 100644 index 000000000..a3ea3d852 --- /dev/null +++ b/examples/2.3.x/server-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/server-rest/examples/oauth2/list-organizations.md b/examples/2.3.x/server-rest/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..babe287c2 --- /dev/null +++ b/examples/2.3.x/server-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/server-rest/examples/oauth2/list-projects.md b/examples/2.3.x/server-rest/examples/oauth2/list-projects.md new file mode 100644 index 000000000..128ce8b32 --- /dev/null +++ b/examples/2.3.x/server-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/server-rest/examples/oauth2/reject.md b/examples/2.3.x/server-rest/examples/oauth2/reject.md new file mode 100644 index 000000000..4e0beece0 --- /dev/null +++ b/examples/2.3.x/server-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": "<GRANT_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/oauth2/revoke.md b/examples/2.3.x/server-rest/examples/oauth2/revoke.md new file mode 100644 index 000000000..3b9012586 --- /dev/null +++ b/examples/2.3.x/server-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>", + "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 new file mode 100644 index 000000000..b3775e56a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,13 @@ +```http +POST /v1/organization/projects/{projectId}/keys/ephemeral 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> + +{ + "scopes": [], + "duration": 600 +} +``` diff --git a/examples/2.3.x/server-rest/examples/organization/create-installation.md b/examples/2.3.x/server-rest/examples/organization/create-installation.md new file mode 100644 index 000000000..bec0d3d9e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/create-installation.md @@ -0,0 +1,13 @@ +```http +POST /v1/organization/installations 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> + +{ + "appId": "<APP_ID>", + "authorizationDetails": "<AUTHORIZATION_DETAILS>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/organization/create-membership.md b/examples/2.3.x/server-rest/examples/organization/create-membership.md new file mode 100644 index 000000000..e80b73123 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/create-membership.md @@ -0,0 +1,17 @@ +```http +POST /v1/organization/memberships 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> + +{ + "email": "email@example.com", + "userId": "<USER_ID>", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/organization/create-project.md b/examples/2.3.x/server-rest/examples/organization/create-project.md new file mode 100644 index 000000000..6718a318d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/create-project.md @@ -0,0 +1,14 @@ +```http +POST /v1/organization/projects 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> + +{ + "projectId": "<PROJECT_ID>", + "name": "<NAME>", + "region": "fra" +} +``` diff --git a/examples/2.3.x/server-rest/examples/organization/delete-installation.md b/examples/2.3.x/server-rest/examples/organization/delete-installation.md new file mode 100644 index 000000000..b06d8cf83 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/delete-installation.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/organization/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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/organization/delete-membership.md b/examples/2.3.x/server-rest/examples/organization/delete-membership.md new file mode 100644 index 000000000..076faef74 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/delete-membership.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/organization/memberships/{membershipId} 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/organization/delete-project-key.md b/examples/2.3.x/server-rest/examples/organization/delete-project-key.md new file mode 100644 index 000000000..e219a11cd --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/delete-project-key.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/organization/projects/{projectId}/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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/organization/delete-project.md b/examples/2.3.x/server-rest/examples/organization/delete-project.md new file mode 100644 index 000000000..e04129a03 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/delete-project.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/organization/projects/{projectId} 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/organization/delete.md b/examples/2.3.x/server-rest/examples/organization/delete.md new file mode 100644 index 000000000..b1a9dae9a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/organization 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/organization/get-installation.md b/examples/2.3.x/server-rest/examples/organization/get-installation.md new file mode 100644 index 000000000..f4acf641a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/get-installation.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/installations/{installationId} 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/organization/get-membership.md b/examples/2.3.x/server-rest/examples/organization/get-membership.md new file mode 100644 index 000000000..ef48c277a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/get-membership.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/memberships/{membershipId} 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/organization/get-project-key.md b/examples/2.3.x/server-rest/examples/organization/get-project-key.md new file mode 100644 index 000000000..c1ef3c1a7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/get-project-key.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/projects/{projectId}/keys/{keyId} 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/organization/get-project.md b/examples/2.3.x/server-rest/examples/organization/get-project.md new file mode 100644 index 000000000..34d3fa376 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/get-project.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/projects/{projectId} 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/organization/get.md b/examples/2.3.x/server-rest/examples/organization/get.md new file mode 100644 index 000000000..b9e46f6ec --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization 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/organization/list-installations.md b/examples/2.3.x/server-rest/examples/organization/list-installations.md new file mode 100644 index 000000000..8ab5fe60e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/list-installations.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/installations 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/organization/list-memberships.md b/examples/2.3.x/server-rest/examples/organization/list-memberships.md new file mode 100644 index 000000000..bebe5e90d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/list-memberships.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/memberships 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/organization/list-project-keys.md b/examples/2.3.x/server-rest/examples/organization/list-project-keys.md new file mode 100644 index 000000000..b8575e52d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/list-project-keys.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/projects/{projectId}/keys 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/organization/list-projects.md b/examples/2.3.x/server-rest/examples/organization/list-projects.md new file mode 100644 index 000000000..8925c41e1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/list-projects.md @@ -0,0 +1,7 @@ +```http +GET /v1/organization/projects 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/organization/update-installation.md b/examples/2.3.x/server-rest/examples/organization/update-installation.md new file mode 100644 index 000000000..f9fc9b541 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/update-installation.md @@ -0,0 +1,12 @@ +```http +PUT /v1/organization/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: <YOUR_PROJECT_ID> + +{ + "authorizationDetails": "<AUTHORIZATION_DETAILS>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/organization/update-membership.md b/examples/2.3.x/server-rest/examples/organization/update-membership.md new file mode 100644 index 000000000..15a2ff483 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/update-membership.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/organization/memberships/{membershipId} 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> + +{ + "roles": [] +} +``` 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 new file mode 100644 index 000000000..949db8a5e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/update-project-key.md @@ -0,0 +1,14 @@ +```http +PUT /v1/organization/projects/{projectId}/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: <YOUR_PROJECT_ID> + +{ + "name": "<NAME>", + "scopes": [], + "expire": "2020-10-15T06:38:00.000+00:00" +} +``` diff --git a/examples/2.3.x/server-rest/examples/organization/update-project.md b/examples/2.3.x/server-rest/examples/organization/update-project.md new file mode 100644 index 000000000..f19fb881d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/update-project.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/organization/projects/{projectId} 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>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/organization/update.md b/examples/2.3.x/server-rest/examples/organization/update.md new file mode 100644 index 000000000..d2238df62 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/organization/update.md @@ -0,0 +1,12 @@ +```http +PUT /v1/organization 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>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-rest/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..9680b58ba --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-backup-policy.md @@ -0,0 +1,17 @@ +```http +POST /v1/postgresql/{databaseId}/backups/policies 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> + +{ + "policyId": "<POLICY_ID>", + "name": "<NAME>", + "schedule": "", + "retention": 1, + "type": "full", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-backup.md b/examples/2.3.x/server-rest/examples/postgresql/create-backup.md new file mode 100644 index 000000000..cd950e8c4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-backup.md @@ -0,0 +1,12 @@ +```http +POST /v1/postgresql/{databaseId}/backups 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> + +{ + "type": "full" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-branch.md b/examples/2.3.x/server-rest/examples/postgresql/create-branch.md new file mode 100644 index 000000000..ccac946a3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-branch.md @@ -0,0 +1,13 @@ +```http +POST /v1/postgresql/{databaseId}/branches 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> + +{ + "branchId": "<BRANCH_ID>", + "ttl": 300 +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-execution.md b/examples/2.3.x/server-rest/examples/postgresql/create-execution.md new file mode 100644 index 000000000..855fbffeb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-execution.md @@ -0,0 +1,14 @@ +```http +POST /v1/postgresql/{databaseId}/executions 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> + +{ + "sql": "<SQL>", + "bindings": {}, + "timeoutSeconds": 1 +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-extension.md b/examples/2.3.x/server-rest/examples/postgresql/create-extension.md new file mode 100644 index 000000000..5cbcadf76 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-extension.md @@ -0,0 +1,12 @@ +```http +POST /v1/postgresql/{databaseId}/extensions 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>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-failover.md b/examples/2.3.x/server-rest/examples/postgresql/create-failover.md new file mode 100644 index 000000000..1db580974 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-failover.md @@ -0,0 +1,12 @@ +```http +POST /v1/postgresql/{databaseId}/failovers 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> + +{ + "targetReplicaId": "<TARGET_REPLICA_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-migration.md b/examples/2.3.x/server-rest/examples/postgresql/create-migration.md new file mode 100644 index 000000000..458b2fdd5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-migration.md @@ -0,0 +1,13 @@ +```http +POST /v1/postgresql/{databaseId}/migrations 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> + +{ + "targetType": "shared", + "specification": "<SPECIFICATION>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-restoration.md b/examples/2.3.x/server-rest/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..0b05b7864 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-restoration.md @@ -0,0 +1,15 @@ +```http +POST /v1/postgresql/{databaseId}/restorations 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> + +{ + "type": "backup", + "backupId": "<BACKUP_ID>", + "targetDatabaseId": "<TARGET_DATABASE_ID>", + "targetTime": "2020-10-15T06:38:00.000+00:00" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-rest/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..dad25c239 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create-upgrade.md @@ -0,0 +1,12 @@ +```http +POST /v1/postgresql/{databaseId}/upgrades 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> + +{ + "targetVersion": "<TARGET_VERSION>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/create.md b/examples/2.3.x/server-rest/examples/postgresql/create.md new file mode 100644 index 000000000..5d50831fa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/create.md @@ -0,0 +1,25 @@ +```http +POST /v1/postgresql 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> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "version": "17", + "specification": "<SPECIFICATION>", + "replicas": 0, + "syncMode": "async", + "networkIdleTimeoutSeconds": 60, + "networkIPAllowlist": [], + "idleTimeoutMinutes": 5, + "pitr": false, + "pitrRetentionDays": 1, + "storageAutoscaling": false, + "storageAutoscalingThresholdPercent": 50, + "storageAutoscalingMaxGb": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-rest/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..205b70ee3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/postgresql/{databaseId}/backups/policies/{policyId} 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/postgresql/delete-backup.md b/examples/2.3.x/server-rest/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..eab670d77 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/delete-backup.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/postgresql/{databaseId}/backups/{backupId} 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/postgresql/delete-branch.md b/examples/2.3.x/server-rest/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..478da7727 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/delete-branch.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/postgresql/{databaseId}/branches/{branchId} 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/postgresql/delete-extension.md b/examples/2.3.x/server-rest/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..f68dcb63c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/delete-extension.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/postgresql/{databaseId}/extensions/{extensionName} 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/postgresql/delete.md b/examples/2.3.x/server-rest/examples/postgresql/delete.md new file mode 100644 index 000000000..7d8d5c88e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/postgresql/{databaseId} 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/postgresql/get-backup-policy.md b/examples/2.3.x/server-rest/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..2fe101ad7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/get-backup-policy.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/backups/policies/{policyId} 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/postgresql/get-backup.md b/examples/2.3.x/server-rest/examples/postgresql/get-backup.md new file mode 100644 index 000000000..6bfa272c3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/get-backup.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/backups/{backupId} 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/postgresql/get-pitr.md b/examples/2.3.x/server-rest/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..037ff0854 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/get-pitr.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/pitr 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/postgresql/get-pooler.md b/examples/2.3.x/server-rest/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..2256b7f75 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/get-pooler.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/pooler 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/postgresql/get-replicas.md b/examples/2.3.x/server-rest/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..5bcb3e171 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/get-replicas.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/replicas 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/postgresql/get-restoration.md b/examples/2.3.x/server-rest/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..93a4ab8c9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/get-restoration.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/restorations/{restorationId} 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/postgresql/get-status.md b/examples/2.3.x/server-rest/examples/postgresql/get-status.md new file mode 100644 index 000000000..952755e02 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/get-status.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/status 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/postgresql/get.md b/examples/2.3.x/server-rest/examples/postgresql/get.md new file mode 100644 index 000000000..85caa58f1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId} 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/postgresql/list-backup-policies.md b/examples/2.3.x/server-rest/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..74e2faef4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/list-backup-policies.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/backups/policies 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/postgresql/list-backups.md b/examples/2.3.x/server-rest/examples/postgresql/list-backups.md new file mode 100644 index 000000000..29f93a91f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/list-backups.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/backups 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/postgresql/list-branches.md b/examples/2.3.x/server-rest/examples/postgresql/list-branches.md new file mode 100644 index 000000000..6a2f9af22 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/list-branches.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/branches 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/postgresql/list-extensions.md b/examples/2.3.x/server-rest/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..ad3105104 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/list-extensions.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/extensions 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/postgresql/list-operations.md b/examples/2.3.x/server-rest/examples/postgresql/list-operations.md new file mode 100644 index 000000000..56710f78f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/list-operations.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/operations 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/postgresql/list-restorations.md b/examples/2.3.x/server-rest/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..893b8a99e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/list-restorations.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/{databaseId}/restorations 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/postgresql/list-specifications.md b/examples/2.3.x/server-rest/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..17b1a5eb3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/list-specifications.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql/specifications 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/postgresql/list.md b/examples/2.3.x/server-rest/examples/postgresql/list.md new file mode 100644 index 000000000..1c8ed7536 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/postgresql 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/postgresql/update-backup-policy.md b/examples/2.3.x/server-rest/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..7faa351d7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/update-backup-policy.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/postgresql/{databaseId}/backups/policies/{policyId} 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>", + "schedule": "", + "retention": 1, + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-rest/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..6186bdd8e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/update-backup-storage.md @@ -0,0 +1,18 @@ +```http +PUT /v1/postgresql/{databaseId}/backups/storage 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> + +{ + "provider": "s3", + "bucket": "<BUCKET>", + "region": "<REGION>", + "prefix": "<PREFIX>", + "endpoint": "<ENDPOINT>", + "accessKey": "<ACCESS_KEY>", + "secretKey": "<SECRET_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/update-credentials.md b/examples/2.3.x/server-rest/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..5466c3305 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/update-credentials.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/postgresql/{databaseId}/credentials 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/postgresql/update-maintenance.md b/examples/2.3.x/server-rest/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..524ba27a8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/update-maintenance.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/postgresql/{databaseId}/maintenance 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> + +{ + "day": "sun", + "hourUtc": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/update-pooler.md b/examples/2.3.x/server-rest/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..fac596dc8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/update-pooler.md @@ -0,0 +1,19 @@ +```http +PATCH /v1/postgresql/{databaseId}/pooler 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> + +{ + "mode": "transaction", + "maxConnections": 10, + "defaultPoolSize": 1, + "readWriteSplitting": false, + "poolerCpuRequest": "<POOLER_CPU_REQUEST>", + "poolerCpuLimit": "<POOLER_CPU_LIMIT>", + "poolerMemoryRequest": "<POOLER_MEMORY_REQUEST>", + "poolerMemoryLimit": "<POOLER_MEMORY_LIMIT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/postgresql/update.md b/examples/2.3.x/server-rest/examples/postgresql/update.md new file mode 100644 index 000000000..e08c883fa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/postgresql/update.md @@ -0,0 +1,31 @@ +```http +PATCH /v1/postgresql/{databaseId} 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>", + "status": "ready", + "specification": "<SPECIFICATION>", + "replicas": 0, + "syncMode": "async", + "networkIdleTimeoutSeconds": 60, + "networkIPAllowlist": [], + "idleTimeoutMinutes": 5, + "pitr": false, + "pitrRetentionDays": 1, + "storageAutoscaling": false, + "storageAutoscalingThresholdPercent": 50, + "storageAutoscalingMaxGb": 0, + "metricsTraceSampleRate": 0, + "metricsSlowQueryLogThresholdMs": 0, + "sqlApiEnabled": false, + "sqlApiAllowedStatements": [], + "sqlApiMaxRows": 1, + "sqlApiMaxBytes": 1024, + "sqlApiTimeoutSeconds": 1 +} +``` diff --git a/examples/2.3.x/server-rest/examples/presences/delete.md b/examples/2.3.x/server-rest/examples/presences/delete.md new file mode 100644 index 000000000..70721ec2b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/presences/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/presences/{presenceId} 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/presences/get.md b/examples/2.3.x/server-rest/examples/presences/get.md new file mode 100644 index 000000000..a872e4109 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/presences/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/presences/{presenceId} 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/presences/list.md b/examples/2.3.x/server-rest/examples/presences/list.md new file mode 100644 index 000000000..a156b3e80 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/presences/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/presences 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/presences/update.md b/examples/2.3.x/server-rest/examples/presences/update.md new file mode 100644 index 000000000..23d75dfe7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/presences/update.md @@ -0,0 +1,17 @@ +```http +PATCH /v1/presences/{presenceId} 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> + +{ + "userId": "<USER_ID>", + "status": "<STATUS>", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": {}, + "permissions": ["read(\"any\")"], + "purge": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/presences/upsert.md b/examples/2.3.x/server-rest/examples/presences/upsert.md new file mode 100644 index 000000000..f4c6b68a5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/presences/upsert.md @@ -0,0 +1,16 @@ +```http +PUT /v1/presences/{presenceId} 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> + +{ + "userId": "<USER_ID>", + "status": "<STATUS>", + "permissions": ["read(\"any\")"], + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": {} +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/create-android-platform.md b/examples/2.3.x/server-rest/examples/project/create-android-platform.md new file mode 100644 index 000000000..332108e2a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-android-platform.md @@ -0,0 +1,14 @@ +```http +POST /v1/project/platforms/android 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> + +{ + "platformId": "<PLATFORM_ID>", + "name": "<NAME>", + "applicationId": "<APPLICATION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/create-apple-platform.md b/examples/2.3.x/server-rest/examples/project/create-apple-platform.md new file mode 100644 index 000000000..55242ca06 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-apple-platform.md @@ -0,0 +1,14 @@ +```http +POST /v1/project/platforms/apple 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> + +{ + "platformId": "<PLATFORM_ID>", + "name": "<NAME>", + "bundleIdentifier": "<BUNDLE_IDENTIFIER>" +} +``` 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 new file mode 100644 index 000000000..453eafbfb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-ephemeral-key.md @@ -0,0 +1,13 @@ +```http +POST /v1/project/keys/ephemeral 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> + +{ + "scopes": [], + "duration": 600 +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/create-linux-platform.md b/examples/2.3.x/server-rest/examples/project/create-linux-platform.md new file mode 100644 index 000000000..0a4c48c53 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-linux-platform.md @@ -0,0 +1,14 @@ +```http +POST /v1/project/platforms/linux 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> + +{ + "platformId": "<PLATFORM_ID>", + "name": "<NAME>", + "packageName": "<PACKAGE_NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/create-mock-phone.md b/examples/2.3.x/server-rest/examples/project/create-mock-phone.md new file mode 100644 index 000000000..7d475ef4b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-mock-phone.md @@ -0,0 +1,13 @@ +```http +POST /v1/project/mock-phones 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> + +{ + "number": "+12065550100", + "otp": "<OTP>" +} +``` 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 new file mode 100644 index 000000000..96a0765dd --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-smtp-test.md @@ -0,0 +1,12 @@ +```http +POST /v1/project/smtp/tests 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> + +{ + "emails": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/create-variable.md b/examples/2.3.x/server-rest/examples/project/create-variable.md new file mode 100644 index 000000000..ea2cc8f83 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-variable.md @@ -0,0 +1,15 @@ +```http +POST /v1/project/variables 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> + +{ + "variableId": "<VARIABLE_ID>", + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/create-web-platform.md b/examples/2.3.x/server-rest/examples/project/create-web-platform.md new file mode 100644 index 000000000..ba9cca5aa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-web-platform.md @@ -0,0 +1,14 @@ +```http +POST /v1/project/platforms/web 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> + +{ + "platformId": "<PLATFORM_ID>", + "name": "<NAME>", + "hostname": "app.example.com" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/create-windows-platform.md b/examples/2.3.x/server-rest/examples/project/create-windows-platform.md new file mode 100644 index 000000000..6ae45f92c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/create-windows-platform.md @@ -0,0 +1,14 @@ +```http +POST /v1/project/platforms/windows 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> + +{ + "platformId": "<PLATFORM_ID>", + "name": "<NAME>", + "packageIdentifierName": "<PACKAGE_IDENTIFIER_NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/delete-key.md b/examples/2.3.x/server-rest/examples/project/delete-key.md new file mode 100644 index 000000000..37f0bf6dc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/delete-key.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/project/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: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/project/delete-mock-phone.md b/examples/2.3.x/server-rest/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..c885ff0d2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/delete-mock-phone.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/project/mock-phones/{number} 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/project/delete-platform.md b/examples/2.3.x/server-rest/examples/project/delete-platform.md new file mode 100644 index 000000000..db2e269fa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/delete-platform.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/project/platforms/{platformId} 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/project/delete-variable.md b/examples/2.3.x/server-rest/examples/project/delete-variable.md new file mode 100644 index 000000000..d0fedff24 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/delete-variable.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/project/variables/{variableId} 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/project/delete.md b/examples/2.3.x/server-rest/examples/project/delete.md new file mode 100644 index 000000000..844690dd3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/project 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/project/get-email-template.md b/examples/2.3.x/server-rest/examples/project/get-email-template.md new file mode 100644 index 000000000..16c62c727 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/get-email-template.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/templates/email/{templateId} 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/project/get-key.md b/examples/2.3.x/server-rest/examples/project/get-key.md new file mode 100644 index 000000000..a6e29cf6f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/get-key.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/keys/{keyId} 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/project/get-mock-phone.md b/examples/2.3.x/server-rest/examples/project/get-mock-phone.md new file mode 100644 index 000000000..0b625713d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/get-mock-phone.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/mock-phones/{number} 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/project/get-o-auth-2-provider.md b/examples/2.3.x/server-rest/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..f5086dd2e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/oauth2/{providerId} 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/project/get-platform.md b/examples/2.3.x/server-rest/examples/project/get-platform.md new file mode 100644 index 000000000..c5457dc2b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/get-platform.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/platforms/{platformId} 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/project/get-policy.md b/examples/2.3.x/server-rest/examples/project/get-policy.md new file mode 100644 index 000000000..2f52e8cb6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/get-policy.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/policies/{policyId} 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/project/get-variable.md b/examples/2.3.x/server-rest/examples/project/get-variable.md new file mode 100644 index 000000000..58c371ecc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/get-variable.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/variables/{variableId} 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/project/get.md b/examples/2.3.x/server-rest/examples/project/get.md new file mode 100644 index 000000000..68bc0ee51 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/project 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/project/list-email-templates.md b/examples/2.3.x/server-rest/examples/project/list-email-templates.md new file mode 100644 index 000000000..d384d2b0d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/list-email-templates.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/templates/email 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/project/list-keys.md b/examples/2.3.x/server-rest/examples/project/list-keys.md new file mode 100644 index 000000000..b53f03212 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/list-keys.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/keys 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/project/list-mock-phones.md b/examples/2.3.x/server-rest/examples/project/list-mock-phones.md new file mode 100644 index 000000000..d0f0f4f4b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/list-mock-phones.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/mock-phones 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/project/list-o-auth-2-providers.md b/examples/2.3.x/server-rest/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..8483f11dc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/oauth2 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/project/list-platforms.md b/examples/2.3.x/server-rest/examples/project/list-platforms.md new file mode 100644 index 000000000..374f59726 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/list-platforms.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/platforms 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/project/list-policies.md b/examples/2.3.x/server-rest/examples/project/list-policies.md new file mode 100644 index 000000000..004ecbb11 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/list-policies.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/policies 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/project/list-variables.md b/examples/2.3.x/server-rest/examples/project/list-variables.md new file mode 100644 index 000000000..4db0d57fa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/list-variables.md @@ -0,0 +1,7 @@ +```http +GET /v1/project/variables 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/project/update-android-platform.md b/examples/2.3.x/server-rest/examples/project/update-android-platform.md new file mode 100644 index 000000000..91a0031d2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-android-platform.md @@ -0,0 +1,13 @@ +```http +PUT /v1/project/platforms/android/{platformId} 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>", + "applicationId": "<APPLICATION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-apple-platform.md b/examples/2.3.x/server-rest/examples/project/update-apple-platform.md new file mode 100644 index 000000000..6974d365b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-apple-platform.md @@ -0,0 +1,13 @@ +```http +PUT /v1/project/platforms/apple/{platformId} 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>", + "bundleIdentifier": "<BUNDLE_IDENTIFIER>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-auth-method.md b/examples/2.3.x/server-rest/examples/project/update-auth-method.md new file mode 100644 index 000000000..477c08c76 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-auth-method.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/auth-methods/{methodId} 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-rest/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..f51823d9e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/deny-aliased-email 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-rest/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..5d5835b4c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/deny-corporate-email 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-rest/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..05896fcc3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/deny-disposable-email 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-rest/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..bbd65af23 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/deny-free-email 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-email-template.md b/examples/2.3.x/server-rest/examples/project/update-email-template.md new file mode 100644 index 000000000..12f227191 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-email-template.md @@ -0,0 +1,19 @@ +```http +PATCH /v1/project/templates/email 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> + +{ + "templateId": "verification", + "locale": "af", + "subject": "<SUBJECT>", + "message": "<MESSAGE>", + "senderName": "<SENDER_NAME>", + "senderEmail": "email@example.com", + "replyToEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>" +} +``` 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 new file mode 100644 index 000000000..c32ba4f2f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-key.md @@ -0,0 +1,14 @@ +```http +PUT /v1/project/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: <YOUR_PROJECT_ID> + +{ + "name": "<NAME>", + "scopes": [], + "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 new file mode 100644 index 000000000..07a8dd86f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-labels.md @@ -0,0 +1,12 @@ +```http +PUT /v1/project/labels 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> + +{ + "labels": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-linux-platform.md b/examples/2.3.x/server-rest/examples/project/update-linux-platform.md new file mode 100644 index 000000000..d694d6483 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-linux-platform.md @@ -0,0 +1,13 @@ +```http +PUT /v1/project/platforms/linux/{platformId} 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>", + "packageName": "<PACKAGE_NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-rest/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..db16cf0be --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,17 @@ +```http +PATCH /v1/project/policies/membership-privacy 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> + +{ + "userId": false, + "userEmail": false, + "userPhone": false, + "userName": false, + "userMFA": false, + "userAccessedAt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-rest/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..6e04475ee --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-mfa-factors-policy.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/project/policies/mfa-factors 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> + +{ + "totp": false, + "email": false, + "phone": false, + "custom": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-mock-phone.md b/examples/2.3.x/server-rest/examples/project/update-mock-phone.md new file mode 100644 index 000000000..73b089241 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-mock-phone.md @@ -0,0 +1,12 @@ +```http +PUT /v1/project/mock-phones/{number} 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> + +{ + "otp": "<OTP>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..0f2637f2c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-amazon.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/amazon 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-apple.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..022f8371e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,18 @@ +```http +PATCH /v1/project/oauth2/apple 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> + +{ + "serviceId": "<SERVICE_ID>", + "keyId": "<KEY_ID>", + "teamId": "<TEAM_ID>", + "p8File": "<P8_FILE>", + "nativeClientIds": [], + "enabled": false, + "nativeEnabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..92d809e59 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-appwrite.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/appwrite 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-auth-0.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..0d143e5e4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-auth-0.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/project/oauth2/auth0 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>", + "endpoint": "<ENDPOINT>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..459cc40d4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-authentik.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/project/oauth2/authentik 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>", + "endpoint": "<ENDPOINT>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..39f8905c0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-autodesk.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/autodesk 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-bitbucket.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..859f0ccb7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-bitbucket.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/bitbucket 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> + +{ + "key": "<KEY>", + "secret": "<SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..ed8b3851d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-bitly.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/bitly 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-box.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..147502988 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-box.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/box 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-cloudflare.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..79dbf740a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-cloudflare.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/cloudflare 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-dailymotion.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..361414626 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-dailymotion.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/dailymotion 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> + +{ + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "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 new file mode 100644 index 000000000..02746ab74 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-discord.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/discord 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-disqus.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..cdd0ddaac --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-disqus.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/disqus 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> + +{ + "publicKey": "<PUBLIC_KEY>", + "secretKey": "<SECRET_KEY>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..00ae2f97d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-dropbox.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/dropbox 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> + +{ + "appKey": "<APP_KEY>", + "appSecret": "<APP_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..3d0c07b5c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-etsy.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/etsy 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> + +{ + "keyString": "<KEY_STRING>", + "sharedSecret": "<SHARED_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..934af607b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-facebook.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/facebook 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> + +{ + "appId": "<APP_ID>", + "appSecret": "<APP_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..3609bf05d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-figma.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/figma 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-fusion-auth.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..7d2025418 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/project/oauth2/fusionauth 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>", + "endpoint": "<ENDPOINT>", + "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 new file mode 100644 index 000000000..453a25386 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-git-hub.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/github 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-gitlab.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..40a0f3600 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-gitlab.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/project/oauth2/gitlab 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> + +{ + "applicationId": "<APPLICATION_ID>", + "secret": "<SECRET>", + "endpoint": "https://example.com", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..085122299 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-google.md @@ -0,0 +1,17 @@ +```http +PATCH /v1/project/oauth2/google 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>", + "prompt": [], + "nativeClientIds": [], + "enabled": false, + "nativeEnabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..4b6faff6c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-hugging-face.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/huggingface 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-kakao.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..306581b18 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kakao.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/kakao 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-keycloak.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..72dbb615f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/project/oauth2/keycloak 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>", + "endpoint": "<ENDPOINT>", + "realmName": "<REALM_NAME>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..656791000 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kick.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/kick 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-linkedin.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..5136b4b54 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-linkedin.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/linkedin 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>", + "primaryClientSecret": "<PRIMARY_CLIENT_SECRET>", + "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 new file mode 100644 index 000000000..36284b066 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-microsoft.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/project/oauth2/microsoft 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> + +{ + "applicationId": "<APPLICATION_ID>", + "applicationSecret": "<APPLICATION_SECRET>", + "tenant": "<TENANT>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..e423389c0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-notion.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/notion 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> + +{ + "oauthClientId": "<OAUTH_CLIENT_ID>", + "oauthClientSecret": "<OAUTH_CLIENT_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..e61f75144 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/project/oauth2/oidc 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>", + "wellKnownURL": "https://example.com", + "authorizationURL": "https://example.com", + "tokenURL": "https://example.com", + "userInfoURL": "https://example.com", + "prompt": [], + "maxAge": 0, + "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 new file mode 100644 index 000000000..3fa0c6d8f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/project/oauth2/okta 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>", + "domain": "example.com", + "authorizationServerId": "<AUTHORIZATION_SERVER_ID>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..4b36b5f2e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-paypal-sandbox.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/paypalSandbox 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>", + "secretKey": "<SECRET_KEY>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..f2fd3b7a2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-paypal.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/paypal 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>", + "secretKey": "<SECRET_KEY>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..c1d785ba4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-podio.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/podio 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-resend.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..913e19cfa --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-resend.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/resend 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-salesforce.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..a39520834 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-salesforce.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/salesforce 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> + +{ + "customerKey": "<CUSTOMER_KEY>", + "customerSecret": "<CUSTOMER_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..fe7471a1d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-server.md @@ -0,0 +1,27 @@ +```http +PUT /v1/project/oauth2-server 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> + +{ + "enabled": false, + "authorizationUrl": "https://example.com", + "scopes": [], + "authorizationDetailsTypes": [], + "accessTokenDuration": 60, + "refreshTokenDuration": 60, + "publicAccessTokenDuration": 60, + "publicRefreshTokenDuration": 60, + "installationAccessTokenDuration": 60, + "confidentialPkce": false, + "verificationUrl": "https://example.com", + "userCodeLength": 6, + "userCodeFormat": "numeric", + "deviceCodeDuration": 60, + "defaultScopes": [], + "installationScopes": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..8a45d8d0e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-slack.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/slack 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-spotify.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..0500cd552 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-spotify.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/spotify 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-stripe.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..e1b7ebff0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-stripe.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/stripe 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>", + "apiSecretKey": "<API_SECRET_KEY>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..93ec2dcc8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-tik-tok.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/tiktok 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-tradeshift-sandbox.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..a02934b79 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-tradeshift-sandbox.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/tradeshiftBox 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> + +{ + "oauth2ClientId": "<OAUTH2_CLIENT_ID>", + "oauth2ClientSecret": "<OAUTH2_CLIENT_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..22d6c866e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-tradeshift.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/tradeshift 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> + +{ + "oauth2ClientId": "<OAUTH2_CLIENT_ID>", + "oauth2ClientSecret": "<OAUTH2_CLIENT_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..6bec11da6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-twitch.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/twitch 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-word-press.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..eadb4512d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-word-press.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/wordpress 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-yahoo.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..54f47f159 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-yahoo.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/yahoo 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-yandex.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..f1a13942a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-yandex.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/yandex 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 new file mode 100644 index 000000000..5df4ec3ca --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-zoho.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/zoho 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-zoom.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..9754bce3c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-zoom.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/zoom 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-2x.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..763d9c46b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2x.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/x 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> + +{ + "customerKey": "<CUSTOMER_KEY>", + "secretKey": "<SECRET_KEY>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-rest/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..95810f61f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/password-dictionary 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-password-history-policy.md b/examples/2.3.x/server-rest/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..1bc2f44c7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-password-history-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/password-history 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> + +{ + "total": 1 +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-rest/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..a22cd0db9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/password-personal-data 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-rest/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..928a0d1ba --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-password-pwned-policy.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/policies/password-pwned 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> + +{ + "enabled": false, + "sessions": false, + "users": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-rest/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..8a8a60add --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-password-strength-policy.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/project/policies/password-strength 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> + +{ + "min": 8, + "uppercase": false, + "lowercase": false, + "number": false, + "symbols": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-protocol.md b/examples/2.3.x/server-rest/examples/project/update-protocol.md new file mode 100644 index 000000000..454f390de --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-protocol.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/protocols/{protocolId} 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-service.md b/examples/2.3.x/server-rest/examples/project/update-service.md new file mode 100644 index 000000000..d2c4508b9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-service.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/services/{serviceId} 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-rest/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..752d62e0e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-session-alert-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/session-alert 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-rest/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..3991966ed --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-session-duration-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/session-duration 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> + +{ + "duration": 60 +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-rest/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..378bff705 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/session-invalidation 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> + +{ + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-rest/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..81d9e38de --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-session-limit-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/session-limit 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> + +{ + "total": 1 +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-smtp.md b/examples/2.3.x/server-rest/examples/project/update-smtp.md new file mode 100644 index 000000000..c51c75d7c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-smtp.md @@ -0,0 +1,21 @@ +```http +PATCH /v1/project/smtp 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> + +{ + "host": "example.com", + "port": 587, + "username": "<USERNAME>", + "password": "password", + "senderEmail": "email@example.com", + "senderName": "<SENDER_NAME>", + "replyToEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "secure": "tls", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-rest/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..dc20428c8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-user-limit-policy.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/project/policies/user-limit 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> + +{ + "total": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-variable.md b/examples/2.3.x/server-rest/examples/project/update-variable.md new file mode 100644 index 000000000..a6d318575 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-variable.md @@ -0,0 +1,14 @@ +```http +PUT /v1/project/variables/{variableId} 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> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-web-platform.md b/examples/2.3.x/server-rest/examples/project/update-web-platform.md new file mode 100644 index 000000000..4a22cb44e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-web-platform.md @@ -0,0 +1,13 @@ +```http +PUT /v1/project/platforms/web/{platformId} 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>", + "hostname": "app.example.com" +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-windows-platform.md b/examples/2.3.x/server-rest/examples/project/update-windows-platform.md new file mode 100644 index 000000000..d95875555 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-windows-platform.md @@ -0,0 +1,13 @@ +```http +PUT /v1/project/platforms/windows/{platformId} 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>", + "packageIdentifierName": "<PACKAGE_IDENTIFIER_NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/proxy/create-api-rule.md b/examples/2.3.x/server-rest/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..54e11247d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/create-api-rule.md @@ -0,0 +1,12 @@ +```http +POST /v1/proxy/rules/api 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> + +{ + "domain": "example.com" +} +``` diff --git a/examples/2.3.x/server-rest/examples/proxy/create-function-rule.md b/examples/2.3.x/server-rest/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..548a10194 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/create-function-rule.md @@ -0,0 +1,14 @@ +```http +POST /v1/proxy/rules/function 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> + +{ + "domain": "example.com", + "functionId": "<FUNCTION_ID>", + "branch": "<BRANCH>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/proxy/create-invalidation.md b/examples/2.3.x/server-rest/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..d35c588db --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/create-invalidation.md @@ -0,0 +1,14 @@ +```http +POST /v1/proxy/invalidations 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> + +{ + "domain": "example.com", + "type": "tag", + "reference": "<REFERENCE>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-rest/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..f4ffccf60 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/create-redirect-rule.md @@ -0,0 +1,16 @@ +```http +POST /v1/proxy/rules/redirect 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> + +{ + "domain": "example.com", + "url": "https://example.com", + "statusCode": "301", + "resourceId": "<RESOURCE_ID>", + "resourceType": "site" +} +``` diff --git a/examples/2.3.x/server-rest/examples/proxy/create-site-rule.md b/examples/2.3.x/server-rest/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..5db8e397a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/create-site-rule.md @@ -0,0 +1,14 @@ +```http +POST /v1/proxy/rules/site 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> + +{ + "domain": "example.com", + "siteId": "<SITE_ID>", + "branch": "<BRANCH>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/proxy/delete-rule.md b/examples/2.3.x/server-rest/examples/proxy/delete-rule.md new file mode 100644 index 000000000..793b74b16 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/delete-rule.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/proxy/rules/{ruleId} 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/proxy/get-rule.md b/examples/2.3.x/server-rest/examples/proxy/get-rule.md new file mode 100644 index 000000000..e464e680e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/get-rule.md @@ -0,0 +1,7 @@ +```http +GET /v1/proxy/rules/{ruleId} 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/proxy/list-rules.md b/examples/2.3.x/server-rest/examples/proxy/list-rules.md new file mode 100644 index 000000000..0e60c0f88 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/list-rules.md @@ -0,0 +1,7 @@ +```http +GET /v1/proxy/rules 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/proxy/update-rule-status.md b/examples/2.3.x/server-rest/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..a9f2577f2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/proxy/update-rule-status.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/proxy/rules/{ruleId}/status 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/sites/create-deployment.md b/examples/2.3.x/server-rest/examples/sites/create-deployment.md new file mode 100644 index 000000000..1c1761ad9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/create-deployment.md @@ -0,0 +1,36 @@ +```http +POST /v1/sites/{siteId}/deployments 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="installCommand" + +"<INSTALL_COMMAND>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="buildCommand" + +"<BUILD_COMMAND>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="outputDirectory" + +"<OUTPUT_DIRECTORY>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +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 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/server-rest/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-rest/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..778867ee7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,12 @@ +```http +POST /v1/sites/{siteId}/deployments/duplicate 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> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/sites/create-template-deployment.md b/examples/2.3.x/server-rest/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..83639cc6e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +```http +POST /v1/sites/{siteId}/deployments/template 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> + +{ + "repository": "<REPOSITORY>", + "owner": "<OWNER>", + "rootDirectory": "<ROOT_DIRECTORY>", + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/sites/create-variable.md b/examples/2.3.x/server-rest/examples/sites/create-variable.md new file mode 100644 index 000000000..93451f97a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +```http +POST /v1/sites/{siteId}/variables 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> + +{ + "variableId": "<VARIABLE_ID>", + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-rest/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..c148888d3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/create-vcs-deployment.md @@ -0,0 +1,14 @@ +```http +POST /v1/sites/{siteId}/deployments/vcs 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> + +{ + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/sites/create.md b/examples/2.3.x/server-rest/examples/sites/create.md new file mode 100644 index 000000000..53f6f54fb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/create.md @@ -0,0 +1,35 @@ +```http +POST /v1/sites 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> + +{ + "siteId": "<SITE_ID>", + "name": "<NAME>", + "framework": "analog", + "enabled": false, + "logging": false, + "timeout": 1, + "installCommand": "<INSTALL_COMMAND>", + "buildCommand": "<BUILD_COMMAND>", + "startCommand": "<START_COMMAND>", + "outputDirectory": "<OUTPUT_DIRECTORY>", + "buildRuntime": "node-14.5", + "adapter": "static", + "installationId": "<INSTALLATION_ID>", + "fallbackFile": "<FALLBACK_FILE>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "providerBranches": [], + "providerPaths": [], + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "deploymentRetention": 0, + "scopes": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/sites/delete-deployment.md b/examples/2.3.x/server-rest/examples/sites/delete-deployment.md new file mode 100644 index 000000000..e667f066a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/delete-deployment.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/sites/{siteId}/deployments/{deploymentId} 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/sites/delete-log.md b/examples/2.3.x/server-rest/examples/sites/delete-log.md new file mode 100644 index 000000000..c87580ae3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/delete-log.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/sites/{siteId}/logs/{logId} 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/sites/delete-variable.md b/examples/2.3.x/server-rest/examples/sites/delete-variable.md new file mode 100644 index 000000000..198a0ff44 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/delete-variable.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/sites/{siteId}/variables/{variableId} 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/sites/delete.md b/examples/2.3.x/server-rest/examples/sites/delete.md new file mode 100644 index 000000000..00416edba --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/sites/{siteId} 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/sites/get-deployment-download.md b/examples/2.3.x/server-rest/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..ee3f1890f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/get-deployment-download.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/{siteId}/deployments/{deploymentId}/download HTTP/1.1 +Host: cloud.appwrite.io +Accept: */* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/sites/get-deployment.md b/examples/2.3.x/server-rest/examples/sites/get-deployment.md new file mode 100644 index 000000000..85c628f39 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/get-deployment.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/{siteId}/deployments/{deploymentId} 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/sites/get-log.md b/examples/2.3.x/server-rest/examples/sites/get-log.md new file mode 100644 index 000000000..af8a2ad0e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/get-log.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/{siteId}/logs/{logId} 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/sites/get-variable.md b/examples/2.3.x/server-rest/examples/sites/get-variable.md new file mode 100644 index 000000000..30f9dadbb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/get-variable.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/{siteId}/variables/{variableId} 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/sites/get.md b/examples/2.3.x/server-rest/examples/sites/get.md new file mode 100644 index 000000000..9183d6d91 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/{siteId} 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/sites/list-deployments.md b/examples/2.3.x/server-rest/examples/sites/list-deployments.md new file mode 100644 index 000000000..86b5aad93 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/list-deployments.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/{siteId}/deployments 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/sites/list-frameworks.md b/examples/2.3.x/server-rest/examples/sites/list-frameworks.md new file mode 100644 index 000000000..9248ae011 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/list-frameworks.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/frameworks 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/sites/list-logs.md b/examples/2.3.x/server-rest/examples/sites/list-logs.md new file mode 100644 index 000000000..70e5f10ff --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/list-logs.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/{siteId}/logs 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/sites/list-specifications.md b/examples/2.3.x/server-rest/examples/sites/list-specifications.md new file mode 100644 index 000000000..d8402de24 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/list-specifications.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/specifications 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/sites/list-variables.md b/examples/2.3.x/server-rest/examples/sites/list-variables.md new file mode 100644 index 000000000..e9887a853 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/list-variables.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites/{siteId}/variables 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/sites/list.md b/examples/2.3.x/server-rest/examples/sites/list.md new file mode 100644 index 000000000..6bf7aaf90 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/sites 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/sites/update-deployment-status.md b/examples/2.3.x/server-rest/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..5c950ae34 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/update-deployment-status.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/sites/{siteId}/deployments/{deploymentId}/status 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/sites/update-site-deployment.md b/examples/2.3.x/server-rest/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..036d98828 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/update-site-deployment.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/sites/{siteId}/deployment 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> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/sites/update-variable.md b/examples/2.3.x/server-rest/examples/sites/update-variable.md new file mode 100644 index 000000000..88b5afae7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/update-variable.md @@ -0,0 +1,14 @@ +```http +PUT /v1/sites/{siteId}/variables/{variableId} 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> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/sites/update.md b/examples/2.3.x/server-rest/examples/sites/update.md new file mode 100644 index 000000000..226a3b8de --- /dev/null +++ b/examples/2.3.x/server-rest/examples/sites/update.md @@ -0,0 +1,34 @@ +```http +PUT /v1/sites/{siteId} 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>", + "framework": "analog", + "enabled": false, + "logging": false, + "timeout": 1, + "installCommand": "<INSTALL_COMMAND>", + "buildCommand": "<BUILD_COMMAND>", + "startCommand": "<START_COMMAND>", + "outputDirectory": "<OUTPUT_DIRECTORY>", + "buildRuntime": "node-14.5", + "adapter": "static", + "fallbackFile": "<FALLBACK_FILE>", + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "providerBranches": [], + "providerPaths": [], + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "deploymentRetention": 0, + "scopes": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/storage/create-bucket.md b/examples/2.3.x/server-rest/examples/storage/create-bucket.md new file mode 100644 index 000000000..77a309d58 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/create-bucket.md @@ -0,0 +1,22 @@ +```http +POST /v1/storage/buckets 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> + +{ + "bucketId": "<BUCKET_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false, + "transformations": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/storage/create-file.md b/examples/2.3.x/server-rest/examples/storage/create-file.md new file mode 100644 index 000000000..d46117f79 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/create-file.md @@ -0,0 +1,31 @@ +```http +POST /v1/storage/buckets/{bucketId}/files 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="fileId" + +"<FILE_ID>" + +--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 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="folder" + +"photos/2026" + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/server-rest/examples/storage/delete-bucket.md b/examples/2.3.x/server-rest/examples/storage/delete-bucket.md new file mode 100644 index 000000000..2c271dc5c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/delete-bucket.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/storage/buckets/{bucketId} 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/storage/delete-file.md b/examples/2.3.x/server-rest/examples/storage/delete-file.md new file mode 100644 index 000000000..cbfff5eb3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/delete-file.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} 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/storage/get-bucket.md b/examples/2.3.x/server-rest/examples/storage/get-bucket.md new file mode 100644 index 000000000..f6a68a263 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/get-bucket.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId} 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/storage/get-file-download.md b/examples/2.3.x/server-rest/examples/storage/get-file-download.md new file mode 100644 index 000000000..2d7f52d86 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/get-file-download.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: cloud.appwrite.io +Accept: */* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/storage/get-file-preview.md b/examples/2.3.x/server-rest/examples/storage/get-file-preview.md new file mode 100644 index 000000000..4ff6429ab --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/get-file-preview.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: cloud.appwrite.io +Accept: image/* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/storage/get-file-view.md b/examples/2.3.x/server-rest/examples/storage/get-file-view.md new file mode 100644 index 000000000..97ff6cd71 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/get-file-view.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: cloud.appwrite.io +Accept: */* +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/storage/get-file.md b/examples/2.3.x/server-rest/examples/storage/get-file.md new file mode 100644 index 000000000..ef97d4ebf --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/get-file.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files/{fileId} 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/storage/list-buckets.md b/examples/2.3.x/server-rest/examples/storage/list-buckets.md new file mode 100644 index 000000000..f5a89b7b9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/list-buckets.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets 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/storage/list-files.md b/examples/2.3.x/server-rest/examples/storage/list-files.md new file mode 100644 index 000000000..35c7e0f5b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/list-files.md @@ -0,0 +1,7 @@ +```http +GET /v1/storage/buckets/{bucketId}/files 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/storage/update-bucket.md b/examples/2.3.x/server-rest/examples/storage/update-bucket.md new file mode 100644 index 000000000..cdc05f009 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +```http +PUT /v1/storage/buckets/{bucketId} 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>", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false, + "transformations": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/storage/update-file.md b/examples/2.3.x/server-rest/examples/storage/update-file.md new file mode 100644 index 000000000..23741785b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/storage/update-file.md @@ -0,0 +1,13 @@ +```http +PUT /v1/storage/buckets/{bucketId}/files/{fileId} 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>", + "permissions": ["read(\"any\")"] +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..6a568b69a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,17 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/bigint 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> + +{ + "key": "<KEY>", + "required": false, + "min": 0, + "max": 1000000, + "default": 0, + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..df8f7ac65 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,15 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/boolean 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> + +{ + "key": "<KEY>", + "required": false, + "default": false, + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-rest/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..f4a3b8b2e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-cutover.md @@ -0,0 +1,9 @@ +```http +POST /v1/tablesdb/{databaseId}/migrations/{migrationId}/cutovers 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/tablesdb/create-datetime-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..d23637037 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,15 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/datetime 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> + +{ + "key": "<KEY>", + "required": false, + "default": "2020-10-15T06:38:00.000+00:00", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..5d4369c51 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-email-column.md @@ -0,0 +1,15 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/email 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> + +{ + "key": "<KEY>", + "required": false, + "default": "email@example.com", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..60450ea5d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-enum-column.md @@ -0,0 +1,16 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/enum 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> + +{ + "key": "<KEY>", + "elements": ["active", "inactive"], + "required": false, + "default": "active", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-failover.md b/examples/2.3.x/server-rest/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..327da549b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-failover.md @@ -0,0 +1,12 @@ +```http +POST /v1/tablesdb/{databaseId}/failovers 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> + +{ + "targetReplicaId": "<TARGET_REPLICA_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..b36d6d46c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-float-column.md @@ -0,0 +1,17 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/float 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> + +{ + "key": "<KEY>", + "required": false, + "min": 0, + "max": 100, + "default": 10.5, + "array": 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 new file mode 100644 index 000000000..2c51ed6db --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-index.md @@ -0,0 +1,16 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/indexes 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> + +{ + "key": "<KEY>", + "type": "key", + "columns": [], + "orders": [], + "lengths": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..7c95179c8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-integer-column.md @@ -0,0 +1,17 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/integer 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> + +{ + "key": "<KEY>", + "required": false, + "min": 0, + "max": 100, + "default": 10, + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..12d270c7b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-ip-column.md @@ -0,0 +1,15 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/ip 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> + +{ + "key": "<KEY>", + "required": false, + "default": "192.0.2.0", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..6d36a2033 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-line-column.md @@ -0,0 +1,14 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/line 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> + +{ + "key": "<KEY>", + "required": false, + "default": [[1, 2], [3, 4], [5, 6]] +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..eeb9f29a6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,16 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/longtext 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> + +{ + "key": "<KEY>", + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..5b11e3611 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,16 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext 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> + +{ + "key": "<KEY>", + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-migration.md b/examples/2.3.x/server-rest/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..8ab07fb74 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-migration.md @@ -0,0 +1,13 @@ +```http +POST /v1/tablesdb/{databaseId}/migrations 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> + +{ + "specification": "s-1vcpu-1gb", + "autoCutover": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-operations.md b/examples/2.3.x/server-rest/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..8a5b1fa42 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-operations.md @@ -0,0 +1,22 @@ +```http +POST /v1/tablesdb/transactions/{transactionId}/operations 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> + +{ + "operations": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..288396fac --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-point-column.md @@ -0,0 +1,14 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/point 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> + +{ + "key": "<KEY>", + "required": false, + "default": [1, 2] +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..99563c258 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,14 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/polygon 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> + +{ + "key": "<KEY>", + "required": false, + "default": [[[1, 2], [3, 4], [5, 6], [1, 2]]] +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..a38006af1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,17 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/relationship 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> + +{ + "relatedTableId": "<RELATED_TABLE_ID>", + "type": "oneToOne", + "twoWay": false, + "key": "<KEY>", + "twoWayKey": "<TWO_WAY_KEY>", + "onDelete": "cascade" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-row.md b/examples/2.3.x/server-rest/examples/tablesdb/create-row.md new file mode 100644 index 000000000..a36367c5d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-row.md @@ -0,0 +1,21 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows 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> + +{ + "rowId": "<ROW_ID>", + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` 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 new file mode 100644 index 000000000..f8e2a3478 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-rows.md @@ -0,0 +1,13 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows 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> + +{ + "rows": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..db4f4d3c1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-string-column.md @@ -0,0 +1,17 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/string 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> + +{ + "key": "<KEY>", + "size": 1, + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-table.md b/examples/2.3.x/server-rest/examples/tablesdb/create-table.md new file mode 100644 index 000000000..144d24165 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-table.md @@ -0,0 +1,18 @@ +```http +POST /v1/tablesdb/{databaseId}/tables 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> + +{ + "tableId": "<TABLE_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false, + "columns": [], + "indexes": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..fadd633f9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-text-column.md @@ -0,0 +1,16 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/text 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> + +{ + "key": "<KEY>", + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-rest/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..e3eadf4cb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-transaction.md @@ -0,0 +1,12 @@ +```http +POST /v1/tablesdb/transactions 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> + +{ + "ttl": 60 +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..d5918eee2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-url-column.md @@ -0,0 +1,15 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/url 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> + +{ + "key": "<KEY>", + "required": false, + "default": "https://example.com", + "array": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-rest/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..6e11d6e69 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,17 @@ +```http +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/varchar 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> + +{ + "key": "<KEY>", + "size": 1, + "required": false, + "default": "Hello World", + "array": false, + "encrypt": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create.md b/examples/2.3.x/server-rest/examples/tablesdb/create.md new file mode 100644 index 000000000..b03c61c1c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/create.md @@ -0,0 +1,17 @@ +```http +POST /v1/tablesdb 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> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false, + "specification": "serverless", + "replicas": 0, + "syncMode": "async" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-rest/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..5c6ce0f01 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement 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> + +{ + "value": 1, + "min": 0, + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/delete-column.md b/examples/2.3.x/server-rest/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..73159c159 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/delete-column.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/columns/{key} 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/tablesdb/delete-index.md b/examples/2.3.x/server-rest/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..91b500d2b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/delete-index.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/indexes/{key} 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/tablesdb/delete-migration.md b/examples/2.3.x/server-rest/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..3583baf19 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/delete-migration.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/{databaseId}/migrations/{migrationId} 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/tablesdb/delete-row.md b/examples/2.3.x/server-rest/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..3f989a76c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/delete-row.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} 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/tablesdb/delete-rows.md b/examples/2.3.x/server-rest/examples/tablesdb/delete-rows.md new file mode 100644 index 000000000..90ddee7fe --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/delete-rows.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows 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/tablesdb/delete-table.md b/examples/2.3.x/server-rest/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..45d705ac6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/delete-table.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/{databaseId}/tables/{tableId} 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/tablesdb/delete-transaction.md b/examples/2.3.x/server-rest/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..de9680c61 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/delete-transaction.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/transactions/{transactionId} 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/tablesdb/delete.md b/examples/2.3.x/server-rest/examples/tablesdb/delete.md new file mode 100644 index 000000000..eacbc471b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tablesdb/{databaseId} 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/tablesdb/get-column.md b/examples/2.3.x/server-rest/examples/tablesdb/get-column.md new file mode 100644 index 000000000..01d8e5fff --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get-column.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId}/columns/{key} 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/tablesdb/get-index.md b/examples/2.3.x/server-rest/examples/tablesdb/get-index.md new file mode 100644 index 000000000..537dfe35b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get-index.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId}/indexes/{key} 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/tablesdb/get-migration.md b/examples/2.3.x/server-rest/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..59f36a232 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get-migration.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/migrations/{migrationId} 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/tablesdb/get-replicas.md b/examples/2.3.x/server-rest/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..de5325b16 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get-replicas.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/replicas 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/tablesdb/get-row.md b/examples/2.3.x/server-rest/examples/tablesdb/get-row.md new file mode 100644 index 000000000..b54f17302 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get-row.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} 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/tablesdb/get-status.md b/examples/2.3.x/server-rest/examples/tablesdb/get-status.md new file mode 100644 index 000000000..b6717997d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get-status.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/status 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/tablesdb/get-table.md b/examples/2.3.x/server-rest/examples/tablesdb/get-table.md new file mode 100644 index 000000000..c454b31e0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get-table.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId} 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/tablesdb/get-transaction.md b/examples/2.3.x/server-rest/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..6ce8f644b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get-transaction.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/transactions/{transactionId} 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/tablesdb/get.md b/examples/2.3.x/server-rest/examples/tablesdb/get.md new file mode 100644 index 000000000..c89359722 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId} 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/tablesdb/increment-row-column.md b/examples/2.3.x/server-rest/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..0e9f6b36d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/increment-row-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment 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> + +{ + "value": 1, + "max": 100, + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/list-columns.md b/examples/2.3.x/server-rest/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..1a7c778c4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list-columns.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId}/columns 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/tablesdb/list-indexes.md b/examples/2.3.x/server-rest/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..37d77233b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list-indexes.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId}/indexes 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/tablesdb/list-migrations.md b/examples/2.3.x/server-rest/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..4cb0889f1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list-migrations.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/migrations 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/tablesdb/list-operations.md b/examples/2.3.x/server-rest/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..dda234996 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list-operations.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/operations 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/tablesdb/list-rows.md b/examples/2.3.x/server-rest/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..374ff3a9a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list-rows.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows 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/tablesdb/list-specifications.md b/examples/2.3.x/server-rest/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..adcadbb4d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list-specifications.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/specifications 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/tablesdb/list-tables.md b/examples/2.3.x/server-rest/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..30406b4ea --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list-tables.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/{databaseId}/tables 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/tablesdb/list-transactions.md b/examples/2.3.x/server-rest/examples/tablesdb/list-transactions.md new file mode 100644 index 000000000..151eeff1b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list-transactions.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb/transactions 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/tablesdb/list.md b/examples/2.3.x/server-rest/examples/tablesdb/list.md new file mode 100644 index 000000000..3f4acec2f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/tablesdb 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/tablesdb/update-big-int-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..cc58369c1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/bigint/{key} 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> + +{ + "required": false, + "min": 0, + "max": 1000000, + "default": 0, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..d0173d8ff --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key} 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> + +{ + "required": false, + "default": false, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..abc19e147 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key} 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> + +{ + "required": false, + "default": "2020-10-15T06:38:00.000+00:00", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..b4f3c8b4d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-email-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key} 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> + +{ + "required": false, + "default": "email@example.com", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..a5f57a7ce --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-enum-column.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key} 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> + +{ + "elements": ["active", "inactive"], + "required": false, + "default": "active", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..3c32484fd --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-float-column.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key} 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> + +{ + "required": false, + "min": 0, + "max": 100, + "default": 10.5, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..b20b3dbb7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-integer-column.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key} 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> + +{ + "required": false, + "min": 0, + "max": 100, + "default": 10, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..657433934 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-ip-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key} 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> + +{ + "required": false, + "default": "192.0.2.0", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..0615a165c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-line-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key} 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> + +{ + "required": false, + "default": [[1, 2], [3, 4], [5, 6]], + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..62d0906c8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key} 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> + +{ + "required": false, + "default": "Hello World", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..0b25bcb78 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key} 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> + +{ + "required": false, + "default": "Hello World", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..7d4c5a458 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-point-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key} 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> + +{ + "required": false, + "default": [1, 2], + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..6ba3a92ea --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key} 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> + +{ + "required": false, + "default": [[[1, 2], [3, 4], [5, 6], [1, 2]]], + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..693aa2fdb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/relationship/{key} 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> + +{ + "onDelete": "cascade", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-row.md b/examples/2.3.x/server-rest/examples/tablesdb/update-row.md new file mode 100644 index 000000000..b1747bd31 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-row.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} 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> + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-rows.md b/examples/2.3.x/server-rest/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..a57622626 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-rows.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows 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> + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, + "queries": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..014b48b29 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-string-column.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key} 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> + +{ + "required": false, + "default": "Hello World", + "size": 1, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-table.md b/examples/2.3.x/server-rest/examples/tablesdb/update-table.md new file mode 100644 index 000000000..830e2a8da --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-table.md @@ -0,0 +1,16 @@ +```http +PUT /v1/tablesdb/{databaseId}/tables/{tableId} 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>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false, + "purge": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..05496a627 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-text-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key} 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> + +{ + "required": false, + "default": "Hello World", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-rest/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..e71e7ca81 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-transaction.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/tablesdb/transactions/{transactionId} 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> + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..d7c756717 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-url-column.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key} 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> + +{ + "required": false, + "default": "https://example.com", + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-rest/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..8a74b4103 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,15 @@ +```http +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key} 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> + +{ + "required": false, + "default": "Hello World", + "size": 1, + "newKey": "<NEW_KEY>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/update.md b/examples/2.3.x/server-rest/examples/tablesdb/update.md new file mode 100644 index 000000000..b586f760f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/update.md @@ -0,0 +1,16 @@ +```http +PUT /v1/tablesdb/{databaseId} 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>", + "enabled": false, + "specification": "serverless", + "replicas": 0, + "syncMode": "async" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-rest/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..6c7ebc074 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/upsert-row.md @@ -0,0 +1,20 @@ +```http +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} 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> + +{ + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + }, + "permissions": ["read(\"any\")"], + "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 new file mode 100644 index 000000000..2c43a30df --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tablesdb/upsert-rows.md @@ -0,0 +1,13 @@ +```http +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows 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> + +{ + "rows": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/teams/create-installation.md b/examples/2.3.x/server-rest/examples/teams/create-installation.md new file mode 100644 index 000000000..ed26bd178 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/create-installation.md @@ -0,0 +1,13 @@ +```http +POST /v1/teams/{teamId}/installations 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> + +{ + "appId": "<APP_ID>", + "authorizationDetails": "<AUTHORIZATION_DETAILS>" +} +``` 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 new file mode 100644 index 000000000..c4840217f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +```http +POST /v1/teams/{teamId}/memberships 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> + +{ + "email": "email@example.com", + "userId": "<USER_ID>", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/teams/create.md b/examples/2.3.x/server-rest/examples/teams/create.md new file mode 100644 index 000000000..f6b14347c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/create.md @@ -0,0 +1,14 @@ +```http +POST /v1/teams 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> + +{ + "teamId": "<TEAM_ID>", + "name": "<NAME>", + "roles": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/teams/delete-installation.md b/examples/2.3.x/server-rest/examples/teams/delete-installation.md new file mode 100644 index 000000000..83c753b4d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/delete-installation.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/teams/delete-membership.md b/examples/2.3.x/server-rest/examples/teams/delete-membership.md new file mode 100644 index 000000000..7f07cd3ae --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/delete-membership.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/teams/{teamId}/memberships/{membershipId} 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/teams/delete.md b/examples/2.3.x/server-rest/examples/teams/delete.md new file mode 100644 index 000000000..c53e5fb68 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/teams/{teamId} 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/teams/get-installation.md b/examples/2.3.x/server-rest/examples/teams/get-installation.md new file mode 100644 index 000000000..fd34bb104 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/get-installation.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/installations/{installationId} 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/teams/get-membership.md b/examples/2.3.x/server-rest/examples/teams/get-membership.md new file mode 100644 index 000000000..80210cf1b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/get-membership.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/memberships/{membershipId} 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/teams/get-prefs.md b/examples/2.3.x/server-rest/examples/teams/get-prefs.md new file mode 100644 index 000000000..904afc75d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/get-prefs.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/prefs 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/teams/get.md b/examples/2.3.x/server-rest/examples/teams/get.md new file mode 100644 index 000000000..5f7f1c9d7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId} 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/teams/list-installations.md b/examples/2.3.x/server-rest/examples/teams/list-installations.md new file mode 100644 index 000000000..890f6677d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/list-installations.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/installations 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/teams/list-memberships.md b/examples/2.3.x/server-rest/examples/teams/list-memberships.md new file mode 100644 index 000000000..d9c8783be --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/list-memberships.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams/{teamId}/memberships 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/teams/list.md b/examples/2.3.x/server-rest/examples/teams/list.md new file mode 100644 index 000000000..81ab77c48 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/teams 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/teams/update-installation.md b/examples/2.3.x/server-rest/examples/teams/update-installation.md new file mode 100644 index 000000000..671c4f1b3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/update-installation.md @@ -0,0 +1,12 @@ +```http +PUT /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "authorizationDetails": "<AUTHORIZATION_DETAILS>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/teams/update-membership-status.md b/examples/2.3.x/server-rest/examples/teams/update-membership-status.md new file mode 100644 index 000000000..d2b79b661 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/update-membership-status.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status 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> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} +``` 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 new file mode 100644 index 000000000..22358a94d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/update-membership.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/teams/{teamId}/memberships/{membershipId} 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> + +{ + "roles": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/teams/update-name.md b/examples/2.3.x/server-rest/examples/teams/update-name.md new file mode 100644 index 000000000..7357765b3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/update-name.md @@ -0,0 +1,12 @@ +```http +PUT /v1/teams/{teamId} 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>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/teams/update-prefs.md b/examples/2.3.x/server-rest/examples/teams/update-prefs.md new file mode 100644 index 000000000..cd21f1287 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/teams/update-prefs.md @@ -0,0 +1,12 @@ +```http +PUT /v1/teams/{teamId}/prefs 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> + +{ + "prefs": {} +} +``` diff --git a/examples/2.3.x/server-rest/examples/tokens/create-file-token.md b/examples/2.3.x/server-rest/examples/tokens/create-file-token.md new file mode 100644 index 000000000..3e9b5c9c6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tokens/create-file-token.md @@ -0,0 +1,12 @@ +```http +POST /v1/tokens/buckets/{bucketId}/files/{fileId} 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> + +{ + "expire": "2020-10-15T06:38:00.000+00:00" +} +``` diff --git a/examples/2.3.x/server-rest/examples/tokens/delete.md b/examples/2.3.x/server-rest/examples/tokens/delete.md new file mode 100644 index 000000000..eb3e839f5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tokens/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/tokens/{tokenId} 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/tokens/get.md b/examples/2.3.x/server-rest/examples/tokens/get.md new file mode 100644 index 000000000..43ce3698f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tokens/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/tokens/{tokenId} 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/tokens/list.md b/examples/2.3.x/server-rest/examples/tokens/list.md new file mode 100644 index 000000000..9207b3ed4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tokens/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/tokens/buckets/{bucketId}/files/{fileId} 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/tokens/update.md b/examples/2.3.x/server-rest/examples/tokens/update.md new file mode 100644 index 000000000..d76f5b44a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/tokens/update.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/tokens/{tokenId} 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> + +{ + "expire": "2020-10-15T06:38:00.000+00:00" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-argon-2-user.md b/examples/2.3.x/server-rest/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..dd445f55e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-argon-2-user.md @@ -0,0 +1,15 @@ +```http +POST /v1/users/argon2 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-rest/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..60475080a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +```http +POST /v1/users/bcrypt 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-jwt.md b/examples/2.3.x/server-rest/examples/users/create-jwt.md new file mode 100644 index 000000000..f14872957 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-jwt.md @@ -0,0 +1,13 @@ +```http +POST /v1/users/{userId}/jwts 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> + +{ + "sessionId": "recent()", + "duration": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-md-5-user.md b/examples/2.3.x/server-rest/examples/users/create-md-5-user.md new file mode 100644 index 000000000..1995818c9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-md-5-user.md @@ -0,0 +1,15 @@ +```http +POST /v1/users/md5 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-rest/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..84f657265 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```http +PATCH /v1/users/{userId}/mfa/recovery-codes 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/users/create-ph-pass-user.md b/examples/2.3.x/server-rest/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..d9a9c9ad1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-ph-pass-user.md @@ -0,0 +1,15 @@ +```http +POST /v1/users/phpass 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-rest/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..cf1fff7ba --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +```http +POST /v1/users/scrypt-modified 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordSalt": "<PASSWORD_SALT>", + "passwordSaltSeparator": "<PASSWORD_SALT_SEPARATOR>", + "passwordSignerKey": "<PASSWORD_SIGNER_KEY>", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-scrypt-user.md b/examples/2.3.x/server-rest/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..b6ea3a060 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +```http +POST /v1/users/scrypt 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordSalt": "<PASSWORD_SALT>", + "passwordCpu": 8, + "passwordMemory": 65536, + "passwordParallel": 1, + "passwordLength": 64, + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-session.md b/examples/2.3.x/server-rest/examples/users/create-session.md new file mode 100644 index 000000000..cc14aff8e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-session.md @@ -0,0 +1,9 @@ +```http +POST /v1/users/{userId}/sessions 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/users/create-sha-user.md b/examples/2.3.x/server-rest/examples/users/create-sha-user.md new file mode 100644 index 000000000..4d3209ec2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-sha-user.md @@ -0,0 +1,16 @@ +```http +POST /v1/users/sha 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordVersion": "sha1", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-target.md b/examples/2.3.x/server-rest/examples/users/create-target.md new file mode 100644 index 000000000..e30aa4a34 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-target.md @@ -0,0 +1,16 @@ +```http +POST /v1/users/{userId}/targets 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> + +{ + "targetId": "<TARGET_ID>", + "providerType": "email", + "identifier": "<IDENTIFIER>", + "providerId": "<PROVIDER_ID>", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create-token.md b/examples/2.3.x/server-rest/examples/users/create-token.md new file mode 100644 index 000000000..bbd773d7d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create-token.md @@ -0,0 +1,13 @@ +```http +POST /v1/users/{userId}/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: <YOUR_PROJECT_ID> + +{ + "length": 4, + "expire": 60 +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/create.md b/examples/2.3.x/server-rest/examples/users/create.md new file mode 100644 index 000000000..6bec2ed2c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/create.md @@ -0,0 +1,16 @@ +```http +POST /v1/users 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> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "phone": "+12065550100", + "password": "password", + "name": "<NAME>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/delete-identity.md b/examples/2.3.x/server-rest/examples/users/delete-identity.md new file mode 100644 index 000000000..c44ff9dc9 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/delete-identity.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/users/identities/{identityId} 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/users/delete-mfa-authenticator.md b/examples/2.3.x/server-rest/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..998fc2c01 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/users/{userId}/mfa/authenticators/{type} 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/users/delete-session.md b/examples/2.3.x/server-rest/examples/users/delete-session.md new file mode 100644 index 000000000..18941ba79 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/delete-session.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/users/{userId}/sessions/{sessionId} 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/users/delete-sessions.md b/examples/2.3.x/server-rest/examples/users/delete-sessions.md new file mode 100644 index 000000000..c020bcd17 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/delete-sessions.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/users/{userId}/sessions 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/users/delete-target.md b/examples/2.3.x/server-rest/examples/users/delete-target.md new file mode 100644 index 000000000..70bbf25ca --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/delete-target.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/users/{userId}/targets/{targetId} 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/users/delete.md b/examples/2.3.x/server-rest/examples/users/delete.md new file mode 100644 index 000000000..03eedc9af --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/users/{userId} 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/users/get-mfa-challenge.md b/examples/2.3.x/server-rest/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..8d218d584 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/get-mfa-challenge.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId}/mfa/challenges/{challengeId} 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/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-rest/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..dd63bd611 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId}/mfa/recovery-codes 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/users/get-prefs.md b/examples/2.3.x/server-rest/examples/users/get-prefs.md new file mode 100644 index 000000000..b84382fb7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/get-prefs.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId}/prefs 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/users/get-target.md b/examples/2.3.x/server-rest/examples/users/get-target.md new file mode 100644 index 000000000..098355583 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/get-target.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId}/targets/{targetId} 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/users/get.md b/examples/2.3.x/server-rest/examples/users/get.md new file mode 100644 index 000000000..911df0aa2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId} 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/users/list-identities.md b/examples/2.3.x/server-rest/examples/users/list-identities.md new file mode 100644 index 000000000..cfdbf5329 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/list-identities.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/identities 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/users/list-memberships.md b/examples/2.3.x/server-rest/examples/users/list-memberships.md new file mode 100644 index 000000000..7cffddb34 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/list-memberships.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId}/memberships 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/users/list-mfa-factors.md b/examples/2.3.x/server-rest/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..0c4445448 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/list-mfa-factors.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId}/mfa/factors 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/users/list-sessions.md b/examples/2.3.x/server-rest/examples/users/list-sessions.md new file mode 100644 index 000000000..779636f7b --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/list-sessions.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId}/sessions 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/users/list-targets.md b/examples/2.3.x/server-rest/examples/users/list-targets.md new file mode 100644 index 000000000..45a759b1c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/list-targets.md @@ -0,0 +1,7 @@ +```http +GET /v1/users/{userId}/targets 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/users/list.md b/examples/2.3.x/server-rest/examples/users/list.md new file mode 100644 index 000000000..f3c41e04a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/users 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/users/update-email-verification.md b/examples/2.3.x/server-rest/examples/users/update-email-verification.md new file mode 100644 index 000000000..2ed9b69bf --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-email-verification.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/verification 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> + +{ + "emailVerification": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-email.md b/examples/2.3.x/server-rest/examples/users/update-email.md new file mode 100644 index 000000000..240e9ddf5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-email.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/email 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> + +{ + "email": "email@example.com" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-impersonator.md b/examples/2.3.x/server-rest/examples/users/update-impersonator.md new file mode 100644 index 000000000..b58706053 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-impersonator.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/impersonator 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> + +{ + "impersonator": false +} +``` 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 new file mode 100644 index 000000000..64a6805f4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-labels.md @@ -0,0 +1,12 @@ +```http +PUT /v1/users/{userId}/labels 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> + +{ + "labels": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-rest/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..3a10577bb --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +```http +PUT /v1/users/{userId}/mfa/recovery-codes 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/users/update-mfa.md b/examples/2.3.x/server-rest/examples/users/update-mfa.md new file mode 100644 index 000000000..62d8fd646 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-mfa.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/mfa 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> + +{ + "mfa": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-name.md b/examples/2.3.x/server-rest/examples/users/update-name.md new file mode 100644 index 000000000..addf34cf3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-name.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/name 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>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-password.md b/examples/2.3.x/server-rest/examples/users/update-password.md new file mode 100644 index 000000000..8dcce3165 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-password.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/password 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> + +{ + "password": "password" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-phone-verification.md b/examples/2.3.x/server-rest/examples/users/update-phone-verification.md new file mode 100644 index 000000000..6cab14d6e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-phone-verification.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/verification/phone 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> + +{ + "phoneVerification": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-phone.md b/examples/2.3.x/server-rest/examples/users/update-phone.md new file mode 100644 index 000000000..1c40eb572 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-phone.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/phone 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> + +{ + "number": "+12065550100" +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-prefs.md b/examples/2.3.x/server-rest/examples/users/update-prefs.md new file mode 100644 index 000000000..bf14b1318 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-prefs.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/prefs 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> + +{ + "prefs": {} +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-status.md b/examples/2.3.x/server-rest/examples/users/update-status.md new file mode 100644 index 000000000..44d9fd6c0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-status.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/users/{userId}/status 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> + +{ + "status": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/users/update-target.md b/examples/2.3.x/server-rest/examples/users/update-target.md new file mode 100644 index 000000000..2d2d32dc0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/users/update-target.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/users/{userId}/targets/{targetId} 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> + +{ + "identifier": "<IDENTIFIER>", + "providerId": "<PROVIDER_ID>", + "name": "<NAME>" +} +``` 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 new file mode 100644 index 000000000..229c76ec0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-collection.md @@ -0,0 +1,17 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections 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> + +{ + "collectionId": "<COLLECTION_ID>", + "name": "<NAME>", + "dimension": 1, + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create-document.md b/examples/2.3.x/server-rest/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..7b7df3bc5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-document.md @@ -0,0 +1,25 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "documentId": "<DOCUMENT_ID>", + "data": { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` 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 new file mode 100644 index 000000000..5d7d25329 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-documents.md @@ -0,0 +1,13 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "documents": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-rest/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..56420b1e5 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-failover.md @@ -0,0 +1,12 @@ +```http +POST /v1/vectorsdb/{databaseId}/failovers 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> + +{ + "targetReplicaId": "<TARGET_REPLICA_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 new file mode 100644 index 000000000..9bed79bbd --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-index.md @@ -0,0 +1,16 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "key": "<KEY>", + "type": "hnsw_euclidean", + "attributes": [], + "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 new file mode 100644 index 000000000..9f34f5b34 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-operations.md @@ -0,0 +1,22 @@ +```http +POST /v1/vectorsdb/transactions/{transactionId}/operations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "operations": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create-query.md b/examples/2.3.x/server-rest/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..2c9f8080d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-query.md @@ -0,0 +1,15 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/query HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "queries": [], + "transactionId": "<TRANSACTION_ID>", + "total": false, + "ttl": 0 +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-rest/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..7cdba97f8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-transaction.md @@ -0,0 +1,12 @@ +```http +POST /v1/vectorsdb/transactions 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> + +{ + "ttl": 60 +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create.md b/examples/2.3.x/server-rest/examples/vectorsdb/create.md new file mode 100644 index 000000000..65b365eea --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create.md @@ -0,0 +1,17 @@ +```http +POST /v1/vectorsdb 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> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false, + "specification": "serverless", + "replicas": 0, + "syncMode": "async" +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-rest/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..b6539a2ee --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/delete-collection.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId} 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/vectorsdb/delete-document.md b/examples/2.3.x/server-rest/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..1d47c9165 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/delete-document.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-rest/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..a682069fc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/delete-documents.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-rest/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..9624bc131 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/delete-index.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId}/indexes/{key} 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/vectorsdb/delete-transaction.md b/examples/2.3.x/server-rest/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..241c0b626 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/vectorsdb/transactions/{transactionId} 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/vectorsdb/delete.md b/examples/2.3.x/server-rest/examples/vectorsdb/delete.md new file mode 100644 index 000000000..723d3c7d4 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/vectorsdb/{databaseId} 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/vectorsdb/get-collection.md b/examples/2.3.x/server-rest/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..b51271c44 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/get-collection.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId} 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/vectorsdb/get-document.md b/examples/2.3.x/server-rest/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..2e2c467f7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/get-document.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} 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/vectorsdb/get-index.md b/examples/2.3.x/server-rest/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..0dad8dfb0 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/get-index.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/indexes/{key} 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/vectorsdb/get-replicas.md b/examples/2.3.x/server-rest/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..67aaa8eab --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/get-replicas.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/replicas 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/vectorsdb/get-status.md b/examples/2.3.x/server-rest/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..9e6cce526 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/get-status.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/status 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/vectorsdb/get-transaction.md b/examples/2.3.x/server-rest/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..36180f219 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/get-transaction.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/transactions/{transactionId} 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/vectorsdb/get.md b/examples/2.3.x/server-rest/examples/vectorsdb/get.md new file mode 100644 index 000000000..db5004e9d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId} 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/vectorsdb/list-collections.md b/examples/2.3.x/server-rest/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..7e594bfe1 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/list-collections.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections 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/vectorsdb/list-documents.md b/examples/2.3.x/server-rest/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..40fb060fd --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/list-documents.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents 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/vectorsdb/list-indexes.md b/examples/2.3.x/server-rest/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..c4b083f3f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/list-indexes.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/indexes 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/vectorsdb/list-operations.md b/examples/2.3.x/server-rest/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..eca6307ce --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/list-operations.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/{databaseId}/operations 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/vectorsdb/list-specifications.md b/examples/2.3.x/server-rest/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..e592f8ea3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/list-specifications.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/specifications 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/vectorsdb/list-transactions.md b/examples/2.3.x/server-rest/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..659efa4dc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/list-transactions.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb/transactions 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/vectorsdb/list.md b/examples/2.3.x/server-rest/examples/vectorsdb/list.md new file mode 100644 index 000000000..5c2f8fe2c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/vectorsdb 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/vectorsdb/update-collection.md b/examples/2.3.x/server-rest/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..2ab3dc84f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/update-collection.md @@ -0,0 +1,16 @@ +```http +PUT /v1/vectorsdb/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "name": "<NAME>", + "dimension": 1, + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/update-document.md b/examples/2.3.x/server-rest/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..aba8122e3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/update-document.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-rest/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..771c760a3 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/update-documents.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "data": {}, + "queries": [], + "transactionId": "<TRANSACTION_ID>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-rest/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..3851b7624 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/update-transaction.md @@ -0,0 +1,13 @@ +```http +PATCH /v1/vectorsdb/transactions/{transactionId} 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> + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/update.md b/examples/2.3.x/server-rest/examples/vectorsdb/update.md new file mode 100644 index 000000000..365e102c6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/update.md @@ -0,0 +1,16 @@ +```http +PUT /v1/vectorsdb/{databaseId} 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>", + "enabled": false, + "specification": "serverless", + "replicas": 0, + "syncMode": "async" +} +``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-rest/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..45b66eb4d --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/upsert-document.md @@ -0,0 +1,14 @@ +```http +PUT /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "<TRANSACTION_ID>" +} +``` 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 new file mode 100644 index 000000000..102c69e97 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,13 @@ +```http +PUT /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "documents": [], + "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 new file mode 100644 index 000000000..3515358f8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/webhooks/create.md @@ -0,0 +1,20 @@ +```http +POST /v1/webhooks 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> + +{ + "webhookId": "<WEBHOOK_ID>", + "url": "https://example.com/webhook", + "name": "<NAME>", + "events": [], + "enabled": false, + "tls": false, + "authUsername": "<AUTH_USERNAME>", + "authPassword": "password", + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/webhooks/delete.md b/examples/2.3.x/server-rest/examples/webhooks/delete.md new file mode 100644 index 000000000..9e5b3837c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/webhooks/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/webhooks/{webhookId} 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/webhooks/get.md b/examples/2.3.x/server-rest/examples/webhooks/get.md new file mode 100644 index 000000000..76dbc1176 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/webhooks/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/webhooks/{webhookId} 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/webhooks/list.md b/examples/2.3.x/server-rest/examples/webhooks/list.md new file mode 100644 index 000000000..f7e26d1f8 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/webhooks/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/webhooks 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/webhooks/update-secret.md b/examples/2.3.x/server-rest/examples/webhooks/update-secret.md new file mode 100644 index 000000000..8fe93cc68 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/webhooks/update-secret.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/webhooks/{webhookId}/secret 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> + +{ + "secret": "<SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/webhooks/update.md b/examples/2.3.x/server-rest/examples/webhooks/update.md new file mode 100644 index 000000000..a29585a49 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/webhooks/update.md @@ -0,0 +1,18 @@ +```http +PUT /v1/webhooks/{webhookId} 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/webhook", + "events": [], + "enabled": false, + "tls": false, + "authUsername": "<AUTH_USERNAME>", + "authPassword": "password" +} +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-anonymous-session.md b/examples/2.3.x/server-ruby/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..0fce57505 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-anonymous-session.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 + +account = Account.new(client) + +result = account.create_anonymous_session() +``` 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 new file mode 100644 index 000000000..57ab742da --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-email-password-session.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.create_email_password_session( + email: 'email@example.com', + password: 'password' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-email-token.md b/examples/2.3.x/server-ruby/examples/account/create-email-token.md new file mode 100644 index 000000000..e259f8132 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-email-token.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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_email_token( + user_id: '<USER_ID>', + email: 'email@example.com', + phrase: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-ruby/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..618575b39 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-email-verification-otp.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 + +account = Account.new(client) + +result = account.create_email_verification_otp( + phrase: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-email-verification.md b/examples/2.3.x/server-ruby/examples/account/create-email-verification.md new file mode 100644 index 000000000..b2351cc46 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-email-verification.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 + +account = Account.new(client) + +result = account.create_email_verification( + url: 'https://example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-id-token-session.md b/examples/2.3.x/server-ruby/examples/account/create-id-token-session.md new file mode 100644 index 000000000..3a244017c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-id-token-session.md @@ -0,0 +1,22 @@ +```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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_id_token_session( + provider: IdTokenProvider::APPLE, + id_token: '<ID_TOKEN>', + nonce: '<NONCE>', # optional + access_token: '<ACCESS_TOKEN>', # optional + access_token_expiry: 0, # optional + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-magic-url-token.md b/examples/2.3.x/server-ruby/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..e84c21512 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-magic-url-token.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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_magic_url_token( + user_id: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', # optional + phrase: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-ruby/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..5d80789dc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-mfa-authenticator.md @@ -0,0 +1,17 @@ +```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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_mfa_authenticator( + type: AuthenticatorType::TOTP +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-ruby/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..117f86f89 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-mfa-challenge.md @@ -0,0 +1,17 @@ +```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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_mfa_challenge( + factor: AuthenticationFactor::EMAIL +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-ruby/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..680f9df3e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-mfa-recovery-codes.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 + +account = Account.new(client) + +result = account.create_mfa_recovery_codes() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-ruby/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..4dbba2f03 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-o-auth-2-token.md @@ -0,0 +1,20 @@ +```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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_o_auth2_token( + provider: OAuthProvider::AMAZON, + success: 'https://example.com', # optional + failure: 'https://example.com', # optional + scopes: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-phone-token.md b/examples/2.3.x/server-ruby/examples/account/create-phone-token.md new file mode 100644 index 000000000..e291fd0ed --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-phone-token.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.create_phone_token( + user_id: '<USER_ID>', + phone: '+12065550100' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-phone-verification.md b/examples/2.3.x/server-ruby/examples/account/create-phone-verification.md new file mode 100644 index 000000000..0bf3df115 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-phone-verification.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 + +account = Account.new(client) + +result = account.create_phone_verification() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-recovery-otp.md b/examples/2.3.x/server-ruby/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..06aff8ecd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-recovery-otp.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.create_recovery_otp( + email: 'email@example.com', + phrase: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-recovery.md b/examples/2.3.x/server-ruby/examples/account/create-recovery.md new file mode 100644 index 000000000..380dde1d2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-recovery.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.create_recovery( + email: 'email@example.com', + url: 'https://example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-session.md b/examples/2.3.x/server-ruby/examples/account/create-session.md new file mode 100644 index 000000000..dcc2bd7ef --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-session.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.create_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create-verification.md b/examples/2.3.x/server-ruby/examples/account/create-verification.md new file mode 100644 index 000000000..278198864 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create-verification.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 + +account = Account.new(client) + +result = account.create_verification( + url: 'https://example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/create.md b/examples/2.3.x/server-ruby/examples/account/create.md new file mode 100644 index 000000000..683fd89dd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/create.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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/delete-consent-token.md b/examples/2.3.x/server-ruby/examples/account/delete-consent-token.md new file mode 100644 index 000000000..3e3c11e5f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/delete-consent-token.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.delete_consent_token( + consent_id: '<CONSENT_ID>', + token_id: '<TOKEN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/delete-consent.md b/examples/2.3.x/server-ruby/examples/account/delete-consent.md new file mode 100644 index 000000000..b673c2047 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/delete-consent.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 + +account = Account.new(client) + +result = account.delete_consent( + consent_id: '<CONSENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/delete-identity.md b/examples/2.3.x/server-ruby/examples/account/delete-identity.md new file mode 100644 index 000000000..fa6a2264f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/delete-identity.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 + +account = Account.new(client) + +result = account.delete_identity( + identity_id: '<IDENTITY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-ruby/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..76efdab1f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,17 @@ +```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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_mfa_authenticator( + type: AuthenticatorType::TOTP +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/delete-session.md b/examples/2.3.x/server-ruby/examples/account/delete-session.md new file mode 100644 index 000000000..83a201ce3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/delete-session.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 + +account = Account.new(client) + +result = account.delete_session( + session_id: '<SESSION_ID>' +) +``` 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 new file mode 100644 index 000000000..3008032f0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/delete-sessions.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 + +account = Account.new(client) + +result = account.delete_sessions() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/get-consent-token.md b/examples/2.3.x/server-ruby/examples/account/get-consent-token.md new file mode 100644 index 000000000..d65e22ddd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/get-consent-token.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.get_consent_token( + consent_id: '<CONSENT_ID>', + token_id: '<TOKEN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/get-consent.md b/examples/2.3.x/server-ruby/examples/account/get-consent.md new file mode 100644 index 000000000..8fe59764d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/get-consent.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 + +account = Account.new(client) + +result = account.get_consent( + consent_id: '<CONSENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-ruby/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..144abb0bd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/get-mfa-recovery-codes.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 + +account = Account.new(client) + +result = account.get_mfa_recovery_codes() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/get-prefs.md b/examples/2.3.x/server-ruby/examples/account/get-prefs.md new file mode 100644 index 000000000..9cbebfea1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/get-prefs.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 + +account = Account.new(client) + +result = account.get_prefs() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/get-session.md b/examples/2.3.x/server-ruby/examples/account/get-session.md new file mode 100644 index 000000000..d8b68f099 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/get-session.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 + +account = Account.new(client) + +result = account.get_session( + session_id: '<SESSION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/get.md b/examples/2.3.x/server-ruby/examples/account/get.md new file mode 100644 index 000000000..4615dab17 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/get.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 + +account = Account.new(client) + +result = account.get() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/list-consent-tokens.md b/examples/2.3.x/server-ruby/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..1d7f6049f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/list-consent-tokens.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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_consent_tokens( + consent_id: '<CONSENT_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/list-consents.md b/examples/2.3.x/server-ruby/examples/account/list-consents.md new file mode 100644 index 000000000..968c1e55a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/list-consents.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.list_consents( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/list-identities.md b/examples/2.3.x/server-ruby/examples/account/list-identities.md new file mode 100644 index 000000000..e66dade30 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/list-identities.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.list_identities( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/list-mfa-factors.md b/examples/2.3.x/server-ruby/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..c172d71a7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/list-mfa-factors.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 + +account = Account.new(client) + +result = account.list_mfa_factors() +``` 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 new file mode 100644 index 000000000..47d2c033c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/list-sessions.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 + +account = Account.new(client) + +result = account.list_sessions() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-ruby/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..dd20ac13a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-email-verification-otp.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_email_verification_otp( + user_id: '<USER_ID>', + secret: '<SECRET>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-email-verification.md b/examples/2.3.x/server-ruby/examples/account/update-email-verification.md new file mode 100644 index 000000000..143d7924f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-email-verification.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_email_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-email.md b/examples/2.3.x/server-ruby/examples/account/update-email.md new file mode 100644 index 000000000..606a93651 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-email.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_email( + email: 'email@example.com', + password: 'password' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-magic-url-session.md b/examples/2.3.x/server-ruby/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..e37318283 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-magic-url-session.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_magic_url_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-ruby/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..89c165264 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-mfa-authenticator.md @@ -0,0 +1,18 @@ +```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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_authenticator( + type: AuthenticatorType::TOTP, + otp: '<OTP>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-ruby/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..60e271f45 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-mfa-challenge.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_mfa_challenge( + challenge_id: '<CHALLENGE_ID>', + otp: '<OTP>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-ruby/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..e9bd85857 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-mfa-recovery-codes.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 + +account = Account.new(client) + +result = account.update_mfa_recovery_codes() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-mfa.md b/examples/2.3.x/server-ruby/examples/account/update-mfa.md new file mode 100644 index 000000000..1806f7c4a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-mfa.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 + +account = Account.new(client) + +result = account.update_mfa( + mfa: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-name.md b/examples/2.3.x/server-ruby/examples/account/update-name.md new file mode 100644 index 000000000..9904c8c40 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-name.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 + +account = Account.new(client) + +result = account.update_name( + name: '<NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-password.md b/examples/2.3.x/server-ruby/examples/account/update-password.md new file mode 100644 index 000000000..1e9aba5ad --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-password.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_password( + password: 'password', + old_password: 'password' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-phone-session.md b/examples/2.3.x/server-ruby/examples/account/update-phone-session.md new file mode 100644 index 000000000..318840494 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-phone-session.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_phone_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-phone-verification.md b/examples/2.3.x/server-ruby/examples/account/update-phone-verification.md new file mode 100644 index 000000000..a3904a9a1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-phone-verification.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_phone_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-phone.md b/examples/2.3.x/server-ruby/examples/account/update-phone.md new file mode 100644 index 000000000..6501becc1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-phone.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_phone( + phone: '+12065550100', + password: 'password' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-prefs.md b/examples/2.3.x/server-ruby/examples/account/update-prefs.md new file mode 100644 index 000000000..847cff42d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-prefs.md @@ -0,0 +1,20 @@ +```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 + +account = Account.new(client) + +result = account.update_prefs( + prefs: { + "language" => "en", + "timezone" => "UTC", + "darkTheme" => true + } +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-recovery-otp.md b/examples/2.3.x/server-ruby/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..4376249cc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-recovery-otp.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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_recovery_otp( + user_id: '<USER_ID>', + secret: '<SECRET>', + password: 'password' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-recovery.md b/examples/2.3.x/server-ruby/examples/account/update-recovery.md new file mode 100644 index 000000000..e3cfb643b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-recovery.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_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_recovery( + user_id: '<USER_ID>', + secret: '<SECRET>', + password: 'password' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-session.md b/examples/2.3.x/server-ruby/examples/account/update-session.md new file mode 100644 index 000000000..5919db026 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-session.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 + +account = Account.new(client) + +result = account.update_session( + session_id: '<SESSION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-status.md b/examples/2.3.x/server-ruby/examples/account/update-status.md new file mode 100644 index 000000000..725bd31ca --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-status.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 + +account = Account.new(client) + +result = account.update_status() +``` diff --git a/examples/2.3.x/server-ruby/examples/account/update-verification.md b/examples/2.3.x/server-ruby/examples/account/update-verification.md new file mode 100644 index 000000000..bee759fc9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/account/update-verification.md @@ -0,0 +1,17 @@ +```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 + +account = Account.new(client) + +result = account.update_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/activities/get-event.md b/examples/2.3.x/server-ruby/examples/activities/get-event.md new file mode 100644 index 000000000..b2cf05970 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/activities/get-event.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 + +activities = Activities.new(client) + +result = activities.get_event( + event_id: '<EVENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/activities/list-events.md b/examples/2.3.x/server-ruby/examples/activities/list-events.md new file mode 100644 index 000000000..dd1ea3542 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/activities/list-events.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 + +activities = Activities.new(client) + +result = activities.list_events( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/advisor/delete-report.md b/examples/2.3.x/server-ruby/examples/advisor/delete-report.md new file mode 100644 index 000000000..1139bb71e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/advisor/delete-report.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 + +advisor = Advisor.new(client) + +result = advisor.delete_report( + report_id: '<REPORT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/advisor/get-insight.md b/examples/2.3.x/server-ruby/examples/advisor/get-insight.md new file mode 100644 index 000000000..e9fd0ac31 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/advisor/get-insight.md @@ -0,0 +1,17 @@ +```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 + +advisor = Advisor.new(client) + +result = advisor.get_insight( + report_id: '<REPORT_ID>', + insight_id: '<INSIGHT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/advisor/get-report.md b/examples/2.3.x/server-ruby/examples/advisor/get-report.md new file mode 100644 index 000000000..919cc2850 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/advisor/get-report.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 + +advisor = Advisor.new(client) + +result = advisor.get_report( + report_id: '<REPORT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/advisor/list-insights.md b/examples/2.3.x/server-ruby/examples/advisor/list-insights.md new file mode 100644 index 000000000..59e97ad87 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/advisor/list-insights.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 + +advisor = Advisor.new(client) + +result = advisor.list_insights( + report_id: '<REPORT_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/advisor/list-reports.md b/examples/2.3.x/server-ruby/examples/advisor/list-reports.md new file mode 100644 index 000000000..11670c30a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/advisor/list-reports.md @@ -0,0 +1,17 @@ +```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 + +advisor = Advisor.new(client) + +result = advisor.list_reports( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/create-installation-token.md b/examples/2.3.x/server-ruby/examples/apps/create-installation-token.md new file mode 100644 index 000000000..4a4ea2535 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/create-installation-token.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.create_installation_token( + app_id: '<APP_ID>', + installation_id: '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/create-key.md b/examples/2.3.x/server-ruby/examples/apps/create-key.md new file mode 100644 index 000000000..312434779 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/create-key.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 + +apps = Apps.new(client) + +result = apps.create_key( + app_id: '<APP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/create-secret.md b/examples/2.3.x/server-ruby/examples/apps/create-secret.md new file mode 100644 index 000000000..7b26ea6ad --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/create-secret.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 + +apps = Apps.new(client) + +result = apps.create_secret( + app_id: '<APP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/create.md b/examples/2.3.x/server-ruby/examples/apps/create.md new file mode 100644 index 000000000..94da7f010 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/create.md @@ -0,0 +1,34 @@ +```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 + +apps = Apps.new(client) + +result = apps.create( + app_id: '<APP_ID>', + name: '<NAME>', + redirect_uris: [], + description: '<DESCRIPTION>', # optional + client_uri: 'https://example.com', # optional + logo_uri: 'https://example.com', # optional + privacy_policy_url: 'https://example.com', # optional + terms_url: 'https://example.com', # optional + contacts: [], # optional + tagline: '<TAGLINE>', # optional + tags: [], # optional + images: [], # optional + support_url: 'https://example.com', # optional + data_deletion_url: 'https://example.com', # optional + post_logout_redirect_uris: [], # optional + enabled: false, # optional + type: 'public', # optional + device_flow: false, # optional + team_id: '<TEAM_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/delete-installation.md b/examples/2.3.x/server-ruby/examples/apps/delete-installation.md new file mode 100644 index 000000000..d975728dd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/delete-installation.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.delete_installation( + app_id: '<APP_ID>', + installation_id: '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/delete-key.md b/examples/2.3.x/server-ruby/examples/apps/delete-key.md new file mode 100644 index 000000000..70ea81fac --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/delete-key.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.delete_key( + app_id: '<APP_ID>', + key_id: '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/delete-secret.md b/examples/2.3.x/server-ruby/examples/apps/delete-secret.md new file mode 100644 index 000000000..a0335204d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/delete-secret.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.delete_secret( + app_id: '<APP_ID>', + secret_id: '<SECRET_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/delete-tokens.md b/examples/2.3.x/server-ruby/examples/apps/delete-tokens.md new file mode 100644 index 000000000..e15cf22bb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/delete-tokens.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 + +apps = Apps.new(client) + +result = apps.delete_tokens( + app_id: '<APP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/delete.md b/examples/2.3.x/server-ruby/examples/apps/delete.md new file mode 100644 index 000000000..614c50270 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/delete.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 + +apps = Apps.new(client) + +result = apps.delete( + app_id: '<APP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/get-installation.md b/examples/2.3.x/server-ruby/examples/apps/get-installation.md new file mode 100644 index 000000000..08a949cfd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/get-installation.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.get_installation( + app_id: '<APP_ID>', + installation_id: '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/get-key.md b/examples/2.3.x/server-ruby/examples/apps/get-key.md new file mode 100644 index 000000000..b6b1c2afe --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/get-key.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.get_key( + app_id: '<APP_ID>', + key_id: '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/get-secret.md b/examples/2.3.x/server-ruby/examples/apps/get-secret.md new file mode 100644 index 000000000..57adff386 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/get-secret.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.get_secret( + app_id: '<APP_ID>', + secret_id: '<SECRET_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/get.md b/examples/2.3.x/server-ruby/examples/apps/get.md new file mode 100644 index 000000000..9f06a501e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/get.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 + +apps = Apps.new(client) + +result = apps.get( + app_id: '<APP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-ruby/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..eef52129a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/list-installation-scopes.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 + +apps = Apps.new(client) + +result = apps.list_installation_scopes() +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/list-installations.md b/examples/2.3.x/server-ruby/examples/apps/list-installations.md new file mode 100644 index 000000000..81becbcf7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/list-installations.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_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list_installations( + app_id: '<APP_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/list-keys.md b/examples/2.3.x/server-ruby/examples/apps/list-keys.md new file mode 100644 index 000000000..9a7e19ec3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/list-keys.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_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list_keys( + app_id: '<APP_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-ruby/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..92cbb8046 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,14 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list_o_auth2_scopes() +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/list-secrets.md b/examples/2.3.x/server-ruby/examples/apps/list-secrets.md new file mode 100644 index 000000000..f77289035 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/list-secrets.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_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list_secrets( + app_id: '<APP_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/list.md b/examples/2.3.x/server-ruby/examples/apps/list.md new file mode 100644 index 000000000..75ab272ee --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/list.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.list( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/update-labels.md b/examples/2.3.x/server-ruby/examples/apps/update-labels.md new file mode 100644 index 000000000..1705f8bfe --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/update-labels.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.update_labels( + app_id: '<APP_ID>', + labels: [] +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/update-team.md b/examples/2.3.x/server-ruby/examples/apps/update-team.md new file mode 100644 index 000000000..a47a58e51 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/update-team.md @@ -0,0 +1,17 @@ +```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 + +apps = Apps.new(client) + +result = apps.update_team( + app_id: '<APP_ID>', + team_id: '<TEAM_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/apps/update.md b/examples/2.3.x/server-ruby/examples/apps/update.md new file mode 100644 index 000000000..f8fd0a32f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/apps/update.md @@ -0,0 +1,35 @@ +```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 + +apps = Apps.new(client) + +result = apps.update( + app_id: '<APP_ID>', + name: '<NAME>', + description: '<DESCRIPTION>', # optional + client_uri: 'https://example.com', # optional + logo_uri: 'https://example.com', # optional + privacy_policy_url: 'https://example.com', # optional + terms_url: 'https://example.com', # optional + contacts: [], # optional + tagline: '<TAGLINE>', # optional + tags: [], # optional + images: [], # optional + support_url: 'https://example.com', # optional + data_deletion_url: 'https://example.com', # optional + enabled: false, # optional + redirect_uris: [], # optional + post_logout_redirect_uris: [], # optional + type: 'public', # optional + device_flow: false, # optional + installation_scopes: [], # optional + installation_redirect_url: 'https://example.com' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-browser.md b/examples/2.3.x/server-ruby/examples/avatars/get-browser.md new file mode 100644 index 000000000..2c9c1272d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-browser.md @@ -0,0 +1,20 @@ +```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_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_browser( + code: Browser::AVANT_BROWSER, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-credit-card.md b/examples/2.3.x/server-ruby/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..a912b9cd4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-credit-card.md @@ -0,0 +1,20 @@ +```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_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_credit_card( + code: CreditCard::AMERICAN_EXPRESS, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-favicon.md b/examples/2.3.x/server-ruby/examples/avatars/get-favicon.md new file mode 100644 index 000000000..a50b91a85 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-favicon.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.get_favicon( + url: 'https://example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-flag.md b/examples/2.3.x/server-ruby/examples/avatars/get-flag.md new file mode 100644 index 000000000..a2f120672 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-flag.md @@ -0,0 +1,20 @@ +```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_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_flag( + code: Flag::AFGHANISTAN, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-image.md b/examples/2.3.x/server-ruby/examples/avatars/get-image.md new file mode 100644 index 000000000..b3bcce331 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-image.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_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_image( + url: 'https://example.com', + width: 0, # optional + height: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-initials.md b/examples/2.3.x/server-ruby/examples/avatars/get-initials.md new file mode 100644 index 000000000..728777d75 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-initials.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_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_initials( + name: '<NAME>', # optional + width: 0, # optional + height: 0, # optional + background: 'FFFFFF' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-photo.md b/examples/2.3.x/server-ruby/examples/avatars/get-photo.md new file mode 100644 index 000000000..37659bcbb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-photo.md @@ -0,0 +1,23 @@ +```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.get_photo( + width: 0, # optional + height: 0, # optional + quality: 0, # optional + output: 'png', # optional + rating: 'g', # optional + user_id: 'current()', # optional + email_hash: '<EMAIL_HASH>', # optional + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-qr.md b/examples/2.3.x/server-ruby/examples/avatars/get-qr.md new file mode 100644 index 000000000..2ccde309a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-qr.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_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_qr( + text: '<TEXT>', + size: 1, # optional + margin: 0, # optional + download: false # optional +) +``` 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 new file mode 100644 index 000000000..742c87fd9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/get-screenshot.md @@ -0,0 +1,39 @@ +```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_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_screenshot( + url: 'https://example.com', + headers: { + "Authorization" => "Bearer token123", + "X-Custom-Header" => "value" + }, # optional + viewport_width: 1920, # optional + viewport_height: 1080, # optional + scale: 2, # optional + theme: BrowserTheme::DARK, # optional + user_agent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', # optional + fullpage: true, # optional + locale: 'en-US', # optional + timezone: Timezone::AFRICA_ABIDJAN, # optional + latitude: 37.7749, # optional + longitude: -122.4194, # optional + accuracy: 100, # optional + touch: true, # optional + permissions: [BrowserPermission::GEOLOCATION, BrowserPermission::NOTIFICATIONS], # optional + sleep: 3, # optional + width: 800, # optional + height: 600, # optional + quality: 85, # optional + output: ImageFormat::JPEG # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/create-archive.md b/examples/2.3.x/server-ruby/examples/backups/create-archive.md new file mode 100644 index 000000000..95b0087ca --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/create-archive.md @@ -0,0 +1,18 @@ +```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 + +backups = Backups.new(client) + +result = backups.create_archive( + services: [BackupServices::DATABASES], + resource_id: '<RESOURCE_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/create-policy.md b/examples/2.3.x/server-ruby/examples/backups/create-policy.md new file mode 100644 index 000000000..de2754793 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/create-policy.md @@ -0,0 +1,23 @@ +```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 + +backups = Backups.new(client) + +result = backups.create_policy( + policy_id: '<POLICY_ID>', + services: [BackupServices::DATABASES], + retention: 1, + schedule: '', + name: '<NAME>', # optional + resource_id: '<RESOURCE_ID>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/create-restoration.md b/examples/2.3.x/server-ruby/examples/backups/create-restoration.md new file mode 100644 index 000000000..f6509087d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/create-restoration.md @@ -0,0 +1,20 @@ +```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 + +backups = Backups.new(client) + +result = backups.create_restoration( + archive_id: '<ARCHIVE_ID>', + services: [BackupServices::DATABASES], + new_resource_id: '<NEW_RESOURCE_ID>', # optional + new_resource_name: '<NEW_RESOURCE_NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/delete-archive.md b/examples/2.3.x/server-ruby/examples/backups/delete-archive.md new file mode 100644 index 000000000..b9335ca6d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/delete-archive.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 + +backups = Backups.new(client) + +result = backups.delete_archive( + archive_id: '<ARCHIVE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/delete-policy.md b/examples/2.3.x/server-ruby/examples/backups/delete-policy.md new file mode 100644 index 000000000..efcc9fd01 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/delete-policy.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 + +backups = Backups.new(client) + +result = backups.delete_policy( + policy_id: '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/get-archive.md b/examples/2.3.x/server-ruby/examples/backups/get-archive.md new file mode 100644 index 000000000..da4833a8a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/get-archive.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 + +backups = Backups.new(client) + +result = backups.get_archive( + archive_id: '<ARCHIVE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/get-policy.md b/examples/2.3.x/server-ruby/examples/backups/get-policy.md new file mode 100644 index 000000000..910d0eb2e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/get-policy.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 + +backups = Backups.new(client) + +result = backups.get_policy( + policy_id: '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/get-restoration.md b/examples/2.3.x/server-ruby/examples/backups/get-restoration.md new file mode 100644 index 000000000..351c16fcf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/get-restoration.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 + +backups = Backups.new(client) + +result = backups.get_restoration( + restoration_id: '<RESTORATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/list-archives.md b/examples/2.3.x/server-ruby/examples/backups/list-archives.md new file mode 100644 index 000000000..71a855b19 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/list-archives.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 + +backups = Backups.new(client) + +result = backups.list_archives( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/list-policies.md b/examples/2.3.x/server-ruby/examples/backups/list-policies.md new file mode 100644 index 000000000..bb69fb334 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/list-policies.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 + +backups = Backups.new(client) + +result = backups.list_policies( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/list-restorations.md b/examples/2.3.x/server-ruby/examples/backups/list-restorations.md new file mode 100644 index 000000000..e1a49eeee --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/list-restorations.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 + +backups = Backups.new(client) + +result = backups.list_restorations( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/backups/update-policy.md b/examples/2.3.x/server-ruby/examples/backups/update-policy.md new file mode 100644 index 000000000..65e81af78 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/backups/update-policy.md @@ -0,0 +1,20 @@ +```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 + +backups = Backups.new(client) + +result = backups.update_policy( + policy_id: '<POLICY_ID>', + name: '<NAME>', # optional + retention: 1, # optional + schedule: '', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..b808068c7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-big-int-attribute.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_big_int_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, # optional + max: 1000000, # optional + default: 0, # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..95879a9c8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-boolean-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_boolean_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: false, # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-collection.md b/examples/2.3.x/server-ruby/examples/databases/create-collection.md new file mode 100644 index 000000000..3b21dc545 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-collection.md @@ -0,0 +1,25 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +databases = Databases.new(client) + +result = databases.create_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], # optional + document_security: false, # optional + enabled: false, # optional + attributes: [], # optional + indexes: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..8cc00eabf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-datetime-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_datetime_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: '2020-10-15T06:38:00.000+00:00', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-document.md b/examples/2.3.x/server-ruby/examples/databases/create-document.md new file mode 100644 index 000000000..6398a210b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-document.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +databases = Databases.new(client) + +result = databases.create_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 30, + "isAdmin" => false + }, + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` 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 new file mode 100644 index 000000000..60acd19f7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-documents.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 + +databases = Databases.new(client) + +result = databases.create_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + documents: [], + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-email-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..29d022461 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-email-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_email_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'email@example.com', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..e5975c020 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-enum-attribute.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 + +databases = Databases.new(client) + +result = databases.create_enum_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + required: false, + default: 'active', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-float-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..62eeecd8d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-float-attribute.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_float_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, # optional + max: 100, # optional + default: 10.5, # optional + array: false # 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 new file mode 100644 index 000000000..e3e9238a9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-index.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + type: DatabasesIndexType::KEY, + attributes: [], + orders: [OrderBy::ASC], # optional + lengths: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..6b6d3a86a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-integer-attribute.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_integer_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + min: 0, # optional + max: 100, # optional + default: 10, # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..a64553ff3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-ip-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_ip_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: '192.0.2.0', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-line-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..8c2845f0c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-line-attribute.md @@ -0,0 +1,20 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_line_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [[1, 2], [3, 4], [5, 6]] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..a7cc06f4d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-longtext-attribute.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 + +databases = Databases.new(client) + +result = databases.create_longtext_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..84b609cd4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-mediumtext-attribute.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 + +databases = Databases.new(client) + +result = databases.create_mediumtext_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-operations.md b/examples/2.3.x/server-ruby/examples/databases/create-operations.md new file mode 100644 index 000000000..5fffcc05b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-operations.md @@ -0,0 +1,27 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_operations( + transaction_id: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-point-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..cb61a8646 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-point-attribute.md @@ -0,0 +1,20 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_point_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [1, 2] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..2a3e43321 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-polygon-attribute.md @@ -0,0 +1,20 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_polygon_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..fca5aadf4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-relationship-attribute.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 + +databases = Databases.new(client) + +result = databases.create_relationship_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + related_collection_id: '<RELATED_COLLECTION_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '<KEY>', # optional + two_way_key: '<TWO_WAY_KEY>', # optional + on_delete: RelationMutate::CASCADE # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-string-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..014578058 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-string-attribute.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_string_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-text-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..b231a0a15 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-text-attribute.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 + +databases = Databases.new(client) + +result = databases.create_text_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-transaction.md b/examples/2.3.x/server-ruby/examples/databases/create-transaction.md new file mode 100644 index 000000000..86c61cd7f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-transaction.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 + +databases = Databases.new(client) + +result = databases.create_transaction( + ttl: 60 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-url-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..4078fb147 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-url-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_url_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'https://example.com', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-ruby/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..5d965bd5b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create-varchar-attribute.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.create_varchar_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + size: 1, + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create.md b/examples/2.3.x/server-ruby/examples/databases/create.md new file mode 100644 index 000000000..c59b42306 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/create.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 + +databases = Databases.new(client) + +result = databases.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-ruby/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..a91aafc44 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/decrement-document-attribute.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_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.decrement_document_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, # optional + min: 0, # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/delete-attribute.md b/examples/2.3.x/server-ruby/examples/databases/delete-attribute.md new file mode 100644 index 000000000..56269a2d4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/delete-attribute.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 + +databases = Databases.new(client) + +result = databases.delete_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/delete-collection.md b/examples/2.3.x/server-ruby/examples/databases/delete-collection.md new file mode 100644 index 000000000..1ec714e92 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/delete-collection.md @@ -0,0 +1,17 @@ +```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 + +databases = Databases.new(client) + +result = databases.delete_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/delete-document.md b/examples/2.3.x/server-ruby/examples/databases/delete-document.md new file mode 100644 index 000000000..4ca8c4e52 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/delete-document.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_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.delete_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..c9309bd9d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/delete-documents.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 + +databases = Databases.new(client) + +result = databases.delete_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/delete-index.md b/examples/2.3.x/server-ruby/examples/databases/delete-index.md new file mode 100644 index 000000000..404bc9b07 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/delete-index.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 + +databases = Databases.new(client) + +result = databases.delete_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/delete-transaction.md b/examples/2.3.x/server-ruby/examples/databases/delete-transaction.md new file mode 100644 index 000000000..c181b3495 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/delete-transaction.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 + +databases = Databases.new(client) + +result = databases.delete_transaction( + transaction_id: '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/delete.md b/examples/2.3.x/server-ruby/examples/databases/delete.md new file mode 100644 index 000000000..054534cce --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/delete.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 + +databases = Databases.new(client) + +result = databases.delete( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/get-attribute.md b/examples/2.3.x/server-ruby/examples/databases/get-attribute.md new file mode 100644 index 000000000..7753ac466 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/get-attribute.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 + +databases = Databases.new(client) + +result = databases.get_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/get-collection.md b/examples/2.3.x/server-ruby/examples/databases/get-collection.md new file mode 100644 index 000000000..a3384568b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/get-collection.md @@ -0,0 +1,17 @@ +```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 + +databases = Databases.new(client) + +result = databases.get_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/get-document.md b/examples/2.3.x/server-ruby/examples/databases/get-document.md new file mode 100644 index 000000000..3a976514b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/get-document.md @@ -0,0 +1,20 @@ +```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 + +databases = Databases.new(client) + +result = databases.get_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/get-index.md b/examples/2.3.x/server-ruby/examples/databases/get-index.md new file mode 100644 index 000000000..fb6557c5b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/get-index.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 + +databases = Databases.new(client) + +result = databases.get_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/get-transaction.md b/examples/2.3.x/server-ruby/examples/databases/get-transaction.md new file mode 100644 index 000000000..33432aae3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/get-transaction.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 + +databases = Databases.new(client) + +result = databases.get_transaction( + transaction_id: '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/get.md b/examples/2.3.x/server-ruby/examples/databases/get.md new file mode 100644 index 000000000..d8e46b69f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/get.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 + +databases = Databases.new(client) + +result = databases.get( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-ruby/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..d3992e678 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/increment-document-attribute.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_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.increment_document_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, # optional + max: 100, # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/list-attributes.md b/examples/2.3.x/server-ruby/examples/databases/list-attributes.md new file mode 100644 index 000000000..32374674f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/list-attributes.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 + +databases = Databases.new(client) + +result = databases.list_attributes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/list-collections.md b/examples/2.3.x/server-ruby/examples/databases/list-collections.md new file mode 100644 index 000000000..d1ae8d985 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/list-collections.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 + +databases = Databases.new(client) + +result = databases.list_collections( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/list-documents.md b/examples/2.3.x/server-ruby/examples/databases/list-documents.md new file mode 100644 index 000000000..0e471e298 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/list-documents.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.list_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>', # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/list-indexes.md b/examples/2.3.x/server-ruby/examples/databases/list-indexes.md new file mode 100644 index 000000000..17adc6049 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/list-indexes.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 + +databases = Databases.new(client) + +result = databases.list_indexes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + total: false # 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 new file mode 100644 index 000000000..9071982e7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/list-transactions.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 + +databases = Databases.new(client) + +result = databases.list_transactions( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/list.md b/examples/2.3.x/server-ruby/examples/databases/list.md new file mode 100644 index 000000000..9c747c5ce --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/list.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 + +databases = Databases.new(client) + +result = databases.list( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..33d5b1f7d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-big-int-attribute.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_big_int_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 0, + min: 0, # optional + max: 1000000, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..086ffb2d2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-boolean-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_boolean_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: false, + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-collection.md b/examples/2.3.x/server-ruby/examples/databases/update-collection.md new file mode 100644 index 000000000..a3c190033 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-collection.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +databases = Databases.new(client) + +result = databases.update_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', # optional + permissions: [Permission.read(Role.any())], # optional + document_security: false, # optional + enabled: false, # optional + purge: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..b56c18054 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-datetime-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_datetime_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: '2020-10-15T06:38:00.000+00:00', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-document.md b/examples/2.3.x/server-ruby/examples/databases/update-document.md new file mode 100644 index 000000000..27747e3ba --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-document.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +databases = Databases.new(client) + +result = databases.update_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 33, + "isAdmin" => false + }, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-documents.md b/examples/2.3.x/server-ruby/examples/databases/update-documents.md new file mode 100644 index 000000000..5ebb951f9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-documents.md @@ -0,0 +1,26 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 33, + "isAdmin" => false + }, # optional + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-email-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..207940878 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-email-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_email_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'email@example.com', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..a3f66c449 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-enum-attribute.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 + +databases = Databases.new(client) + +result = databases.update_enum_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + required: false, + default: 'active', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-float-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..5a652c7f3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-float-attribute.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_float_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 10.5, + min: 0, # optional + max: 100, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..47d7eb45e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-integer-attribute.md @@ -0,0 +1,23 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_integer_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 10, + min: 0, # optional + max: 100, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..3f7882893 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-ip-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_ip_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: '192.0.2.0', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-line-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..27754f2fd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-line-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_line_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [[1, 2], [3, 4], [5, 6]], # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..ceca43a3a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-longtext-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_longtext_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..d82768ed9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_mediumtext_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-point-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..95ffce6ef --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-point-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_point_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [1, 2], # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..75582120c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-polygon-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_polygon_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..22541f0e5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-relationship-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_relationship_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + on_delete: RelationMutate::CASCADE, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-string-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..d6e3a76d8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-string-attribute.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 + +databases = Databases.new(client) + +result = databases.update_string_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + size: 1, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-text-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..c4b46f5b8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-text-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_text_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-transaction.md b/examples/2.3.x/server-ruby/examples/databases/update-transaction.md new file mode 100644 index 000000000..18598015f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-transaction.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 + +databases = Databases.new(client) + +result = databases.update_transaction( + transaction_id: '<TRANSACTION_ID>', + commit: false, # optional + rollback: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-url-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..9a3176426 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-url-attribute.md @@ -0,0 +1,21 @@ +```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 + +databases = Databases.new(client) + +result = databases.update_url_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'https://example.com', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-ruby/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..07f216026 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update-varchar-attribute.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 + +databases = Databases.new(client) + +result = databases.update_varchar_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + size: 1, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/update.md b/examples/2.3.x/server-ruby/examples/databases/update.md new file mode 100644 index 000000000..a5c6d143b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/update.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 + +databases = Databases.new(client) + +result = databases.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/upsert-document.md b/examples/2.3.x/server-ruby/examples/databases/upsert-document.md new file mode 100644 index 000000000..d196769e6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/upsert-document.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +databases = Databases.new(client) + +result = databases.upsert_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 30, + "isAdmin" => false + }, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..49432e01b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/databases/upsert-documents.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 + +databases = Databases.new(client) + +result = databases.upsert_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + documents: [], + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/create-collection.md b/examples/2.3.x/server-ruby/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..60b4570f6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-collection.md @@ -0,0 +1,25 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://<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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], # optional + document_security: false, # optional + enabled: false, # optional + attributes: [], # optional + indexes: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/create-document.md b/examples/2.3.x/server-ruby/examples/documentsdb/create-document.md new file mode 100644 index 000000000..94b68b351 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-document.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 30, + "isAdmin" => false + }, + permissions: [Permission.read(Role.any())], # optional + 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 new file mode 100644 index 000000000..1277f4aca --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-documents.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_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + documents: [], + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/create-failover.md b/examples/2.3.x/server-ruby/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..eade78605 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-failover.md @@ -0,0 +1,17 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_failover( + database_id: '<DATABASE_ID>', + target_replica_id: '<TARGET_REPLICA_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 new file mode 100644 index 000000000..d1891f9ae --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-index.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + type: DocumentsDBIndexType::KEY, + attributes: [], + orders: [OrderBy::ASC], # optional + lengths: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/create-operations.md b/examples/2.3.x/server-ruby/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..8f96a15ca --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-operations.md @@ -0,0 +1,27 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_operations( + transaction_id: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-ruby/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..5f56cb235 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-transaction.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_transaction( + ttl: 60 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/create.md b/examples/2.3.x/server-ruby/examples/documentsdb/create.md new file mode 100644 index 000000000..8eb470432 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create.md @@ -0,0 +1,21 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, # optional + specification: 'serverless', # optional + replicas: 0, # optional + sync_mode: 'async' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-ruby/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..926c406b9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/decrement-document-attribute.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_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.decrement_document_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, # optional + min: 0, # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-ruby/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..886b2d68a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/delete-collection.md @@ -0,0 +1,17 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/delete-document.md b/examples/2.3.x/server-ruby/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..d4482765f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/delete-document.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_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..cd628c75f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/delete-documents.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/delete-index.md b/examples/2.3.x/server-ruby/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..cf25af04a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/delete-index.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-ruby/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..017d541bc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/delete-transaction.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_transaction( + transaction_id: '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/delete.md b/examples/2.3.x/server-ruby/examples/documentsdb/delete.md new file mode 100644 index 000000000..668637d51 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/delete.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/get-collection.md b/examples/2.3.x/server-ruby/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..d92c81093 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/get-collection.md @@ -0,0 +1,17 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/get-document.md b/examples/2.3.x/server-ruby/examples/documentsdb/get-document.md new file mode 100644 index 000000000..8f5b5c685 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/get-document.md @@ -0,0 +1,20 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/get-index.md b/examples/2.3.x/server-ruby/examples/documentsdb/get-index.md new file mode 100644 index 000000000..e6ba531b9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/get-index.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-ruby/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..fd3541a2f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/get-replicas.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_replicas( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/get-status.md b/examples/2.3.x/server-ruby/examples/documentsdb/get-status.md new file mode 100644 index 000000000..733407180 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/get-status.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_status( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-ruby/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..3b586e38e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/get-transaction.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_transaction( + transaction_id: '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/get.md b/examples/2.3.x/server-ruby/examples/documentsdb/get.md new file mode 100644 index 000000000..ad7d06ab3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/get.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.get( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-ruby/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..abf9a5883 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/increment-document-attribute.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_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.increment_document_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + attribute: '<ATTRIBUTE>', + value: 1, # optional + max: 100, # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/list-collections.md b/examples/2.3.x/server-ruby/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..6a784fb0f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/list-collections.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_collections( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/list-documents.md b/examples/2.3.x/server-ruby/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..a2562675d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/list-documents.md @@ -0,0 +1,21 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>', # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-ruby/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..b23b14915 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/list-indexes.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_indexes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/list-operations.md b/examples/2.3.x/server-ruby/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..267e3469c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/list-operations.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_operations( + database_id: '<DATABASE_ID>', + status: 'queued', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-ruby/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..f9bea5b88 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/list-specifications.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_key('<YOUR_API_KEY>') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_specifications() +``` 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 new file mode 100644 index 000000000..82d368e17 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/list-transactions.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_transactions( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/list.md b/examples/2.3.x/server-ruby/examples/documentsdb/list.md new file mode 100644 index 000000000..f4bb9f8c4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/list.md @@ -0,0 +1,17 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.list( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/update-collection.md b/examples/2.3.x/server-ruby/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..2be8dca6f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/update-collection.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://<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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.update_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], # optional + document_security: false, # optional + enabled: false, # optional + purge: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/update-document.md b/examples/2.3.x/server-ruby/examples/documentsdb/update-document.md new file mode 100644 index 000000000..90e51e069 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/update-document.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.update_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/update-documents.md b/examples/2.3.x/server-ruby/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..4f3bb64e9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/update-documents.md @@ -0,0 +1,20 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.update_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + data: {}, # optional + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-ruby/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..37a638e26 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/update-transaction.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.update_transaction( + transaction_id: '<TRANSACTION_ID>', + commit: false, # optional + rollback: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/update.md b/examples/2.3.x/server-ruby/examples/documentsdb/update.md new file mode 100644 index 000000000..d5e5d577a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/update.md @@ -0,0 +1,21 @@ +```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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, # optional + specification: 'serverless', # optional + replicas: 0, # optional + sync_mode: 'async' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-ruby/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..ca6bace1b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/upsert-document.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.upsert_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..f7f05970e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/documentsdb/upsert-documents.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 + +documents_db = DocumentsDB.new(client) + +result = documents_db.upsert_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + documents: [], + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-ruby/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..d81c279f9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-preset-google-workspace.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 + +domains = Domains.new(client) + +result = domains.create_preset_google_workspace( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-ruby/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..531f3c5db --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-preset-i-cloud.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 + +domains = Domains.new(client) + +result = domains.create_preset_i_cloud( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-ruby/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..2b39a5c3d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-preset-mailgun.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 + +domains = Domains.new(client) + +result = domains.create_preset_mailgun( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-ruby/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..e67b58579 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-preset-outlook.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 + +domains = Domains.new(client) + +result = domains.create_preset_outlook( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-ruby/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..ecbbecd6d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-preset-proton-mail.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 + +domains = Domains.new(client) + +result = domains.create_preset_proton_mail( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-ruby/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..d79be6e81 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-preset-zoho.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 + +domains = Domains.new(client) + +result = domains.create_preset_zoho( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-a.md b/examples/2.3.x/server-ruby/examples/domains/create-record-a.md new file mode 100644 index 000000000..0d164ab4c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-a.md @@ -0,0 +1,20 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_a( + domain_id: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-ruby/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..8dc596462 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-aaaa.md @@ -0,0 +1,20 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_aaaa( + domain_id: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-alias.md b/examples/2.3.x/server-ruby/examples/domains/create-record-alias.md new file mode 100644 index 000000000..fbb10b8f9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-alias.md @@ -0,0 +1,20 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_alias( + domain_id: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-caa.md b/examples/2.3.x/server-ruby/examples/domains/create-record-caa.md new file mode 100644 index 000000000..5ec76857c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-caa.md @@ -0,0 +1,20 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_caa( + domain_id: '<DOMAIN_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-cname.md b/examples/2.3.x/server-ruby/examples/domains/create-record-cname.md new file mode 100644 index 000000000..d5d81fb8e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-cname.md @@ -0,0 +1,20 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_cname( + domain_id: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-https.md b/examples/2.3.x/server-ruby/examples/domains/create-record-https.md new file mode 100644 index 000000000..54276b773 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-https.md @@ -0,0 +1,20 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_https( + domain_id: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-mx.md b/examples/2.3.x/server-ruby/examples/domains/create-record-mx.md new file mode 100644 index 000000000..41bc9c7d9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-mx.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_mx( + domain_id: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-ns.md b/examples/2.3.x/server-ruby/examples/domains/create-record-ns.md new file mode 100644 index 000000000..155d90406 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-ns.md @@ -0,0 +1,20 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_ns( + domain_id: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-srv.md b/examples/2.3.x/server-ruby/examples/domains/create-record-srv.md new file mode 100644 index 000000000..40f97aac7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-srv.md @@ -0,0 +1,23 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_srv( + domain_id: '<DOMAIN_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create-record-txt.md b/examples/2.3.x/server-ruby/examples/domains/create-record-txt.md new file mode 100644 index 000000000..01d9e6dbe --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create-record-txt.md @@ -0,0 +1,20 @@ +```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 + +domains = Domains.new(client) + +result = domains.create_record_txt( + domain_id: '<DOMAIN_ID>', + name: '', + ttl: 1, + value: '<VALUE>', # optional + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/create.md b/examples/2.3.x/server-ruby/examples/domains/create.md new file mode 100644 index 000000000..765a5fbaa --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/create.md @@ -0,0 +1,17 @@ +```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 + +domains = Domains.new(client) + +result = domains.create( + team_id: '<TEAM_ID>', + domain: 'example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/delete-record.md b/examples/2.3.x/server-ruby/examples/domains/delete-record.md new file mode 100644 index 000000000..8aafe5d57 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/delete-record.md @@ -0,0 +1,17 @@ +```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 + +domains = Domains.new(client) + +result = domains.delete_record( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/delete.md b/examples/2.3.x/server-ruby/examples/domains/delete.md new file mode 100644 index 000000000..42520ee56 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/delete.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 + +domains = Domains.new(client) + +result = domains.delete( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-ruby/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..42db938a2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-preset-google-workspace.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 + +domains = Domains.new(client) + +result = domains.get_preset_google_workspace( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-ruby/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..35713afa0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-preset-i-cloud.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 + +domains = Domains.new(client) + +result = domains.get_preset_i_cloud( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-ruby/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..82ad69fc2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-preset-mailgun.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 + +domains = Domains.new(client) + +result = domains.get_preset_mailgun( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-ruby/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..887b514bd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-preset-outlook.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 + +domains = Domains.new(client) + +result = domains.get_preset_outlook( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-ruby/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..01661d2d6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-preset-proton-mail.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 + +domains = Domains.new(client) + +result = domains.get_preset_proton_mail( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-ruby/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..e5339dc1d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-preset-zoho.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 + +domains = Domains.new(client) + +result = domains.get_preset_zoho( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-price.md b/examples/2.3.x/server-ruby/examples/domains/get-price.md new file mode 100644 index 000000000..7727397c7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-price.md @@ -0,0 +1,19 @@ +```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 + +domains = Domains.new(client) + +result = domains.get_price( + domain: 'example.com', + period_years: null, # optional + registration_type: DomainRegistrationType::NEW # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-record.md b/examples/2.3.x/server-ruby/examples/domains/get-record.md new file mode 100644 index 000000000..2f55038a7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-record.md @@ -0,0 +1,17 @@ +```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 + +domains = Domains.new(client) + +result = domains.get_record( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-transfer-status.md b/examples/2.3.x/server-ruby/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..e3b8b5375 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-transfer-status.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 + +domains = Domains.new(client) + +result = domains.get_transfer_status( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get-zone.md b/examples/2.3.x/server-ruby/examples/domains/get-zone.md new file mode 100644 index 000000000..b3693663e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get-zone.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 + +domains = Domains.new(client) + +result = domains.get_zone( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/get.md b/examples/2.3.x/server-ruby/examples/domains/get.md new file mode 100644 index 000000000..bca8160ec --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/get.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 + +domains = Domains.new(client) + +result = domains.get( + domain_id: '<DOMAIN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/list-prices.md b/examples/2.3.x/server-ruby/examples/domains/list-prices.md new file mode 100644 index 000000000..14ced00ca --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/list-prices.md @@ -0,0 +1,19 @@ +```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 + +domains = Domains.new(client) + +result = domains.list_prices( + domains: [], + period_years: null, # optional + registration_type: DomainRegistrationType::NEW # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/list-records.md b/examples/2.3.x/server-ruby/examples/domains/list-records.md new file mode 100644 index 000000000..d25f19ad7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/list-records.md @@ -0,0 +1,17 @@ +```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 + +domains = Domains.new(client) + +result = domains.list_records( + domain_id: '<DOMAIN_ID>', + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/list.md b/examples/2.3.x/server-ruby/examples/domains/list.md new file mode 100644 index 000000000..44fcf3390 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/list.md @@ -0,0 +1,17 @@ +```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 + +domains = Domains.new(client) + +result = domains.list( + queries: [], # optional + search: '<SEARCH>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-nameservers.md b/examples/2.3.x/server-ruby/examples/domains/update-nameservers.md new file mode 100644 index 000000000..d6166825a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-nameservers.md @@ -0,0 +1,17 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_nameservers( + domain_id: '<DOMAIN_ID>', + nameservers: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-a.md b/examples/2.3.x/server-ruby/examples/domains/update-record-a.md new file mode 100644 index 000000000..927597d1b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-a.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_a( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-ruby/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..6d20866bb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-aaaa.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_aaaa( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-alias.md b/examples/2.3.x/server-ruby/examples/domains/update-record-alias.md new file mode 100644 index 000000000..17558e8e2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-alias.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_alias( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-caa.md b/examples/2.3.x/server-ruby/examples/domains/update-record-caa.md new file mode 100644 index 000000000..d77eec0fd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-caa.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_caa( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-cname.md b/examples/2.3.x/server-ruby/examples/domains/update-record-cname.md new file mode 100644 index 000000000..3ec0aa0f2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-cname.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_cname( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-https.md b/examples/2.3.x/server-ruby/examples/domains/update-record-https.md new file mode 100644 index 000000000..848a7c31b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-https.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_https( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-mx.md b/examples/2.3.x/server-ruby/examples/domains/update-record-mx.md new file mode 100644 index 000000000..4cf0cf8de --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-mx.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 + +domains = Domains.new(client) + +result = domains.update_record_mx( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-ns.md b/examples/2.3.x/server-ruby/examples/domains/update-record-ns.md new file mode 100644 index 000000000..30974d70d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-ns.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_ns( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-srv.md b/examples/2.3.x/server-ruby/examples/domains/update-record-srv.md new file mode 100644 index 000000000..9b02cd69c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-srv.md @@ -0,0 +1,24 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_srv( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-record-txt.md b/examples/2.3.x/server-ruby/examples/domains/update-record-txt.md new file mode 100644 index 000000000..89a777eda --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-record-txt.md @@ -0,0 +1,21 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_record_txt( + domain_id: '<DOMAIN_ID>', + record_id: '<RECORD_ID>', + name: '', + value: '<VALUE>', + ttl: 1, + comment: '<COMMENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-team.md b/examples/2.3.x/server-ruby/examples/domains/update-team.md new file mode 100644 index 000000000..03e4a81da --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-team.md @@ -0,0 +1,17 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_team( + domain_id: '<DOMAIN_ID>', + team_id: '<TEAM_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/update-zone.md b/examples/2.3.x/server-ruby/examples/domains/update-zone.md new file mode 100644 index 000000000..f7c145ee5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/update-zone.md @@ -0,0 +1,17 @@ +```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 + +domains = Domains.new(client) + +result = domains.update_zone( + domain_id: '<DOMAIN_ID>', + content: '<CONTENT>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/domains/verify-nameservers.md b/examples/2.3.x/server-ruby/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..cfbf8e3cd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/domains/verify-nameservers.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 + +domains = Domains.new(client) + +result = domains.verify_nameservers( + domain_id: '<DOMAIN_ID>' +) +``` 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 new file mode 100644 index 000000000..facbe573f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,18 @@ +```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 + +embeddings = Embeddings.new(client) + +result = embeddings.create_text_embeddings( + texts: [], + model: EmbeddingModel::NOMIC_EMBED_TEXT # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/create-deployment.md b/examples/2.3.x/server-ruby/examples/functions/create-deployment.md new file mode 100644 index 000000000..1bc2abdf9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/create-deployment.md @@ -0,0 +1,20 @@ +```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 + +functions = Functions.new(client) + +result = functions.create_deployment( + function_id: '<FUNCTION_ID>', + code: InputFile.from_path('dir/file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-ruby/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..c39e3a7ea --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/create-duplicate-deployment.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 + +functions = Functions.new(client) + +result = functions.create_duplicate_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>', + build_id: '<BUILD_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/create-execution.md b/examples/2.3.x/server-ruby/examples/functions/create-execution.md new file mode 100644 index 000000000..9c529150d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/create-execution.md @@ -0,0 +1,23 @@ +```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_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.create_execution( + function_id: '<FUNCTION_ID>', + body: '<BODY>', # optional + async: false, # optional + path: '<PATH>', # optional + method: ExecutionMethod::GET, # optional + headers: {}, # optional + scheduled_at: '<SCHEDULED_AT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/create-template-deployment.md b/examples/2.3.x/server-ruby/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..9f80f906d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/create-template-deployment.md @@ -0,0 +1,23 @@ +```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 + +functions = Functions.new(client) + +result = functions.create_template_deployment( + function_id: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + root_directory: '<ROOT_DIRECTORY>', + type: TemplateReferenceType::COMMIT, + reference: '<REFERENCE>', + activate: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/create-variable.md b/examples/2.3.x/server-ruby/examples/functions/create-variable.md new file mode 100644 index 000000000..de8f763d5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/create-variable.md @@ -0,0 +1,20 @@ +```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 + +functions = Functions.new(client) + +result = functions.create_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-ruby/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..fe8d9917c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/create-vcs-deployment.md @@ -0,0 +1,20 @@ +```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 + +functions = Functions.new(client) + +result = functions.create_vcs_deployment( + function_id: '<FUNCTION_ID>', + type: VCSReferenceType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/create.md b/examples/2.3.x/server-ruby/examples/functions/create.md new file mode 100644 index 000000000..49c372650 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/create.md @@ -0,0 +1,38 @@ +```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 + +functions = Functions.new(client) + +result = functions.create( + function_id: '<FUNCTION_ID>', + name: '<NAME>', + runtime: Runtime::NODE_14_5, + execute: ["any"], # optional + events: [], # optional + schedule: '0 0 * * *', # optional + timeout: 1, # optional + enabled: false, # optional + logging: false, # optional + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>', # optional + scopes: [ProjectKeyScopes::PROJECT_READ], # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches: [], # optional + provider_paths: [], # optional + build_specification: 's-1vcpu-512mb', # optional + runtime_specification: 's-1vcpu-512mb', # optional + deployment_retention: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/delete-deployment.md b/examples/2.3.x/server-ruby/examples/functions/delete-deployment.md new file mode 100644 index 000000000..42ee16cbc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/delete-deployment.md @@ -0,0 +1,17 @@ +```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 + +functions = Functions.new(client) + +result = functions.delete_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/delete-execution.md b/examples/2.3.x/server-ruby/examples/functions/delete-execution.md new file mode 100644 index 000000000..8d125bcf1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/delete-execution.md @@ -0,0 +1,17 @@ +```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 + +functions = Functions.new(client) + +result = functions.delete_execution( + function_id: '<FUNCTION_ID>', + execution_id: '<EXECUTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/delete-variable.md b/examples/2.3.x/server-ruby/examples/functions/delete-variable.md new file mode 100644 index 000000000..bd8e79e25 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/delete-variable.md @@ -0,0 +1,17 @@ +```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 + +functions = Functions.new(client) + +result = functions.delete_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/delete.md b/examples/2.3.x/server-ruby/examples/functions/delete.md new file mode 100644 index 000000000..f895cd650 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/delete.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 + +functions = Functions.new(client) + +result = functions.delete( + function_id: '<FUNCTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/get-deployment-download.md b/examples/2.3.x/server-ruby/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..dd7547af0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/get-deployment-download.md @@ -0,0 +1,20 @@ +```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 + +functions = Functions.new(client) + +result = functions.get_deployment_download( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE, # optional + token: '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/get-deployment.md b/examples/2.3.x/server-ruby/examples/functions/get-deployment.md new file mode 100644 index 000000000..1711df1e6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/get-deployment.md @@ -0,0 +1,17 @@ +```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 + +functions = Functions.new(client) + +result = functions.get_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/get-execution.md b/examples/2.3.x/server-ruby/examples/functions/get-execution.md new file mode 100644 index 000000000..240606c65 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/get-execution.md @@ -0,0 +1,17 @@ +```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 + +functions = Functions.new(client) + +result = functions.get_execution( + function_id: '<FUNCTION_ID>', + execution_id: '<EXECUTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/get-variable.md b/examples/2.3.x/server-ruby/examples/functions/get-variable.md new file mode 100644 index 000000000..e06337ea4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/get-variable.md @@ -0,0 +1,17 @@ +```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 + +functions = Functions.new(client) + +result = functions.get_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/get.md b/examples/2.3.x/server-ruby/examples/functions/get.md new file mode 100644 index 000000000..8b4b1b13e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/get.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 + +functions = Functions.new(client) + +result = functions.get( + function_id: '<FUNCTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/list-deployments.md b/examples/2.3.x/server-ruby/examples/functions/list-deployments.md new file mode 100644 index 000000000..d4f88ba61 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/list-deployments.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 + +functions = Functions.new(client) + +result = functions.list_deployments( + function_id: '<FUNCTION_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/list-executions.md b/examples/2.3.x/server-ruby/examples/functions/list-executions.md new file mode 100644 index 000000000..f9b138ecf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/list-executions.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_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.list_executions( + function_id: '<FUNCTION_ID>', + queries: [], # optional + total: false # 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 new file mode 100644 index 000000000..98a754662 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/list-runtimes.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_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_runtimes() +``` 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 new file mode 100644 index 000000000..635f73a5c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/list-specifications.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 + +functions = Functions.new(client) + +result = functions.list_specifications( + type: 'runtimes' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/list-variables.md b/examples/2.3.x/server-ruby/examples/functions/list-variables.md new file mode 100644 index 000000000..3e4b1ca63 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/list-variables.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 + +functions = Functions.new(client) + +result = functions.list_variables( + function_id: '<FUNCTION_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/list.md b/examples/2.3.x/server-ruby/examples/functions/list.md new file mode 100644 index 000000000..b9ffba05e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/list.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 + +functions = Functions.new(client) + +result = functions.list( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/update-deployment-status.md b/examples/2.3.x/server-ruby/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..b70d5f0f0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/update-deployment-status.md @@ -0,0 +1,17 @@ +```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 + +functions = Functions.new(client) + +result = functions.update_deployment_status( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/update-function-deployment.md b/examples/2.3.x/server-ruby/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..be7eff9c5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/update-function-deployment.md @@ -0,0 +1,17 @@ +```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 + +functions = Functions.new(client) + +result = functions.update_function_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/update-variable.md b/examples/2.3.x/server-ruby/examples/functions/update-variable.md new file mode 100644 index 000000000..d3a2a8deb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/update-variable.md @@ -0,0 +1,20 @@ +```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 + +functions = Functions.new(client) + +result = functions.update_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', # optional + value: '<VALUE>', # optional + secret: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/functions/update.md b/examples/2.3.x/server-ruby/examples/functions/update.md new file mode 100644 index 000000000..d0bb4c859 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/functions/update.md @@ -0,0 +1,38 @@ +```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 + +functions = Functions.new(client) + +result = functions.update( + function_id: '<FUNCTION_ID>', + name: '<NAME>', + runtime: Runtime::NODE_14_5, # optional + execute: ["any"], # optional + events: [], # optional + schedule: '0 0 * * *', # optional + timeout: 1, # optional + enabled: false, # optional + logging: false, # optional + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>', # optional + scopes: [ProjectKeyScopes::PROJECT_READ], # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches: [], # optional + provider_paths: [], # optional + build_specification: 's-1vcpu-512mb', # optional + runtime_specification: 's-1vcpu-512mb', # optional + deployment_retention: 0 # 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 new file mode 100644 index 000000000..a71a8bd61 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/graphql/mutation.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 + +graphql = Graphql.new(client) + +result = graphql.mutation( + query: {} +) +``` diff --git a/examples/2.3.x/server-ruby/examples/graphql/query.md b/examples/2.3.x/server-ruby/examples/graphql/query.md new file mode 100644 index 000000000..49561b158 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/graphql/query.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 + +graphql = Graphql.new(client) + +result = graphql.query( + query: {} +) +``` diff --git a/examples/2.3.x/server-ruby/examples/locale/get.md b/examples/2.3.x/server-ruby/examples/locale/get.md new file mode 100644 index 000000000..e6fa23f9a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/locale/get.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 + +locale = Locale.new(client) + +result = locale.get() +``` 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 new file mode 100644 index 000000000..cf31d3af0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/locale/list-codes.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 + +locale = Locale.new(client) + +result = locale.list_codes() +``` 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 new file mode 100644 index 000000000..1470c7d16 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/locale/list-continents.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 + +locale = Locale.new(client) + +result = locale.list_continents() +``` 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 new file mode 100644 index 000000000..7ca1e985d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/locale/list-countries-eu.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 + +locale = Locale.new(client) + +result = locale.list_countries_eu() +``` 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 new file mode 100644 index 000000000..43c80c6ac --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/locale/list-countries-phones.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 + +locale = Locale.new(client) + +result = locale.list_countries_phones() +``` 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 new file mode 100644 index 000000000..a5a81c7ba --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/locale/list-countries.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 + +locale = Locale.new(client) + +result = locale.list_countries() +``` 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 new file mode 100644 index 000000000..a5316f2bf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/locale/list-currencies.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 + +locale = Locale.new(client) + +result = locale.list_currencies() +``` 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 new file mode 100644 index 000000000..9c8655f4e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/locale/list-languages.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 + +locale = Locale.new(client) + +result = locale.list_languages() +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..0d4534fee --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-apns-provider.md @@ -0,0 +1,23 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_apns_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + auth_key: '<AUTH_KEY>', # optional + auth_key_id: '<AUTH_KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + bundle_id: '<BUNDLE_ID>', # optional + sandbox: false, # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..ae56ec576 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,20 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_appwrite_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, # optional + qos: 0, # optional + expiry: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-email.md b/examples/2.3.x/server-ruby/examples/messaging/create-email.md new file mode 100644 index 000000000..694e50325 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-email.md @@ -0,0 +1,29 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_email( + message_id: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], # optional + users: [], # optional + targets: [], # optional + cc: [], # optional + bcc: [], # optional + attachments: [], # optional + reply_to_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # 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/create-fcm-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..2ff771b6c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-fcm-provider.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 + +messaging = Messaging.new(client) + +result = messaging.create_fcm_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + service_account_json: {}, # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..eaa15ecb2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,25 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_mailgun_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + domain: 'example.com', # optional + is_eu_region: false, # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..2553f1c1c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_msg91_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + template_id: '<TEMPLATE_ID>', # optional + sender_id: '<SENDER_ID>', # optional + auth_key: '<AUTH_KEY>', # optional + enabled: 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 new file mode 100644 index 000000000..e94015e60 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-push.md @@ -0,0 +1,35 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_push( + message_id: '<MESSAGE_ID>', + title: '<TITLE>', # optional + body: '<BODY>', # optional + topics: [], # optional + users: [], # optional + targets: [], # optional + data: {}, # optional + action: '<ACTION>', # optional + image: '<ID1:ID2>', # optional + icon: '<ICON>', # optional + sound: '<SOUND>', # optional + color: '<COLOR>', # optional + tag: '<TAG>', # optional + badge: 1, # optional + draft: false, # optional + scheduled_at: '2020-10-15T06:38:00.000+00:00', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..417142fe7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-resend-provider.md @@ -0,0 +1,23 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_resend_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..d57c79f17 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,23 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_sendgrid_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..2ac71f733 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-ses-provider.md @@ -0,0 +1,25 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_ses_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + access_key: '<ACCESS_KEY>', # optional + secret_key: '<SECRET_KEY>', # optional + region: '<REGION>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-sms.md b/examples/2.3.x/server-ruby/examples/messaging/create-sms.md new file mode 100644 index 000000000..c59279fd8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-sms.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 + +messaging = Messaging.new(client) + +result = messaging.create_sms( + message_id: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], # optional + users: [], # optional + targets: [], # 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/messaging/create-smtp-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..25e5dd7f3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-smtp-provider.md @@ -0,0 +1,30 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_smtp_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 587, # optional + username: '<USERNAME>', # optional + password: 'password', # optional + encryption: SmtpEncryption::NONE, # optional + auto_tls: false, # optional + mailer: '<MAILER>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-subscriber.md b/examples/2.3.x/server-ruby/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..2038711f2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-subscriber.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_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging.new(client) + +result = messaging.create_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>', + target_id: '<TARGET_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..49e43a7c0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-telesign-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_telesign_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + customer_id: '<CUSTOMER_ID>', # optional + api_key: '<API_KEY>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..ff7b9116e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_textmagic_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + username: '<USERNAME>', # optional + api_key: '<API_KEY>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-topic.md b/examples/2.3.x/server-ruby/examples/messaging/create-topic.md new file mode 100644 index 000000000..2b650e9fa --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-topic.md @@ -0,0 +1,20 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_topic( + topic_id: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"], # optional + qos: 0, # optional + expiry: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..a68eec6f6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-twilio-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_twilio_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '<FROM>', # optional + account_sid: '<ACCOUNT_SID>', # optional + auth_token: '<AUTH_TOKEN>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-ruby/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..f3fa1beb8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/create-vonage-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.create_vonage_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/delete-provider.md b/examples/2.3.x/server-ruby/examples/messaging/delete-provider.md new file mode 100644 index 000000000..67273651b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/delete-provider.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 + +messaging = Messaging.new(client) + +result = messaging.delete_provider( + provider_id: '<PROVIDER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-ruby/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..11b31bac9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/delete-subscriber.md @@ -0,0 +1,17 @@ +```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_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging.new(client) + +result = messaging.delete_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/delete-topic.md b/examples/2.3.x/server-ruby/examples/messaging/delete-topic.md new file mode 100644 index 000000000..fb1c13840 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/delete-topic.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 + +messaging = Messaging.new(client) + +result = messaging.delete_topic( + topic_id: '<TOPIC_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/delete.md b/examples/2.3.x/server-ruby/examples/messaging/delete.md new file mode 100644 index 000000000..0e238dee8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/delete.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 + +messaging = Messaging.new(client) + +result = messaging.delete( + message_id: '<MESSAGE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/get-message.md b/examples/2.3.x/server-ruby/examples/messaging/get-message.md new file mode 100644 index 000000000..ae854c3c5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/get-message.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 + +messaging = Messaging.new(client) + +result = messaging.get_message( + message_id: '<MESSAGE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/get-provider.md b/examples/2.3.x/server-ruby/examples/messaging/get-provider.md new file mode 100644 index 000000000..b66144fc9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/get-provider.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 + +messaging = Messaging.new(client) + +result = messaging.get_provider( + provider_id: '<PROVIDER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/get-subscriber.md b/examples/2.3.x/server-ruby/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..800f60c1c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/get-subscriber.md @@ -0,0 +1,17 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.get_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/get-topic.md b/examples/2.3.x/server-ruby/examples/messaging/get-topic.md new file mode 100644 index 000000000..c34d6e05d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/get-topic.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 + +messaging = Messaging.new(client) + +result = messaging.get_topic( + topic_id: '<TOPIC_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/list-messages.md b/examples/2.3.x/server-ruby/examples/messaging/list-messages.md new file mode 100644 index 000000000..250e57fa5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/list-messages.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 + +messaging = Messaging.new(client) + +result = messaging.list_messages( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/list-providers.md b/examples/2.3.x/server-ruby/examples/messaging/list-providers.md new file mode 100644 index 000000000..4faa0bd6e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/list-providers.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 + +messaging = Messaging.new(client) + +result = messaging.list_providers( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/list-subscribers.md b/examples/2.3.x/server-ruby/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..ac594e86a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/list-subscribers.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 + +messaging = Messaging.new(client) + +result = messaging.list_subscribers( + topic_id: '<TOPIC_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/list-targets.md b/examples/2.3.x/server-ruby/examples/messaging/list-targets.md new file mode 100644 index 000000000..ea2ad4a82 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/list-targets.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 + +messaging = Messaging.new(client) + +result = messaging.list_targets( + message_id: '<MESSAGE_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/list-topics.md b/examples/2.3.x/server-ruby/examples/messaging/list-topics.md new file mode 100644 index 000000000..8778e95e7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/list-topics.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 + +messaging = Messaging.new(client) + +result = messaging.list_topics( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..2ef7cc625 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-apns-provider.md @@ -0,0 +1,23 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_apns_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + auth_key: '<AUTH_KEY>', # optional + auth_key_id: '<AUTH_KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + bundle_id: '<BUNDLE_ID>', # optional + sandbox: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..e35af7272 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,20 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_appwrite_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + qos: 0, # optional + expiry: 0 # 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 new file mode 100644 index 000000000..dcdd413ea --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-email.md @@ -0,0 +1,29 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_email( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + subject: '<SUBJECT>', # optional + content: '<CONTENT>', # optional + draft: false, # optional + html: false, # optional + cc: [], # optional + bcc: [], # 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 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-fcm-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..003d016d3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-fcm-provider.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 + +messaging = Messaging.new(client) + +result = messaging.update_fcm_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + service_account_json: {} # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..4c3f9018b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,25 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_mailgun_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + api_key: '<API_KEY>', # optional + domain: 'example.com', # optional + is_eu_region: false, # optional + enabled: false, # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..d091ee297 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_msg91_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + template_id: '<TEMPLATE_ID>', # optional + sender_id: '<SENDER_ID>', # optional + auth_key: '<AUTH_KEY>' # 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 new file mode 100644 index 000000000..9aa0e8ba9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-push.md @@ -0,0 +1,35 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_push( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + title: '<TITLE>', # optional + body: '<BODY>', # optional + data: {}, # optional + action: '<ACTION>', # optional + image: '<ID1:ID2>', # optional + icon: '<ICON>', # optional + sound: '<SOUND>', # optional + color: '<COLOR>', # optional + tag: '<TAG>', # optional + badge: 1, # optional + draft: false, # optional + scheduled_at: '2020-10-15T06:38:00.000+00:00', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..bafa99c98 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-resend-provider.md @@ -0,0 +1,23 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_resend_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..f18e9ebeb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,23 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_sendgrid_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..9465ac31b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-ses-provider.md @@ -0,0 +1,25 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_ses_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + access_key: '<ACCESS_KEY>', # optional + secret_key: '<SECRET_KEY>', # optional + region: '<REGION>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # 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 new file mode 100644 index 000000000..233ffb819 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-sms.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 + +messaging = Messaging.new(client) + +result = messaging.update_sms( + message_id: '<MESSAGE_ID>', + 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/messaging/update-smtp-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..a7355fefc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-smtp-provider.md @@ -0,0 +1,30 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_smtp_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + host: '<HOST>', # optional + port: 1, # optional + username: '<USERNAME>', # optional + password: 'password', # optional + encryption: SmtpEncryption::NONE, # optional + auto_tls: false, # optional + mailer: '<MAILER>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..25dc144c6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-telesign-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_telesign_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + customer_id: '<CUSTOMER_ID>', # optional + api_key: '<API_KEY>', # optional + from: '<FROM>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..5f41c6ac3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_textmagic_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + username: '<USERNAME>', # optional + api_key: '<API_KEY>', # optional + from: '<FROM>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-topic.md b/examples/2.3.x/server-ruby/examples/messaging/update-topic.md new file mode 100644 index 000000000..43d8ce019 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-topic.md @@ -0,0 +1,20 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_topic( + topic_id: '<TOPIC_ID>', + name: '<NAME>', # optional + subscribe: ["any"], # optional + qos: 0, # optional + expiry: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..952d185b0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-twilio-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_twilio_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + account_sid: '<ACCOUNT_SID>', # optional + auth_token: '<AUTH_TOKEN>', # optional + from: '<FROM>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-ruby/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..3fb4558c1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/messaging/update-vonage-provider.md @@ -0,0 +1,21 @@ +```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 + +messaging = Messaging.new(client) + +result = messaging.update_vonage_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # optional + from: '<FROM>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-ruby/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..cee35bb87 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/create-backup-policy.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 + +mongo = Mongo.new(client) + +result = mongo.create_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/create-backup.md b/examples/2.3.x/server-ruby/examples/mongo/create-backup.md new file mode 100644 index 000000000..d17f7de74 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/create-backup.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.create_backup( + database_id: '<DATABASE_ID>', + type: 'full' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/create-branch.md b/examples/2.3.x/server-ruby/examples/mongo/create-branch.md new file mode 100644 index 000000000..1299c3a83 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/create-branch.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 + +mongo = Mongo.new(client) + +result = mongo.create_branch( + database_id: '<DATABASE_ID>', + branch_id: '<BRANCH_ID>', # optional + ttl: 300 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/create-failover.md b/examples/2.3.x/server-ruby/examples/mongo/create-failover.md new file mode 100644 index 000000000..b07c504ae --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/create-failover.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.create_failover( + database_id: '<DATABASE_ID>', + target_replica_id: '<TARGET_REPLICA_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/create-migration.md b/examples/2.3.x/server-ruby/examples/mongo/create-migration.md new file mode 100644 index 000000000..7243c1c15 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/create-migration.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 + +mongo = Mongo.new(client) + +result = mongo.create_migration( + database_id: '<DATABASE_ID>', + target_type: 'shared', + specification: '<SPECIFICATION>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/create-restoration.md b/examples/2.3.x/server-ruby/examples/mongo/create-restoration.md new file mode 100644 index 000000000..43f91beb7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/create-restoration.md @@ -0,0 +1,20 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.create_restoration( + database_id: '<DATABASE_ID>', + type: 'backup', # optional + backup_id: '<BACKUP_ID>', # optional + target_database_id: '<TARGET_DATABASE_ID>', # optional + target_time: '2020-10-15T06:38:00.000+00:00' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/create-upgrade.md b/examples/2.3.x/server-ruby/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..050a2374e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/create-upgrade.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.create_upgrade( + database_id: '<DATABASE_ID>', + target_version: '<TARGET_VERSION>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/create.md b/examples/2.3.x/server-ruby/examples/mongo/create.md new file mode 100644 index 000000000..5854e4cfd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/create.md @@ -0,0 +1,29 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + version: '17', # optional + specification: '<SPECIFICATION>', # optional + replicas: 0, # optional + sync_mode: 'async', # optional + network_idle_timeout_seconds: 60, # optional + network_ip_allowlist: [], # optional + idle_timeout_minutes: 5, # optional + pitr: false, # optional + pitr_retention_days: 1, # optional + storage_autoscaling: false, # optional + storage_autoscaling_threshold_percent: 50, # optional + storage_autoscaling_max_gb: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-ruby/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..b5c27d744 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/delete-backup-policy.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.delete_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/delete-backup.md b/examples/2.3.x/server-ruby/examples/mongo/delete-backup.md new file mode 100644 index 000000000..22f427edb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/delete-backup.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.delete_backup( + database_id: '<DATABASE_ID>', + backup_id: '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/delete-branch.md b/examples/2.3.x/server-ruby/examples/mongo/delete-branch.md new file mode 100644 index 000000000..2cb5dda2a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/delete-branch.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.delete_branch( + database_id: '<DATABASE_ID>', + branch_id: '<BRANCH_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/delete.md b/examples/2.3.x/server-ruby/examples/mongo/delete.md new file mode 100644 index 000000000..7d903e4ce --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/delete.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 + +mongo = Mongo.new(client) + +result = mongo.delete( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-ruby/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..fe964f8f5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/get-backup-policy.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.get_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/get-backup.md b/examples/2.3.x/server-ruby/examples/mongo/get-backup.md new file mode 100644 index 000000000..93dfa00f6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/get-backup.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.get_backup( + database_id: '<DATABASE_ID>', + backup_id: '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/get-pitr.md b/examples/2.3.x/server-ruby/examples/mongo/get-pitr.md new file mode 100644 index 000000000..6dead665e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/get-pitr.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 + +mongo = Mongo.new(client) + +result = mongo.get_pitr( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/get-replicas.md b/examples/2.3.x/server-ruby/examples/mongo/get-replicas.md new file mode 100644 index 000000000..62f5af8dd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/get-replicas.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 + +mongo = Mongo.new(client) + +result = mongo.get_replicas( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/get-restoration.md b/examples/2.3.x/server-ruby/examples/mongo/get-restoration.md new file mode 100644 index 000000000..0364a6856 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/get-restoration.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.get_restoration( + database_id: '<DATABASE_ID>', + restoration_id: '<RESTORATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/get-status.md b/examples/2.3.x/server-ruby/examples/mongo/get-status.md new file mode 100644 index 000000000..d8aa927bd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/get-status.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 + +mongo = Mongo.new(client) + +result = mongo.get_status( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/get.md b/examples/2.3.x/server-ruby/examples/mongo/get.md new file mode 100644 index 000000000..ad7d1ad1c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/get.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 + +mongo = Mongo.new(client) + +result = mongo.get( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-ruby/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..a78fea897 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/list-backup-policies.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.list_backup_policies( + database_id: '<DATABASE_ID>', + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/list-backups.md b/examples/2.3.x/server-ruby/examples/mongo/list-backups.md new file mode 100644 index 000000000..dff1d39b0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/list-backups.md @@ -0,0 +1,17 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.list_backups( + database_id: '<DATABASE_ID>', + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/list-branches.md b/examples/2.3.x/server-ruby/examples/mongo/list-branches.md new file mode 100644 index 000000000..9ab6cc52e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/list-branches.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 + +mongo = Mongo.new(client) + +result = mongo.list_branches( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/list-operations.md b/examples/2.3.x/server-ruby/examples/mongo/list-operations.md new file mode 100644 index 000000000..93499975f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/list-operations.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 + +mongo = Mongo.new(client) + +result = mongo.list_operations( + database_id: '<DATABASE_ID>', + status: 'queued', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/list-restorations.md b/examples/2.3.x/server-ruby/examples/mongo/list-restorations.md new file mode 100644 index 000000000..dc9be3966 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/list-restorations.md @@ -0,0 +1,20 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.list_restorations( + database_id: '<DATABASE_ID>', + status: 'pending', # optional + type: 'backup', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/list-specifications.md b/examples/2.3.x/server-ruby/examples/mongo/list-specifications.md new file mode 100644 index 000000000..dbd3d314e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/list-specifications.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_key('<YOUR_API_KEY>') # Your secret API key + +mongo = Mongo.new(client) + +result = mongo.list_specifications() +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/list.md b/examples/2.3.x/server-ruby/examples/mongo/list.md new file mode 100644 index 000000000..72066bd85 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/list.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 + +mongo = Mongo.new(client) + +result = mongo.list( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-ruby/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..6da9fe2b0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/update-backup-policy.md @@ -0,0 +1,21 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.update_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>', + name: '<NAME>', # optional + schedule: '', # optional + retention: 1, # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-ruby/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..2893e7e87 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/update-backup-storage.md @@ -0,0 +1,23 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.update_backup_storage( + database_id: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + access_key: '<ACCESS_KEY>', + secret_key: '<SECRET_KEY>', + region: '<REGION>', # optional + prefix: '<PREFIX>', # optional + endpoint: '<ENDPOINT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/update-credentials.md b/examples/2.3.x/server-ruby/examples/mongo/update-credentials.md new file mode 100644 index 000000000..389f54ab2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/update-credentials.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 + +mongo = Mongo.new(client) + +result = mongo.update_credentials( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/update-maintenance.md b/examples/2.3.x/server-ruby/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..075d5cc4c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/update-maintenance.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 + +mongo = Mongo.new(client) + +result = mongo.update_maintenance( + database_id: '<DATABASE_ID>', + day: 'sun', + hour_utc: 0 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mongo/update.md b/examples/2.3.x/server-ruby/examples/mongo/update.md new file mode 100644 index 000000000..55f02acd5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mongo/update.md @@ -0,0 +1,36 @@ +```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 + +mongo = Mongo.new(client) + +result = mongo.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', # optional + status: 'ready', # optional + specification: '<SPECIFICATION>', # optional + replicas: 0, # optional + sync_mode: 'async', # optional + network_idle_timeout_seconds: 60, # optional + network_ip_allowlist: [], # optional + idle_timeout_minutes: 5, # optional + pitr: false, # optional + pitr_retention_days: 1, # optional + storage_autoscaling: false, # optional + storage_autoscaling_threshold_percent: 50, # optional + storage_autoscaling_max_gb: 0, # optional + metrics_trace_sample_rate: null, # optional + metrics_slow_query_log_threshold_ms: 0, # optional + sql_api_enabled: false, # optional + sql_api_allowed_statements: [], # optional + sql_api_max_rows: 1, # optional + sql_api_max_bytes: 1024, # optional + sql_api_timeout_seconds: 1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-ruby/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..c898944bf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create-backup-policy.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 + +mysql = Mysql.new(client) + +result = mysql.create_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create-backup.md b/examples/2.3.x/server-ruby/examples/mysql/create-backup.md new file mode 100644 index 000000000..ec1168da6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create-backup.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.create_backup( + database_id: '<DATABASE_ID>', + type: 'full' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create-branch.md b/examples/2.3.x/server-ruby/examples/mysql/create-branch.md new file mode 100644 index 000000000..b0d48db9d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create-branch.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 + +mysql = Mysql.new(client) + +result = mysql.create_branch( + database_id: '<DATABASE_ID>', + branch_id: '<BRANCH_ID>', # optional + ttl: 300 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create-execution.md b/examples/2.3.x/server-ruby/examples/mysql/create-execution.md new file mode 100644 index 000000000..1384a5026 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create-execution.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 + +mysql = Mysql.new(client) + +result = mysql.create_execution( + database_id: '<DATABASE_ID>', + sql: '<SQL>', + bindings: {}, # optional + timeout_seconds: 1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create-failover.md b/examples/2.3.x/server-ruby/examples/mysql/create-failover.md new file mode 100644 index 000000000..d3b0bcfaf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create-failover.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.create_failover( + database_id: '<DATABASE_ID>', + target_replica_id: '<TARGET_REPLICA_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create-migration.md b/examples/2.3.x/server-ruby/examples/mysql/create-migration.md new file mode 100644 index 000000000..3d5e5c35a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create-migration.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 + +mysql = Mysql.new(client) + +result = mysql.create_migration( + database_id: '<DATABASE_ID>', + target_type: 'shared', + specification: '<SPECIFICATION>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create-restoration.md b/examples/2.3.x/server-ruby/examples/mysql/create-restoration.md new file mode 100644 index 000000000..ad5aa0585 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create-restoration.md @@ -0,0 +1,20 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.create_restoration( + database_id: '<DATABASE_ID>', + type: 'backup', # optional + backup_id: '<BACKUP_ID>', # optional + target_database_id: '<TARGET_DATABASE_ID>', # optional + target_time: '2020-10-15T06:38:00.000+00:00' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create-upgrade.md b/examples/2.3.x/server-ruby/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..b20972321 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create-upgrade.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.create_upgrade( + database_id: '<DATABASE_ID>', + target_version: '<TARGET_VERSION>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/create.md b/examples/2.3.x/server-ruby/examples/mysql/create.md new file mode 100644 index 000000000..a0dcdced8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/create.md @@ -0,0 +1,29 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + version: '17', # optional + specification: '<SPECIFICATION>', # optional + replicas: 0, # optional + sync_mode: 'async', # optional + network_idle_timeout_seconds: 60, # optional + network_ip_allowlist: [], # optional + idle_timeout_minutes: 5, # optional + pitr: false, # optional + pitr_retention_days: 1, # optional + storage_autoscaling: false, # optional + storage_autoscaling_threshold_percent: 50, # optional + storage_autoscaling_max_gb: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-ruby/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..b2f35a00a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/delete-backup-policy.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.delete_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/delete-backup.md b/examples/2.3.x/server-ruby/examples/mysql/delete-backup.md new file mode 100644 index 000000000..b4e267628 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/delete-backup.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.delete_backup( + database_id: '<DATABASE_ID>', + backup_id: '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/delete-branch.md b/examples/2.3.x/server-ruby/examples/mysql/delete-branch.md new file mode 100644 index 000000000..959b6290d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/delete-branch.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.delete_branch( + database_id: '<DATABASE_ID>', + branch_id: '<BRANCH_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/delete.md b/examples/2.3.x/server-ruby/examples/mysql/delete.md new file mode 100644 index 000000000..aedde62e7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/delete.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 + +mysql = Mysql.new(client) + +result = mysql.delete( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-ruby/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..bec9f397e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/get-backup-policy.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.get_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/get-backup.md b/examples/2.3.x/server-ruby/examples/mysql/get-backup.md new file mode 100644 index 000000000..286dfda65 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/get-backup.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.get_backup( + database_id: '<DATABASE_ID>', + backup_id: '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/get-pitr.md b/examples/2.3.x/server-ruby/examples/mysql/get-pitr.md new file mode 100644 index 000000000..a5c48f67d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/get-pitr.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 + +mysql = Mysql.new(client) + +result = mysql.get_pitr( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/get-pooler.md b/examples/2.3.x/server-ruby/examples/mysql/get-pooler.md new file mode 100644 index 000000000..5117f05b0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/get-pooler.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 + +mysql = Mysql.new(client) + +result = mysql.get_pooler( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/get-replicas.md b/examples/2.3.x/server-ruby/examples/mysql/get-replicas.md new file mode 100644 index 000000000..aa04c558f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/get-replicas.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 + +mysql = Mysql.new(client) + +result = mysql.get_replicas( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/get-restoration.md b/examples/2.3.x/server-ruby/examples/mysql/get-restoration.md new file mode 100644 index 000000000..8794092dc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/get-restoration.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.get_restoration( + database_id: '<DATABASE_ID>', + restoration_id: '<RESTORATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/get-status.md b/examples/2.3.x/server-ruby/examples/mysql/get-status.md new file mode 100644 index 000000000..0031fa25f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/get-status.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 + +mysql = Mysql.new(client) + +result = mysql.get_status( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/get.md b/examples/2.3.x/server-ruby/examples/mysql/get.md new file mode 100644 index 000000000..2c41277d2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/get.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 + +mysql = Mysql.new(client) + +result = mysql.get( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-ruby/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..1b2a50da7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/list-backup-policies.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.list_backup_policies( + database_id: '<DATABASE_ID>', + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/list-backups.md b/examples/2.3.x/server-ruby/examples/mysql/list-backups.md new file mode 100644 index 000000000..bdc345565 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/list-backups.md @@ -0,0 +1,17 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.list_backups( + database_id: '<DATABASE_ID>', + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/list-branches.md b/examples/2.3.x/server-ruby/examples/mysql/list-branches.md new file mode 100644 index 000000000..92dcda4c5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/list-branches.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 + +mysql = Mysql.new(client) + +result = mysql.list_branches( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/list-operations.md b/examples/2.3.x/server-ruby/examples/mysql/list-operations.md new file mode 100644 index 000000000..afb542e59 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/list-operations.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 + +mysql = Mysql.new(client) + +result = mysql.list_operations( + database_id: '<DATABASE_ID>', + status: 'queued', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/list-restorations.md b/examples/2.3.x/server-ruby/examples/mysql/list-restorations.md new file mode 100644 index 000000000..c242d7633 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/list-restorations.md @@ -0,0 +1,20 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.list_restorations( + database_id: '<DATABASE_ID>', + status: 'pending', # optional + type: 'backup', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/list-specifications.md b/examples/2.3.x/server-ruby/examples/mysql/list-specifications.md new file mode 100644 index 000000000..d0c56c6ba --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/list-specifications.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_key('<YOUR_API_KEY>') # Your secret API key + +mysql = Mysql.new(client) + +result = mysql.list_specifications() +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/list.md b/examples/2.3.x/server-ruby/examples/mysql/list.md new file mode 100644 index 000000000..82de078a7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/list.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 + +mysql = Mysql.new(client) + +result = mysql.list( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-ruby/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..54bc9f64e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/update-backup-policy.md @@ -0,0 +1,21 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.update_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>', + name: '<NAME>', # optional + schedule: '', # optional + retention: 1, # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-ruby/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..3545e3908 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/update-backup-storage.md @@ -0,0 +1,23 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.update_backup_storage( + database_id: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + access_key: '<ACCESS_KEY>', + secret_key: '<SECRET_KEY>', + region: '<REGION>', # optional + prefix: '<PREFIX>', # optional + endpoint: '<ENDPOINT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/update-credentials.md b/examples/2.3.x/server-ruby/examples/mysql/update-credentials.md new file mode 100644 index 000000000..6e4775ec9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/update-credentials.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 + +mysql = Mysql.new(client) + +result = mysql.update_credentials( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/update-maintenance.md b/examples/2.3.x/server-ruby/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..026a0c63e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/update-maintenance.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 + +mysql = Mysql.new(client) + +result = mysql.update_maintenance( + database_id: '<DATABASE_ID>', + day: 'sun', + hour_utc: 0 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/update-pooler.md b/examples/2.3.x/server-ruby/examples/mysql/update-pooler.md new file mode 100644 index 000000000..7a4a1f03a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/update-pooler.md @@ -0,0 +1,24 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.update_pooler( + database_id: '<DATABASE_ID>', + mode: 'transaction', # optional + max_connections: 10, # optional + default_pool_size: 1, # optional + read_write_splitting: false, # optional + pooler_cpu_request: '<POOLER_CPU_REQUEST>', # optional + pooler_cpu_limit: '<POOLER_CPU_LIMIT>', # optional + pooler_memory_request: '<POOLER_MEMORY_REQUEST>', # optional + pooler_memory_limit: '<POOLER_MEMORY_LIMIT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/mysql/update.md b/examples/2.3.x/server-ruby/examples/mysql/update.md new file mode 100644 index 000000000..2ba792ea3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/mysql/update.md @@ -0,0 +1,36 @@ +```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 + +mysql = Mysql.new(client) + +result = mysql.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', # optional + status: 'ready', # optional + specification: '<SPECIFICATION>', # optional + replicas: 0, # optional + sync_mode: 'async', # optional + network_idle_timeout_seconds: 60, # optional + network_ip_allowlist: [], # optional + idle_timeout_minutes: 5, # optional + pitr: false, # optional + pitr_retention_days: 1, # optional + storage_autoscaling: false, # optional + storage_autoscaling_threshold_percent: 50, # optional + storage_autoscaling_max_gb: 0, # optional + metrics_trace_sample_rate: null, # optional + metrics_slow_query_log_threshold_ms: 0, # optional + sql_api_enabled: false, # optional + sql_api_allowed_statements: [], # optional + sql_api_max_rows: 1, # optional + sql_api_max_bytes: 1024, # optional + sql_api_timeout_seconds: 1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/approve.md b/examples/2.3.x/server-ruby/examples/oauth2/approve.md new file mode 100644 index 000000000..99818b875 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/approve.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_session('') # The user session to authenticate with + +oauth2 = Oauth2.new(client) + +result = oauth2.approve( + grant_id: '<GRANT_ID>', + authorization_details: '<AUTHORIZATION_DETAILS>', # optional + scope: '<SCOPE>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/authorize-post.md b/examples/2.3.x/server-ruby/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..dddc503a2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/authorize-post.md @@ -0,0 +1,29 @@ +```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 + +oauth2 = Oauth2.new(client) + +result = oauth2.authorize_post( + client_id: '<CLIENT_ID>', # optional + redirect_uri: 'https://example.com', # optional + response_type: '', # optional + scope: '<SCOPE>', # optional + state: '<STATE>', # optional + nonce: '<NONCE>', # optional + code_challenge: '<CODE_CHALLENGE>', # optional + code_challenge_method: 's256', # optional + prompt: '<PROMPT>', # optional + max_age: 0, # optional + authorization_details: '<AUTHORIZATION_DETAILS>', # optional + resource: '', # optional + audience: '<AUDIENCE>', # optional + request_uri: '<REQUEST_URI>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/authorize.md b/examples/2.3.x/server-ruby/examples/oauth2/authorize.md new file mode 100644 index 000000000..9df01c2ea --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/authorize.md @@ -0,0 +1,29 @@ +```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 + +oauth2 = Oauth2.new(client) + +result = oauth2.authorize( + client_id: '<CLIENT_ID>', # optional + redirect_uri: 'https://example.com', # optional + response_type: '', # optional + scope: '<SCOPE>', # optional + state: '<STATE>', # optional + nonce: '<NONCE>', # optional + code_challenge: '<CODE_CHALLENGE>', # optional + code_challenge_method: 's256', # optional + prompt: '<PROMPT>', # optional + max_age: 0, # optional + authorization_details: '<AUTHORIZATION_DETAILS>', # optional + resource: '', # optional + audience: '<AUDIENCE>', # optional + request_uri: '<REQUEST_URI>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-ruby/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..1fd99578c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/create-device-authorization.md @@ -0,0 +1,20 @@ +```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 + +oauth2 = Oauth2.new(client) + +result = oauth2.create_device_authorization( + client_id: '<CLIENT_ID>', # optional + scope: '<SCOPE>', # optional + authorization_details: '<AUTHORIZATION_DETAILS>', # optional + resource: '', # optional + audience: '<AUDIENCE>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/create-grant.md b/examples/2.3.x/server-ruby/examples/oauth2/create-grant.md new file mode 100644 index 000000000..f4bff9f22 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/create-grant.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 + +oauth2 = Oauth2.new(client) + +result = oauth2.create_grant( + user_code: '<USER_CODE>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/create-par.md b/examples/2.3.x/server-ruby/examples/oauth2/create-par.md new file mode 100644 index 000000000..eb94e74fc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/create-par.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 + +oauth2 = Oauth2.new(client) + +result = oauth2.create_par( + client_id: '<CLIENT_ID>', + redirect_uri: 'https://example.com', + response_type: 'code', + scope: '<SCOPE>', # optional + state: '<STATE>', # optional + nonce: '<NONCE>', # optional + code_challenge: '<CODE_CHALLENGE>', # optional + code_challenge_method: 's256', # optional + prompt: '<PROMPT>', # optional + max_age: 0, # optional + authorization_details: '<AUTHORIZATION_DETAILS>', # optional + resource: '', # optional + audience: '<AUDIENCE>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/create-token.md b/examples/2.3.x/server-ruby/examples/oauth2/create-token.md new file mode 100644 index 000000000..931a2b906 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/create-token.md @@ -0,0 +1,25 @@ +```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 + +oauth2 = Oauth2.new(client) + +result = oauth2.create_token( + grant_type: '<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 + resource: '', # optional + audience: '<AUDIENCE>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/get-grant.md b/examples/2.3.x/server-ruby/examples/oauth2/get-grant.md new file mode 100644 index 000000000..819852861 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/get-grant.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 + +oauth2 = Oauth2.new(client) + +result = oauth2.get_grant( + grant_id: '<GRANT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/list-organizations.md b/examples/2.3.x/server-ruby/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..2e9ed664f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/list-organizations.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_session('') # The user session to authenticate with + +oauth2 = Oauth2.new(client) + +result = oauth2.list_organizations( + limit: 1, # optional + offset: 0, # optional + search: '<SEARCH>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/list-projects.md b/examples/2.3.x/server-ruby/examples/oauth2/list-projects.md new file mode 100644 index 000000000..f7a69362f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/list-projects.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_session('') # The user session to authenticate with + +oauth2 = Oauth2.new(client) + +result = oauth2.list_projects( + limit: 1, # optional + offset: 0, # optional + search: '<SEARCH>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/reject.md b/examples/2.3.x/server-ruby/examples/oauth2/reject.md new file mode 100644 index 000000000..e10fd752a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/reject.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 + +oauth2 = Oauth2.new(client) + +result = oauth2.reject( + grant_id: '<GRANT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/oauth2/revoke.md b/examples/2.3.x/server-ruby/examples/oauth2/revoke.md new file mode 100644 index 000000000..36c5c145b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/revoke.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_session('') # The user session to authenticate with + +oauth2 = Oauth2.new(client) + +result = oauth2.revoke( + 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 new file mode 100644 index 000000000..b37d17ba5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,19 @@ +```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 + +organization = Organization.new(client) + +result = organization.create_ephemeral_project_key( + project_id: '<PROJECT_ID>', + scopes: [ProjectKeyScopes::PROJECT_READ], + duration: 600 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/create-installation.md b/examples/2.3.x/server-ruby/examples/organization/create-installation.md new file mode 100644 index 000000000..a36a41e02 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/create-installation.md @@ -0,0 +1,17 @@ +```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 + +organization = Organization.new(client) + +result = organization.create_installation( + app_id: '<APP_ID>', + authorization_details: '<AUTHORIZATION_DETAILS>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/create-membership.md b/examples/2.3.x/server-ruby/examples/organization/create-membership.md new file mode 100644 index 000000000..b49780c80 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/create-membership.md @@ -0,0 +1,21 @@ +```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 + +organization = Organization.new(client) + +result = organization.create_membership( + roles: [], + email: 'email@example.com', # optional + user_id: '<USER_ID>', # optional + phone: '+12065550100', # optional + url: 'https://example.com', # optional + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/create-project.md b/examples/2.3.x/server-ruby/examples/organization/create-project.md new file mode 100644 index 000000000..95afd8015 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/create-project.md @@ -0,0 +1,19 @@ +```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 + +organization = Organization.new(client) + +result = organization.create_project( + project_id: '<PROJECT_ID>', + name: '<NAME>', + region: Region::FRA # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/delete-installation.md b/examples/2.3.x/server-ruby/examples/organization/delete-installation.md new file mode 100644 index 000000000..c906fc18b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/delete-installation.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 + +organization = Organization.new(client) + +result = organization.delete_installation( + installation_id: '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/delete-membership.md b/examples/2.3.x/server-ruby/examples/organization/delete-membership.md new file mode 100644 index 000000000..8130e2225 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/delete-membership.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 + +organization = Organization.new(client) + +result = organization.delete_membership( + membership_id: '<MEMBERSHIP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/delete-project-key.md b/examples/2.3.x/server-ruby/examples/organization/delete-project-key.md new file mode 100644 index 000000000..f96b65e4f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/delete-project-key.md @@ -0,0 +1,17 @@ +```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 + +organization = Organization.new(client) + +result = organization.delete_project_key( + project_id: '<PROJECT_ID>', + key_id: '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/delete-project.md b/examples/2.3.x/server-ruby/examples/organization/delete-project.md new file mode 100644 index 000000000..39172c8c8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/delete-project.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 + +organization = Organization.new(client) + +result = organization.delete_project( + project_id: '<PROJECT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/delete.md b/examples/2.3.x/server-ruby/examples/organization/delete.md new file mode 100644 index 000000000..c70d53dbc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/delete.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_key('<YOUR_API_KEY>') # Your secret API key + +organization = Organization.new(client) + +result = organization.delete() +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/get-installation.md b/examples/2.3.x/server-ruby/examples/organization/get-installation.md new file mode 100644 index 000000000..32c087663 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/get-installation.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 + +organization = Organization.new(client) + +result = organization.get_installation( + installation_id: '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/get-membership.md b/examples/2.3.x/server-ruby/examples/organization/get-membership.md new file mode 100644 index 000000000..85db10085 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/get-membership.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 + +organization = Organization.new(client) + +result = organization.get_membership( + membership_id: '<MEMBERSHIP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/get-project-key.md b/examples/2.3.x/server-ruby/examples/organization/get-project-key.md new file mode 100644 index 000000000..8270214d8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/get-project-key.md @@ -0,0 +1,17 @@ +```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 + +organization = Organization.new(client) + +result = organization.get_project_key( + project_id: '<PROJECT_ID>', + key_id: '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/get-project.md b/examples/2.3.x/server-ruby/examples/organization/get-project.md new file mode 100644 index 000000000..13f7a49d7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/get-project.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 + +organization = Organization.new(client) + +result = organization.get_project( + project_id: '<PROJECT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/get.md b/examples/2.3.x/server-ruby/examples/organization/get.md new file mode 100644 index 000000000..e39c77646 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/get.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_key('<YOUR_API_KEY>') # Your secret API key + +organization = Organization.new(client) + +result = organization.get() +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/list-installations.md b/examples/2.3.x/server-ruby/examples/organization/list-installations.md new file mode 100644 index 000000000..92214d266 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/list-installations.md @@ -0,0 +1,17 @@ +```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 + +organization = Organization.new(client) + +result = organization.list_installations( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/list-memberships.md b/examples/2.3.x/server-ruby/examples/organization/list-memberships.md new file mode 100644 index 000000000..ea03bef42 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/list-memberships.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 + +organization = Organization.new(client) + +result = organization.list_memberships( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/list-project-keys.md b/examples/2.3.x/server-ruby/examples/organization/list-project-keys.md new file mode 100644 index 000000000..a2697641c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/list-project-keys.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 + +organization = Organization.new(client) + +result = organization.list_project_keys( + project_id: '<PROJECT_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/list-projects.md b/examples/2.3.x/server-ruby/examples/organization/list-projects.md new file mode 100644 index 000000000..16bb09cf6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/list-projects.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 + +organization = Organization.new(client) + +result = organization.list_projects( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/update-installation.md b/examples/2.3.x/server-ruby/examples/organization/update-installation.md new file mode 100644 index 000000000..db7c932e9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/update-installation.md @@ -0,0 +1,17 @@ +```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 + +organization = Organization.new(client) + +result = organization.update_installation( + installation_id: '<INSTALLATION_ID>', + authorization_details: '<AUTHORIZATION_DETAILS>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/update-membership.md b/examples/2.3.x/server-ruby/examples/organization/update-membership.md new file mode 100644 index 000000000..f4b5ac27a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/update-membership.md @@ -0,0 +1,17 @@ +```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 + +organization = Organization.new(client) + +result = organization.update_membership( + membership_id: '<MEMBERSHIP_ID>', + roles: [] +) +``` 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 new file mode 100644 index 000000000..ee44ade53 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/update-project-key.md @@ -0,0 +1,21 @@ +```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 + +organization = Organization.new(client) + +result = organization.update_project_key( + project_id: '<PROJECT_ID>', + key_id: '<KEY_ID>', + name: '<NAME>', + scopes: [ProjectKeyScopes::PROJECT_READ], + expire: '2020-10-15T06:38:00.000+00:00' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/update-project.md b/examples/2.3.x/server-ruby/examples/organization/update-project.md new file mode 100644 index 000000000..275851830 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/update-project.md @@ -0,0 +1,17 @@ +```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 + +organization = Organization.new(client) + +result = organization.update_project( + project_id: '<PROJECT_ID>', + name: '<NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/update.md b/examples/2.3.x/server-ruby/examples/organization/update.md new file mode 100644 index 000000000..5c0cda425 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/organization/update.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 + +organization = Organization.new(client) + +result = organization.update( + name: '<NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-ruby/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..871212ef2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-backup-policy.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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>', + name: '<NAME>', + schedule: '', + retention: 1, + type: 'full', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-backup.md b/examples/2.3.x/server-ruby/examples/postgresql/create-backup.md new file mode 100644 index 000000000..5439d2b30 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-backup.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_backup( + database_id: '<DATABASE_ID>', + type: 'full' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-branch.md b/examples/2.3.x/server-ruby/examples/postgresql/create-branch.md new file mode 100644 index 000000000..1ff35c7f1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-branch.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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_branch( + database_id: '<DATABASE_ID>', + branch_id: '<BRANCH_ID>', # optional + ttl: 300 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-execution.md b/examples/2.3.x/server-ruby/examples/postgresql/create-execution.md new file mode 100644 index 000000000..7359465da --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-execution.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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_execution( + database_id: '<DATABASE_ID>', + sql: '<SQL>', + bindings: {}, # optional + timeout_seconds: 1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-extension.md b/examples/2.3.x/server-ruby/examples/postgresql/create-extension.md new file mode 100644 index 000000000..c60554c2c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-extension.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_extension( + database_id: '<DATABASE_ID>', + name: '<NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-failover.md b/examples/2.3.x/server-ruby/examples/postgresql/create-failover.md new file mode 100644 index 000000000..17642ce9f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-failover.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_failover( + database_id: '<DATABASE_ID>', + target_replica_id: '<TARGET_REPLICA_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-migration.md b/examples/2.3.x/server-ruby/examples/postgresql/create-migration.md new file mode 100644 index 000000000..a8acf341f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-migration.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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_migration( + database_id: '<DATABASE_ID>', + target_type: 'shared', + specification: '<SPECIFICATION>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-restoration.md b/examples/2.3.x/server-ruby/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..b4a8e9883 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-restoration.md @@ -0,0 +1,20 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_restoration( + database_id: '<DATABASE_ID>', + type: 'backup', # optional + backup_id: '<BACKUP_ID>', # optional + target_database_id: '<TARGET_DATABASE_ID>', # optional + target_time: '2020-10-15T06:38:00.000+00:00' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-ruby/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..0eeebbc6e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create-upgrade.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.create_upgrade( + database_id: '<DATABASE_ID>', + target_version: '<TARGET_VERSION>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/create.md b/examples/2.3.x/server-ruby/examples/postgresql/create.md new file mode 100644 index 000000000..69a6033d8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/create.md @@ -0,0 +1,29 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + version: '17', # optional + specification: '<SPECIFICATION>', # optional + replicas: 0, # optional + sync_mode: 'async', # optional + network_idle_timeout_seconds: 60, # optional + network_ip_allowlist: [], # optional + idle_timeout_minutes: 5, # optional + pitr: false, # optional + pitr_retention_days: 1, # optional + storage_autoscaling: false, # optional + storage_autoscaling_threshold_percent: 50, # optional + storage_autoscaling_max_gb: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-ruby/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..824f6a5b8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.delete_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/delete-backup.md b/examples/2.3.x/server-ruby/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..d86c46eff --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/delete-backup.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.delete_backup( + database_id: '<DATABASE_ID>', + backup_id: '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/delete-branch.md b/examples/2.3.x/server-ruby/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..4ff43f2d1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/delete-branch.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.delete_branch( + database_id: '<DATABASE_ID>', + branch_id: '<BRANCH_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/delete-extension.md b/examples/2.3.x/server-ruby/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..46873c52f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/delete-extension.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.delete_extension( + database_id: '<DATABASE_ID>', + extension_name: '<EXTENSION_NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/delete.md b/examples/2.3.x/server-ruby/examples/postgresql/delete.md new file mode 100644 index 000000000..b692ba5da --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/delete.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 + +postgresql = Postgresql.new(client) + +result = postgresql.delete( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-ruby/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..674ed65a8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/get-backup-policy.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.get_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/get-backup.md b/examples/2.3.x/server-ruby/examples/postgresql/get-backup.md new file mode 100644 index 000000000..19a4d6cc3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/get-backup.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.get_backup( + database_id: '<DATABASE_ID>', + backup_id: '<BACKUP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/get-pitr.md b/examples/2.3.x/server-ruby/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..9701c3848 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/get-pitr.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 + +postgresql = Postgresql.new(client) + +result = postgresql.get_pitr( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/get-pooler.md b/examples/2.3.x/server-ruby/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..9bf12dd45 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/get-pooler.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 + +postgresql = Postgresql.new(client) + +result = postgresql.get_pooler( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/get-replicas.md b/examples/2.3.x/server-ruby/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..710a96309 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/get-replicas.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 + +postgresql = Postgresql.new(client) + +result = postgresql.get_replicas( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/get-restoration.md b/examples/2.3.x/server-ruby/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..075587a21 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/get-restoration.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.get_restoration( + database_id: '<DATABASE_ID>', + restoration_id: '<RESTORATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/get-status.md b/examples/2.3.x/server-ruby/examples/postgresql/get-status.md new file mode 100644 index 000000000..0040a9ced --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/get-status.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 + +postgresql = Postgresql.new(client) + +result = postgresql.get_status( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/get.md b/examples/2.3.x/server-ruby/examples/postgresql/get.md new file mode 100644 index 000000000..9c44154e9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/get.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 + +postgresql = Postgresql.new(client) + +result = postgresql.get( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-ruby/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..2120ce92e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/list-backup-policies.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.list_backup_policies( + database_id: '<DATABASE_ID>', + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/list-backups.md b/examples/2.3.x/server-ruby/examples/postgresql/list-backups.md new file mode 100644 index 000000000..28d47c905 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/list-backups.md @@ -0,0 +1,17 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.list_backups( + database_id: '<DATABASE_ID>', + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/list-branches.md b/examples/2.3.x/server-ruby/examples/postgresql/list-branches.md new file mode 100644 index 000000000..65400567f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/list-branches.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 + +postgresql = Postgresql.new(client) + +result = postgresql.list_branches( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/list-extensions.md b/examples/2.3.x/server-ruby/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..e75a398eb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/list-extensions.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 + +postgresql = Postgresql.new(client) + +result = postgresql.list_extensions( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/list-operations.md b/examples/2.3.x/server-ruby/examples/postgresql/list-operations.md new file mode 100644 index 000000000..b9629cfde --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/list-operations.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 + +postgresql = Postgresql.new(client) + +result = postgresql.list_operations( + database_id: '<DATABASE_ID>', + status: 'queued', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/list-restorations.md b/examples/2.3.x/server-ruby/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..0ee5eced0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/list-restorations.md @@ -0,0 +1,20 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.list_restorations( + database_id: '<DATABASE_ID>', + status: 'pending', # optional + type: 'backup', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/list-specifications.md b/examples/2.3.x/server-ruby/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..90a473d60 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/list-specifications.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_key('<YOUR_API_KEY>') # Your secret API key + +postgresql = Postgresql.new(client) + +result = postgresql.list_specifications() +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/list.md b/examples/2.3.x/server-ruby/examples/postgresql/list.md new file mode 100644 index 000000000..729f2fe21 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/list.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 + +postgresql = Postgresql.new(client) + +result = postgresql.list( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-ruby/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..d1b404748 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/update-backup-policy.md @@ -0,0 +1,21 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.update_backup_policy( + database_id: '<DATABASE_ID>', + policy_id: '<POLICY_ID>', + name: '<NAME>', # optional + schedule: '', # optional + retention: 1, # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-ruby/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..546e1e7e5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/update-backup-storage.md @@ -0,0 +1,23 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.update_backup_storage( + database_id: '<DATABASE_ID>', + provider: 's3', + bucket: '<BUCKET>', + access_key: '<ACCESS_KEY>', + secret_key: '<SECRET_KEY>', + region: '<REGION>', # optional + prefix: '<PREFIX>', # optional + endpoint: '<ENDPOINT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/update-credentials.md b/examples/2.3.x/server-ruby/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..cab98e92c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/update-credentials.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 + +postgresql = Postgresql.new(client) + +result = postgresql.update_credentials( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-ruby/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..a8d5f7971 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/update-maintenance.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 + +postgresql = Postgresql.new(client) + +result = postgresql.update_maintenance( + database_id: '<DATABASE_ID>', + day: 'sun', + hour_utc: 0 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/update-pooler.md b/examples/2.3.x/server-ruby/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..f6421f70e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/update-pooler.md @@ -0,0 +1,24 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.update_pooler( + database_id: '<DATABASE_ID>', + mode: 'transaction', # optional + max_connections: 10, # optional + default_pool_size: 1, # optional + read_write_splitting: false, # optional + pooler_cpu_request: '<POOLER_CPU_REQUEST>', # optional + pooler_cpu_limit: '<POOLER_CPU_LIMIT>', # optional + pooler_memory_request: '<POOLER_MEMORY_REQUEST>', # optional + pooler_memory_limit: '<POOLER_MEMORY_LIMIT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/postgresql/update.md b/examples/2.3.x/server-ruby/examples/postgresql/update.md new file mode 100644 index 000000000..f43a9e88b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/postgresql/update.md @@ -0,0 +1,36 @@ +```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 + +postgresql = Postgresql.new(client) + +result = postgresql.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', # optional + status: 'ready', # optional + specification: '<SPECIFICATION>', # optional + replicas: 0, # optional + sync_mode: 'async', # optional + network_idle_timeout_seconds: 60, # optional + network_ip_allowlist: [], # optional + idle_timeout_minutes: 5, # optional + pitr: false, # optional + pitr_retention_days: 1, # optional + storage_autoscaling: false, # optional + storage_autoscaling_threshold_percent: 50, # optional + storage_autoscaling_max_gb: 0, # optional + metrics_trace_sample_rate: null, # optional + metrics_slow_query_log_threshold_ms: 0, # optional + sql_api_enabled: false, # optional + sql_api_allowed_statements: [], # optional + sql_api_max_rows: 1, # optional + sql_api_max_bytes: 1024, # optional + sql_api_timeout_seconds: 1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/presences/delete.md b/examples/2.3.x/server-ruby/examples/presences/delete.md new file mode 100644 index 000000000..b9b015269 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/presences/delete.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 + +presences = Presences.new(client) + +result = presences.delete( + presence_id: '<PRESENCE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/presences/get.md b/examples/2.3.x/server-ruby/examples/presences/get.md new file mode 100644 index 000000000..18307cfd8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/presences/get.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 + +presences = Presences.new(client) + +result = presences.get( + presence_id: '<PRESENCE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/presences/list.md b/examples/2.3.x/server-ruby/examples/presences/list.md new file mode 100644 index 000000000..ff2ad46fe --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/presences/list.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 + +presences = Presences.new(client) + +result = presences.list( + queries: [], # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/presences/update.md b/examples/2.3.x/server-ruby/examples/presences/update.md new file mode 100644 index 000000000..90acb543f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/presences/update.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +presences = Presences.new(client) + +result = presences.update( + presence_id: '<PRESENCE_ID>', + user_id: '<USER_ID>', + status: '<STATUS>', # optional + expires_at: '2020-10-15T06:38:00.000+00:00', # optional + metadata: {}, # optional + permissions: [Permission.read(Role.any())], # optional + purge: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/presences/upsert.md b/examples/2.3.x/server-ruby/examples/presences/upsert.md new file mode 100644 index 000000000..cc0801af5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/presences/upsert.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +presences = Presences.new(client) + +result = presences.upsert( + presence_id: '<PRESENCE_ID>', + user_id: '<USER_ID>', + status: '<STATUS>', + permissions: [Permission.read(Role.any())], # optional + expires_at: '2020-10-15T06:38:00.000+00:00', # optional + metadata: {} # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-android-platform.md b/examples/2.3.x/server-ruby/examples/project/create-android-platform.md new file mode 100644 index 000000000..31c9725ed --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-android-platform.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.create_android_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + application_id: '<APPLICATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-apple-platform.md b/examples/2.3.x/server-ruby/examples/project/create-apple-platform.md new file mode 100644 index 000000000..d720b22c3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-apple-platform.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.create_apple_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + bundle_identifier: '<BUNDLE_IDENTIFIER>' +) +``` 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 new file mode 100644 index 000000000..6f0d9b660 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-ephemeral-key.md @@ -0,0 +1,18 @@ +```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 + +project = Project.new(client) + +result = project.create_ephemeral_key( + scopes: [ProjectKeyScopes::PROJECT_READ], + duration: 600 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-linux-platform.md b/examples/2.3.x/server-ruby/examples/project/create-linux-platform.md new file mode 100644 index 000000000..11af48743 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-linux-platform.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.create_linux_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + package_name: '<PACKAGE_NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-mock-phone.md b/examples/2.3.x/server-ruby/examples/project/create-mock-phone.md new file mode 100644 index 000000000..73cb15a44 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-mock-phone.md @@ -0,0 +1,17 @@ +```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.create_mock_phone( + number: '+12065550100', + otp: '<OTP>' +) +``` 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 new file mode 100644 index 000000000..1e1d1eae0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-smtp-test.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 + +project = Project.new(client) + +result = project.create_smtp_test( + emails: [] +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-variable.md b/examples/2.3.x/server-ruby/examples/project/create-variable.md new file mode 100644 index 000000000..782cb51fe --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-variable.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 + +project = Project.new(client) + +result = project.create_variable( + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-web-platform.md b/examples/2.3.x/server-ruby/examples/project/create-web-platform.md new file mode 100644 index 000000000..9abfe8e99 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-web-platform.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.create_web_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-windows-platform.md b/examples/2.3.x/server-ruby/examples/project/create-windows-platform.md new file mode 100644 index 000000000..8f53f16a8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/create-windows-platform.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.create_windows_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + package_identifier_name: '<PACKAGE_IDENTIFIER_NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/delete-key.md b/examples/2.3.x/server-ruby/examples/project/delete-key.md new file mode 100644 index 000000000..ed80903cc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/delete-key.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 + +project = Project.new(client) + +result = project.delete_key( + key_id: '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/delete-mock-phone.md b/examples/2.3.x/server-ruby/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..1800c0ec6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/delete-mock-phone.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 + +project = Project.new(client) + +result = project.delete_mock_phone( + number: '+12065550100' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/delete-platform.md b/examples/2.3.x/server-ruby/examples/project/delete-platform.md new file mode 100644 index 000000000..bf8c2e5ba --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/delete-platform.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 + +project = Project.new(client) + +result = project.delete_platform( + platform_id: '<PLATFORM_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/delete-variable.md b/examples/2.3.x/server-ruby/examples/project/delete-variable.md new file mode 100644 index 000000000..71c5bd804 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/delete-variable.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 + +project = Project.new(client) + +result = project.delete_variable( + variable_id: '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/delete.md b/examples/2.3.x/server-ruby/examples/project/delete.md new file mode 100644 index 000000000..bc8b3a1a2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/delete.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_key('<YOUR_API_KEY>') # Your secret API key + +project = Project.new(client) + +result = project.delete() +``` diff --git a/examples/2.3.x/server-ruby/examples/project/get-email-template.md b/examples/2.3.x/server-ruby/examples/project/get-email-template.md new file mode 100644 index 000000000..1bb1a4bc6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/get-email-template.md @@ -0,0 +1,18 @@ +```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 + +project = Project.new(client) + +result = project.get_email_template( + template_id: ProjectEmailTemplateId::VERIFICATION, + locale: ProjectEmailTemplateLocale::AF # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/get-key.md b/examples/2.3.x/server-ruby/examples/project/get-key.md new file mode 100644 index 000000000..2d19eae2c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/get-key.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 + +project = Project.new(client) + +result = project.get_key( + key_id: '<KEY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/get-mock-phone.md b/examples/2.3.x/server-ruby/examples/project/get-mock-phone.md new file mode 100644 index 000000000..03ef044ba --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/get-mock-phone.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 + +project = Project.new(client) + +result = project.get_mock_phone( + number: '+12065550100' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-ruby/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..d5bde47f7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,17 @@ +```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 + +project = Project.new(client) + +result = project.get_o_auth2_provider( + provider_id: ProjectOAuthProviderId::AMAZON +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/get-platform.md b/examples/2.3.x/server-ruby/examples/project/get-platform.md new file mode 100644 index 000000000..276901c55 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/get-platform.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 + +project = Project.new(client) + +result = project.get_platform( + platform_id: '<PLATFORM_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/get-policy.md b/examples/2.3.x/server-ruby/examples/project/get-policy.md new file mode 100644 index 000000000..57b186f22 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/get-policy.md @@ -0,0 +1,17 @@ +```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 + +project = Project.new(client) + +result = project.get_policy( + policy_id: ProjectPolicyId::PASSWORD_DICTIONARY +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/get-variable.md b/examples/2.3.x/server-ruby/examples/project/get-variable.md new file mode 100644 index 000000000..7bea5e9de --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/get-variable.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 + +project = Project.new(client) + +result = project.get_variable( + variable_id: '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/get.md b/examples/2.3.x/server-ruby/examples/project/get.md new file mode 100644 index 000000000..3a702dec3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/get.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_key('<YOUR_API_KEY>') # Your secret API key + +project = Project.new(client) + +result = project.get() +``` diff --git a/examples/2.3.x/server-ruby/examples/project/list-email-templates.md b/examples/2.3.x/server-ruby/examples/project/list-email-templates.md new file mode 100644 index 000000000..3286a5db4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/list-email-templates.md @@ -0,0 +1,17 @@ +```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.list_email_templates( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/list-keys.md b/examples/2.3.x/server-ruby/examples/project/list-keys.md new file mode 100644 index 000000000..fe8823573 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/list-keys.md @@ -0,0 +1,17 @@ +```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.list_keys( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/list-mock-phones.md b/examples/2.3.x/server-ruby/examples/project/list-mock-phones.md new file mode 100644 index 000000000..e0f0b35d5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/list-mock-phones.md @@ -0,0 +1,17 @@ +```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.list_mock_phones( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-ruby/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..b91088014 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,17 @@ +```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.list_o_auth2_providers( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/list-platforms.md b/examples/2.3.x/server-ruby/examples/project/list-platforms.md new file mode 100644 index 000000000..3685c81ce --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/list-platforms.md @@ -0,0 +1,17 @@ +```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.list_platforms( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/list-policies.md b/examples/2.3.x/server-ruby/examples/project/list-policies.md new file mode 100644 index 000000000..b5ac0bd25 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/list-policies.md @@ -0,0 +1,17 @@ +```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.list_policies( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/list-variables.md b/examples/2.3.x/server-ruby/examples/project/list-variables.md new file mode 100644 index 000000000..a6af08204 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/list-variables.md @@ -0,0 +1,17 @@ +```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.list_variables( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-android-platform.md b/examples/2.3.x/server-ruby/examples/project/update-android-platform.md new file mode 100644 index 000000000..07e177d28 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-android-platform.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_android_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + application_id: '<APPLICATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-apple-platform.md b/examples/2.3.x/server-ruby/examples/project/update-apple-platform.md new file mode 100644 index 000000000..9faa5c138 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-apple-platform.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_apple_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + bundle_identifier: '<BUNDLE_IDENTIFIER>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-auth-method.md b/examples/2.3.x/server-ruby/examples/project/update-auth-method.md new file mode 100644 index 000000000..a717e1051 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-auth-method.md @@ -0,0 +1,18 @@ +```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 + +project = Project.new(client) + +result = project.update_auth_method( + method_id: ProjectAuthMethodId::EMAIL_PASSWORD, + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-ruby/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..f1ce424d5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-deny-aliased-email-policy.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 + +project = Project.new(client) + +result = project.update_deny_aliased_email_policy( + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-ruby/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..24082514e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-deny-corporate-email-policy.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 + +project = Project.new(client) + +result = project.update_deny_corporate_email_policy( + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-ruby/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..39725fb80 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-deny-disposable-email-policy.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 + +project = Project.new(client) + +result = project.update_deny_disposable_email_policy( + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-ruby/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..7a373db60 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-deny-free-email-policy.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 + +project = Project.new(client) + +result = project.update_deny_free_email_policy( + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-email-template.md b/examples/2.3.x/server-ruby/examples/project/update-email-template.md new file mode 100644 index 000000000..d845017e9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-email-template.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 + +project = Project.new(client) + +result = project.update_email_template( + template_id: ProjectEmailTemplateId::VERIFICATION, + locale: ProjectEmailTemplateLocale::AF, # optional + subject: '<SUBJECT>', # optional + message: '<MESSAGE>', # optional + sender_name: '<SENDER_NAME>', # optional + sender_email: 'email@example.com', # optional + reply_to_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>' # optional +) +``` 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 new file mode 100644 index 000000000..b192315d7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-key.md @@ -0,0 +1,20 @@ +```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 + +project = Project.new(client) + +result = project.update_key( + key_id: '<KEY_ID>', + name: '<NAME>', + scopes: [ProjectKeyScopes::PROJECT_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 new file mode 100644 index 000000000..f57cec70e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-labels.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 + +project = Project.new(client) + +result = project.update_labels( + labels: [] +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-linux-platform.md b/examples/2.3.x/server-ruby/examples/project/update-linux-platform.md new file mode 100644 index 000000000..9714dced8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-linux-platform.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_linux_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + package_name: '<PACKAGE_NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-ruby/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..b84a8facc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,21 @@ +```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_membership_privacy_policy( + user_id: false, # optional + user_email: false, # optional + user_phone: false, # optional + user_name: false, # optional + user_mfa: false, # optional + user_accessed_at: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-ruby/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..1849b161f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-mfa-factors-policy.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 + +project = Project.new(client) + +result = project.update_mfa_factors_policy( + totp: false, # optional + email: false, # optional + phone: false, # optional + custom: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-mock-phone.md b/examples/2.3.x/server-ruby/examples/project/update-mock-phone.md new file mode 100644 index 000000000..028cb481f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-mock-phone.md @@ -0,0 +1,17 @@ +```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_mock_phone( + number: '+12065550100', + otp: '<OTP>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..29861e692 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-amazon.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_amazon( + 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-apple.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..a8c259e35 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-apple.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 + +project = Project.new(client) + +result = project.update_o_auth2_apple( + service_id: '<SERVICE_ID>', # optional + key_id: '<KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + p8_file: '<P8_FILE>', # optional + native_client_ids: [], # optional + enabled: false, # optional + native_enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..1d8e92edf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-appwrite.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_appwrite( + 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-auth-0.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..e8d11dbf3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-auth-0.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 + +project = Project.new(client) + +result = project.update_o_auth2_auth0( + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>', # optional + endpoint: '<ENDPOINT>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..d0ec2396d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-authentik.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 + +project = Project.new(client) + +result = project.update_o_auth2_authentik( + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>', # optional + endpoint: '<ENDPOINT>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..41e2e475f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-autodesk.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_autodesk( + 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-bitbucket.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..46c7e20f4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-bitbucket.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_bitbucket( + key: '<KEY>', # optional + secret: '<SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..12a8ab63c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-bitly.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_bitly( + 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-box.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..5d390fead --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-box.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_box( + 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-cloudflare.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..7b143a7ef --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-cloudflare.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_cloudflare( + 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-dailymotion.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..7ae5ac7b5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-dailymotion.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_dailymotion( + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # 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 new file mode 100644 index 000000000..01bacd7cb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-discord.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_discord( + 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-disqus.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..38784b107 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-disqus.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_disqus( + public_key: '<PUBLIC_KEY>', # optional + secret_key: '<SECRET_KEY>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..29247c56d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-dropbox.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_dropbox( + app_key: '<APP_KEY>', # optional + app_secret: '<APP_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..e3fdb3882 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-etsy.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_etsy( + key_string: '<KEY_STRING>', # optional + shared_secret: '<SHARED_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..474e4b5a6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-facebook.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_facebook( + app_id: '<APP_ID>', # optional + app_secret: '<APP_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..78ce11092 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-figma.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_figma( + 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-fusion-auth.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..5350351e3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-fusion-auth.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 + +project = Project.new(client) + +result = project.update_o_auth2_fusion_auth( + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>', # optional + endpoint: '<ENDPOINT>', # 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 new file mode 100644 index 000000000..e63370f78 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-git-hub.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_git_hub( + 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-gitlab.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..6073bc86a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-gitlab.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 + +project = Project.new(client) + +result = project.update_o_auth2_gitlab( + application_id: '<APPLICATION_ID>', # optional + secret: '<SECRET>', # optional + endpoint: 'https://example.com', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..7c21efe66 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-google.md @@ -0,0 +1,22 @@ +```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 + +project = Project.new(client) + +result = project.update_o_auth2_google( + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>', # optional + prompt: [ProjectOAuth2GooglePrompt::NONE], # optional + native_client_ids: [], # optional + enabled: false, # optional + native_enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..a8d2adc81 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-hugging-face.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_hugging_face( + 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-kakao.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..53b6a10af --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kakao.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_kakao( + 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-keycloak.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..63d60d122 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,20 @@ +```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_keycloak( + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>', # optional + endpoint: '<ENDPOINT>', # optional + realm_name: '<REALM_NAME>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..4a36804b0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kick.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_kick( + 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-linkedin.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..7a9109cec --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-linkedin.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_linkedin( + client_id: '<CLIENT_ID>', # optional + primary_client_secret: '<PRIMARY_CLIENT_SECRET>', # 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 new file mode 100644 index 000000000..0a5563f7a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-microsoft.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 + +project = Project.new(client) + +result = project.update_o_auth2_microsoft( + application_id: '<APPLICATION_ID>', # optional + application_secret: '<APPLICATION_SECRET>', # optional + tenant: '<TENANT>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..f679d2872 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-notion.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_notion( + oauth_client_id: '<OAUTH_CLIENT_ID>', # optional + oauth_client_secret: '<OAUTH_CLIENT_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..f090e96ae --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,25 @@ +```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 + +project = Project.new(client) + +result = project.update_o_auth2_oidc( + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>', # optional + well_known_url: 'https://example.com', # optional + authorization_url: 'https://example.com', # optional + token_url: 'https://example.com', # optional + user_info_url: 'https://example.com', # optional + prompt: [ProjectOAuth2OidcPrompt::NONE], # optional + max_age: 0, # 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 new file mode 100644 index 000000000..44716551f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,20 @@ +```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_okta( + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>', # optional + domain: 'example.com', # optional + authorization_server_id: '<AUTHORIZATION_SERVER_ID>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..34a5cbf11 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-paypal-sandbox.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_paypal_sandbox( + client_id: '<CLIENT_ID>', # optional + secret_key: '<SECRET_KEY>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..054a5c919 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-paypal.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_paypal( + client_id: '<CLIENT_ID>', # optional + secret_key: '<SECRET_KEY>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..5f58dbe8a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-podio.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_podio( + 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-resend.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..c88eb5a83 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-resend.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_resend( + 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-salesforce.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..f573693fb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-salesforce.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_salesforce( + customer_key: '<CUSTOMER_KEY>', # optional + customer_secret: '<CUSTOMER_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..cfa1a0ab2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-server.md @@ -0,0 +1,31 @@ +```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_server( + enabled: false, + authorization_url: 'https://example.com', + scopes: [], # optional + authorization_details_types: [], # optional + access_token_duration: 60, # optional + refresh_token_duration: 60, # optional + public_access_token_duration: 60, # optional + public_refresh_token_duration: 60, # optional + installation_access_token_duration: 60, # optional + confidential_pkce: false, # optional + verification_url: 'https://example.com', # optional + user_code_length: 6, # optional + user_code_format: 'numeric', # optional + device_code_duration: 60, # optional + default_scopes: [], # optional + installation_scopes: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..fb5055df9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-slack.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_slack( + 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-spotify.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..fc95bff49 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-spotify.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_spotify( + 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-stripe.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..21db796dc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-stripe.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_stripe( + client_id: '<CLIENT_ID>', # optional + api_secret_key: '<API_SECRET_KEY>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..36b8ceeac --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-tik-tok.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_tik_tok( + 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-tradeshift-sandbox.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..a79d0a91e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-tradeshift-sandbox.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_tradeshift_sandbox( + oauth2_client_id: '<OAUTH2_CLIENT_ID>', # optional + oauth2_client_secret: '<OAUTH2_CLIENT_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..eb4536caa --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-tradeshift.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_tradeshift( + oauth2_client_id: '<OAUTH2_CLIENT_ID>', # optional + oauth2_client_secret: '<OAUTH2_CLIENT_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..c110abaf2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-twitch.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_twitch( + 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-word-press.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..90da17ab1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-word-press.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_word_press( + 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-yahoo.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..8e2498a37 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-yahoo.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_yahoo( + 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-yandex.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..73461da23 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-yandex.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_yandex( + 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 new file mode 100644 index 000000000..2fbd5fed3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-zoho.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_zoho( + 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-zoom.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..c61ddd9b4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-zoom.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_zoom( + 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-2x.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..3d06d8443 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2x.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_x( + customer_key: '<CUSTOMER_KEY>', # optional + secret_key: '<SECRET_KEY>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-ruby/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..e3f152e60 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-password-dictionary-policy.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 + +project = Project.new(client) + +result = project.update_password_dictionary_policy( + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-password-history-policy.md b/examples/2.3.x/server-ruby/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..462ab8a85 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-password-history-policy.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 + +project = Project.new(client) + +result = project.update_password_history_policy( + total: 1 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-ruby/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..226ecc821 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-password-personal-data-policy.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 + +project = Project.new(client) + +result = project.update_password_personal_data_policy( + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-ruby/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..abb2abb6d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-password-pwned-policy.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_password_pwned_policy( + enabled: false, # optional + sessions: false, # optional + users: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-ruby/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..516324116 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-password-strength-policy.md @@ -0,0 +1,20 @@ +```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_password_strength_policy( + min: 8, # optional + uppercase: false, # optional + lowercase: false, # optional + number: false, # optional + symbols: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-protocol.md b/examples/2.3.x/server-ruby/examples/project/update-protocol.md new file mode 100644 index 000000000..6ff3cc123 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-protocol.md @@ -0,0 +1,18 @@ +```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 + +project = Project.new(client) + +result = project.update_protocol( + protocol_id: ProjectProtocolId::REST, + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-service.md b/examples/2.3.x/server-ruby/examples/project/update-service.md new file mode 100644 index 000000000..0cabe6ac5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-service.md @@ -0,0 +1,18 @@ +```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 + +project = Project.new(client) + +result = project.update_service( + service_id: ProjectServiceId::ACCOUNT, + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-ruby/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..2fd2fe15d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-session-alert-policy.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 + +project = Project.new(client) + +result = project.update_session_alert_policy( + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-ruby/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..ba8f1cb39 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-session-duration-policy.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 + +project = Project.new(client) + +result = project.update_session_duration_policy( + duration: 60 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-ruby/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..e48d0e318 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-session-invalidation-policy.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 + +project = Project.new(client) + +result = project.update_session_invalidation_policy( + enabled: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-ruby/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..38a4dfdd4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-session-limit-policy.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 + +project = Project.new(client) + +result = project.update_session_limit_policy( + total: 1 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-smtp.md b/examples/2.3.x/server-ruby/examples/project/update-smtp.md new file mode 100644 index 000000000..0af3b32be --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-smtp.md @@ -0,0 +1,26 @@ +```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 + +project = Project.new(client) + +result = project.update_smtp( + host: 'example.com', # optional + port: 587, # optional + username: '<USERNAME>', # optional + password: 'password', # optional + sender_email: 'email@example.com', # optional + sender_name: '<SENDER_NAME>', # optional + reply_to_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + secure: ProjectSMTPSecure::TLS, # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-ruby/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..145906a3e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-user-limit-policy.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 + +project = Project.new(client) + +result = project.update_user_limit_policy( + total: 0 +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-variable.md b/examples/2.3.x/server-ruby/examples/project/update-variable.md new file mode 100644 index 000000000..fcfcac625 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-variable.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 + +project = Project.new(client) + +result = project.update_variable( + variable_id: '<VARIABLE_ID>', + key: '<KEY>', # optional + value: '<VALUE>', # optional + secret: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-web-platform.md b/examples/2.3.x/server-ruby/examples/project/update-web-platform.md new file mode 100644 index 000000000..46fe9cfd3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-web-platform.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_web_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + hostname: 'app.example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-windows-platform.md b/examples/2.3.x/server-ruby/examples/project/update-windows-platform.md new file mode 100644 index 000000000..5e2b10694 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-windows-platform.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_windows_platform( + platform_id: '<PLATFORM_ID>', + name: '<NAME>', + package_identifier_name: '<PACKAGE_IDENTIFIER_NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/create-api-rule.md b/examples/2.3.x/server-ruby/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..a69c1ec2b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/create-api-rule.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 + +proxy = Proxy.new(client) + +result = proxy.create_api_rule( + domain: 'example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/create-function-rule.md b/examples/2.3.x/server-ruby/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..2f65090bf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/create-function-rule.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 + +proxy = Proxy.new(client) + +result = proxy.create_function_rule( + domain: 'example.com', + function_id: '<FUNCTION_ID>', + branch: '<BRANCH>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/create-invalidation.md b/examples/2.3.x/server-ruby/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..e3e43f76d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/create-invalidation.md @@ -0,0 +1,19 @@ +```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 + +proxy = Proxy.new(client) + +result = proxy.create_invalidation( + domain: 'example.com', + type: InvalidationType::TAG, + reference: '<REFERENCE>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-ruby/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..40a1ea4b7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/create-redirect-rule.md @@ -0,0 +1,21 @@ +```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 + +proxy = Proxy.new(client) + +result = proxy.create_redirect_rule( + domain: 'example.com', + url: 'https://example.com', + status_code: StatusCode::MOVEDPERMANENTLY, + resource_id: '<RESOURCE_ID>', + resource_type: ProxyResourceType::SITE +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/create-site-rule.md b/examples/2.3.x/server-ruby/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..c2570cb23 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/create-site-rule.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 + +proxy = Proxy.new(client) + +result = proxy.create_site_rule( + domain: 'example.com', + site_id: '<SITE_ID>', + branch: '<BRANCH>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/delete-rule.md b/examples/2.3.x/server-ruby/examples/proxy/delete-rule.md new file mode 100644 index 000000000..960cd399e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/delete-rule.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 + +proxy = Proxy.new(client) + +result = proxy.delete_rule( + rule_id: '<RULE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/get-rule.md b/examples/2.3.x/server-ruby/examples/proxy/get-rule.md new file mode 100644 index 000000000..47c03f1e2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/get-rule.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 + +proxy = Proxy.new(client) + +result = proxy.get_rule( + rule_id: '<RULE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/list-rules.md b/examples/2.3.x/server-ruby/examples/proxy/list-rules.md new file mode 100644 index 000000000..858fc6c83 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/list-rules.md @@ -0,0 +1,17 @@ +```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 + +proxy = Proxy.new(client) + +result = proxy.list_rules( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/proxy/update-rule-status.md b/examples/2.3.x/server-ruby/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..13192b411 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/proxy/update-rule-status.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 + +proxy = Proxy.new(client) + +result = proxy.update_rule_status( + rule_id: '<RULE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/create-deployment.md b/examples/2.3.x/server-ruby/examples/sites/create-deployment.md new file mode 100644 index 000000000..14bb26adb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/create-deployment.md @@ -0,0 +1,21 @@ +```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 + +sites = Sites.new(client) + +result = sites.create_deployment( + site_id: '<SITE_ID>', + code: InputFile.from_path('dir/file.png'), + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + activate: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-ruby/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..b0d11d214 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.create_duplicate_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/create-template-deployment.md b/examples/2.3.x/server-ruby/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..81a92c474 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/create-template-deployment.md @@ -0,0 +1,23 @@ +```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 + +sites = Sites.new(client) + +result = sites.create_template_deployment( + site_id: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + root_directory: '<ROOT_DIRECTORY>', + type: TemplateReferenceType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/create-variable.md b/examples/2.3.x/server-ruby/examples/sites/create-variable.md new file mode 100644 index 000000000..8c878439b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/create-variable.md @@ -0,0 +1,20 @@ +```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 + +sites = Sites.new(client) + +result = sites.create_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-ruby/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..bdda14c10 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/create-vcs-deployment.md @@ -0,0 +1,20 @@ +```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 + +sites = Sites.new(client) + +result = sites.create_vcs_deployment( + site_id: '<SITE_ID>', + type: VCSReferenceType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/create.md b/examples/2.3.x/server-ruby/examples/sites/create.md new file mode 100644 index 000000000..9f8d7f7f1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/create.md @@ -0,0 +1,40 @@ +```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 + +sites = Sites.new(client) + +result = sites.create( + site_id: '<SITE_ID>', + name: '<NAME>', + framework: Framework::ANALOG, + build_runtime: BuildRuntime::NODE_14_5, + enabled: false, # optional + logging: false, # optional + timeout: 1, # optional + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + start_command: '<START_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + adapter: Adapter::STATIC, # optional + installation_id: '<INSTALLATION_ID>', # optional + fallback_file: '<FALLBACK_FILE>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches: [], # optional + provider_paths: [], # optional + build_specification: 's-1vcpu-512mb', # optional + runtime_specification: 's-1vcpu-512mb', # optional + deployment_retention: 0, # optional + scopes: [ProjectKeyScopes::PROJECT_READ] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/delete-deployment.md b/examples/2.3.x/server-ruby/examples/sites/delete-deployment.md new file mode 100644 index 000000000..3c381a41a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/delete-deployment.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.delete_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/delete-log.md b/examples/2.3.x/server-ruby/examples/sites/delete-log.md new file mode 100644 index 000000000..65f5f67a3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/delete-log.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.delete_log( + site_id: '<SITE_ID>', + log_id: '<LOG_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/delete-variable.md b/examples/2.3.x/server-ruby/examples/sites/delete-variable.md new file mode 100644 index 000000000..a841882db --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/delete-variable.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.delete_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/delete.md b/examples/2.3.x/server-ruby/examples/sites/delete.md new file mode 100644 index 000000000..55011140f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/delete.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 + +sites = Sites.new(client) + +result = sites.delete( + site_id: '<SITE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/get-deployment-download.md b/examples/2.3.x/server-ruby/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..55206b431 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/get-deployment-download.md @@ -0,0 +1,20 @@ +```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 + +sites = Sites.new(client) + +result = sites.get_deployment_download( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE, # optional + token: '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/get-deployment.md b/examples/2.3.x/server-ruby/examples/sites/get-deployment.md new file mode 100644 index 000000000..585e8724b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/get-deployment.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.get_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/get-log.md b/examples/2.3.x/server-ruby/examples/sites/get-log.md new file mode 100644 index 000000000..2b02488a1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/get-log.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.get_log( + site_id: '<SITE_ID>', + log_id: '<LOG_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/get-variable.md b/examples/2.3.x/server-ruby/examples/sites/get-variable.md new file mode 100644 index 000000000..ab2862656 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/get-variable.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.get_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/get.md b/examples/2.3.x/server-ruby/examples/sites/get.md new file mode 100644 index 000000000..b2005fb80 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/get.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 + +sites = Sites.new(client) + +result = sites.get( + site_id: '<SITE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/list-deployments.md b/examples/2.3.x/server-ruby/examples/sites/list-deployments.md new file mode 100644 index 000000000..11a0b002e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/list-deployments.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 + +sites = Sites.new(client) + +result = sites.list_deployments( + site_id: '<SITE_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: 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 new file mode 100644 index 000000000..a33303a27 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/list-frameworks.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_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_frameworks() +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/list-logs.md b/examples/2.3.x/server-ruby/examples/sites/list-logs.md new file mode 100644 index 000000000..e02b3536d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/list-logs.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 + +sites = Sites.new(client) + +result = sites.list_logs( + site_id: '<SITE_ID>', + queries: [], # optional + 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 new file mode 100644 index 000000000..9ed8d0018 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/list-specifications.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 + +sites = Sites.new(client) + +result = sites.list_specifications( + type: 'runtimes' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/list-variables.md b/examples/2.3.x/server-ruby/examples/sites/list-variables.md new file mode 100644 index 000000000..ad4daf113 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/list-variables.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 + +sites = Sites.new(client) + +result = sites.list_variables( + site_id: '<SITE_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/list.md b/examples/2.3.x/server-ruby/examples/sites/list.md new file mode 100644 index 000000000..aa32f1baa --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/list.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 + +sites = Sites.new(client) + +result = sites.list( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/update-deployment-status.md b/examples/2.3.x/server-ruby/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..d3f2ff9ed --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/update-deployment-status.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.update_deployment_status( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/update-site-deployment.md b/examples/2.3.x/server-ruby/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..f52453516 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/update-site-deployment.md @@ -0,0 +1,17 @@ +```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 + +sites = Sites.new(client) + +result = sites.update_site_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/update-variable.md b/examples/2.3.x/server-ruby/examples/sites/update-variable.md new file mode 100644 index 000000000..f2736136c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/update-variable.md @@ -0,0 +1,20 @@ +```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 + +sites = Sites.new(client) + +result = sites.update_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', # optional + value: '<VALUE>', # optional + secret: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/sites/update.md b/examples/2.3.x/server-ruby/examples/sites/update.md new file mode 100644 index 000000000..56031c02b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/sites/update.md @@ -0,0 +1,40 @@ +```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 + +sites = Sites.new(client) + +result = sites.update( + site_id: '<SITE_ID>', + name: '<NAME>', + framework: Framework::ANALOG, + enabled: false, # optional + logging: false, # optional + timeout: 1, # optional + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + start_command: '<START_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + build_runtime: BuildRuntime::NODE_14_5, # optional + adapter: Adapter::STATIC, # optional + fallback_file: '<FALLBACK_FILE>', # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + provider_branches: [], # optional + provider_paths: [], # optional + build_specification: 's-1vcpu-512mb', # optional + runtime_specification: 's-1vcpu-512mb', # optional + deployment_retention: 0, # optional + scopes: [ProjectKeyScopes::PROJECT_READ] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/create-bucket.md b/examples/2.3.x/server-ruby/examples/storage/create-bucket.md new file mode 100644 index 000000000..47287c4ae --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/create-bucket.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Enums +include Appwrite::Permission +include Appwrite::Role + +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 + +storage = Storage.new(client) + +result = storage.create_bucket( + bucket_id: '<BUCKET_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], # optional + file_security: false, # optional + enabled: false, # optional + maximum_file_size: 1, # optional + allowed_file_extensions: [], # optional + compression: Compression::NONE, # optional + encryption: false, # optional + antivirus: false, # optional + transformations: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/create-file.md b/examples/2.3.x/server-ruby/examples/storage/create-file.md new file mode 100644 index 000000000..8176563fd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/create-file.md @@ -0,0 +1,22 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +storage = Storage.new(client) + +result = storage.create_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + file: InputFile.from_path('dir/file.png'), + permissions: [Permission.read(Role.any())], # optional + folder: 'photos/2026' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/delete-bucket.md b/examples/2.3.x/server-ruby/examples/storage/delete-bucket.md new file mode 100644 index 000000000..5ff3c4bcf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/delete-bucket.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 + +storage = Storage.new(client) + +result = storage.delete_bucket( + bucket_id: '<BUCKET_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/delete-file.md b/examples/2.3.x/server-ruby/examples/storage/delete-file.md new file mode 100644 index 000000000..1175afbb3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/delete-file.md @@ -0,0 +1,17 @@ +```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 + +storage = Storage.new(client) + +result = storage.delete_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/get-bucket.md b/examples/2.3.x/server-ruby/examples/storage/get-bucket.md new file mode 100644 index 000000000..7a401b8c4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/get-bucket.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 + +storage = Storage.new(client) + +result = storage.get_bucket( + bucket_id: '<BUCKET_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/get-file-download.md b/examples/2.3.x/server-ruby/examples/storage/get-file-download.md new file mode 100644 index 000000000..33324990c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/get-file-download.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_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_download( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + token: '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/get-file-preview.md b/examples/2.3.x/server-ruby/examples/storage/get-file-preview.md new file mode 100644 index 000000000..d40c3a5e8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/get-file-preview.md @@ -0,0 +1,30 @@ +```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_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_preview( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + width: 0, # optional + height: 0, # optional + gravity: ImageGravity::AUTO, # optional + quality: -1, # optional + border_width: 0, # optional + border_color: 'FFFFFF', # optional + border_radius: 0, # optional + opacity: 0, # optional + rotation: -360, # optional + background: 'FFFFFF', # optional + output: ImageFormat::JPG, # optional + token: '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/get-file-view.md b/examples/2.3.x/server-ruby/examples/storage/get-file-view.md new file mode 100644 index 000000000..ed3e898e1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/get-file-view.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_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_view( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + token: '<TOKEN>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/get-file.md b/examples/2.3.x/server-ruby/examples/storage/get-file.md new file mode 100644 index 000000000..dbcfcb6a8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/get-file.md @@ -0,0 +1,17 @@ +```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 + +storage = Storage.new(client) + +result = storage.get_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/list-buckets.md b/examples/2.3.x/server-ruby/examples/storage/list-buckets.md new file mode 100644 index 000000000..712d4ed08 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/list-buckets.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 + +storage = Storage.new(client) + +result = storage.list_buckets( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/list-files.md b/examples/2.3.x/server-ruby/examples/storage/list-files.md new file mode 100644 index 000000000..0247abb24 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/list-files.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_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.list_files( + bucket_id: '<BUCKET_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/update-bucket.md b/examples/2.3.x/server-ruby/examples/storage/update-bucket.md new file mode 100644 index 000000000..8c6c1962f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/update-bucket.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Enums +include Appwrite::Permission +include Appwrite::Role + +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 + +storage = Storage.new(client) + +result = storage.update_bucket( + bucket_id: '<BUCKET_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], # optional + file_security: false, # optional + enabled: false, # optional + maximum_file_size: 1, # optional + allowed_file_extensions: [], # optional + compression: Compression::NONE, # optional + encryption: false, # optional + antivirus: false, # optional + transformations: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/storage/update-file.md b/examples/2.3.x/server-ruby/examples/storage/update-file.md new file mode 100644 index 000000000..f7fa78165 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/storage/update-file.md @@ -0,0 +1,21 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +storage = Storage.new(client) + +result = storage.update_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + name: '<NAME>', # optional + permissions: [Permission.read(Role.any())] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..8af044404 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_big_int_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, # optional + max: 1000000, # optional + default: 0, # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..f4bdf1b18 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: false, # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..a566a147f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-cutover.md @@ -0,0 +1,17 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_cutover( + database_id: '<DATABASE_ID>', + migration_id: '<MIGRATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..e21b99b75 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: '2020-10-15T06:38:00.000+00:00', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..c7ed0fd71 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-email-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'email@example.com', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..6a2dafbee --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-enum-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + required: false, + default: 'active', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-failover.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..4935f32de --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-failover.md @@ -0,0 +1,17 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_failover( + database_id: '<DATABASE_ID>', + target_replica_id: '<TARGET_REPLICA_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..65fe00433 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-float-column.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, # optional + max: 100, # optional + default: 10.5, # optional + array: 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 new file mode 100644 index 000000000..a0453818c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-index.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + type: TablesDBIndexType::KEY, + columns: [], + orders: [OrderBy::ASC], # optional + lengths: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..8abb17a5c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-integer-column.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + min: 0, # optional + max: 100, # optional + default: 10, # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..546f7818d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-ip-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: '192.0.2.0', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..aaf75a362 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-line-column.md @@ -0,0 +1,20 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_line_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [[1, 2], [3, 4], [5, 6]] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..f5a9318e5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-longtext-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_longtext_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..e2bf27b70 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-mediumtext-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_mediumtext_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-migration.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..a7f085bd0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-migration.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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_migration( + database_id: '<DATABASE_ID>', + specification: 's-1vcpu-1gb', + auto_cutover: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-operations.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..576e9f224 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-operations.md @@ -0,0 +1,27 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_operations( + transaction_id: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..1e52d6e59 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-point-column.md @@ -0,0 +1,20 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_point_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [1, 2] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..c47193817 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,20 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_polygon_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..9b082036c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-relationship-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + related_table_id: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '<KEY>', # optional + two_way_key: '<TWO_WAY_KEY>', # optional + on_delete: RelationMutate::CASCADE # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-row.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-row.md new file mode 100644 index 000000000..60aa4e9da --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-row.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 30, + "isAdmin" => false + }, + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..2fc8a2b16 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-rows.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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [], + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..9f4586884 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-string-column.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + size: 1, + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-table.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-table.md new file mode 100644 index 000000000..d89b2be59 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-table.md @@ -0,0 +1,25 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: [Permission.read(Role.any())], # optional + row_security: false, # optional + enabled: false, # optional + columns: [], # optional + indexes: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..aa7e59e2a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-text-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_text_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..61d6077cf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-transaction.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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_transaction( + ttl: 60 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..49671760f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-url-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'https://example.com', # optional + array: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..a03b5b706 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create_varchar_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + size: 1, + required: false, + default: 'Hello World', # optional + array: false, # optional + encrypt: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create.md b/examples/2.3.x/server-ruby/examples/tablesdb/create.md new file mode 100644 index 000000000..e68bb0a38 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, # optional + specification: 'serverless', # optional + replicas: 0, # optional + sync_mode: 'async' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..7dfeb83b3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/decrement-row-column.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_session('') # The user session to authenticate with + +tables_db = TablesDB.new(client) + +result = tables_db.decrement_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '<COLUMN>', + value: 1, # optional + min: 0, # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/delete-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..697305ada --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.delete_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/delete-index.md b/examples/2.3.x/server-ruby/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..78edab989 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete-index.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 + +tables_db = TablesDB.new(client) + +result = tables_db.delete_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-ruby/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..d806b8256 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete-migration.md @@ -0,0 +1,17 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.delete_migration( + database_id: '<DATABASE_ID>', + migration_id: '<MIGRATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/delete-row.md b/examples/2.3.x/server-ruby/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..a6074a4f1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete-row.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_session('') # The user session to authenticate with + +tables_db = TablesDB.new(client) + +result = tables_db.delete_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + 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 new file mode 100644 index 000000000..69ab29e8a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete-rows.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 + +tables_db = TablesDB.new(client) + +result = tables_db.delete_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/delete-table.md b/examples/2.3.x/server-ruby/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..30c7587c0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete-table.md @@ -0,0 +1,17 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.delete_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-ruby/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..336fabba5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete-transaction.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 + +tables_db = TablesDB.new(client) + +result = tables_db.delete_transaction( + transaction_id: '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/delete.md b/examples/2.3.x/server-ruby/examples/tablesdb/delete.md new file mode 100644 index 000000000..92cb3b59f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete.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 + +tables_db = TablesDB.new(client) + +result = tables_db.delete( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/get-column.md new file mode 100644 index 000000000..21865dd54 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.get_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get-index.md b/examples/2.3.x/server-ruby/examples/tablesdb/get-index.md new file mode 100644 index 000000000..78a49d384 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get-index.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 + +tables_db = TablesDB.new(client) + +result = tables_db.get_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get-migration.md b/examples/2.3.x/server-ruby/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..5c9763fb1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get-migration.md @@ -0,0 +1,17 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.get_migration( + database_id: '<DATABASE_ID>', + migration_id: '<MIGRATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-ruby/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..a8fb122c6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get-replicas.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 + +tables_db = TablesDB.new(client) + +result = tables_db.get_replicas( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get-row.md b/examples/2.3.x/server-ruby/examples/tablesdb/get-row.md new file mode 100644 index 000000000..f16225a2b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get-row.md @@ -0,0 +1,20 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.get_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get-status.md b/examples/2.3.x/server-ruby/examples/tablesdb/get-status.md new file mode 100644 index 000000000..c0b68e563 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get-status.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 + +tables_db = TablesDB.new(client) + +result = tables_db.get_status( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get-table.md b/examples/2.3.x/server-ruby/examples/tablesdb/get-table.md new file mode 100644 index 000000000..9c464793f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get-table.md @@ -0,0 +1,17 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.get_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-ruby/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..a9cd7d2f3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get-transaction.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 + +tables_db = TablesDB.new(client) + +result = tables_db.get_transaction( + transaction_id: '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/get.md b/examples/2.3.x/server-ruby/examples/tablesdb/get.md new file mode 100644 index 000000000..b45c2ca05 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/get.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 + +tables_db = TablesDB.new(client) + +result = tables_db.get( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..c3295fda0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/increment-row-column.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_session('') # The user session to authenticate with + +tables_db = TablesDB.new(client) + +result = tables_db.increment_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '<COLUMN>', + value: 1, # optional + max: 100, # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list-columns.md b/examples/2.3.x/server-ruby/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..0214923ed --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-columns.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 + +tables_db = TablesDB.new(client) + +result = tables_db.list_columns( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-ruby/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..1a2a19d85 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-indexes.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 + +tables_db = TablesDB.new(client) + +result = tables_db.list_indexes( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-ruby/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..3d92f789e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-migrations.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 + +tables_db = TablesDB.new(client) + +result = tables_db.list_migrations( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list-operations.md b/examples/2.3.x/server-ruby/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..e8a531fb2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-operations.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 + +tables_db = TablesDB.new(client) + +result = tables_db.list_operations( + database_id: '<DATABASE_ID>', + status: 'queued', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list-rows.md b/examples/2.3.x/server-ruby/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..6d5669317 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-rows.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.list_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>', # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-ruby/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..8aa6987b0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-specifications.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_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDB.new(client) + +result = tables_db.list_specifications() +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list-tables.md b/examples/2.3.x/server-ruby/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..9517913cc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-tables.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 + +tables_db = TablesDB.new(client) + +result = tables_db.list_tables( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # 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 new file mode 100644 index 000000000..f8800dd78 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-transactions.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 + +tables_db = TablesDB.new(client) + +result = tables_db.list_transactions( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list.md b/examples/2.3.x/server-ruby/examples/tablesdb/list.md new file mode 100644 index 000000000..d9b52f250 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list.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 + +tables_db = TablesDB.new(client) + +result = tables_db.list( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..fea7bfdbd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_big_int_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 0, + min: 0, # optional + max: 1000000, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..c55d1f216 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: false, + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..d50571db9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: '2020-10-15T06:38:00.000+00:00', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..24b5ef629 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-email-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'email@example.com', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..6204ac2b0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-enum-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + elements: ["active", "inactive"], + required: false, + default: 'active', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..cd98ae905 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-float-column.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 10.5, + min: 0, # optional + max: 100, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..1fd1e315e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-integer-column.md @@ -0,0 +1,23 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 10, + min: 0, # optional + max: 100, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..9948c6f8c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-ip-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: '192.0.2.0', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..8b32b9725 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-line-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_line_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [[1, 2], [3, 4], [5, 6]], # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..342ba998a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_longtext_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..70c7bca56 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_mediumtext_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..50ef5298a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-point-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_point_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [1, 2], # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..e6bb0bce6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_polygon_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..1bdbf618d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + on_delete: RelationMutate::CASCADE, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-row.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-row.md new file mode 100644 index 000000000..e801cb240 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-row.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 33, + "isAdmin" => false + }, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-rows.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..0eb800bd3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-rows.md @@ -0,0 +1,26 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 33, + "isAdmin" => false + }, # optional + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..1a356d189 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-string-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + size: 1, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-table.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-table.md new file mode 100644 index 000000000..a560d718e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-table.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', # optional + permissions: [Permission.read(Role.any())], # optional + row_security: false, # optional + enabled: false, # optional + purge: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..9e40c656b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-text-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_text_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..057bff9ff --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-transaction.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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_transaction( + transaction_id: '<TRANSACTION_ID>', + commit: false, # optional + rollback: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..93197380c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-url-column.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'https://example.com', + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-ruby/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..99804b03f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update-varchar-column.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 + +tables_db = TablesDB.new(client) + +result = tables_db.update_varchar_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '<KEY>', + required: false, + default: 'Hello World', + size: 1, # optional + new_key: '<NEW_KEY>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/update.md b/examples/2.3.x/server-ruby/examples/tablesdb/update.md new file mode 100644 index 000000000..d13b8caf9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/update.md @@ -0,0 +1,21 @@ +```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 + +tables_db = TablesDB.new(client) + +result = tables_db.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', # optional + enabled: false, # optional + specification: 'serverless', # optional + replicas: 0, # optional + sync_mode: 'async' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-ruby/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..7802e672f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/upsert-row.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +tables_db = TablesDB.new(client) + +result = tables_db.upsert_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 33, + "isAdmin" => false + }, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..d450971f9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tablesdb/upsert-rows.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 + +tables_db = TablesDB.new(client) + +result = tables_db.upsert_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [], + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/create-installation.md b/examples/2.3.x/server-ruby/examples/teams/create-installation.md new file mode 100644 index 000000000..326c84cca --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/create-installation.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create_installation( + team_id: '<TEAM_ID>', + app_id: '<APP_ID>', + authorization_details: '<AUTHORIZATION_DETAILS>' # 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 new file mode 100644 index 000000000..7df704e71 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/create-membership.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create_membership( + team_id: '<TEAM_ID>', + roles: [], + email: 'email@example.com', # optional + user_id: '<USER_ID>', # optional + phone: '+12065550100', # optional + url: 'https://example.com', # optional + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/create.md b/examples/2.3.x/server-ruby/examples/teams/create.md new file mode 100644 index 000000000..4cec586c5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/create.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create( + team_id: '<TEAM_ID>', + name: '<NAME>', + roles: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/delete-installation.md b/examples/2.3.x/server-ruby/examples/teams/delete-installation.md new file mode 100644 index 000000000..420b289d7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/delete-installation.md @@ -0,0 +1,17 @@ +```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 + +teams = Teams.new(client) + +result = teams.delete_installation( + team_id: '<TEAM_ID>', + installation_id: '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/delete-membership.md b/examples/2.3.x/server-ruby/examples/teams/delete-membership.md new file mode 100644 index 000000000..a53369d0d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/delete-membership.md @@ -0,0 +1,17 @@ +```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 + +teams = Teams.new(client) + +result = teams.delete_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/delete.md b/examples/2.3.x/server-ruby/examples/teams/delete.md new file mode 100644 index 000000000..926087d69 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/delete.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 + +teams = Teams.new(client) + +result = teams.delete( + team_id: '<TEAM_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/get-installation.md b/examples/2.3.x/server-ruby/examples/teams/get-installation.md new file mode 100644 index 000000000..f1200564b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/get-installation.md @@ -0,0 +1,17 @@ +```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 + +teams = Teams.new(client) + +result = teams.get_installation( + team_id: '<TEAM_ID>', + installation_id: '<INSTALLATION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/get-membership.md b/examples/2.3.x/server-ruby/examples/teams/get-membership.md new file mode 100644 index 000000000..1e4ac1169 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/get-membership.md @@ -0,0 +1,17 @@ +```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 + +teams = Teams.new(client) + +result = teams.get_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/get-prefs.md b/examples/2.3.x/server-ruby/examples/teams/get-prefs.md new file mode 100644 index 000000000..13f9394d4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/get-prefs.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 + +teams = Teams.new(client) + +result = teams.get_prefs( + team_id: '<TEAM_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/get.md b/examples/2.3.x/server-ruby/examples/teams/get.md new file mode 100644 index 000000000..46c30add2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/get.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 + +teams = Teams.new(client) + +result = teams.get( + team_id: '<TEAM_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/list-installations.md b/examples/2.3.x/server-ruby/examples/teams/list-installations.md new file mode 100644 index 000000000..cfd7ea617 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/list-installations.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list_installations( + team_id: '<TEAM_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/list-memberships.md b/examples/2.3.x/server-ruby/examples/teams/list-memberships.md new file mode 100644 index 000000000..af1145cb5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/list-memberships.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list_memberships( + team_id: '<TEAM_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/list.md b/examples/2.3.x/server-ruby/examples/teams/list.md new file mode 100644 index 000000000..dcebb72db --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/list.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/update-installation.md b/examples/2.3.x/server-ruby/examples/teams/update-installation.md new file mode 100644 index 000000000..666093200 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/update-installation.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_installation( + team_id: '<TEAM_ID>', + installation_id: '<INSTALLATION_ID>', + authorization_details: '<AUTHORIZATION_DETAILS>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/update-membership-status.md b/examples/2.3.x/server-ruby/examples/teams/update-membership-status.md new file mode 100644 index 000000000..4762f5aa6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/update-membership-status.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_membership_status( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>', + user_id: '<USER_ID>', + secret: '<SECRET>' +) +``` 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 new file mode 100644 index 000000000..f94e3879e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/update-membership.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_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>', + roles: [] +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/update-name.md b/examples/2.3.x/server-ruby/examples/teams/update-name.md new file mode 100644 index 000000000..7c2fda631 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/update-name.md @@ -0,0 +1,17 @@ +```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 + +teams = Teams.new(client) + +result = teams.update_name( + team_id: '<TEAM_ID>', + name: '<NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/teams/update-prefs.md b/examples/2.3.x/server-ruby/examples/teams/update-prefs.md new file mode 100644 index 000000000..4410e91a6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/teams/update-prefs.md @@ -0,0 +1,17 @@ +```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 + +teams = Teams.new(client) + +result = teams.update_prefs( + team_id: '<TEAM_ID>', + prefs: {} +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tokens/create-file-token.md b/examples/2.3.x/server-ruby/examples/tokens/create-file-token.md new file mode 100644 index 000000000..c734e65f2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tokens/create-file-token.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 + +tokens = Tokens.new(client) + +result = tokens.create_file_token( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + expire: '2020-10-15T06:38:00.000+00:00' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tokens/delete.md b/examples/2.3.x/server-ruby/examples/tokens/delete.md new file mode 100644 index 000000000..c17c4f452 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tokens/delete.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 + +tokens = Tokens.new(client) + +result = tokens.delete( + token_id: '<TOKEN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tokens/get.md b/examples/2.3.x/server-ruby/examples/tokens/get.md new file mode 100644 index 000000000..b4342f660 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tokens/get.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 + +tokens = Tokens.new(client) + +result = tokens.get( + token_id: '<TOKEN_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tokens/list.md b/examples/2.3.x/server-ruby/examples/tokens/list.md new file mode 100644 index 000000000..c407e970c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tokens/list.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 + +tokens = Tokens.new(client) + +result = tokens.list( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/tokens/update.md b/examples/2.3.x/server-ruby/examples/tokens/update.md new file mode 100644 index 000000000..84a9ddfad --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/tokens/update.md @@ -0,0 +1,17 @@ +```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 + +tokens = Tokens.new(client) + +result = tokens.update( + token_id: '<TOKEN_ID>', + expire: '2020-10-15T06:38:00.000+00:00' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-argon-2-user.md b/examples/2.3.x/server-ruby/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..26ad7f224 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-argon-2-user.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 + +users = Users.new(client) + +result = users.create_argon2_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-ruby/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..9e3fd9bab --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-bcrypt-user.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 + +users = Users.new(client) + +result = users.create_bcrypt_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-jwt.md b/examples/2.3.x/server-ruby/examples/users/create-jwt.md new file mode 100644 index 000000000..bb940ab27 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-jwt.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 + +users = Users.new(client) + +result = users.create_jwt( + user_id: '<USER_ID>', + session_id: 'recent()', # optional + duration: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-md-5-user.md b/examples/2.3.x/server-ruby/examples/users/create-md-5-user.md new file mode 100644 index 000000000..8ad1535fe --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-md-5-user.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 + +users = Users.new(client) + +result = users.create_md5_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-ruby/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..e2763ebfd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-mfa-recovery-codes.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 + +users = Users.new(client) + +result = users.create_mfa_recovery_codes( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-ruby/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..c4e1b541a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-ph-pass-user.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 + +users = Users.new(client) + +result = users.create_ph_pass_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-ruby/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..42138bd7f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-scrypt-modified-user.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 + +users = Users.new(client) + +result = users.create_scrypt_modified_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_salt: '<PASSWORD_SALT>', + password_salt_separator: '<PASSWORD_SALT_SEPARATOR>', + password_signer_key: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-scrypt-user.md b/examples/2.3.x/server-ruby/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..14d85cf4a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-scrypt-user.md @@ -0,0 +1,24 @@ +```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 + +users = Users.new(client) + +result = users.create_scrypt_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_salt: '<PASSWORD_SALT>', + password_cpu: 8, + password_memory: 65536, + password_parallel: 1, + password_length: 64, + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-session.md b/examples/2.3.x/server-ruby/examples/users/create-session.md new file mode 100644 index 000000000..e44a0d845 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-session.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 + +users = Users.new(client) + +result = users.create_session( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-sha-user.md b/examples/2.3.x/server-ruby/examples/users/create-sha-user.md new file mode 100644 index 000000000..6dbdece85 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-sha-user.md @@ -0,0 +1,21 @@ +```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 + +users = Users.new(client) + +result = users.create_sha_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_version: PasswordHash::SHA1, # optional + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-target.md b/examples/2.3.x/server-ruby/examples/users/create-target.md new file mode 100644 index 000000000..624b56f9d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-target.md @@ -0,0 +1,22 @@ +```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 + +users = Users.new(client) + +result = users.create_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>', + provider_type: MessagingProviderType::EMAIL, + identifier: '<IDENTIFIER>', + provider_id: '<PROVIDER_ID>', # optional + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create-token.md b/examples/2.3.x/server-ruby/examples/users/create-token.md new file mode 100644 index 000000000..fbcbc6eeb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create-token.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 + +users = Users.new(client) + +result = users.create_token( + user_id: '<USER_ID>', + length: 4, # optional + expire: 60 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/create.md b/examples/2.3.x/server-ruby/examples/users/create.md new file mode 100644 index 000000000..183fa0769 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/create.md @@ -0,0 +1,20 @@ +```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 + +users = Users.new(client) + +result = users.create( + user_id: '<USER_ID>', + email: 'email@example.com', # optional + phone: '+12065550100', # optional + password: 'password', # optional + name: '<NAME>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/delete-identity.md b/examples/2.3.x/server-ruby/examples/users/delete-identity.md new file mode 100644 index 000000000..36625931b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/delete-identity.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 + +users = Users.new(client) + +result = users.delete_identity( + identity_id: '<IDENTITY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-ruby/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..94af17b8b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,18 @@ +```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 + +users = Users.new(client) + +result = users.delete_mfa_authenticator( + user_id: '<USER_ID>', + type: AuthenticatorType::TOTP +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/delete-session.md b/examples/2.3.x/server-ruby/examples/users/delete-session.md new file mode 100644 index 000000000..e4f55cf0f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/delete-session.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.delete_session( + user_id: '<USER_ID>', + session_id: '<SESSION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/delete-sessions.md b/examples/2.3.x/server-ruby/examples/users/delete-sessions.md new file mode 100644 index 000000000..578366c54 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/delete-sessions.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 + +users = Users.new(client) + +result = users.delete_sessions( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/delete-target.md b/examples/2.3.x/server-ruby/examples/users/delete-target.md new file mode 100644 index 000000000..08b774487 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/delete-target.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.delete_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/delete.md b/examples/2.3.x/server-ruby/examples/users/delete.md new file mode 100644 index 000000000..600fe7729 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/delete.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 + +users = Users.new(client) + +result = users.delete( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-ruby/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..dbdbad3bc --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/get-mfa-challenge.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.get_mfa_challenge( + user_id: '<USER_ID>', + challenge_id: '<CHALLENGE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-ruby/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..92e172291 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/get-mfa-recovery-codes.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 + +users = Users.new(client) + +result = users.get_mfa_recovery_codes( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/get-prefs.md b/examples/2.3.x/server-ruby/examples/users/get-prefs.md new file mode 100644 index 000000000..58271f0e0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/get-prefs.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 + +users = Users.new(client) + +result = users.get_prefs( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/get-target.md b/examples/2.3.x/server-ruby/examples/users/get-target.md new file mode 100644 index 000000000..d7d8a0976 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/get-target.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.get_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/get.md b/examples/2.3.x/server-ruby/examples/users/get.md new file mode 100644 index 000000000..b54a2a685 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/get.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 + +users = Users.new(client) + +result = users.get( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/list-identities.md b/examples/2.3.x/server-ruby/examples/users/list-identities.md new file mode 100644 index 000000000..cbfdaa4fb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/list-identities.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 + +users = Users.new(client) + +result = users.list_identities( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/list-memberships.md b/examples/2.3.x/server-ruby/examples/users/list-memberships.md new file mode 100644 index 000000000..15f3bb817 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/list-memberships.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 + +users = Users.new(client) + +result = users.list_memberships( + user_id: '<USER_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/list-mfa-factors.md b/examples/2.3.x/server-ruby/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..ac66333fd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/list-mfa-factors.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 + +users = Users.new(client) + +result = users.list_mfa_factors( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/list-sessions.md b/examples/2.3.x/server-ruby/examples/users/list-sessions.md new file mode 100644 index 000000000..f32fb1184 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/list-sessions.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.list_sessions( + user_id: '<USER_ID>', + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/list-targets.md b/examples/2.3.x/server-ruby/examples/users/list-targets.md new file mode 100644 index 000000000..ac582c3be --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/list-targets.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 + +users = Users.new(client) + +result = users.list_targets( + user_id: '<USER_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/list.md b/examples/2.3.x/server-ruby/examples/users/list.md new file mode 100644 index 000000000..e3ee048e6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/list.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 + +users = Users.new(client) + +result = users.list( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-email-verification.md b/examples/2.3.x/server-ruby/examples/users/update-email-verification.md new file mode 100644 index 000000000..32bd4dcb3 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-email-verification.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_email_verification( + user_id: '<USER_ID>', + email_verification: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-email.md b/examples/2.3.x/server-ruby/examples/users/update-email.md new file mode 100644 index 000000000..0d8e7d461 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-email.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_email( + user_id: '<USER_ID>', + email: 'email@example.com' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-impersonator.md b/examples/2.3.x/server-ruby/examples/users/update-impersonator.md new file mode 100644 index 000000000..b11d61f49 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-impersonator.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_impersonator( + user_id: '<USER_ID>', + impersonator: false +) +``` 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 new file mode 100644 index 000000000..0110cb9e5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-labels.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_labels( + user_id: '<USER_ID>', + labels: [] +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-ruby/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..ca2a9adf7 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-mfa-recovery-codes.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 + +users = Users.new(client) + +result = users.update_mfa_recovery_codes( + user_id: '<USER_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-mfa.md b/examples/2.3.x/server-ruby/examples/users/update-mfa.md new file mode 100644 index 000000000..d46a61334 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-mfa.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_mfa( + user_id: '<USER_ID>', + mfa: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-name.md b/examples/2.3.x/server-ruby/examples/users/update-name.md new file mode 100644 index 000000000..79bd5c2d8 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-name.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_name( + user_id: '<USER_ID>', + name: '<NAME>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-password.md b/examples/2.3.x/server-ruby/examples/users/update-password.md new file mode 100644 index 000000000..6be197188 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-password.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_password( + user_id: '<USER_ID>', + password: 'password' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-phone-verification.md b/examples/2.3.x/server-ruby/examples/users/update-phone-verification.md new file mode 100644 index 000000000..0dfed2c86 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-phone-verification.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_phone_verification( + user_id: '<USER_ID>', + phone_verification: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-phone.md b/examples/2.3.x/server-ruby/examples/users/update-phone.md new file mode 100644 index 000000000..2788ed071 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-phone.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_phone( + user_id: '<USER_ID>', + number: '+12065550100' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-prefs.md b/examples/2.3.x/server-ruby/examples/users/update-prefs.md new file mode 100644 index 000000000..452fe9aa2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-prefs.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_prefs( + user_id: '<USER_ID>', + prefs: {} +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-status.md b/examples/2.3.x/server-ruby/examples/users/update-status.md new file mode 100644 index 000000000..75b7f375b --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-status.md @@ -0,0 +1,17 @@ +```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 + +users = Users.new(client) + +result = users.update_status( + user_id: '<USER_ID>', + status: false +) +``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-target.md b/examples/2.3.x/server-ruby/examples/users/update-target.md new file mode 100644 index 000000000..9c4c1c091 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/users/update-target.md @@ -0,0 +1,20 @@ +```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 + +users = Users.new(client) + +result = users.update_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>', + identifier: '<IDENTIFIER>', # optional + provider_id: '<PROVIDER_ID>', # optional + name: '<NAME>' # optional +) +``` 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 new file mode 100644 index 000000000..b449f541e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-collection.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://<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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, + 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-document.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..648d9b2c5 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-document.md @@ -0,0 +1,33 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: { + "embeddings" => { + "0" => 0.12, + "1" => -0.55, + "2" => 0.88, + "3" => 1.02 + }, + "metadata" => { + "key" => "value" + } + }, + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..9f3a4d4d9 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-documents.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + documents: [], + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..479cbfa49 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-failover.md @@ -0,0 +1,17 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_failover( + database_id: '<DATABASE_ID>', + target_replica_id: '<TARGET_REPLICA_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 new file mode 100644 index 000000000..d7880ab2c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-index.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>', + type: VectorsDBIndexType::HNSW_EUCLIDEAN, + attributes: [], + 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 new file mode 100644 index 000000000..6817930bb --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-operations.md @@ -0,0 +1,27 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_operations( + transaction_id: '<TRANSACTION_ID>', + operations: [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/create-query.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..917cdac2c --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-query.md @@ -0,0 +1,21 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_query( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>', # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..509255332 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-transaction.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_transaction( + ttl: 60 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/create.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create.md new file mode 100644 index 000000000..9166fc420 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create.md @@ -0,0 +1,21 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, # optional + specification: 'serverless', # optional + replicas: 0, # optional + sync_mode: 'async' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..fc3bd763e --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-collection.md @@ -0,0 +1,17 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..40718f324 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-document.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_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..bb1173a38 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-documents.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..b968f684f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-index.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..4124aac36 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-transaction.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_transaction( + transaction_id: '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/delete.md b/examples/2.3.x/server-ruby/examples/vectorsdb/delete.md new file mode 100644 index 000000000..6be5631a1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/delete.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-ruby/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..dae8e5315 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/get-collection.md @@ -0,0 +1,17 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/get-document.md b/examples/2.3.x/server-ruby/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..49bfc862f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/get-document.md @@ -0,0 +1,20 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/get-index.md b/examples/2.3.x/server-ruby/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..af722303a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/get-index.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '<KEY>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-ruby/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..d3d5d6f4a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/get-replicas.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_replicas( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/get-status.md b/examples/2.3.x/server-ruby/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..15f2ca33f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/get-status.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_status( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-ruby/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..584134d61 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/get-transaction.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_transaction( + transaction_id: '<TRANSACTION_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/get.md b/examples/2.3.x/server-ruby/examples/vectorsdb/get.md new file mode 100644 index 000000000..cea4329f6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/get.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get( + database_id: '<DATABASE_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-ruby/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..dc85e4ac0 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/list-collections.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_collections( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-ruby/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..c60da651f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/list-documents.md @@ -0,0 +1,21 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + transaction_id: '<TRANSACTION_ID>', # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-ruby/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..2df5e6825 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/list-indexes.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_indexes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-ruby/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..a6ec3a287 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/list-operations.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_operations( + database_id: '<DATABASE_ID>', + status: 'queued', # optional + limit: 1, # optional + offset: 0 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-ruby/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..33380781f --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/list-specifications.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_key('<YOUR_API_KEY>') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_specifications() +``` 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 new file mode 100644 index 000000000..9c2182da6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/list-transactions.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_transactions( + queries: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/list.md b/examples/2.3.x/server-ruby/examples/vectorsdb/list.md new file mode 100644 index 000000000..9f162854a --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/list.md @@ -0,0 +1,17 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list( + 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 new file mode 100644 index 000000000..0dfdac139 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/update-collection.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://<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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + dimension: 1, # 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/update-document.md b/examples/2.3.x/server-ruby/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..b4fdb3731 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/update-document.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-ruby/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..2f4d27a41 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/update-documents.md @@ -0,0 +1,20 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + data: {}, # optional + queries: [], # optional + transaction_id: '<TRANSACTION_ID>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-ruby/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..96fbc93da --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/update-transaction.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update_transaction( + transaction_id: '<TRANSACTION_ID>', + commit: false, # optional + rollback: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/update.md b/examples/2.3.x/server-ruby/examples/vectorsdb/update.md new file mode 100644 index 000000000..dc8ccb0e4 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/update.md @@ -0,0 +1,21 @@ +```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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, # optional + specification: 'serverless', # optional + replicas: 0, # optional + sync_mode: 'async' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-ruby/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..788890374 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/upsert-document.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.upsert_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '<TRANSACTION_ID>' # 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 new file mode 100644 index 000000000..d737f1072 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/upsert-documents.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 + +vectors_db = VectorsDB.new(client) + +result = vectors_db.upsert_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + documents: [], + 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 new file mode 100644 index 000000000..9f231f7b1 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/webhooks/create.md @@ -0,0 +1,24 @@ +```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 + +webhooks = Webhooks.new(client) + +result = webhooks.create( + webhook_id: '<WEBHOOK_ID>', + url: 'https://example.com/webhook', + name: '<NAME>', + events: [], + enabled: false, # optional + tls: false, # optional + auth_username: '<AUTH_USERNAME>', # optional + auth_password: 'password', # optional + secret: '<SECRET>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/webhooks/delete.md b/examples/2.3.x/server-ruby/examples/webhooks/delete.md new file mode 100644 index 000000000..5951b7cab --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/webhooks/delete.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 + +webhooks = Webhooks.new(client) + +result = webhooks.delete( + webhook_id: '<WEBHOOK_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/webhooks/get.md b/examples/2.3.x/server-ruby/examples/webhooks/get.md new file mode 100644 index 000000000..d81c12995 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/webhooks/get.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 + +webhooks = Webhooks.new(client) + +result = webhooks.get( + webhook_id: '<WEBHOOK_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/webhooks/list.md b/examples/2.3.x/server-ruby/examples/webhooks/list.md new file mode 100644 index 000000000..541604073 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/webhooks/list.md @@ -0,0 +1,17 @@ +```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 + +webhooks = Webhooks.new(client) + +result = webhooks.list( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/webhooks/update-secret.md b/examples/2.3.x/server-ruby/examples/webhooks/update-secret.md new file mode 100644 index 000000000..7aadac164 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/webhooks/update-secret.md @@ -0,0 +1,17 @@ +```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 + +webhooks = Webhooks.new(client) + +result = webhooks.update_secret( + webhook_id: '<WEBHOOK_ID>', + secret: '<SECRET>' # 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 new file mode 100644 index 000000000..ad3fa894d --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/webhooks/update.md @@ -0,0 +1,23 @@ +```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 + +webhooks = Webhooks.new(client) + +result = webhooks.update( + webhook_id: '<WEBHOOK_ID>', + name: '<NAME>', + url: 'https://example.com/webhook', + events: [], + enabled: false, # optional + tls: false, # optional + auth_username: '<AUTH_USERNAME>', # optional + auth_password: 'password' # optional +) +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-anonymous-session.md b/examples/2.3.x/server-rust/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..0d1b46780 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-anonymous-session.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_anonymous_session().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..ac72db12b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-email-password-session.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_email_password_session( + "email@example.com", + "password" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-email-token.md b/examples/2.3.x/server-rust/examples/account/create-email-token.md new file mode 100644 index 000000000..4c9d6f4c2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-email-token.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_email_token( + "<USER_ID>", + "email@example.com", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-rust/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..5b6b83cbe --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-email-verification-otp.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_email_verification_otp( + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-email-verification.md b/examples/2.3.x/server-rust/examples/account/create-email-verification.md new file mode 100644 index 000000000..044e55088 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-email-verification.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_email_verification( + "https://example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-id-token-session.md b/examples/2.3.x/server-rust/examples/account/create-id-token-session.md new file mode 100644 index 000000000..37993ba2d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-id-token-session.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_id_token_session( + appwrite::enums::IdTokenProvider::Apple, + "<ID_TOKEN>", + Some("<NONCE>"), // optional + Some("<ACCESS_TOKEN>"), // optional + Some(0), // optional + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-magic-url-token.md b/examples/2.3.x/server-rust/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..26f6992ed --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-magic-url-token.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_magic_url_token( + "<USER_ID>", + "email@example.com", + Some("https://example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-rust/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..1c44d6bd4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-mfa-authenticator.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_mfa_authenticator( + appwrite::enums::AuthenticatorType::Totp + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-rust/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..b9a315b89 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-mfa-challenge.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_mfa_challenge( + appwrite::enums::AuthenticationFactor::Email + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-rust/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..6bee9337a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_mfa_recovery_codes().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-rust/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..3fdb0c527 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-o-auth-2-token.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_o_auth2_token( + appwrite::enums::OAuthProvider::Amazon, + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-phone-token.md b/examples/2.3.x/server-rust/examples/account/create-phone-token.md new file mode 100644 index 000000000..870d1698b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-phone-token.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_phone_token( + "<USER_ID>", + "+12065550100" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-phone-verification.md b/examples/2.3.x/server-rust/examples/account/create-phone-verification.md new file mode 100644 index 000000000..4032be23e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-phone-verification.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_phone_verification().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-recovery-otp.md b/examples/2.3.x/server-rust/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..4c9f08deb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-recovery-otp.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_recovery_otp( + "email@example.com", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-recovery.md b/examples/2.3.x/server-rust/examples/account/create-recovery.md new file mode 100644 index 000000000..ddd6c8d38 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-recovery.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_recovery( + "email@example.com", + "https://example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-session.md b/examples/2.3.x/server-rust/examples/account/create-session.md new file mode 100644 index 000000000..70f220957 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-session.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_session( + "<USER_ID>", + "<SECRET>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create-verification.md b/examples/2.3.x/server-rust/examples/account/create-verification.md new file mode 100644 index 000000000..2a6e2e626 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create-verification.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create_verification( + "https://example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/create.md b/examples/2.3.x/server-rust/examples/account/create.md new file mode 100644 index 000000000..b32e57733 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/create.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.create( + "<USER_ID>", + "email@example.com", + "password", + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/delete-consent-token.md b/examples/2.3.x/server-rust/examples/account/delete-consent-token.md new file mode 100644 index 000000000..6314ff5bf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/delete-consent-token.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + account.delete_consent_token( + "<CONSENT_ID>", + "<TOKEN_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/delete-consent.md b/examples/2.3.x/server-rust/examples/account/delete-consent.md new file mode 100644 index 000000000..c850bcd79 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/delete-consent.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + account.delete_consent( + "<CONSENT_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/delete-identity.md b/examples/2.3.x/server-rust/examples/account/delete-identity.md new file mode 100644 index 000000000..9e0de14d6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/delete-identity.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + account.delete_identity( + "<IDENTITY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-rust/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..93e8f2d4f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + account.delete_mfa_authenticator( + appwrite::enums::AuthenticatorType::Totp + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/delete-session.md b/examples/2.3.x/server-rust/examples/account/delete-session.md new file mode 100644 index 000000000..5e1cef5f8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/delete-session.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + account.delete_session( + "<SESSION_ID>" + ).await?; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..ee557af60 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/delete-sessions.md @@ -0,0 +1,18 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + account.delete_sessions().await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/get-consent-token.md b/examples/2.3.x/server-rust/examples/account/get-consent-token.md new file mode 100644 index 000000000..d59b022a2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/get-consent-token.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.get_consent_token( + "<CONSENT_ID>", + "<TOKEN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/get-consent.md b/examples/2.3.x/server-rust/examples/account/get-consent.md new file mode 100644 index 000000000..bcfa12ce5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/get-consent.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.get_consent( + "<CONSENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-rust/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..453b3854c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.get_mfa_recovery_codes().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/get-prefs.md b/examples/2.3.x/server-rust/examples/account/get-prefs.md new file mode 100644 index 000000000..dad334c7a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/get-prefs.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.get_prefs().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/get-session.md b/examples/2.3.x/server-rust/examples/account/get-session.md new file mode 100644 index 000000000..e0659e942 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/get-session.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.get_session( + "<SESSION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/get.md b/examples/2.3.x/server-rust/examples/account/get.md new file mode 100644 index 000000000..c132a21ed --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/get.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.get().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/list-consent-tokens.md b/examples/2.3.x/server-rust/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..d2de6d0a5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/list-consent-tokens.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.list_consent_tokens( + "<CONSENT_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/list-consents.md b/examples/2.3.x/server-rust/examples/account/list-consents.md new file mode 100644 index 000000000..34196160c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/list-consents.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.list_consents( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/list-identities.md b/examples/2.3.x/server-rust/examples/account/list-identities.md new file mode 100644 index 000000000..59c6bfbc7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/list-identities.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.list_identities( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/list-mfa-factors.md b/examples/2.3.x/server-rust/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..65e05f467 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/list-mfa-factors.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.list_mfa_factors().await?; + + let _ = result; + + 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 new file mode 100644 index 000000000..5a2af5974 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/list-sessions.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.list_sessions().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-rust/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..1670c9802 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-email-verification-otp.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_email_verification_otp( + "<USER_ID>", + "<SECRET>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-email-verification.md b/examples/2.3.x/server-rust/examples/account/update-email-verification.md new file mode 100644 index 000000000..ce125bdf3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-email-verification.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_email_verification( + "<USER_ID>", + "<SECRET>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-email.md b/examples/2.3.x/server-rust/examples/account/update-email.md new file mode 100644 index 000000000..054da7721 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-email.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_email( + "email@example.com", + "password" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-magic-url-session.md b/examples/2.3.x/server-rust/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..a540c4c7e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-magic-url-session.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_magic_url_session( + "<USER_ID>", + "<SECRET>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-rust/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..32610e12a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-mfa-authenticator.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_mfa_authenticator( + appwrite::enums::AuthenticatorType::Totp, + "<OTP>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-rust/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..d903fa60d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-mfa-challenge.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_mfa_challenge( + "<CHALLENGE_ID>", + "<OTP>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-rust/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..df849273b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_mfa_recovery_codes().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-mfa.md b/examples/2.3.x/server-rust/examples/account/update-mfa.md new file mode 100644 index 000000000..d9769d9d2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-mfa.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_mfa( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-name.md b/examples/2.3.x/server-rust/examples/account/update-name.md new file mode 100644 index 000000000..46ceffc2f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-name.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_name( + "<NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-password.md b/examples/2.3.x/server-rust/examples/account/update-password.md new file mode 100644 index 000000000..2e0ac1d36 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-password.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_password( + "password", + Some("password") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-phone-session.md b/examples/2.3.x/server-rust/examples/account/update-phone-session.md new file mode 100644 index 000000000..cd39e140f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-phone-session.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_phone_session( + "<USER_ID>", + "<SECRET>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-phone-verification.md b/examples/2.3.x/server-rust/examples/account/update-phone-verification.md new file mode 100644 index 000000000..5c6beca90 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-phone-verification.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_phone_verification( + "<USER_ID>", + "<SECRET>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-phone.md b/examples/2.3.x/server-rust/examples/account/update-phone.md new file mode 100644 index 000000000..f17c0f5c5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-phone.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_phone( + "+12065550100", + "password" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-prefs.md b/examples/2.3.x/server-rust/examples/account/update-prefs.md new file mode 100644 index 000000000..830abd9e0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-prefs.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_prefs( + serde_json::json!({}) + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-recovery-otp.md b/examples/2.3.x/server-rust/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..a6bc18c85 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-recovery-otp.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_recovery_otp( + "<USER_ID>", + "<SECRET>", + "password" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-recovery.md b/examples/2.3.x/server-rust/examples/account/update-recovery.md new file mode 100644 index 000000000..340134c60 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-recovery.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_recovery( + "<USER_ID>", + "<SECRET>", + "password" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-session.md b/examples/2.3.x/server-rust/examples/account/update-session.md new file mode 100644 index 000000000..8ed7a2293 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-session.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_session( + "<SESSION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-status.md b/examples/2.3.x/server-rust/examples/account/update-status.md new file mode 100644 index 000000000..66ddfe17c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-status.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_status().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/account/update-verification.md b/examples/2.3.x/server-rust/examples/account/update-verification.md new file mode 100644 index 000000000..cbe7e8447 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/account/update-verification.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Account; + +#[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 account = Account::new(&client); + + let result = account.update_verification( + "<USER_ID>", + "<SECRET>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/activities/get-event.md b/examples/2.3.x/server-rust/examples/activities/get-event.md new file mode 100644 index 000000000..afeaae165 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/activities/get-event.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Activities; + +#[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 activities = Activities::new(&client); + + let result = activities.get_event( + "<EVENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/activities/list-events.md b/examples/2.3.x/server-rust/examples/activities/list-events.md new file mode 100644 index 000000000..ea776ddf4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/activities/list-events.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Activities; + +#[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 activities = Activities::new(&client); + + let result = activities.list_events( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/advisor/delete-report.md b/examples/2.3.x/server-rust/examples/advisor/delete-report.md new file mode 100644 index 000000000..e0a205aae --- /dev/null +++ b/examples/2.3.x/server-rust/examples/advisor/delete-report.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Advisor; + +#[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 advisor = Advisor::new(&client); + + advisor.delete_report( + "<REPORT_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/advisor/get-insight.md b/examples/2.3.x/server-rust/examples/advisor/get-insight.md new file mode 100644 index 000000000..7926f5f84 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/advisor/get-insight.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Advisor; + +#[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 advisor = Advisor::new(&client); + + let result = advisor.get_insight( + "<REPORT_ID>", + "<INSIGHT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/advisor/get-report.md b/examples/2.3.x/server-rust/examples/advisor/get-report.md new file mode 100644 index 000000000..9cfe34e79 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/advisor/get-report.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Advisor; + +#[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 advisor = Advisor::new(&client); + + let result = advisor.get_report( + "<REPORT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/advisor/list-insights.md b/examples/2.3.x/server-rust/examples/advisor/list-insights.md new file mode 100644 index 000000000..a67a7ddc3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/advisor/list-insights.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Advisor; + +#[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 advisor = Advisor::new(&client); + + let result = advisor.list_insights( + "<REPORT_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/advisor/list-reports.md b/examples/2.3.x/server-rust/examples/advisor/list-reports.md new file mode 100644 index 000000000..f0620dc50 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/advisor/list-reports.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Advisor; + +#[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 advisor = Advisor::new(&client); + + let result = advisor.list_reports( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/create-installation-token.md b/examples/2.3.x/server-rust/examples/apps/create-installation-token.md new file mode 100644 index 000000000..9ba40020c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/create-installation-token.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.create_installation_token( + "<APP_ID>", + "<INSTALLATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/create-key.md b/examples/2.3.x/server-rust/examples/apps/create-key.md new file mode 100644 index 000000000..4aba64fe8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/create-key.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.create_key( + "<APP_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/create-secret.md b/examples/2.3.x/server-rust/examples/apps/create-secret.md new file mode 100644 index 000000000..4714bdcd0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/create-secret.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.create_secret( + "<APP_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/create.md b/examples/2.3.x/server-rust/examples/apps/create.md new file mode 100644 index 000000000..908863079 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/create.md @@ -0,0 +1,40 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.create( + "<APP_ID>", + "<NAME>", + vec![], + Some("<DESCRIPTION>"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(vec![]), // optional + Some("<TAGLINE>"), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(vec![]), // optional + Some(false), // optional + Some("public"), // optional + Some(false), // optional + Some("<TEAM_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/delete-installation.md b/examples/2.3.x/server-rust/examples/apps/delete-installation.md new file mode 100644 index 000000000..8abf00147 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/delete-installation.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[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 apps = Apps::new(&client); + + apps.delete_installation( + "<APP_ID>", + "<INSTALLATION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/delete-key.md b/examples/2.3.x/server-rust/examples/apps/delete-key.md new file mode 100644 index 000000000..2b3c9ae84 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/delete-key.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[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 apps = Apps::new(&client); + + apps.delete_key( + "<APP_ID>", + "<KEY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/delete-secret.md b/examples/2.3.x/server-rust/examples/apps/delete-secret.md new file mode 100644 index 000000000..86ba5da09 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/delete-secret.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[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 apps = Apps::new(&client); + + apps.delete_secret( + "<APP_ID>", + "<SECRET_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/delete-tokens.md b/examples/2.3.x/server-rust/examples/apps/delete-tokens.md new file mode 100644 index 000000000..dc7104592 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/delete-tokens.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[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 apps = Apps::new(&client); + + apps.delete_tokens( + "<APP_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/delete.md b/examples/2.3.x/server-rust/examples/apps/delete.md new file mode 100644 index 000000000..ab57e98d1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[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 apps = Apps::new(&client); + + apps.delete( + "<APP_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/get-installation.md b/examples/2.3.x/server-rust/examples/apps/get-installation.md new file mode 100644 index 000000000..c3a8d1df8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/get-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.get_installation( + "<APP_ID>", + "<INSTALLATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/get-key.md b/examples/2.3.x/server-rust/examples/apps/get-key.md new file mode 100644 index 000000000..cd5a613b4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/get-key.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.get_key( + "<APP_ID>", + "<KEY_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/get-secret.md b/examples/2.3.x/server-rust/examples/apps/get-secret.md new file mode 100644 index 000000000..6d4a76af5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/get-secret.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.get_secret( + "<APP_ID>", + "<SECRET_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/get.md b/examples/2.3.x/server-rust/examples/apps/get.md new file mode 100644 index 000000000..d1f2839e3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.get( + "<APP_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-rust/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..9e1dd5450 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/list-installation-scopes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.list_installation_scopes().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/list-installations.md b/examples/2.3.x/server-rust/examples/apps/list-installations.md new file mode 100644 index 000000000..8698cced6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/list-installations.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.list_installations( + "<APP_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/list-keys.md b/examples/2.3.x/server-rust/examples/apps/list-keys.md new file mode 100644 index 000000000..e7a308d24 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/list-keys.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.list_keys( + "<APP_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-rust/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..450ffe9cd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.list_o_auth2_scopes().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/list-secrets.md b/examples/2.3.x/server-rust/examples/apps/list-secrets.md new file mode 100644 index 000000000..11e698463 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/list-secrets.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.list_secrets( + "<APP_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/list.md b/examples/2.3.x/server-rust/examples/apps/list.md new file mode 100644 index 000000000..f02743a2a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/list.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.list( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/update-labels.md b/examples/2.3.x/server-rust/examples/apps/update-labels.md new file mode 100644 index 000000000..fd4365810 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/update-labels.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.update_labels( + "<APP_ID>", + vec![] + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/update-team.md b/examples/2.3.x/server-rust/examples/apps/update-team.md new file mode 100644 index 000000000..6d639e094 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/update-team.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.update_team( + "<APP_ID>", + "<TEAM_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/apps/update.md b/examples/2.3.x/server-rust/examples/apps/update.md new file mode 100644 index 000000000..a55b13781 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/apps/update.md @@ -0,0 +1,41 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box<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 apps = Apps::new(&client); + + let result = apps.update( + "<APP_ID>", + "<NAME>", + Some("<DESCRIPTION>"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(vec![]), // optional + Some("<TAGLINE>"), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(false), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("public"), // optional + Some(false), // optional + Some(vec![]), // optional + Some("https://example.com") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-browser.md b/examples/2.3.x/server-rust/examples/avatars/get-browser.md new file mode 100644 index 000000000..e61031416 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-browser.md @@ -0,0 +1,25 @@ +```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); + + let result = avatars.get_browser( + appwrite::enums::Browser::AvantBrowser, + Some(0), // optional + Some(0), // optional + Some(-1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-credit-card.md b/examples/2.3.x/server-rust/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..2fb6fef00 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-credit-card.md @@ -0,0 +1,25 @@ +```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); + + let result = avatars.get_credit_card( + appwrite::enums::CreditCard::AmericanExpress, + Some(0), // optional + Some(0), // optional + Some(-1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-favicon.md b/examples/2.3.x/server-rust/examples/avatars/get-favicon.md new file mode 100644 index 000000000..74c33216a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-favicon.md @@ -0,0 +1,22 @@ +```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); + + let result = avatars.get_favicon( + "https://example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-flag.md b/examples/2.3.x/server-rust/examples/avatars/get-flag.md new file mode 100644 index 000000000..621d2c13e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-flag.md @@ -0,0 +1,25 @@ +```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); + + let result = avatars.get_flag( + appwrite::enums::Flag::Afghanistan, + Some(0), // optional + Some(0), // optional + Some(-1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-image.md b/examples/2.3.x/server-rust/examples/avatars/get-image.md new file mode 100644 index 000000000..b7175c7bf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-image.md @@ -0,0 +1,24 @@ +```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); + + let result = avatars.get_image( + "https://example.com", + Some(0), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-initials.md b/examples/2.3.x/server-rust/examples/avatars/get-initials.md new file mode 100644 index 000000000..eaae6ff39 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-initials.md @@ -0,0 +1,25 @@ +```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); + + let result = avatars.get_initials( + Some("<NAME>"), // optional + Some(0), // optional + Some(0), // optional + Some("FFFFFF") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-photo.md b/examples/2.3.x/server-rust/examples/avatars/get-photo.md new file mode 100644 index 000000000..040583849 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-photo.md @@ -0,0 +1,29 @@ +```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); + + let result = avatars.get_photo( + Some(0), // optional + Some(0), // optional + Some(0), // optional + Some("png"), // optional + Some("g"), // optional + Some("current()"), // optional + Some("<EMAIL_HASH>"), // optional + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-qr.md b/examples/2.3.x/server-rust/examples/avatars/get-qr.md new file mode 100644 index 000000000..585f63a04 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-qr.md @@ -0,0 +1,25 @@ +```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); + + let result = avatars.get_qr( + "<TEXT>", + Some(1), // optional + Some(0), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/get-screenshot.md b/examples/2.3.x/server-rust/examples/avatars/get-screenshot.md new file mode 100644 index 000000000..d21ece0b5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/get-screenshot.md @@ -0,0 +1,41 @@ +```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); + + let result = avatars.get_screenshot( + "https://example.com", + Some(serde_json::json!({})), // optional + Some(1920), // optional + Some(1080), // optional + Some(2), // optional + Some(appwrite::enums::BrowserTheme::Dark), // optional + Some("Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15"), // optional + Some(true), // optional + Some("en-US"), // optional + Some(appwrite::enums::Timezone::AfricaAbidjan), // optional + Some(37.7749), // optional + Some(-122.4194), // optional + Some(100), // optional + Some(true), // optional + Some(vec![appwrite::enums::BrowserPermission::Geolocation, appwrite::enums::BrowserPermission::Notifications]), // optional + Some(3), // optional + Some(800), // optional + Some(600), // optional + Some(85), // optional + Some(appwrite::enums::ImageFormat::Jpeg) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/create-archive.md b/examples/2.3.x/server-rust/examples/backups/create-archive.md new file mode 100644 index 000000000..0fef16eba --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/create-archive.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.create_archive( + vec![appwrite::enums::BackupServices::Databases], + Some("<RESOURCE_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/create-policy.md b/examples/2.3.x/server-rust/examples/backups/create-policy.md new file mode 100644 index 000000000..a732e2741 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/create-policy.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.create_policy( + "<POLICY_ID>", + vec![appwrite::enums::BackupServices::Databases], + 1, + "", + Some("<NAME>"), // optional + Some("<RESOURCE_ID>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/create-restoration.md b/examples/2.3.x/server-rust/examples/backups/create-restoration.md new file mode 100644 index 000000000..b11c70699 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/create-restoration.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.create_restoration( + "<ARCHIVE_ID>", + vec![appwrite::enums::BackupServices::Databases], + Some("<NEW_RESOURCE_ID>"), // optional + Some("<NEW_RESOURCE_NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/delete-archive.md b/examples/2.3.x/server-rust/examples/backups/delete-archive.md new file mode 100644 index 000000000..5929752f9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/delete-archive.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + backups.delete_archive( + "<ARCHIVE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/delete-policy.md b/examples/2.3.x/server-rust/examples/backups/delete-policy.md new file mode 100644 index 000000000..2368cc217 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/delete-policy.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + backups.delete_policy( + "<POLICY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/get-archive.md b/examples/2.3.x/server-rust/examples/backups/get-archive.md new file mode 100644 index 000000000..c9a745e36 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/get-archive.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.get_archive( + "<ARCHIVE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/get-policy.md b/examples/2.3.x/server-rust/examples/backups/get-policy.md new file mode 100644 index 000000000..45375894a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/get-policy.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.get_policy( + "<POLICY_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/get-restoration.md b/examples/2.3.x/server-rust/examples/backups/get-restoration.md new file mode 100644 index 000000000..8a6c96c02 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/get-restoration.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.get_restoration( + "<RESTORATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/list-archives.md b/examples/2.3.x/server-rust/examples/backups/list-archives.md new file mode 100644 index 000000000..ba01f5895 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/list-archives.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.list_archives( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/list-policies.md b/examples/2.3.x/server-rust/examples/backups/list-policies.md new file mode 100644 index 000000000..16313ac6e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/list-policies.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.list_policies( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/list-restorations.md b/examples/2.3.x/server-rust/examples/backups/list-restorations.md new file mode 100644 index 000000000..ef03b0203 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/list-restorations.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.list_restorations( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/backups/update-policy.md b/examples/2.3.x/server-rust/examples/backups/update-policy.md new file mode 100644 index 000000000..e86b8a2d8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/backups/update-policy.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Backups; + +#[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 backups = Backups::new(&client); + + let result = backups.update_policy( + "<POLICY_ID>", + Some("<NAME>"), // optional + Some(1), // optional + Some(""), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..6c8f09dbe --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-big-int-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_big_int_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(0), // optional + Some(1000000), // optional + Some(0), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..b109079af --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-boolean-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_boolean_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-collection.md b/examples/2.3.x/server-rust/examples/databases/create-collection.md new file mode 100644 index 000000000..57bf5f810 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-collection.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 databases = Databases::new(&client); + + let result = databases.create_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(vec![]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..736f80cac --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-datetime-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_datetime_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-document.md b/examples/2.3.x/server-rust/examples/databases/create-document.md new file mode 100644 index 000000000..6e3321d35 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 databases = Databases::new(&client); + + let result = databases.create_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + serde_json::json!({}), + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).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 new file mode 100644 index 000000000..f46917840 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + vec![], + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-email-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..cdebbb408 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-email-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_email_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("email@example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..edaf6a8b6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-enum-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_enum_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + vec!["active".into(), "inactive".into()], + false, + Some("active"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-float-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..2f1faf562 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-float-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_float_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(0), // optional + Some(100), // optional + Some(10.5), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..b7389d9a5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-index.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + appwrite::enums::DatabasesIndexType::Key, + vec![], + Some(vec![appwrite::enums::OrderBy::Asc]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..7d2d1b18e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-integer-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_integer_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(0), // optional + Some(100), // optional + Some(10), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..9ab3d7cbf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-ip-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_ip_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("192.0.2.0"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-line-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..d0834b1b9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-line-attribute.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_line_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(vec![serde_json::json!([1,2]), serde_json::json!([3,4]), serde_json::json!([5,6])]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..11a38c1c9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-longtext-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_longtext_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..328414b34 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-mediumtext-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_mediumtext_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-operations.md b/examples/2.3.x/server-rust/examples/databases/create-operations.md new file mode 100644 index 000000000..7e4204a52 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-operations.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.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 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-point-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..489fba3b0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-point-attribute.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_point_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(vec![1, 2]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..32c519f05 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-polygon-attribute.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_polygon_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(vec![serde_json::json!([[1,2],[3,4],[5,6],[1,2]])]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..af202d405 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-relationship-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_relationship_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<RELATED_COLLECTION_ID>", + appwrite::enums::RelationshipType::OneToOne, + Some(false), // optional + Some("<KEY>"), // optional + Some("<TWO_WAY_KEY>"), // optional + Some(appwrite::enums::RelationMutate::Cascade) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-string-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..30ed03b61 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-string-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_string_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + 1, + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-text-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..6f0b142f7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-text-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_text_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-transaction.md b/examples/2.3.x/server-rust/examples/databases/create-transaction.md new file mode 100644 index 000000000..13ec21f87 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_transaction( + Some(60) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-url-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..6a9b96fdb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-url-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_url_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("https://example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-rust/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..66528ae7b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create-varchar-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create_varchar_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + 1, + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create.md b/examples/2.3.x/server-rust/examples/databases/create.md new file mode 100644 index 000000000..58ff3e5e8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/create.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.create( + "<DATABASE_ID>", + "<NAME>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-rust/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..8dd9d1858 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/decrement-document-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.decrement_document_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "<ATTRIBUTE>", + Some(1), // optional + Some(0), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/delete-attribute.md b/examples/2.3.x/server-rust/examples/databases/delete-attribute.md new file mode 100644 index 000000000..3388f0b95 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/delete-attribute.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + databases.delete_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/delete-collection.md b/examples/2.3.x/server-rust/examples/databases/delete-collection.md new file mode 100644 index 000000000..1b7a38577 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/delete-collection.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + databases.delete_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/delete-document.md b/examples/2.3.x/server-rust/examples/databases/delete-document.md new file mode 100644 index 000000000..4762af670 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/delete-document.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + databases.delete_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some("<TRANSACTION_ID>") // optional + ).await?; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..2d75876c5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/delete-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.delete_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/delete-index.md b/examples/2.3.x/server-rust/examples/databases/delete-index.md new file mode 100644 index 000000000..49ae6eb2e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/delete-index.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + databases.delete_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/delete-transaction.md b/examples/2.3.x/server-rust/examples/databases/delete-transaction.md new file mode 100644 index 000000000..45308f71f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/delete-transaction.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + databases.delete_transaction( + "<TRANSACTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/delete.md b/examples/2.3.x/server-rust/examples/databases/delete.md new file mode 100644 index 000000000..268bad5c5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + databases.delete( + "<DATABASE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/get-attribute.md b/examples/2.3.x/server-rust/examples/databases/get-attribute.md new file mode 100644 index 000000000..6053bdfbc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/get-attribute.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.get_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/get-collection.md b/examples/2.3.x/server-rust/examples/databases/get-collection.md new file mode 100644 index 000000000..cdc1f8705 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/get-collection.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.get_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/get-document.md b/examples/2.3.x/server-rust/examples/databases/get-document.md new file mode 100644 index 000000000..06b72cc95 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/get-document.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.get_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/get-index.md b/examples/2.3.x/server-rust/examples/databases/get-index.md new file mode 100644 index 000000000..7a7ea7338 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/get-index.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.get_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/get-transaction.md b/examples/2.3.x/server-rust/examples/databases/get-transaction.md new file mode 100644 index 000000000..b035332ad --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/get-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.get_transaction( + "<TRANSACTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/get.md b/examples/2.3.x/server-rust/examples/databases/get.md new file mode 100644 index 000000000..9a2aeb5bb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.get( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-rust/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..36f3ea18f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/increment-document-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.increment_document_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "<ATTRIBUTE>", + Some(1), // optional + Some(100), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/list-attributes.md b/examples/2.3.x/server-rust/examples/databases/list-attributes.md new file mode 100644 index 000000000..156c43fd3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/list-attributes.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.list_attributes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/list-collections.md b/examples/2.3.x/server-rust/examples/databases/list-collections.md new file mode 100644 index 000000000..5b1cd663f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/list-collections.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.list_collections( + "<DATABASE_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/list-documents.md b/examples/2.3.x/server-rust/examples/databases/list-documents.md new file mode 100644 index 000000000..2dd664c6e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/list-documents.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.list_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>"), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/list-indexes.md b/examples/2.3.x/server-rust/examples/databases/list-indexes.md new file mode 100644 index 000000000..94b4d636c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/list-indexes.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.list_indexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..6570a83a7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/list-transactions.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.list_transactions( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/list.md b/examples/2.3.x/server-rust/examples/databases/list.md new file mode 100644 index 000000000..9967ae58a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.list( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..eafd1dd04 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-big-int-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_big_int_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(0), + Some(0), // optional + Some(1000000), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..9e9e5510a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-boolean-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_boolean_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(false), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-collection.md b/examples/2.3.x/server-rust/examples/databases/update-collection.md new file mode 100644 index 000000000..af0a82c4a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-collection.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 databases = Databases::new(&client); + + let result = databases.update_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some("<NAME>"), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..b0ce51faf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-datetime-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_datetime_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("2020-10-15T06:38:00.000+00:00"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-document.md b/examples/2.3.x/server-rust/examples/databases/update-document.md new file mode 100644 index 000000000..3729c1a32 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 databases = Databases::new(&client); + + let result = databases.update_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-documents.md b/examples/2.3.x/server-rust/examples/databases/update-documents.md new file mode 100644 index 000000000..e0dd2373e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-documents.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(serde_json::json!({})), // optional + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-email-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..51da9adc7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-email-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_email_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("email@example.com"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..07f9ea396 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-enum-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_enum_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + vec!["active".into(), "inactive".into()], + false, + Some("active"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-float-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..4ce1b3d0b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-float-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_float_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(10.5), + Some(0), // optional + Some(100), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..d9a912e2a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-integer-attribute.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_integer_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(10), + Some(0), // optional + Some(100), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..3912aa9c3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-ip-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_ip_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("192.0.2.0"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-line-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..8ba81273b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-line-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_line_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(vec![serde_json::json!([1,2]), serde_json::json!([3,4]), serde_json::json!([5,6])]), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..dc6dabca4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-longtext-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_longtext_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("Hello World"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..f88d43bf1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_mediumtext_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("Hello World"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-point-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..b862fd6a9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-point-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_point_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(vec![1, 2]), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..541b17bd2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-polygon-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_polygon_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some(vec![serde_json::json!([[1,2],[3,4],[5,6],[1,2]])]), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..d8a3073a0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-relationship-attribute.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_relationship_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + Some(appwrite::enums::RelationMutate::Cascade), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-string-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..5238097e8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-string-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_string_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("Hello World"), + Some(1), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-text-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..646ccec53 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-text-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_text_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("Hello World"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-transaction.md b/examples/2.3.x/server-rust/examples/databases/update-transaction.md new file mode 100644 index 000000000..0edecca22 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-transaction.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_transaction( + "<TRANSACTION_ID>", + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-url-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..ca807990b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-url-attribute.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_url_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("https://example.com"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-rust/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..bda6271b5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update-varchar-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update_varchar_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + false, + Some("Hello World"), + Some(1), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/update.md b/examples/2.3.x/server-rust/examples/databases/update.md new file mode 100644 index 000000000..1f8f57b07 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/update.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.update( + "<DATABASE_ID>", + Some("<NAME>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/upsert-document.md b/examples/2.3.x/server-rust/examples/databases/upsert-document.md new file mode 100644 index 000000000..88e96676e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/upsert-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 databases = Databases::new(&client); + + let result = databases.upsert_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..6ef035f6e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/databases/upsert-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Databases; + +#[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 databases = Databases::new(&client); + + let result = databases.upsert_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + vec![], + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/create-collection.md b/examples/2.3.x/server-rust/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..8e7eb00c5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-collection.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(vec![]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/create-document.md b/examples/2.3.x/server-rust/examples/documentsdb/create-document.md new file mode 100644 index 000000000..0986a89c2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + serde_json::json!({}), + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..1c60d5cd5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + vec![], + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/create-failover.md b/examples/2.3.x/server-rust/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..9c22257cf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-failover.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_failover( + "<DATABASE_ID>", + Some("<TARGET_REPLICA_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..2b7534c5b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-index.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + appwrite::enums::DocumentsDBIndexType::Key, + vec![], + Some(vec![appwrite::enums::OrderBy::Asc]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/create-operations.md b/examples/2.3.x/server-rust/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..4288bfb1d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-operations.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_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 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-rust/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..46ba2c1b9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_transaction( + Some(60) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/create.md b/examples/2.3.x/server-rust/examples/documentsdb/create.md new file mode 100644 index 000000000..793199322 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/create.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.create( + "<DATABASE_ID>", + "<NAME>", + Some(false), // optional + Some("serverless"), // optional + Some(0), // optional + Some("async") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-rust/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..31453e7ae --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.decrement_document_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "<ATTRIBUTE>", + Some(1), // optional + Some(0), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-rust/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..777bc9f47 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/delete-collection.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + documents_db.delete_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/delete-document.md b/examples/2.3.x/server-rust/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..aaf1c97fb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/delete-document.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + documents_db.delete_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some("<TRANSACTION_ID>") // optional + ).await?; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..be2ad02d6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/delete-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.delete_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/delete-index.md b/examples/2.3.x/server-rust/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..d2911cae9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/delete-index.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + documents_db.delete_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-rust/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..86a7d3dd0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/delete-transaction.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + documents_db.delete_transaction( + "<TRANSACTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/delete.md b/examples/2.3.x/server-rust/examples/documentsdb/delete.md new file mode 100644 index 000000000..f0254c301 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + documents_db.delete( + "<DATABASE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/get-collection.md b/examples/2.3.x/server-rust/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..742ada715 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/get-collection.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/get-document.md b/examples/2.3.x/server-rust/examples/documentsdb/get-document.md new file mode 100644 index 000000000..b2c1ca59a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/get-document.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/get-index.md b/examples/2.3.x/server-rust/examples/documentsdb/get-index.md new file mode 100644 index 000000000..cd4ffbd58 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/get-index.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-rust/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..a00d5cd84 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/get-replicas.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_replicas( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/get-status.md b/examples/2.3.x/server-rust/examples/documentsdb/get-status.md new file mode 100644 index 000000000..c5f38fef1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/get-status.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_status( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-rust/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..2a7ade60a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/get-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_transaction( + "<TRANSACTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/get.md b/examples/2.3.x/server-rust/examples/documentsdb/get.md new file mode 100644 index 000000000..e60770cfe --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.get( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-rust/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..f45a1bbf0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.increment_document_attribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "<ATTRIBUTE>", + Some(1), // optional + Some(100), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/list-collections.md b/examples/2.3.x/server-rust/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..2266a7314 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/list-collections.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_collections( + "<DATABASE_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/list-documents.md b/examples/2.3.x/server-rust/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..b99a9fdb3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/list-documents.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>"), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-rust/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..0db1c7a55 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/list-indexes.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_indexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/list-operations.md b/examples/2.3.x/server-rust/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..e39d7ef6c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/list-operations.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_operations( + "<DATABASE_ID>", + Some("queued"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-rust/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..7ec4b01c7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/list-specifications.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_specifications().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..9f387f633 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/list-transactions.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_transactions( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/list.md b/examples/2.3.x/server-rust/examples/documentsdb/list.md new file mode 100644 index 000000000..f67a70f77 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/list.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.list( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/update-collection.md b/examples/2.3.x/server-rust/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..895461693 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/update-collection.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.update_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/update-document.md b/examples/2.3.x/server-rust/examples/documentsdb/update-document.md new file mode 100644 index 000000000..6faab5b42 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/update-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.update_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/update-documents.md b/examples/2.3.x/server-rust/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..a85039201 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/update-documents.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.update_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(serde_json::json!({})), // optional + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-rust/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..449d18783 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/update-transaction.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.update_transaction( + "<TRANSACTION_ID>", + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/update.md b/examples/2.3.x/server-rust/examples/documentsdb/update.md new file mode 100644 index 000000000..0ac5fcf58 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/update.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.update( + "<DATABASE_ID>", + "<NAME>", + Some(false), // optional + Some("serverless"), // optional + Some(0), // optional + Some("async") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-rust/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..29e6d534c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/upsert-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.upsert_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..d6ba16543 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/documentsdb/upsert-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 documents_db = DocumentsDB::new(&client); + + let result = documents_db.upsert_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + vec![], + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-rust/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..20d878245 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-preset-google-workspace.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_preset_google_workspace( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-rust/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..1cace5a0d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-preset-i-cloud.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_preset_i_cloud( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-rust/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..2168ee718 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-preset-mailgun.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_preset_mailgun( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-rust/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..4349c8bca --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-preset-outlook.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_preset_outlook( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-rust/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..3aef9bb05 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-preset-proton-mail.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_preset_proton_mail( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-rust/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..001f0f57e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-preset-zoho.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_preset_zoho( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-a.md b/examples/2.3.x/server-rust/examples/domains/create-record-a.md new file mode 100644 index 000000000..d319eb526 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-a.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_a( + "<DOMAIN_ID>", + "", + "", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-rust/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..adb4229b2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-aaaa.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_aaaa( + "<DOMAIN_ID>", + "", + "", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-alias.md b/examples/2.3.x/server-rust/examples/domains/create-record-alias.md new file mode 100644 index 000000000..6a903eca2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-alias.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_alias( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-caa.md b/examples/2.3.x/server-rust/examples/domains/create-record-caa.md new file mode 100644 index 000000000..c35b5e2d1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-caa.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_caa( + "<DOMAIN_ID>", + "", + "", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-cname.md b/examples/2.3.x/server-rust/examples/domains/create-record-cname.md new file mode 100644 index 000000000..662293fbd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-cname.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_cname( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-https.md b/examples/2.3.x/server-rust/examples/domains/create-record-https.md new file mode 100644 index 000000000..39f845f93 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-https.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_https( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-mx.md b/examples/2.3.x/server-rust/examples/domains/create-record-mx.md new file mode 100644 index 000000000..f4cf2c826 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-mx.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_mx( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + 0, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-ns.md b/examples/2.3.x/server-rust/examples/domains/create-record-ns.md new file mode 100644 index 000000000..2b605b1f4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-ns.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_ns( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-srv.md b/examples/2.3.x/server-rust/examples/domains/create-record-srv.md new file mode 100644 index 000000000..012de941c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-srv.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_srv( + "<DOMAIN_ID>", + "", + "<VALUE>", + 1, + 0, + 0, + 0, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create-record-txt.md b/examples/2.3.x/server-rust/examples/domains/create-record-txt.md new file mode 100644 index 000000000..76d67f0a8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create-record-txt.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create_record_txt( + "<DOMAIN_ID>", + "", + 1, + Some("<VALUE>"), // optional + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/create.md b/examples/2.3.x/server-rust/examples/domains/create.md new file mode 100644 index 000000000..8d13879ae --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/create.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.create( + "<TEAM_ID>", + "example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/delete-record.md b/examples/2.3.x/server-rust/examples/domains/delete-record.md new file mode 100644 index 000000000..4f03bfeb8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/delete-record.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + domains.delete_record( + "<DOMAIN_ID>", + "<RECORD_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/delete.md b/examples/2.3.x/server-rust/examples/domains/delete.md new file mode 100644 index 000000000..f59ede6b7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + domains.delete( + "<DOMAIN_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-rust/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..03b8baeb2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-preset-google-workspace.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_preset_google_workspace( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-rust/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..0da98fe6c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-preset-i-cloud.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_preset_i_cloud( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-rust/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..fe51c2061 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-preset-mailgun.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_preset_mailgun( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-rust/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..99b472010 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-preset-outlook.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_preset_outlook( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-rust/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..60251f9ee --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-preset-proton-mail.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_preset_proton_mail( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-rust/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..b1fd67d57 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-preset-zoho.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_preset_zoho( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-price.md b/examples/2.3.x/server-rust/examples/domains/get-price.md new file mode 100644 index 000000000..d6cdc47b0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-price.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_price( + "example.com", + Some(0), // optional + Some(appwrite::enums::DomainRegistrationType::New) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-record.md b/examples/2.3.x/server-rust/examples/domains/get-record.md new file mode 100644 index 000000000..5b37a1c31 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-record.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_record( + "<DOMAIN_ID>", + "<RECORD_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-transfer-status.md b/examples/2.3.x/server-rust/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..b6289beb6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-transfer-status.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_transfer_status( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get-zone.md b/examples/2.3.x/server-rust/examples/domains/get-zone.md new file mode 100644 index 000000000..1dad4e964 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get-zone.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get_zone( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/get.md b/examples/2.3.x/server-rust/examples/domains/get.md new file mode 100644 index 000000000..3b319b711 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.get( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/list-prices.md b/examples/2.3.x/server-rust/examples/domains/list-prices.md new file mode 100644 index 000000000..f38d1f579 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/list-prices.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.list_prices( + vec![], + Some(0), // optional + Some(appwrite::enums::DomainRegistrationType::New) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/list-records.md b/examples/2.3.x/server-rust/examples/domains/list-records.md new file mode 100644 index 000000000..3b9aa9990 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/list-records.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.list_records( + "<DOMAIN_ID>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/list.md b/examples/2.3.x/server-rust/examples/domains/list.md new file mode 100644 index 000000000..86d358e59 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/list.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.list( + Some(vec![]), // optional + Some("<SEARCH>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-nameservers.md b/examples/2.3.x/server-rust/examples/domains/update-nameservers.md new file mode 100644 index 000000000..1c3378431 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-nameservers.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_nameservers( + "<DOMAIN_ID>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-a.md b/examples/2.3.x/server-rust/examples/domains/update-record-a.md new file mode 100644 index 000000000..3c1ded596 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-a.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_a( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-rust/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..022a8960d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-aaaa.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_aaaa( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-alias.md b/examples/2.3.x/server-rust/examples/domains/update-record-alias.md new file mode 100644 index 000000000..ba0a3a2d8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-alias.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_alias( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-caa.md b/examples/2.3.x/server-rust/examples/domains/update-record-caa.md new file mode 100644 index 000000000..cceec8b37 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-caa.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_caa( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-cname.md b/examples/2.3.x/server-rust/examples/domains/update-record-cname.md new file mode 100644 index 000000000..32d038bb6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-cname.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_cname( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-https.md b/examples/2.3.x/server-rust/examples/domains/update-record-https.md new file mode 100644 index 000000000..59678999b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-https.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_https( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-mx.md b/examples/2.3.x/server-rust/examples/domains/update-record-mx.md new file mode 100644 index 000000000..fdfb079c7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-mx.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_mx( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + 0, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-ns.md b/examples/2.3.x/server-rust/examples/domains/update-record-ns.md new file mode 100644 index 000000000..7e6d33a7f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-ns.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_ns( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-srv.md b/examples/2.3.x/server-rust/examples/domains/update-record-srv.md new file mode 100644 index 000000000..cdeec2b98 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-srv.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_srv( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + 0, + 0, + 0, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-record-txt.md b/examples/2.3.x/server-rust/examples/domains/update-record-txt.md new file mode 100644 index 000000000..21e263054 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-record-txt.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_record_txt( + "<DOMAIN_ID>", + "<RECORD_ID>", + "", + "<VALUE>", + 1, + Some("<COMMENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-team.md b/examples/2.3.x/server-rust/examples/domains/update-team.md new file mode 100644 index 000000000..8307703f6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-team.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_team( + "<DOMAIN_ID>", + "<TEAM_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/update-zone.md b/examples/2.3.x/server-rust/examples/domains/update-zone.md new file mode 100644 index 000000000..61e3f5a7a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/update-zone.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.update_zone( + "<DOMAIN_ID>", + "<CONTENT>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/domains/verify-nameservers.md b/examples/2.3.x/server-rust/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..e496bf898 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/domains/verify-nameservers.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Domains; + +#[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 domains = Domains::new(&client); + + let result = domains.verify_nameservers( + "<DOMAIN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..8f945bb4c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Embeddings; + +#[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 embeddings = Embeddings::new(&client); + + let result = embeddings.create_text_embeddings( + vec![], + Some(appwrite::enums::EmbeddingModel::NomicEmbedText) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/create-deployment.md b/examples/2.3.x/server-rust/examples/functions/create-deployment.md new file mode 100644 index 000000000..a3fbf94cd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/create-deployment.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; +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_key("<YOUR_API_KEY>"); // Your secret API key + + let functions = Functions::new(&client); + + let code = InputFile::from_path("path/to/file.png", None).await?; + + let result = functions.create_deployment( + "<FUNCTION_ID>", + code, + false, + Some("<ENTRYPOINT>"), // optional + Some("<COMMANDS>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-rust/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..d6d923247 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.create_duplicate_deployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + Some("<BUILD_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/create-execution.md b/examples/2.3.x/server-rust/examples/functions/create-execution.md new file mode 100644 index 000000000..c614af524 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/create-execution.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.create_execution( + "<FUNCTION_ID>", + Some("<BODY>"), // optional + Some(false), // optional + Some("<PATH>"), // optional + Some(appwrite::enums::ExecutionMethod::GET), // optional + Some(serde_json::json!({})), // optional + Some("<SCHEDULED_AT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/create-template-deployment.md b/examples/2.3.x/server-rust/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..998338d14 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/create-template-deployment.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.create_template_deployment( + "<FUNCTION_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + appwrite::enums::TemplateReferenceType::Commit, + "<REFERENCE>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/create-variable.md b/examples/2.3.x/server-rust/examples/functions/create-variable.md new file mode 100644 index 000000000..3f7ec5477 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/create-variable.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.create_variable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + "<KEY>", + "<VALUE>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-rust/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..28ce87815 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/create-vcs-deployment.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.create_vcs_deployment( + "<FUNCTION_ID>", + appwrite::enums::VCSReferenceType::Branch, + "<REFERENCE>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/create.md b/examples/2.3.x/server-rust/examples/functions/create.md new file mode 100644 index 000000000..46b7a2026 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/create.md @@ -0,0 +1,43 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.create( + "<FUNCTION_ID>", + "<NAME>", + appwrite::enums::Runtime::Node145, + Some(vec!["any".into()]), // optional + Some(vec![]), // optional + Some("0 0 * * *"), // optional + Some(1), // optional + Some(false), // optional + Some(false), // optional + Some("<ENTRYPOINT>"), // optional + Some("<COMMANDS>"), // optional + Some(vec![appwrite::enums::ProjectKeyScopes::ProjectRead]), // optional + Some("<INSTALLATION_ID>"), // optional + Some("<PROVIDER_REPOSITORY_ID>"), // optional + Some("<PROVIDER_BRANCH>"), // optional + Some(false), // optional + Some("<PROVIDER_ROOT_DIRECTORY>"), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("s-1vcpu-512mb"), // optional + Some("s-1vcpu-512mb"), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/delete-deployment.md b/examples/2.3.x/server-rust/examples/functions/delete-deployment.md new file mode 100644 index 000000000..2e9ca5661 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/delete-deployment.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + functions.delete_deployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/delete-execution.md b/examples/2.3.x/server-rust/examples/functions/delete-execution.md new file mode 100644 index 000000000..6cc451cca --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/delete-execution.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + functions.delete_execution( + "<FUNCTION_ID>", + "<EXECUTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/delete-variable.md b/examples/2.3.x/server-rust/examples/functions/delete-variable.md new file mode 100644 index 000000000..db03d2537 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/delete-variable.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + functions.delete_variable( + "<FUNCTION_ID>", + "<VARIABLE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/delete.md b/examples/2.3.x/server-rust/examples/functions/delete.md new file mode 100644 index 000000000..55dfb6051 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + functions.delete( + "<FUNCTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/get-deployment-download.md b/examples/2.3.x/server-rust/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..69e5e391e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/get-deployment-download.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.get_deployment_download( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + Some(appwrite::enums::DeploymentDownloadType::Source), // optional + Some("<TOKEN>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/get-deployment.md b/examples/2.3.x/server-rust/examples/functions/get-deployment.md new file mode 100644 index 000000000..0fc911e11 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/get-deployment.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.get_deployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/get-execution.md b/examples/2.3.x/server-rust/examples/functions/get-execution.md new file mode 100644 index 000000000..9b934827a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/get-execution.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.get_execution( + "<FUNCTION_ID>", + "<EXECUTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/get-variable.md b/examples/2.3.x/server-rust/examples/functions/get-variable.md new file mode 100644 index 000000000..74bc9c26c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/get-variable.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.get_variable( + "<FUNCTION_ID>", + "<VARIABLE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/get.md b/examples/2.3.x/server-rust/examples/functions/get.md new file mode 100644 index 000000000..b89adba92 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.get( + "<FUNCTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/list-deployments.md b/examples/2.3.x/server-rust/examples/functions/list-deployments.md new file mode 100644 index 000000000..3d8b44538 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/list-deployments.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.list_deployments( + "<FUNCTION_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/list-executions.md b/examples/2.3.x/server-rust/examples/functions/list-executions.md new file mode 100644 index 000000000..87ac99d6b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/list-executions.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.list_executions( + "<FUNCTION_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..abeffc758 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/list-runtimes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.list_runtimes().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..57245ba6d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/list-specifications.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.list_specifications( + Some("runtimes") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/list-variables.md b/examples/2.3.x/server-rust/examples/functions/list-variables.md new file mode 100644 index 000000000..3b149293c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/list-variables.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.list_variables( + "<FUNCTION_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/list.md b/examples/2.3.x/server-rust/examples/functions/list.md new file mode 100644 index 000000000..ef9d71d62 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.list( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/update-deployment-status.md b/examples/2.3.x/server-rust/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..c0964401a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/update-deployment-status.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.update_deployment_status( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/update-function-deployment.md b/examples/2.3.x/server-rust/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..5fd072800 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/update-function-deployment.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.update_function_deployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/update-variable.md b/examples/2.3.x/server-rust/examples/functions/update-variable.md new file mode 100644 index 000000000..0ee9606d9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/update-variable.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.update_variable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + Some("<KEY>"), // optional + Some("<VALUE>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/functions/update.md b/examples/2.3.x/server-rust/examples/functions/update.md new file mode 100644 index 000000000..16e4ea52a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/functions/update.md @@ -0,0 +1,43 @@ +```rust +use appwrite::Client; +use appwrite::services::Functions; + +#[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 functions = Functions::new(&client); + + let result = functions.update( + "<FUNCTION_ID>", + "<NAME>", + Some(appwrite::enums::Runtime::Node145), // optional + Some(vec!["any".into()]), // optional + Some(vec![]), // optional + Some("0 0 * * *"), // optional + Some(1), // optional + Some(false), // optional + Some(false), // optional + Some("<ENTRYPOINT>"), // optional + Some("<COMMANDS>"), // optional + Some(vec![appwrite::enums::ProjectKeyScopes::ProjectRead]), // optional + Some("<INSTALLATION_ID>"), // optional + Some("<PROVIDER_REPOSITORY_ID>"), // optional + Some("<PROVIDER_BRANCH>"), // optional + Some(false), // optional + Some("<PROVIDER_ROOT_DIRECTORY>"), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("s-1vcpu-512mb"), // optional + Some("s-1vcpu-512mb"), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/graphql/mutation.md b/examples/2.3.x/server-rust/examples/graphql/mutation.md new file mode 100644 index 000000000..559dc2854 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/graphql/mutation.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Graphql; + +#[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 graphql = Graphql::new(&client); + + let result = graphql.mutation( + serde_json::json!({}) + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/graphql/query.md b/examples/2.3.x/server-rust/examples/graphql/query.md new file mode 100644 index 000000000..edd210470 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/graphql/query.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Graphql; + +#[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 graphql = Graphql::new(&client); + + let result = graphql.query( + serde_json::json!({}) + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/locale/get.md b/examples/2.3.x/server-rust/examples/locale/get.md new file mode 100644 index 000000000..c4665a6c8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/locale/get.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Locale; + +#[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 locale = Locale::new(&client); + + let result = locale.get().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..f920bf615 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/locale/list-codes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Locale; + +#[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 locale = Locale::new(&client); + + let result = locale.list_codes().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..b4f8d46ba --- /dev/null +++ b/examples/2.3.x/server-rust/examples/locale/list-continents.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Locale; + +#[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 locale = Locale::new(&client); + + let result = locale.list_continents().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..c959aa1ca --- /dev/null +++ b/examples/2.3.x/server-rust/examples/locale/list-countries-eu.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Locale; + +#[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 locale = Locale::new(&client); + + let result = locale.list_countries_eu().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..6c0238bfc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/locale/list-countries-phones.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Locale; + +#[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 locale = Locale::new(&client); + + let result = locale.list_countries_phones().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..bd8f795e0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/locale/list-countries.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Locale; + +#[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 locale = Locale::new(&client); + + let result = locale.list_countries().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..b382da677 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/locale/list-currencies.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Locale; + +#[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 locale = Locale::new(&client); + + let result = locale.list_currencies().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..fb7c78a53 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/locale/list-languages.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Locale; + +#[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 locale = Locale::new(&client); + + let result = locale.list_languages().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..d20edfadd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-apns-provider.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_apns_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("<AUTH_KEY>"), // optional + Some("<AUTH_KEY_ID>"), // optional + Some("<TEAM_ID>"), // optional + Some("<BUNDLE_ID>"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..4fca67c9a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_appwrite_provider( + "<PROVIDER_ID>", + "<NAME>", + Some(false), // optional + Some(0), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-email.md b/examples/2.3.x/server-rust/examples/messaging/create-email.md new file mode 100644 index 000000000..6a0d39f17 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-email.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_email( + "<MESSAGE_ID>", + "<SUBJECT>", + "<CONTENT>", + Some(vec![]), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some(false), // optional + Some(false), // optional + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..3b62c549a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-fcm-provider.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_fcm_provider( + "<PROVIDER_ID>", + "<NAME>", + Some(serde_json::json!({})), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..ecc599cac --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_mailgun_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("<API_KEY>"), // optional + Some("example.com"), // optional + Some(false), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("email@example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..1a1484599 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_msg91_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("<TEMPLATE_ID>"), // optional + Some("<SENDER_ID>"), // optional + Some("<AUTH_KEY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..7f93d6bff --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-push.md @@ -0,0 +1,40 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_push( + "<MESSAGE_ID>", + Some("<TITLE>"), // optional + Some("<BODY>"), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some(serde_json::json!({})), // optional + Some("<ACTION>"), // optional + Some("<ID1:ID2>"), // optional + Some("<ICON>"), // optional + Some("<SOUND>"), // optional + Some("<COLOR>"), // optional + Some("<TAG>"), // optional + Some(1), // optional + Some(false), // optional + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some(false), // optional + Some(false), // optional + Some(appwrite::enums::MessagePriority::Normal) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..0632c50cf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-resend-provider.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_resend_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("<API_KEY>"), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("email@example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..93fc064b4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_sendgrid_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("<API_KEY>"), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("email@example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..f5d8344c5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-ses-provider.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_ses_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("<ACCESS_KEY>"), // optional + Some("<SECRET_KEY>"), // optional + Some("<REGION>"), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("email@example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-sms.md b/examples/2.3.x/server-rust/examples/messaging/create-sms.md new file mode 100644 index 000000000..f190adc8c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-sms.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_sms( + "<MESSAGE_ID>", + "<CONTENT>", + Some(vec![]), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some(false), // optional + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..f6ee6a1be --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-smtp-provider.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_smtp_provider( + "<PROVIDER_ID>", + "<NAME>", + "<HOST>", + Some(587), // optional + Some("<USERNAME>"), // optional + Some("password"), // optional + Some(appwrite::enums::SmtpEncryption::None), // optional + Some(false), // optional + Some("<MAILER>"), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("email@example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-subscriber.md b/examples/2.3.x/server-rust/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..064875dc5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-subscriber.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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_jwt("<YOUR_JWT>"); // Your secret JSON Web Token + + let messaging = Messaging::new(&client); + + let result = messaging.create_subscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + "<TARGET_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..88860228a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-telesign-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_telesign_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("+12065550100"), // optional + Some("<CUSTOMER_ID>"), // optional + Some("<API_KEY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..d6a7b1378 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_textmagic_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("+12065550100"), // optional + Some("<USERNAME>"), // optional + Some("<API_KEY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-topic.md b/examples/2.3.x/server-rust/examples/messaging/create-topic.md new file mode 100644 index 000000000..b1dcdb0ae --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-topic.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_topic( + "<TOPIC_ID>", + "<NAME>", + Some(vec!["any".into()]), // optional + Some(0), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..0746b1e5f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-twilio-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_twilio_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("<FROM>"), // optional + Some("<ACCOUNT_SID>"), // optional + Some("<AUTH_TOKEN>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-rust/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..6e35af111 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/create-vonage-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.create_vonage_provider( + "<PROVIDER_ID>", + "<NAME>", + Some("+12065550100"), // optional + Some("<API_KEY>"), // optional + Some("<API_SECRET>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/delete-provider.md b/examples/2.3.x/server-rust/examples/messaging/delete-provider.md new file mode 100644 index 000000000..9c6d65d0f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/delete-provider.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + messaging.delete_provider( + "<PROVIDER_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-rust/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..faf142559 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/delete-subscriber.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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_jwt("<YOUR_JWT>"); // Your secret JSON Web Token + + let messaging = Messaging::new(&client); + + messaging.delete_subscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/delete-topic.md b/examples/2.3.x/server-rust/examples/messaging/delete-topic.md new file mode 100644 index 000000000..e9384ce92 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/delete-topic.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + messaging.delete_topic( + "<TOPIC_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/delete.md b/examples/2.3.x/server-rust/examples/messaging/delete.md new file mode 100644 index 000000000..45530838a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + messaging.delete( + "<MESSAGE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/get-message.md b/examples/2.3.x/server-rust/examples/messaging/get-message.md new file mode 100644 index 000000000..c73f09070 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/get-message.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.get_message( + "<MESSAGE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/get-provider.md b/examples/2.3.x/server-rust/examples/messaging/get-provider.md new file mode 100644 index 000000000..be30b3a79 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/get-provider.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.get_provider( + "<PROVIDER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/get-subscriber.md b/examples/2.3.x/server-rust/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..5bd199452 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/get-subscriber.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.get_subscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/get-topic.md b/examples/2.3.x/server-rust/examples/messaging/get-topic.md new file mode 100644 index 000000000..bf3cdfff1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/get-topic.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.get_topic( + "<TOPIC_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/list-messages.md b/examples/2.3.x/server-rust/examples/messaging/list-messages.md new file mode 100644 index 000000000..2a8b10cb4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/list-messages.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.list_messages( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/list-providers.md b/examples/2.3.x/server-rust/examples/messaging/list-providers.md new file mode 100644 index 000000000..d49e39756 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/list-providers.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.list_providers( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/list-subscribers.md b/examples/2.3.x/server-rust/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..7bea96f97 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/list-subscribers.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.list_subscribers( + "<TOPIC_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/list-targets.md b/examples/2.3.x/server-rust/examples/messaging/list-targets.md new file mode 100644 index 000000000..c1c8ef44b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/list-targets.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.list_targets( + "<MESSAGE_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/list-topics.md b/examples/2.3.x/server-rust/examples/messaging/list-topics.md new file mode 100644 index 000000000..ec0d15aee --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/list-topics.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.list_topics( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..c6b5c9bee --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-apns-provider.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_apns_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<AUTH_KEY>"), // optional + Some("<AUTH_KEY_ID>"), // optional + Some("<TEAM_ID>"), // optional + Some("<BUNDLE_ID>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..ef0e371d9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_appwrite_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some(0), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..a7644b293 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-email.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_email( + "<MESSAGE_ID>", + 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 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-fcm-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..6739579a6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-fcm-provider.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_fcm_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some(serde_json::json!({})) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..60a710b60 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_mailgun_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some("<API_KEY>"), // optional + Some("example.com"), // optional + Some(false), // optional + Some(false), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("<REPLY_TO_EMAIL>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..64b167b2d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_msg91_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<TEMPLATE_ID>"), // optional + Some("<SENDER_ID>"), // optional + Some("<AUTH_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..00fdc77c0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-push.md @@ -0,0 +1,40 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_push( + "<MESSAGE_ID>", + 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 + Some("<ICON>"), // optional + Some("<SOUND>"), // optional + Some("<COLOR>"), // optional + Some("<TAG>"), // optional + Some(1), // optional + Some(false), // optional + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some(false), // optional + Some(false), // optional + Some(appwrite::enums::MessagePriority::Normal) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..28f63a6b4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-resend-provider.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_resend_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<API_KEY>"), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("<REPLY_TO_EMAIL>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..89be552df --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_sendgrid_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<API_KEY>"), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("<REPLY_TO_EMAIL>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..c7b44d097 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-ses-provider.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_ses_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<ACCESS_KEY>"), // optional + Some("<SECRET_KEY>"), // optional + Some("<REGION>"), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("<REPLY_TO_EMAIL>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..ede80793e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-sms.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_sms( + "<MESSAGE_ID>", + 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?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-smtp-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..0790c9db1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-smtp-provider.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_smtp_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some("<HOST>"), // optional + Some(1), // optional + Some("<USERNAME>"), // optional + Some("password"), // optional + Some(appwrite::enums::SmtpEncryption::None), // optional + Some(false), // optional + Some("<MAILER>"), // optional + Some("<FROM_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some("<REPLY_TO_EMAIL>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..6aafea8f9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-telesign-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_telesign_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<CUSTOMER_ID>"), // optional + Some("<API_KEY>"), // optional + Some("<FROM>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..d5ff9add7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_textmagic_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<USERNAME>"), // optional + Some("<API_KEY>"), // optional + Some("<FROM>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-topic.md b/examples/2.3.x/server-rust/examples/messaging/update-topic.md new file mode 100644 index 000000000..ddef2904b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-topic.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_topic( + "<TOPIC_ID>", + Some("<NAME>"), // optional + Some(vec!["any".into()]), // optional + Some(0), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..a9c7778d7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-twilio-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_twilio_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<ACCOUNT_SID>"), // optional + Some("<AUTH_TOKEN>"), // optional + Some("<FROM>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-rust/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..4ca9b38a5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/messaging/update-vonage-provider.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Messaging; + +#[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 messaging = Messaging::new(&client); + + let result = messaging.update_vonage_provider( + "<PROVIDER_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("<API_KEY>"), // optional + Some("<API_SECRET>"), // optional + Some("<FROM>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-rust/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..2b279cba0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/create-backup-policy.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.create_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>", + "<NAME>", + "", + 1, + Some("full"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/create-backup.md b/examples/2.3.x/server-rust/examples/mongo/create-backup.md new file mode 100644 index 000000000..70c484a46 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/create-backup.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.create_backup( + "<DATABASE_ID>", + Some("full") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/create-branch.md b/examples/2.3.x/server-rust/examples/mongo/create-branch.md new file mode 100644 index 000000000..c51087824 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/create-branch.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.create_branch( + "<DATABASE_ID>", + Some("<BRANCH_ID>"), // optional + Some(300) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/create-failover.md b/examples/2.3.x/server-rust/examples/mongo/create-failover.md new file mode 100644 index 000000000..d803e925a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/create-failover.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.create_failover( + "<DATABASE_ID>", + Some("<TARGET_REPLICA_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/create-migration.md b/examples/2.3.x/server-rust/examples/mongo/create-migration.md new file mode 100644 index 000000000..7cf12e566 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/create-migration.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.create_migration( + "<DATABASE_ID>", + "shared", + Some("<SPECIFICATION>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/create-restoration.md b/examples/2.3.x/server-rust/examples/mongo/create-restoration.md new file mode 100644 index 000000000..2e93a7a4d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/create-restoration.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.create_restoration( + "<DATABASE_ID>", + Some("backup"), // optional + Some("<BACKUP_ID>"), // optional + Some("<TARGET_DATABASE_ID>"), // optional + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/create-upgrade.md b/examples/2.3.x/server-rust/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..b57fc6817 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/create-upgrade.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.create_upgrade( + "<DATABASE_ID>", + "<TARGET_VERSION>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/create.md b/examples/2.3.x/server-rust/examples/mongo/create.md new file mode 100644 index 000000000..0a08eaaad --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/create.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.create( + "<DATABASE_ID>", + "<NAME>", + Some("17"), // optional + Some("<SPECIFICATION>"), // optional + Some(0), // optional + Some("async"), // optional + Some(60), // optional + Some(vec![]), // optional + Some(5), // optional + Some(false), // optional + Some(1), // optional + Some(false), // optional + Some(50), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-rust/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..05d5d2337 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/delete-backup-policy.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + mongo.delete_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/delete-backup.md b/examples/2.3.x/server-rust/examples/mongo/delete-backup.md new file mode 100644 index 000000000..b992f13ec --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/delete-backup.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + mongo.delete_backup( + "<DATABASE_ID>", + "<BACKUP_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/delete-branch.md b/examples/2.3.x/server-rust/examples/mongo/delete-branch.md new file mode 100644 index 000000000..27e9ad429 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/delete-branch.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.delete_branch( + "<DATABASE_ID>", + "<BRANCH_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/delete.md b/examples/2.3.x/server-rust/examples/mongo/delete.md new file mode 100644 index 000000000..3f9734f11 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + mongo.delete( + "<DATABASE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-rust/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..adccb824b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/get-backup-policy.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.get_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/get-backup.md b/examples/2.3.x/server-rust/examples/mongo/get-backup.md new file mode 100644 index 000000000..53de16c63 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/get-backup.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.get_backup( + "<DATABASE_ID>", + "<BACKUP_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/get-pitr.md b/examples/2.3.x/server-rust/examples/mongo/get-pitr.md new file mode 100644 index 000000000..2182b5b73 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/get-pitr.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.get_pitr( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/get-replicas.md b/examples/2.3.x/server-rust/examples/mongo/get-replicas.md new file mode 100644 index 000000000..cc94ec7a5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/get-replicas.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.get_replicas( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/get-restoration.md b/examples/2.3.x/server-rust/examples/mongo/get-restoration.md new file mode 100644 index 000000000..f1bc6e5f8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/get-restoration.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.get_restoration( + "<DATABASE_ID>", + "<RESTORATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/get-status.md b/examples/2.3.x/server-rust/examples/mongo/get-status.md new file mode 100644 index 000000000..727127122 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/get-status.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.get_status( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/get.md b/examples/2.3.x/server-rust/examples/mongo/get.md new file mode 100644 index 000000000..0daad14ac --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.get( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-rust/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..3e3d46138 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/list-backup-policies.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.list_backup_policies( + "<DATABASE_ID>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/list-backups.md b/examples/2.3.x/server-rust/examples/mongo/list-backups.md new file mode 100644 index 000000000..7b6d7ee64 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/list-backups.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.list_backups( + "<DATABASE_ID>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/list-branches.md b/examples/2.3.x/server-rust/examples/mongo/list-branches.md new file mode 100644 index 000000000..b276e17cf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/list-branches.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.list_branches( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/list-operations.md b/examples/2.3.x/server-rust/examples/mongo/list-operations.md new file mode 100644 index 000000000..07cabebf3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/list-operations.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.list_operations( + "<DATABASE_ID>", + Some("queued"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/list-restorations.md b/examples/2.3.x/server-rust/examples/mongo/list-restorations.md new file mode 100644 index 000000000..e45d1305a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/list-restorations.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.list_restorations( + "<DATABASE_ID>", + Some("pending"), // optional + Some("backup"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/list-specifications.md b/examples/2.3.x/server-rust/examples/mongo/list-specifications.md new file mode 100644 index 000000000..70838477a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/list-specifications.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.list_specifications().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/list.md b/examples/2.3.x/server-rust/examples/mongo/list.md new file mode 100644 index 000000000..935e886e4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/list.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.list( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-rust/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..ae7fe02cf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/update-backup-policy.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.update_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>", + Some("<NAME>"), // optional + Some(""), // optional + Some(1), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-rust/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..6fda5265b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/update-backup-storage.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.update_backup_storage( + "<DATABASE_ID>", + "s3", + "<BUCKET>", + "<ACCESS_KEY>", + "<SECRET_KEY>", + Some("<REGION>"), // optional + Some("<PREFIX>"), // optional + Some("<ENDPOINT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/update-credentials.md b/examples/2.3.x/server-rust/examples/mongo/update-credentials.md new file mode 100644 index 000000000..50ed2f678 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/update-credentials.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.update_credentials( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/update-maintenance.md b/examples/2.3.x/server-rust/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..b3cc19925 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/update-maintenance.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.update_maintenance( + "<DATABASE_ID>", + "sun", + 0 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mongo/update.md b/examples/2.3.x/server-rust/examples/mongo/update.md new file mode 100644 index 000000000..5d05c2037 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mongo/update.md @@ -0,0 +1,42 @@ +```rust +use appwrite::Client; +use appwrite::services::Mongo; + +#[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 mongo = Mongo::new(&client); + + let result = mongo.update( + "<DATABASE_ID>", + Some("<NAME>"), // optional + Some("ready"), // optional + Some("<SPECIFICATION>"), // optional + Some(0), // optional + Some("async"), // optional + Some(60), // optional + Some(vec![]), // optional + Some(5), // optional + Some(false), // optional + Some(1), // optional + Some(false), // optional + Some(50), // optional + Some(0), // optional + Some(0), // optional + Some(0), // optional + Some(false), // optional + Some(vec![]), // optional + Some(1), // optional + Some(1024), // optional + Some(1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-rust/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..199f45627 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create-backup-policy.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>", + "<NAME>", + "", + 1, + Some("full"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create-backup.md b/examples/2.3.x/server-rust/examples/mysql/create-backup.md new file mode 100644 index 000000000..d5dc08a21 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create-backup.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create_backup( + "<DATABASE_ID>", + Some("full") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create-branch.md b/examples/2.3.x/server-rust/examples/mysql/create-branch.md new file mode 100644 index 000000000..d6e9a38ca --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create-branch.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create_branch( + "<DATABASE_ID>", + Some("<BRANCH_ID>"), // optional + Some(300) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create-execution.md b/examples/2.3.x/server-rust/examples/mysql/create-execution.md new file mode 100644 index 000000000..4d42ef222 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create-execution.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create_execution( + "<DATABASE_ID>", + "<SQL>", + Some(serde_json::json!({})), // optional + Some(1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create-failover.md b/examples/2.3.x/server-rust/examples/mysql/create-failover.md new file mode 100644 index 000000000..61413bb2b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create-failover.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create_failover( + "<DATABASE_ID>", + Some("<TARGET_REPLICA_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create-migration.md b/examples/2.3.x/server-rust/examples/mysql/create-migration.md new file mode 100644 index 000000000..d7f641c2d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create-migration.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create_migration( + "<DATABASE_ID>", + "shared", + Some("<SPECIFICATION>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create-restoration.md b/examples/2.3.x/server-rust/examples/mysql/create-restoration.md new file mode 100644 index 000000000..f194175e8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create-restoration.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create_restoration( + "<DATABASE_ID>", + Some("backup"), // optional + Some("<BACKUP_ID>"), // optional + Some("<TARGET_DATABASE_ID>"), // optional + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create-upgrade.md b/examples/2.3.x/server-rust/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..b9530f375 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create-upgrade.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create_upgrade( + "<DATABASE_ID>", + "<TARGET_VERSION>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/create.md b/examples/2.3.x/server-rust/examples/mysql/create.md new file mode 100644 index 000000000..0b58058aa --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/create.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.create( + "<DATABASE_ID>", + "<NAME>", + Some("17"), // optional + Some("<SPECIFICATION>"), // optional + Some(0), // optional + Some("async"), // optional + Some(60), // optional + Some(vec![]), // optional + Some(5), // optional + Some(false), // optional + Some(1), // optional + Some(false), // optional + Some(50), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-rust/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..2e859af83 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/delete-backup-policy.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + mysql.delete_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/delete-backup.md b/examples/2.3.x/server-rust/examples/mysql/delete-backup.md new file mode 100644 index 000000000..40b6302cb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/delete-backup.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + mysql.delete_backup( + "<DATABASE_ID>", + "<BACKUP_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/delete-branch.md b/examples/2.3.x/server-rust/examples/mysql/delete-branch.md new file mode 100644 index 000000000..301c29fd2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/delete-branch.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.delete_branch( + "<DATABASE_ID>", + "<BRANCH_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/delete.md b/examples/2.3.x/server-rust/examples/mysql/delete.md new file mode 100644 index 000000000..ab8b4b924 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + mysql.delete( + "<DATABASE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-rust/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..2a93c6f77 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/get-backup-policy.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.get_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/get-backup.md b/examples/2.3.x/server-rust/examples/mysql/get-backup.md new file mode 100644 index 000000000..1b51767bf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/get-backup.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.get_backup( + "<DATABASE_ID>", + "<BACKUP_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/get-pitr.md b/examples/2.3.x/server-rust/examples/mysql/get-pitr.md new file mode 100644 index 000000000..1f60498e0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/get-pitr.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.get_pitr( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/get-pooler.md b/examples/2.3.x/server-rust/examples/mysql/get-pooler.md new file mode 100644 index 000000000..d9d5c2d99 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/get-pooler.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.get_pooler( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/get-replicas.md b/examples/2.3.x/server-rust/examples/mysql/get-replicas.md new file mode 100644 index 000000000..0522f7f3a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/get-replicas.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.get_replicas( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/get-restoration.md b/examples/2.3.x/server-rust/examples/mysql/get-restoration.md new file mode 100644 index 000000000..a70fc6643 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/get-restoration.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.get_restoration( + "<DATABASE_ID>", + "<RESTORATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/get-status.md b/examples/2.3.x/server-rust/examples/mysql/get-status.md new file mode 100644 index 000000000..bc8d63d1d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/get-status.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.get_status( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/get.md b/examples/2.3.x/server-rust/examples/mysql/get.md new file mode 100644 index 000000000..29db2d293 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.get( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-rust/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..81fda83a0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/list-backup-policies.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.list_backup_policies( + "<DATABASE_ID>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/list-backups.md b/examples/2.3.x/server-rust/examples/mysql/list-backups.md new file mode 100644 index 000000000..3fbc9a2bc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/list-backups.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.list_backups( + "<DATABASE_ID>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/list-branches.md b/examples/2.3.x/server-rust/examples/mysql/list-branches.md new file mode 100644 index 000000000..78dc3278f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/list-branches.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.list_branches( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/list-operations.md b/examples/2.3.x/server-rust/examples/mysql/list-operations.md new file mode 100644 index 000000000..e9e1c3538 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/list-operations.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.list_operations( + "<DATABASE_ID>", + Some("queued"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/list-restorations.md b/examples/2.3.x/server-rust/examples/mysql/list-restorations.md new file mode 100644 index 000000000..0150bf9b9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/list-restorations.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.list_restorations( + "<DATABASE_ID>", + Some("pending"), // optional + Some("backup"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/list-specifications.md b/examples/2.3.x/server-rust/examples/mysql/list-specifications.md new file mode 100644 index 000000000..1b1d41580 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/list-specifications.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.list_specifications().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/list.md b/examples/2.3.x/server-rust/examples/mysql/list.md new file mode 100644 index 000000000..d0eab0ada --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/list.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.list( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-rust/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..0953c2053 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/update-backup-policy.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.update_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>", + Some("<NAME>"), // optional + Some(""), // optional + Some(1), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-rust/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..ead9dcd2d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/update-backup-storage.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.update_backup_storage( + "<DATABASE_ID>", + "s3", + "<BUCKET>", + "<ACCESS_KEY>", + "<SECRET_KEY>", + Some("<REGION>"), // optional + Some("<PREFIX>"), // optional + Some("<ENDPOINT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/update-credentials.md b/examples/2.3.x/server-rust/examples/mysql/update-credentials.md new file mode 100644 index 000000000..cc8b16c1a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/update-credentials.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.update_credentials( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/update-maintenance.md b/examples/2.3.x/server-rust/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..e3f467a34 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/update-maintenance.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.update_maintenance( + "<DATABASE_ID>", + "sun", + 0 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/update-pooler.md b/examples/2.3.x/server-rust/examples/mysql/update-pooler.md new file mode 100644 index 000000000..6025e77bb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/update-pooler.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.update_pooler( + "<DATABASE_ID>", + Some("transaction"), // optional + Some(10), // optional + Some(1), // optional + Some(false), // optional + Some("<POOLER_CPU_REQUEST>"), // optional + Some("<POOLER_CPU_LIMIT>"), // optional + Some("<POOLER_MEMORY_REQUEST>"), // optional + Some("<POOLER_MEMORY_LIMIT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/mysql/update.md b/examples/2.3.x/server-rust/examples/mysql/update.md new file mode 100644 index 000000000..e2f1d1e80 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/mysql/update.md @@ -0,0 +1,42 @@ +```rust +use appwrite::Client; +use appwrite::services::Mysql; + +#[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 mysql = Mysql::new(&client); + + let result = mysql.update( + "<DATABASE_ID>", + Some("<NAME>"), // optional + Some("ready"), // optional + Some("<SPECIFICATION>"), // optional + Some(0), // optional + Some("async"), // optional + Some(60), // optional + Some(vec![]), // optional + Some(5), // optional + Some(false), // optional + Some(1), // optional + Some(false), // optional + Some(50), // optional + Some(0), // optional + Some(0), // optional + Some(0), // optional + Some(false), // optional + Some(vec![]), // optional + Some(1), // optional + Some(1024), // optional + Some(1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/approve.md b/examples/2.3.x/server-rust/examples/oauth2/approve.md new file mode 100644 index 000000000..ee6c1536a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/approve.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.approve( + "<GRANT_ID>", + Some("<AUTHORIZATION_DETAILS>"), // optional + Some("<SCOPE>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/authorize-post.md b/examples/2.3.x/server-rust/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..35fe767ce --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/authorize-post.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.authorize_post( + Some("<CLIENT_ID>"), // optional + Some("https://example.com"), // optional + Some(""), // optional + Some("<SCOPE>"), // optional + Some("<STATE>"), // optional + Some("<NONCE>"), // optional + Some("<CODE_CHALLENGE>"), // optional + Some("s256"), // optional + Some("<PROMPT>"), // optional + Some(0), // optional + Some("<AUTHORIZATION_DETAILS>"), // optional + Some(""), // optional + Some("<AUDIENCE>"), // optional + Some("<REQUEST_URI>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/authorize.md b/examples/2.3.x/server-rust/examples/oauth2/authorize.md new file mode 100644 index 000000000..b6358163b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/authorize.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.authorize( + Some("<CLIENT_ID>"), // optional + Some("https://example.com"), // optional + Some(""), // optional + Some("<SCOPE>"), // optional + Some("<STATE>"), // optional + Some("<NONCE>"), // optional + Some("<CODE_CHALLENGE>"), // optional + Some("s256"), // optional + Some("<PROMPT>"), // optional + Some(0), // optional + Some("<AUTHORIZATION_DETAILS>"), // optional + Some(""), // optional + Some("<AUDIENCE>"), // optional + Some("<REQUEST_URI>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-rust/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..9cc9da596 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/create-device-authorization.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.create_device_authorization( + Some("<CLIENT_ID>"), // optional + Some("<SCOPE>"), // optional + Some("<AUTHORIZATION_DETAILS>"), // optional + Some(""), // optional + Some("<AUDIENCE>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/create-grant.md b/examples/2.3.x/server-rust/examples/oauth2/create-grant.md new file mode 100644 index 000000000..6bf1198d0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/create-grant.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.create_grant( + "<USER_CODE>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/create-par.md b/examples/2.3.x/server-rust/examples/oauth2/create-par.md new file mode 100644 index 000000000..cd4998a55 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/create-par.md @@ -0,0 +1,34 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.create_par( + "<CLIENT_ID>", + "https://example.com", + "code", + Some("<SCOPE>"), // optional + Some("<STATE>"), // optional + Some("<NONCE>"), // optional + Some("<CODE_CHALLENGE>"), // optional + Some("s256"), // optional + Some("<PROMPT>"), // optional + Some(0), // optional + Some("<AUTHORIZATION_DETAILS>"), // optional + Some(""), // optional + Some("<AUDIENCE>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/create-token.md b/examples/2.3.x/server-rust/examples/oauth2/create-token.md new file mode 100644 index 000000000..21280de40 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/create-token.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.create_token( + "<GRANT_TYPE>", + Some("<CODE>"), // optional + Some("<REFRESH_TOKEN>"), // optional + Some("<DEVICE_CODE>"), // optional + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some("<CODE_VERIFIER>"), // optional + Some("https://example.com"), // optional + Some(""), // optional + Some("<AUDIENCE>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/get-grant.md b/examples/2.3.x/server-rust/examples/oauth2/get-grant.md new file mode 100644 index 000000000..8270c9375 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/get-grant.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.get_grant( + "<GRANT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/list-organizations.md b/examples/2.3.x/server-rust/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..6f3268603 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/list-organizations.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.list_organizations( + Some(1), // optional + Some(0), // optional + Some("<SEARCH>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/list-projects.md b/examples/2.3.x/server-rust/examples/oauth2/list-projects.md new file mode 100644 index 000000000..d21afc218 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/list-projects.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.list_projects( + Some(1), // optional + Some(0), // optional + Some("<SEARCH>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/reject.md b/examples/2.3.x/server-rust/examples/oauth2/reject.md new file mode 100644 index 000000000..645c41ddd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/reject.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.reject( + "<GRANT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/oauth2/revoke.md b/examples/2.3.x/server-rust/examples/oauth2/revoke.md new file mode 100644 index 000000000..638b47e83 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/revoke.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<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 oauth2 = Oauth2::new(&client); + + let result = oauth2.revoke( + "<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 new file mode 100644 index 000000000..b96765ba5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.create_ephemeral_project_key( + "<PROJECT_ID>", + vec![appwrite::enums::ProjectKeyScopes::ProjectRead], + 600 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/create-installation.md b/examples/2.3.x/server-rust/examples/organization/create-installation.md new file mode 100644 index 000000000..afdc154b8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/create-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box<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 organization = Organization::new(&client); + + let result = organization.create_installation( + "<APP_ID>", + Some("<AUTHORIZATION_DETAILS>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/create-membership.md b/examples/2.3.x/server-rust/examples/organization/create-membership.md new file mode 100644 index 000000000..7088bebab --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/create-membership.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.create_membership( + vec![], + Some("email@example.com"), // optional + Some("<USER_ID>"), // optional + Some("+12065550100"), // optional + Some("https://example.com"), // optional + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/create-project.md b/examples/2.3.x/server-rust/examples/organization/create-project.md new file mode 100644 index 000000000..a28464c4f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/create-project.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.create_project( + "<PROJECT_ID>", + "<NAME>", + Some(appwrite::enums::Region::Fra) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/delete-installation.md b/examples/2.3.x/server-rust/examples/organization/delete-installation.md new file mode 100644 index 000000000..af3dc97a0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/delete-installation.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + organization.delete_installation( + "<INSTALLATION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/delete-membership.md b/examples/2.3.x/server-rust/examples/organization/delete-membership.md new file mode 100644 index 000000000..22dd3bed6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/delete-membership.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + organization.delete_membership( + "<MEMBERSHIP_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/delete-project-key.md b/examples/2.3.x/server-rust/examples/organization/delete-project-key.md new file mode 100644 index 000000000..4f08719fe --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/delete-project-key.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + organization.delete_project_key( + "<PROJECT_ID>", + "<KEY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/delete-project.md b/examples/2.3.x/server-rust/examples/organization/delete-project.md new file mode 100644 index 000000000..8e8c9379a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/delete-project.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + organization.delete_project( + "<PROJECT_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/delete.md b/examples/2.3.x/server-rust/examples/organization/delete.md new file mode 100644 index 000000000..8f0de2de4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/delete.md @@ -0,0 +1,18 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + organization.delete().await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/get-installation.md b/examples/2.3.x/server-rust/examples/organization/get-installation.md new file mode 100644 index 000000000..3c8be8c84 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/get-installation.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box<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 organization = Organization::new(&client); + + let result = organization.get_installation( + "<INSTALLATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/get-membership.md b/examples/2.3.x/server-rust/examples/organization/get-membership.md new file mode 100644 index 000000000..8b9bf8704 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/get-membership.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.get_membership( + "<MEMBERSHIP_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/get-project-key.md b/examples/2.3.x/server-rust/examples/organization/get-project-key.md new file mode 100644 index 000000000..707dea495 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/get-project-key.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.get_project_key( + "<PROJECT_ID>", + "<KEY_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/get-project.md b/examples/2.3.x/server-rust/examples/organization/get-project.md new file mode 100644 index 000000000..3c1df1ef0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/get-project.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.get_project( + "<PROJECT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/get.md b/examples/2.3.x/server-rust/examples/organization/get.md new file mode 100644 index 000000000..20091c7c2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/get.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.get().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/list-installations.md b/examples/2.3.x/server-rust/examples/organization/list-installations.md new file mode 100644 index 000000000..a8a86f48f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/list-installations.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box<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 organization = Organization::new(&client); + + let result = organization.list_installations( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/list-memberships.md b/examples/2.3.x/server-rust/examples/organization/list-memberships.md new file mode 100644 index 000000000..cfd2363f4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/list-memberships.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.list_memberships( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/list-project-keys.md b/examples/2.3.x/server-rust/examples/organization/list-project-keys.md new file mode 100644 index 000000000..b7d1f5080 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/list-project-keys.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.list_project_keys( + "<PROJECT_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/list-projects.md b/examples/2.3.x/server-rust/examples/organization/list-projects.md new file mode 100644 index 000000000..13591a033 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/list-projects.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.list_projects( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/update-installation.md b/examples/2.3.x/server-rust/examples/organization/update-installation.md new file mode 100644 index 000000000..d76a5b9a2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/update-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box<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 organization = Organization::new(&client); + + let result = organization.update_installation( + "<INSTALLATION_ID>", + Some("<AUTHORIZATION_DETAILS>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/update-membership.md b/examples/2.3.x/server-rust/examples/organization/update-membership.md new file mode 100644 index 000000000..9d757562a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/update-membership.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.update_membership( + "<MEMBERSHIP_ID>", + vec![] + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..9da5f619e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/update-project-key.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.update_project_key( + "<PROJECT_ID>", + "<KEY_ID>", + "<NAME>", + vec![appwrite::enums::ProjectKeyScopes::ProjectRead], + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/update-project.md b/examples/2.3.x/server-rust/examples/organization/update-project.md new file mode 100644 index 000000000..036ecccb8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/update-project.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.update_project( + "<PROJECT_ID>", + "<NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/update.md b/examples/2.3.x/server-rust/examples/organization/update.md new file mode 100644 index 000000000..4d6e9dd0b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/organization/update.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[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 organization = Organization::new(&client); + + let result = organization.update( + "<NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-rust/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..db61e5b27 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-backup-policy.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>", + "<NAME>", + "", + 1, + Some("full"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-backup.md b/examples/2.3.x/server-rust/examples/postgresql/create-backup.md new file mode 100644 index 000000000..d4b1ee2cf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-backup.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_backup( + "<DATABASE_ID>", + Some("full") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-branch.md b/examples/2.3.x/server-rust/examples/postgresql/create-branch.md new file mode 100644 index 000000000..fc78e242b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-branch.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_branch( + "<DATABASE_ID>", + Some("<BRANCH_ID>"), // optional + Some(300) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-execution.md b/examples/2.3.x/server-rust/examples/postgresql/create-execution.md new file mode 100644 index 000000000..3c5bf0972 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-execution.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_execution( + "<DATABASE_ID>", + "<SQL>", + Some(serde_json::json!({})), // optional + Some(1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-extension.md b/examples/2.3.x/server-rust/examples/postgresql/create-extension.md new file mode 100644 index 000000000..b7a9cd778 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-extension.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_extension( + "<DATABASE_ID>", + "<NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-failover.md b/examples/2.3.x/server-rust/examples/postgresql/create-failover.md new file mode 100644 index 000000000..758cac349 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-failover.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_failover( + "<DATABASE_ID>", + Some("<TARGET_REPLICA_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-migration.md b/examples/2.3.x/server-rust/examples/postgresql/create-migration.md new file mode 100644 index 000000000..5c0b51590 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-migration.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_migration( + "<DATABASE_ID>", + "shared", + Some("<SPECIFICATION>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-restoration.md b/examples/2.3.x/server-rust/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..bac2e8576 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-restoration.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_restoration( + "<DATABASE_ID>", + Some("backup"), // optional + Some("<BACKUP_ID>"), // optional + Some("<TARGET_DATABASE_ID>"), // optional + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-rust/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..e1866b817 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create-upgrade.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create_upgrade( + "<DATABASE_ID>", + "<TARGET_VERSION>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/create.md b/examples/2.3.x/server-rust/examples/postgresql/create.md new file mode 100644 index 000000000..10e5409e4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/create.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.create( + "<DATABASE_ID>", + "<NAME>", + Some("17"), // optional + Some("<SPECIFICATION>"), // optional + Some(0), // optional + Some("async"), // optional + Some(60), // optional + Some(vec![]), // optional + Some(5), // optional + Some(false), // optional + Some(1), // optional + Some(false), // optional + Some(50), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-rust/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..4eeef5525 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + postgresql.delete_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/delete-backup.md b/examples/2.3.x/server-rust/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..f5ba8fd1a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/delete-backup.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + postgresql.delete_backup( + "<DATABASE_ID>", + "<BACKUP_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/delete-branch.md b/examples/2.3.x/server-rust/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..d3edb2853 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/delete-branch.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.delete_branch( + "<DATABASE_ID>", + "<BRANCH_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/delete-extension.md b/examples/2.3.x/server-rust/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..8678e6d13 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/delete-extension.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.delete_extension( + "<DATABASE_ID>", + "<EXTENSION_NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/delete.md b/examples/2.3.x/server-rust/examples/postgresql/delete.md new file mode 100644 index 000000000..8a966ce8c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + postgresql.delete( + "<DATABASE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-rust/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..49e7ef568 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/get-backup-policy.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.get_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/get-backup.md b/examples/2.3.x/server-rust/examples/postgresql/get-backup.md new file mode 100644 index 000000000..18c842330 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/get-backup.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.get_backup( + "<DATABASE_ID>", + "<BACKUP_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/get-pitr.md b/examples/2.3.x/server-rust/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..c5b02e1ea --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/get-pitr.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.get_pitr( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/get-pooler.md b/examples/2.3.x/server-rust/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..107c470f6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/get-pooler.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.get_pooler( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/get-replicas.md b/examples/2.3.x/server-rust/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..64e56d5b5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/get-replicas.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.get_replicas( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/get-restoration.md b/examples/2.3.x/server-rust/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..b7a9a2487 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/get-restoration.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.get_restoration( + "<DATABASE_ID>", + "<RESTORATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/get-status.md b/examples/2.3.x/server-rust/examples/postgresql/get-status.md new file mode 100644 index 000000000..36ac2c007 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/get-status.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.get_status( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/get.md b/examples/2.3.x/server-rust/examples/postgresql/get.md new file mode 100644 index 000000000..dd1a4fc29 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.get( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-rust/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..af798965c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/list-backup-policies.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.list_backup_policies( + "<DATABASE_ID>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/list-backups.md b/examples/2.3.x/server-rust/examples/postgresql/list-backups.md new file mode 100644 index 000000000..d0f6d6b4c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/list-backups.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.list_backups( + "<DATABASE_ID>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/list-branches.md b/examples/2.3.x/server-rust/examples/postgresql/list-branches.md new file mode 100644 index 000000000..58e705f8c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/list-branches.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.list_branches( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/list-extensions.md b/examples/2.3.x/server-rust/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..015f6762b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/list-extensions.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.list_extensions( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/list-operations.md b/examples/2.3.x/server-rust/examples/postgresql/list-operations.md new file mode 100644 index 000000000..aaec1a7f7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/list-operations.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.list_operations( + "<DATABASE_ID>", + Some("queued"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/list-restorations.md b/examples/2.3.x/server-rust/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..68971de90 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/list-restorations.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.list_restorations( + "<DATABASE_ID>", + Some("pending"), // optional + Some("backup"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/list-specifications.md b/examples/2.3.x/server-rust/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..88d9b7354 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/list-specifications.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.list_specifications().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/list.md b/examples/2.3.x/server-rust/examples/postgresql/list.md new file mode 100644 index 000000000..9aee99d7c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/list.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.list( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-rust/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..e59509ccd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/update-backup-policy.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.update_backup_policy( + "<DATABASE_ID>", + "<POLICY_ID>", + Some("<NAME>"), // optional + Some(""), // optional + Some(1), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-rust/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..a7c8cb34d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/update-backup-storage.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.update_backup_storage( + "<DATABASE_ID>", + "s3", + "<BUCKET>", + "<ACCESS_KEY>", + "<SECRET_KEY>", + Some("<REGION>"), // optional + Some("<PREFIX>"), // optional + Some("<ENDPOINT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/update-credentials.md b/examples/2.3.x/server-rust/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..7af609f58 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/update-credentials.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.update_credentials( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-rust/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..e07cdbfa4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/update-maintenance.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.update_maintenance( + "<DATABASE_ID>", + "sun", + 0 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/update-pooler.md b/examples/2.3.x/server-rust/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..fffe5aa37 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/update-pooler.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.update_pooler( + "<DATABASE_ID>", + Some("transaction"), // optional + Some(10), // optional + Some(1), // optional + Some(false), // optional + Some("<POOLER_CPU_REQUEST>"), // optional + Some("<POOLER_CPU_LIMIT>"), // optional + Some("<POOLER_MEMORY_REQUEST>"), // optional + Some("<POOLER_MEMORY_LIMIT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/postgresql/update.md b/examples/2.3.x/server-rust/examples/postgresql/update.md new file mode 100644 index 000000000..79d854aeb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/postgresql/update.md @@ -0,0 +1,42 @@ +```rust +use appwrite::Client; +use appwrite::services::Postgresql; + +#[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 postgresql = Postgresql::new(&client); + + let result = postgresql.update( + "<DATABASE_ID>", + Some("<NAME>"), // optional + Some("ready"), // optional + Some("<SPECIFICATION>"), // optional + Some(0), // optional + Some("async"), // optional + Some(60), // optional + Some(vec![]), // optional + Some(5), // optional + Some(false), // optional + Some(1), // optional + Some(false), // optional + Some(50), // optional + Some(0), // optional + Some(0), // optional + Some(0), // optional + Some(false), // optional + Some(vec![]), // optional + Some(1), // optional + Some(1024), // optional + Some(1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/presences/delete.md b/examples/2.3.x/server-rust/examples/presences/delete.md new file mode 100644 index 000000000..6802abd1f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/presences/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Presences; + +#[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 presences = Presences::new(&client); + + presences.delete( + "<PRESENCE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/presences/get.md b/examples/2.3.x/server-rust/examples/presences/get.md new file mode 100644 index 000000000..5bba380a3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/presences/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Presences; + +#[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 presences = Presences::new(&client); + + let result = presences.get( + "<PRESENCE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/presences/list.md b/examples/2.3.x/server-rust/examples/presences/list.md new file mode 100644 index 000000000..413209655 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/presences/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Presences; + +#[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 presences = Presences::new(&client); + + let result = presences.list( + Some(vec![]), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/presences/update.md b/examples/2.3.x/server-rust/examples/presences/update.md new file mode 100644 index 000000000..479bf78be --- /dev/null +++ b/examples/2.3.x/server-rust/examples/presences/update.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Presences; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 presences = Presences::new(&client); + + let result = presences.update( + "<PRESENCE_ID>", + "<USER_ID>", + Some("<STATUS>"), // optional + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/presences/upsert.md b/examples/2.3.x/server-rust/examples/presences/upsert.md new file mode 100644 index 000000000..e1d5745f4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/presences/upsert.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Presences; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 presences = Presences::new(&client); + + let result = presences.upsert( + "<PRESENCE_ID>", + "<USER_ID>", + "<STATUS>", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some(serde_json::json!({})) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/create-android-platform.md b/examples/2.3.x/server-rust/examples/project/create-android-platform.md new file mode 100644 index 000000000..98c013fe2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-android-platform.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.create_android_platform( + "<PLATFORM_ID>", + "<NAME>", + "<APPLICATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/create-apple-platform.md b/examples/2.3.x/server-rust/examples/project/create-apple-platform.md new file mode 100644 index 000000000..5c7f0c8aa --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-apple-platform.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.create_apple_platform( + "<PLATFORM_ID>", + "<NAME>", + "<BUNDLE_IDENTIFIER>" + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..93d1dc4a1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-ephemeral-key.md @@ -0,0 +1,23 @@ +```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.create_ephemeral_key( + vec![appwrite::enums::ProjectKeyScopes::ProjectRead], + 600 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/create-linux-platform.md b/examples/2.3.x/server-rust/examples/project/create-linux-platform.md new file mode 100644 index 000000000..be6274afe --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-linux-platform.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.create_linux_platform( + "<PLATFORM_ID>", + "<NAME>", + "<PACKAGE_NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/create-mock-phone.md b/examples/2.3.x/server-rust/examples/project/create-mock-phone.md new file mode 100644 index 000000000..f867b96f6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-mock-phone.md @@ -0,0 +1,23 @@ +```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.create_mock_phone( + "+12065550100", + "<OTP>" + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..cb5f2ceda --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-smtp-test.md @@ -0,0 +1,20 @@ +```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); + + project.create_smtp_test( + vec![] + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/create-variable.md b/examples/2.3.x/server-rust/examples/project/create-variable.md new file mode 100644 index 000000000..39356ece3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-variable.md @@ -0,0 +1,25 @@ +```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.create_variable( + "<VARIABLE_ID>", + "<KEY>", + "<VALUE>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/create-web-platform.md b/examples/2.3.x/server-rust/examples/project/create-web-platform.md new file mode 100644 index 000000000..07e13a747 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-web-platform.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.create_web_platform( + "<PLATFORM_ID>", + "<NAME>", + "app.example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/create-windows-platform.md b/examples/2.3.x/server-rust/examples/project/create-windows-platform.md new file mode 100644 index 000000000..0921cf898 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/create-windows-platform.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.create_windows_platform( + "<PLATFORM_ID>", + "<NAME>", + "<PACKAGE_IDENTIFIER_NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/delete-key.md b/examples/2.3.x/server-rust/examples/project/delete-key.md new file mode 100644 index 000000000..e0ff21281 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/delete-key.md @@ -0,0 +1,20 @@ +```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); + + project.delete_key( + "<KEY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/delete-mock-phone.md b/examples/2.3.x/server-rust/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..f3b8744be --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/delete-mock-phone.md @@ -0,0 +1,20 @@ +```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); + + project.delete_mock_phone( + "+12065550100" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/delete-platform.md b/examples/2.3.x/server-rust/examples/project/delete-platform.md new file mode 100644 index 000000000..335ab49e5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/delete-platform.md @@ -0,0 +1,20 @@ +```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); + + project.delete_platform( + "<PLATFORM_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/delete-variable.md b/examples/2.3.x/server-rust/examples/project/delete-variable.md new file mode 100644 index 000000000..dc79ce977 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/delete-variable.md @@ -0,0 +1,20 @@ +```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); + + project.delete_variable( + "<VARIABLE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/delete.md b/examples/2.3.x/server-rust/examples/project/delete.md new file mode 100644 index 000000000..aef1dcf76 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/delete.md @@ -0,0 +1,18 @@ +```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); + + project.delete().await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/get-email-template.md b/examples/2.3.x/server-rust/examples/project/get-email-template.md new file mode 100644 index 000000000..b163f0f41 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/get-email-template.md @@ -0,0 +1,23 @@ +```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.get_email_template( + appwrite::enums::ProjectEmailTemplateId::Verification, + Some(appwrite::enums::ProjectEmailTemplateLocale::Af) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/get-key.md b/examples/2.3.x/server-rust/examples/project/get-key.md new file mode 100644 index 000000000..61d58e894 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/get-key.md @@ -0,0 +1,22 @@ +```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.get_key( + "<KEY_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/get-mock-phone.md b/examples/2.3.x/server-rust/examples/project/get-mock-phone.md new file mode 100644 index 000000000..1c44f0729 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/get-mock-phone.md @@ -0,0 +1,22 @@ +```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.get_mock_phone( + "+12065550100" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-rust/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..ea5dd53bc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,22 @@ +```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.get_o_auth2_provider( + appwrite::enums::ProjectOAuthProviderId::Amazon + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/get-platform.md b/examples/2.3.x/server-rust/examples/project/get-platform.md new file mode 100644 index 000000000..559fb7309 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/get-platform.md @@ -0,0 +1,22 @@ +```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.get_platform( + "<PLATFORM_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/get-policy.md b/examples/2.3.x/server-rust/examples/project/get-policy.md new file mode 100644 index 000000000..53781fb9b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/get-policy.md @@ -0,0 +1,22 @@ +```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.get_policy( + appwrite::enums::ProjectPolicyId::PasswordDictionary + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/get-variable.md b/examples/2.3.x/server-rust/examples/project/get-variable.md new file mode 100644 index 000000000..b86d29f2a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/get-variable.md @@ -0,0 +1,22 @@ +```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.get_variable( + "<VARIABLE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/get.md b/examples/2.3.x/server-rust/examples/project/get.md new file mode 100644 index 000000000..5c249b48e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/get.md @@ -0,0 +1,20 @@ +```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.get().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/list-email-templates.md b/examples/2.3.x/server-rust/examples/project/list-email-templates.md new file mode 100644 index 000000000..edbaf99f8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/list-email-templates.md @@ -0,0 +1,23 @@ +```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.list_email_templates( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/list-keys.md b/examples/2.3.x/server-rust/examples/project/list-keys.md new file mode 100644 index 000000000..9d8031704 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/list-keys.md @@ -0,0 +1,23 @@ +```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.list_keys( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/list-mock-phones.md b/examples/2.3.x/server-rust/examples/project/list-mock-phones.md new file mode 100644 index 000000000..4057971d9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/list-mock-phones.md @@ -0,0 +1,23 @@ +```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.list_mock_phones( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-rust/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..e2bc1c7e6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,23 @@ +```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.list_o_auth2_providers( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/list-platforms.md b/examples/2.3.x/server-rust/examples/project/list-platforms.md new file mode 100644 index 000000000..effb3c377 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/list-platforms.md @@ -0,0 +1,23 @@ +```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.list_platforms( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/list-policies.md b/examples/2.3.x/server-rust/examples/project/list-policies.md new file mode 100644 index 000000000..3abb2ab69 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/list-policies.md @@ -0,0 +1,23 @@ +```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.list_policies( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/list-variables.md b/examples/2.3.x/server-rust/examples/project/list-variables.md new file mode 100644 index 000000000..75c3b61f5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/list-variables.md @@ -0,0 +1,23 @@ +```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.list_variables( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-android-platform.md b/examples/2.3.x/server-rust/examples/project/update-android-platform.md new file mode 100644 index 000000000..4240a36d0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-android-platform.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_android_platform( + "<PLATFORM_ID>", + "<NAME>", + "<APPLICATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-apple-platform.md b/examples/2.3.x/server-rust/examples/project/update-apple-platform.md new file mode 100644 index 000000000..9034653b9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-apple-platform.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_apple_platform( + "<PLATFORM_ID>", + "<NAME>", + "<BUNDLE_IDENTIFIER>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-auth-method.md b/examples/2.3.x/server-rust/examples/project/update-auth-method.md new file mode 100644 index 000000000..7b8bd77ba --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-auth-method.md @@ -0,0 +1,23 @@ +```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_auth_method( + appwrite::enums::ProjectAuthMethodId::EmailPassword, + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-rust/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..27609f346 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-deny-aliased-email-policy.md @@ -0,0 +1,22 @@ +```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_deny_aliased_email_policy( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-rust/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..1701cd547 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-deny-corporate-email-policy.md @@ -0,0 +1,22 @@ +```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_deny_corporate_email_policy( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-rust/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..95b145912 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-deny-disposable-email-policy.md @@ -0,0 +1,22 @@ +```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_deny_disposable_email_policy( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-rust/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..03b57cb36 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-deny-free-email-policy.md @@ -0,0 +1,22 @@ +```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_deny_free_email_policy( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-email-template.md b/examples/2.3.x/server-rust/examples/project/update-email-template.md new file mode 100644 index 000000000..4ec7ce96e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-email-template.md @@ -0,0 +1,29 @@ +```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_email_template( + appwrite::enums::ProjectEmailTemplateId::Verification, + Some(appwrite::enums::ProjectEmailTemplateLocale::Af), // optional + Some("<SUBJECT>"), // optional + Some("<MESSAGE>"), // optional + Some("<SENDER_NAME>"), // optional + Some("email@example.com"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>") // optional + ).await?; + + let _ = result; + + 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 new file mode 100644 index 000000000..12b0282ab --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-key.md @@ -0,0 +1,25 @@ +```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_key( + "<KEY_ID>", + "<NAME>", + vec![appwrite::enums::ProjectKeyScopes::ProjectRead], + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..541993e9a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-labels.md @@ -0,0 +1,22 @@ +```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_labels( + vec![] + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-linux-platform.md b/examples/2.3.x/server-rust/examples/project/update-linux-platform.md new file mode 100644 index 000000000..4d0c98353 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-linux-platform.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_linux_platform( + "<PLATFORM_ID>", + "<NAME>", + "<PACKAGE_NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-rust/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..42f9faec8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,27 @@ +```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_membership_privacy_policy( + Some(false), // optional + Some(false), // optional + Some(false), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-rust/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..c8613f0a1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-mfa-factors-policy.md @@ -0,0 +1,25 @@ +```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_mfa_factors_policy( + Some(false), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-mock-phone.md b/examples/2.3.x/server-rust/examples/project/update-mock-phone.md new file mode 100644 index 000000000..cd55b55b3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-mock-phone.md @@ -0,0 +1,23 @@ +```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_mock_phone( + "+12065550100", + "<OTP>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..4c02d8b5d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-amazon.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_amazon( + 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-apple.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..5ae49edf5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-apple.md @@ -0,0 +1,28 @@ +```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_apple( + Some("<SERVICE_ID>"), // optional + Some("<KEY_ID>"), // optional + Some("<TEAM_ID>"), // optional + Some("<P8_FILE>"), // optional + Some(vec![]), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..0ed17eb65 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-appwrite.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_appwrite( + 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-auth-0.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..811a8c8fc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-auth-0.md @@ -0,0 +1,25 @@ +```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_auth0( + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some("<ENDPOINT>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..a4566e112 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-authentik.md @@ -0,0 +1,25 @@ +```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_authentik( + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some("<ENDPOINT>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..62ad0944c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-autodesk.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_autodesk( + 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-bitbucket.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..30791180a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-bitbucket.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_bitbucket( + Some("<KEY>"), // optional + Some("<SECRET>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..212d49fb2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-bitly.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_bitly( + 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-box.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..3a463f299 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-box.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_box( + 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-cloudflare.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..52f74a114 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-cloudflare.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_cloudflare( + 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-dailymotion.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..e46a0f18f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-dailymotion.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_dailymotion( + Some("<API_KEY>"), // optional + Some("<API_SECRET>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..783c9b8ab --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-discord.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_discord( + 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-disqus.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..4476bf26e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-disqus.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_disqus( + Some("<PUBLIC_KEY>"), // optional + Some("<SECRET_KEY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..49458db76 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-dropbox.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_dropbox( + Some("<APP_KEY>"), // optional + Some("<APP_SECRET>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..09ab588e5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-etsy.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_etsy( + Some("<KEY_STRING>"), // optional + Some("<SHARED_SECRET>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..424cdff2a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-facebook.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_facebook( + Some("<APP_ID>"), // optional + Some("<APP_SECRET>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..5f5a34916 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-figma.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_figma( + 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-fusion-auth.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..e1a73144c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-fusion-auth.md @@ -0,0 +1,25 @@ +```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_fusion_auth( + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some("<ENDPOINT>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..be26e71dd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-git-hub.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_git_hub( + 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-gitlab.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..23fab7e4e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-gitlab.md @@ -0,0 +1,25 @@ +```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_gitlab( + Some("<APPLICATION_ID>"), // optional + Some("<SECRET>"), // optional + Some("https://example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..a043cc8c0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-google.md @@ -0,0 +1,27 @@ +```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_google( + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2GooglePrompt::None]), // optional + Some(vec![]), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..275e2d972 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-hugging-face.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_hugging_face( + 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-kakao.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..a4f075cc9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kakao.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_kakao( + 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-keycloak.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..89ae292af --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,26 @@ +```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_keycloak( + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some("<ENDPOINT>"), // optional + Some("<REALM_NAME>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..56aedb478 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kick.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_kick( + 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-linkedin.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..8f864a3f0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-linkedin.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_linkedin( + Some("<CLIENT_ID>"), // optional + Some("<PRIMARY_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-microsoft.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-microsoft.md new file mode 100644 index 000000000..f32216e4b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-microsoft.md @@ -0,0 +1,25 @@ +```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_microsoft( + Some("<APPLICATION_ID>"), // optional + Some("<APPLICATION_SECRET>"), // optional + Some("<TENANT>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..84642ef72 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-notion.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_notion( + Some("<OAUTH_CLIENT_ID>"), // optional + Some("<OAUTH_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-oidc.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..bc607cea4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,30 @@ +```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_oidc( + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(vec![appwrite::enums::ProjectOAuth2OidcPrompt::None]), // optional + Some(0), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..527310412 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,26 @@ +```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_okta( + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some("example.com"), // optional + Some("<AUTHORIZATION_SERVER_ID>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..a260d7d9e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-paypal-sandbox.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_paypal_sandbox( + Some("<CLIENT_ID>"), // optional + Some("<SECRET_KEY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..8a296877a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-paypal.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_paypal( + Some("<CLIENT_ID>"), // optional + Some("<SECRET_KEY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..141c517ba --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-podio.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_podio( + 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-resend.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..5a9e36f72 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-resend.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_resend( + 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-salesforce.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..dd41c0a9b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-salesforce.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_salesforce( + Some("<CUSTOMER_KEY>"), // optional + Some("<CUSTOMER_SECRET>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..602e37957 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-server.md @@ -0,0 +1,37 @@ +```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_server( + false, + "https://example.com", + Some(vec![]), // optional + Some(vec![]), // optional + Some(60), // optional + Some(60), // optional + Some(60), // optional + Some(60), // optional + Some(60), // optional + Some(false), // optional + Some("https://example.com"), // optional + Some(6), // optional + Some("numeric"), // optional + Some(60), // optional + Some(vec![]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..60fa98300 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-slack.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_slack( + 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-spotify.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..ac7af69db --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-spotify.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_spotify( + 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-stripe.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..993f2164c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-stripe.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_stripe( + Some("<CLIENT_ID>"), // optional + Some("<API_SECRET_KEY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..8eec70c25 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-tik-tok.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_tik_tok( + 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-tradeshift-sandbox.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..5804af8fa --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-tradeshift-sandbox.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_tradeshift_sandbox( + Some("<OAUTH2_CLIENT_ID>"), // optional + Some("<OAUTH2_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-tradeshift.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..37bc1145f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-tradeshift.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_tradeshift( + Some("<OAUTH2_CLIENT_ID>"), // optional + Some("<OAUTH2_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-twitch.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..e238d7630 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-twitch.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_twitch( + 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-word-press.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..808c156a6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-word-press.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_word_press( + 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-yahoo.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..c75ae753a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-yahoo.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_yahoo( + 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-yandex.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..b5b82d3a1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-yandex.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_yandex( + 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 new file mode 100644 index 000000000..62ac858e2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-zoho.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_zoho( + 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-zoom.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..225ed8773 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-zoom.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_zoom( + 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-2x.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..b8c02abdf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2x.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_x( + Some("<CUSTOMER_KEY>"), // optional + Some("<SECRET_KEY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-rust/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..2c01878a8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,22 @@ +```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_password_dictionary_policy( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-password-history-policy.md b/examples/2.3.x/server-rust/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..1b884806d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-password-history-policy.md @@ -0,0 +1,22 @@ +```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_password_history_policy( + Some(1) + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-rust/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..fc0cb39b2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,22 @@ +```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_password_personal_data_policy( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-rust/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..b3a2a6ef5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-password-pwned-policy.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_password_pwned_policy( + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-rust/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..dc1b12806 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-password-strength-policy.md @@ -0,0 +1,26 @@ +```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_password_strength_policy( + Some(8), // optional + Some(false), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-protocol.md b/examples/2.3.x/server-rust/examples/project/update-protocol.md new file mode 100644 index 000000000..935b832e3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-protocol.md @@ -0,0 +1,23 @@ +```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_protocol( + appwrite::enums::ProjectProtocolId::Rest, + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-service.md b/examples/2.3.x/server-rust/examples/project/update-service.md new file mode 100644 index 000000000..3e69a585b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-service.md @@ -0,0 +1,23 @@ +```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_service( + appwrite::enums::ProjectServiceId::Account, + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-rust/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..cd67b887f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-session-alert-policy.md @@ -0,0 +1,22 @@ +```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_session_alert_policy( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-rust/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..6a92c036c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-session-duration-policy.md @@ -0,0 +1,22 @@ +```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_session_duration_policy( + 60 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-rust/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..8c275b30d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,22 @@ +```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_session_invalidation_policy( + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-rust/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..fd958cf0a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-session-limit-policy.md @@ -0,0 +1,22 @@ +```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_session_limit_policy( + 1 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-smtp.md b/examples/2.3.x/server-rust/examples/project/update-smtp.md new file mode 100644 index 000000000..d4fa577e1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-smtp.md @@ -0,0 +1,31 @@ +```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_smtp( + Some("example.com"), // optional + Some(587), // optional + Some("<USERNAME>"), // optional + Some("password"), // optional + Some("email@example.com"), // optional + Some("<SENDER_NAME>"), // optional + Some("email@example.com"), // optional + Some("<REPLY_TO_NAME>"), // optional + Some(appwrite::enums::ProjectSMTPSecure::Tls), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-rust/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..b2b0419c7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-user-limit-policy.md @@ -0,0 +1,22 @@ +```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_user_limit_policy( + Some(0) + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-variable.md b/examples/2.3.x/server-rust/examples/project/update-variable.md new file mode 100644 index 000000000..21b4eac31 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-variable.md @@ -0,0 +1,25 @@ +```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_variable( + "<VARIABLE_ID>", + Some("<KEY>"), // optional + Some("<VALUE>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-web-platform.md b/examples/2.3.x/server-rust/examples/project/update-web-platform.md new file mode 100644 index 000000000..f5d44ea82 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-web-platform.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_web_platform( + "<PLATFORM_ID>", + "<NAME>", + "app.example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-windows-platform.md b/examples/2.3.x/server-rust/examples/project/update-windows-platform.md new file mode 100644 index 000000000..ea73c85e4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-windows-platform.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_windows_platform( + "<PLATFORM_ID>", + "<NAME>", + "<PACKAGE_IDENTIFIER_NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/create-api-rule.md b/examples/2.3.x/server-rust/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..50d03218f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/create-api-rule.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + let result = proxy.create_api_rule( + "example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/create-function-rule.md b/examples/2.3.x/server-rust/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..c2ef9ce16 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/create-function-rule.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + let result = proxy.create_function_rule( + "example.com", + "<FUNCTION_ID>", + Some("<BRANCH>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/create-invalidation.md b/examples/2.3.x/server-rust/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..ba4b1aa04 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/create-invalidation.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + let result = proxy.create_invalidation( + "example.com", + appwrite::enums::InvalidationType::Tag, + Some("<REFERENCE>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-rust/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..bb5a8a728 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/create-redirect-rule.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + let result = proxy.create_redirect_rule( + "example.com", + "https://example.com", + appwrite::enums::StatusCode::MovedPermanently, + "<RESOURCE_ID>", + appwrite::enums::ProxyResourceType::Site + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/create-site-rule.md b/examples/2.3.x/server-rust/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..7c1483868 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/create-site-rule.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + let result = proxy.create_site_rule( + "example.com", + "<SITE_ID>", + Some("<BRANCH>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/delete-rule.md b/examples/2.3.x/server-rust/examples/proxy/delete-rule.md new file mode 100644 index 000000000..485df0252 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/delete-rule.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + proxy.delete_rule( + "<RULE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/get-rule.md b/examples/2.3.x/server-rust/examples/proxy/get-rule.md new file mode 100644 index 000000000..4609619af --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/get-rule.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + let result = proxy.get_rule( + "<RULE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/list-rules.md b/examples/2.3.x/server-rust/examples/proxy/list-rules.md new file mode 100644 index 000000000..400963fdf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/list-rules.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + let result = proxy.list_rules( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/proxy/update-rule-status.md b/examples/2.3.x/server-rust/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..0651b48bf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/proxy/update-rule-status.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Proxy; + +#[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 proxy = Proxy::new(&client); + + let result = proxy.update_rule_status( + "<RULE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/create-deployment.md b/examples/2.3.x/server-rust/examples/sites/create-deployment.md new file mode 100644 index 000000000..9bec31f56 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/create-deployment.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; +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_key("<YOUR_API_KEY>"); // Your secret API key + + let sites = Sites::new(&client); + + let code = InputFile::from_path("path/to/file.png", None).await?; + + let result = sites.create_deployment( + "<SITE_ID>", + code, + Some("<INSTALL_COMMAND>"), // optional + Some("<BUILD_COMMAND>"), // optional + Some("<OUTPUT_DIRECTORY>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-rust/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..802e36359 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.create_duplicate_deployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/create-template-deployment.md b/examples/2.3.x/server-rust/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..b5f1716de --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/create-template-deployment.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.create_template_deployment( + "<SITE_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + appwrite::enums::TemplateReferenceType::Branch, + "<REFERENCE>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/create-variable.md b/examples/2.3.x/server-rust/examples/sites/create-variable.md new file mode 100644 index 000000000..873c562a0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/create-variable.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.create_variable( + "<SITE_ID>", + "<VARIABLE_ID>", + "<KEY>", + "<VALUE>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-rust/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..9032a437e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/create-vcs-deployment.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.create_vcs_deployment( + "<SITE_ID>", + appwrite::enums::VCSReferenceType::Branch, + "<REFERENCE>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/create.md b/examples/2.3.x/server-rust/examples/sites/create.md new file mode 100644 index 000000000..5f4c33476 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/create.md @@ -0,0 +1,45 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.create( + "<SITE_ID>", + "<NAME>", + appwrite::enums::Framework::Analog, + appwrite::enums::BuildRuntime::Node145, + Some(false), // optional + Some(false), // optional + Some(1), // optional + Some("<INSTALL_COMMAND>"), // optional + Some("<BUILD_COMMAND>"), // optional + Some("<START_COMMAND>"), // optional + Some("<OUTPUT_DIRECTORY>"), // optional + Some(appwrite::enums::Adapter::Static), // optional + Some("<INSTALLATION_ID>"), // optional + Some("<FALLBACK_FILE>"), // optional + Some("<PROVIDER_REPOSITORY_ID>"), // optional + Some("<PROVIDER_BRANCH>"), // optional + Some(false), // optional + Some("<PROVIDER_ROOT_DIRECTORY>"), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("s-1vcpu-512mb"), // optional + Some("s-1vcpu-512mb"), // optional + Some(0), // optional + Some(vec![appwrite::enums::ProjectKeyScopes::ProjectRead]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/delete-deployment.md b/examples/2.3.x/server-rust/examples/sites/delete-deployment.md new file mode 100644 index 000000000..6b3e01a2e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/delete-deployment.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + sites.delete_deployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/delete-log.md b/examples/2.3.x/server-rust/examples/sites/delete-log.md new file mode 100644 index 000000000..d837d4edc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/delete-log.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + sites.delete_log( + "<SITE_ID>", + "<LOG_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/delete-variable.md b/examples/2.3.x/server-rust/examples/sites/delete-variable.md new file mode 100644 index 000000000..83e2e545d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/delete-variable.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + sites.delete_variable( + "<SITE_ID>", + "<VARIABLE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/delete.md b/examples/2.3.x/server-rust/examples/sites/delete.md new file mode 100644 index 000000000..f39237603 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + sites.delete( + "<SITE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/get-deployment-download.md b/examples/2.3.x/server-rust/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..925c03507 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/get-deployment-download.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.get_deployment_download( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + Some(appwrite::enums::DeploymentDownloadType::Source), // optional + Some("<TOKEN>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/get-deployment.md b/examples/2.3.x/server-rust/examples/sites/get-deployment.md new file mode 100644 index 000000000..5b258c78f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/get-deployment.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.get_deployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/get-log.md b/examples/2.3.x/server-rust/examples/sites/get-log.md new file mode 100644 index 000000000..6cfff4f98 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/get-log.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.get_log( + "<SITE_ID>", + "<LOG_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/get-variable.md b/examples/2.3.x/server-rust/examples/sites/get-variable.md new file mode 100644 index 000000000..6fa109bf4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/get-variable.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.get_variable( + "<SITE_ID>", + "<VARIABLE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/get.md b/examples/2.3.x/server-rust/examples/sites/get.md new file mode 100644 index 000000000..ec7cbb815 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.get( + "<SITE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/list-deployments.md b/examples/2.3.x/server-rust/examples/sites/list-deployments.md new file mode 100644 index 000000000..712b53e12 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/list-deployments.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.list_deployments( + "<SITE_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..1252124c9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/list-frameworks.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.list_frameworks().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/list-logs.md b/examples/2.3.x/server-rust/examples/sites/list-logs.md new file mode 100644 index 000000000..8ff3b46d5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/list-logs.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.list_logs( + "<SITE_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..4736fb7ca --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/list-specifications.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.list_specifications( + Some("runtimes") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/list-variables.md b/examples/2.3.x/server-rust/examples/sites/list-variables.md new file mode 100644 index 000000000..5bc1c9b16 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/list-variables.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.list_variables( + "<SITE_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/list.md b/examples/2.3.x/server-rust/examples/sites/list.md new file mode 100644 index 000000000..e98928c78 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.list( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/update-deployment-status.md b/examples/2.3.x/server-rust/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..bae9438fc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/update-deployment-status.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.update_deployment_status( + "<SITE_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/update-site-deployment.md b/examples/2.3.x/server-rust/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..9fef04f88 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/update-site-deployment.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.update_site_deployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/update-variable.md b/examples/2.3.x/server-rust/examples/sites/update-variable.md new file mode 100644 index 000000000..9ecbfd8b7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/update-variable.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.update_variable( + "<SITE_ID>", + "<VARIABLE_ID>", + Some("<KEY>"), // optional + Some("<VALUE>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/sites/update.md b/examples/2.3.x/server-rust/examples/sites/update.md new file mode 100644 index 000000000..24eaea17f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/sites/update.md @@ -0,0 +1,45 @@ +```rust +use appwrite::Client; +use appwrite::services::Sites; + +#[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 sites = Sites::new(&client); + + let result = sites.update( + "<SITE_ID>", + "<NAME>", + appwrite::enums::Framework::Analog, + Some(false), // optional + Some(false), // optional + Some(1), // optional + Some("<INSTALL_COMMAND>"), // optional + Some("<BUILD_COMMAND>"), // optional + Some("<START_COMMAND>"), // optional + Some("<OUTPUT_DIRECTORY>"), // optional + Some(appwrite::enums::BuildRuntime::Node145), // optional + Some(appwrite::enums::Adapter::Static), // optional + Some("<FALLBACK_FILE>"), // optional + Some("<INSTALLATION_ID>"), // optional + Some("<PROVIDER_REPOSITORY_ID>"), // optional + Some("<PROVIDER_BRANCH>"), // optional + Some(false), // optional + Some("<PROVIDER_ROOT_DIRECTORY>"), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("s-1vcpu-512mb"), // optional + Some("s-1vcpu-512mb"), // optional + Some(0), // optional + Some(vec![appwrite::enums::ProjectKeyScopes::ProjectRead]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/create-bucket.md b/examples/2.3.x/server-rust/examples/storage/create-bucket.md new file mode 100644 index 000000000..939e4b517 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/create-bucket.md @@ -0,0 +1,34 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 storage = Storage::new(&client); + + let result = storage.create_bucket( + "<BUCKET_ID>", + "<NAME>", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(1), // optional + Some(vec![]), // optional + Some(appwrite::enums::Compression::None), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/create-file.md b/examples/2.3.x/server-rust/examples/storage/create-file.md new file mode 100644 index 000000000..882803cc6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/create-file.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; +use appwrite::InputFile; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 storage = Storage::new(&client); + + let file = InputFile::from_path("path/to/file.png", None).await?; + + let result = storage.create_file( + "<BUCKET_ID>", + "<FILE_ID>", + file, + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("photos/2026") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/delete-bucket.md b/examples/2.3.x/server-rust/examples/storage/delete-bucket.md new file mode 100644 index 000000000..dfd3fe95d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/delete-bucket.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + storage.delete_bucket( + "<BUCKET_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/delete-file.md b/examples/2.3.x/server-rust/examples/storage/delete-file.md new file mode 100644 index 000000000..960aa86c0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/delete-file.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + storage.delete_file( + "<BUCKET_ID>", + "<FILE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/get-bucket.md b/examples/2.3.x/server-rust/examples/storage/get-bucket.md new file mode 100644 index 000000000..a1f6b3359 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/get-bucket.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + let result = storage.get_bucket( + "<BUCKET_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/get-file-download.md b/examples/2.3.x/server-rust/examples/storage/get-file-download.md new file mode 100644 index 000000000..1119b18fe --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/get-file-download.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + let result = storage.get_file_download( + "<BUCKET_ID>", + "<FILE_ID>", + Some("<TOKEN>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/get-file-preview.md b/examples/2.3.x/server-rust/examples/storage/get-file-preview.md new file mode 100644 index 000000000..3246e90fa --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/get-file-preview.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + let result = storage.get_file_preview( + "<BUCKET_ID>", + "<FILE_ID>", + Some(0), // optional + Some(0), // optional + Some(appwrite::enums::ImageGravity::Auto), // optional + Some(-1), // optional + Some(0), // optional + Some("FFFFFF"), // optional + Some(0), // optional + Some(0), // optional + Some(-360), // optional + Some("FFFFFF"), // optional + Some(appwrite::enums::ImageFormat::Jpg), // optional + Some("<TOKEN>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/get-file-view.md b/examples/2.3.x/server-rust/examples/storage/get-file-view.md new file mode 100644 index 000000000..01079108b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/get-file-view.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + let result = storage.get_file_view( + "<BUCKET_ID>", + "<FILE_ID>", + Some("<TOKEN>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/get-file.md b/examples/2.3.x/server-rust/examples/storage/get-file.md new file mode 100644 index 000000000..35de19dce --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/get-file.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + let result = storage.get_file( + "<BUCKET_ID>", + "<FILE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/list-buckets.md b/examples/2.3.x/server-rust/examples/storage/list-buckets.md new file mode 100644 index 000000000..12b9bb606 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/list-buckets.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + let result = storage.list_buckets( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/list-files.md b/examples/2.3.x/server-rust/examples/storage/list-files.md new file mode 100644 index 000000000..8cc678171 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/list-files.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; + +#[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 storage = Storage::new(&client); + + let result = storage.list_files( + "<BUCKET_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/update-bucket.md b/examples/2.3.x/server-rust/examples/storage/update-bucket.md new file mode 100644 index 000000000..93e88dc9b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/update-bucket.md @@ -0,0 +1,34 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 storage = Storage::new(&client); + + let result = storage.update_bucket( + "<BUCKET_ID>", + "<NAME>", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(1), // optional + Some(vec![]), // optional + Some(appwrite::enums::Compression::None), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/storage/update-file.md b/examples/2.3.x/server-rust/examples/storage/update-file.md new file mode 100644 index 000000000..84632094f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/storage/update-file.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Storage; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 storage = Storage::new(&client); + + let result = storage.update_file( + "<BUCKET_ID>", + "<FILE_ID>", + Some("<NAME>"), // optional + Some(vec![Permission::read(Role::any()).to_string()]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..03b0ab61a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_big_int_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(0), // optional + Some(1000000), // optional + Some(0), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..1762d5eec --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_boolean_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-rust/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..404e6eccb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-cutover.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_cutover( + "<DATABASE_ID>", + "<MIGRATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..31c8d7ccb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_datetime_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..11f800c9b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-email-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_email_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("email@example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..64d1496d2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-enum-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_enum_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + vec!["active".into(), "inactive".into()], + false, + Some("active"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-failover.md b/examples/2.3.x/server-rust/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..dfe48ef9a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-failover.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_failover( + "<DATABASE_ID>", + Some("<TARGET_REPLICA_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..9c3179ad9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-float-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_float_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(0), // optional + Some(100), // optional + Some(10.5), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..409d88ddf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-index.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_index( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + appwrite::enums::TablesDBIndexType::Key, + vec![], + Some(vec![appwrite::enums::OrderBy::Asc]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..756522813 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-integer-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_integer_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(0), // optional + Some(100), // optional + Some(10), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..c59cd2e43 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-ip-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_ip_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("192.0.2.0"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..70812a4de --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-line-column.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_line_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(vec![serde_json::json!([1,2]), serde_json::json!([3,4]), serde_json::json!([5,6])]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..85a2b4b63 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-longtext-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_longtext_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..35d022dff --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-mediumtext-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_mediumtext_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-migration.md b/examples/2.3.x/server-rust/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..5c2ffe764 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-migration.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_migration( + "<DATABASE_ID>", + "s-1vcpu-1gb", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-operations.md b/examples/2.3.x/server-rust/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..30bd0fcf0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-operations.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_operations( + "<TRANSACTION_ID>", + Some(vec![serde_json::json!({"action":"create","databaseId":"<DATABASE_ID>","tableId":"<TABLE_ID>","rowId":"<ROW_ID>","data":{"name":"Walter O'Brien"}})]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..750f7778c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-point-column.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_point_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(vec![1, 2]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..b9a598f26 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_polygon_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(vec![serde_json::json!([[1,2],[3,4],[5,6],[1,2]])]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..12e8d26da --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_relationship_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + appwrite::enums::RelationshipType::OneToOne, + Some(false), // optional + Some("<KEY>"), // optional + Some("<TWO_WAY_KEY>"), // optional + Some(appwrite::enums::RelationMutate::Cascade) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-row.md b/examples/2.3.x/server-rust/examples/tablesdb/create-row.md new file mode 100644 index 000000000..8dd7d1564 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-row.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_row( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + serde_json::json!({}), + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..b5722c489 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-rows.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_rows( + "<DATABASE_ID>", + "<TABLE_ID>", + vec![], + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..2e6118a22 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-string-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_string_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + 1, + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-table.md b/examples/2.3.x/server-rust/examples/tablesdb/create-table.md new file mode 100644 index 000000000..46aa1457b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-table.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_table( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(vec![]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..c8cb8cc54 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-text-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_text_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-rust/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..e8b878838 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_transaction( + Some(60) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..aed6a8422 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-url-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_url_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("https://example.com"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-rust/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..8be27419b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create_varchar_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + 1, + false, + Some("Hello World"), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create.md b/examples/2.3.x/server-rust/examples/tablesdb/create.md new file mode 100644 index 000000000..544d54b2e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/create.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.create( + "<DATABASE_ID>", + "<NAME>", + Some(false), // optional + Some("serverless"), // optional + Some(0), // optional + Some("async") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-rust/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..f0fc521aa --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.decrement_row_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "<COLUMN>", + Some(1), // optional + Some(0), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/delete-column.md b/examples/2.3.x/server-rust/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..3b4d2e1e3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete-column.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + tables_db.delete_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/delete-index.md b/examples/2.3.x/server-rust/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..50d737150 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete-index.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + tables_db.delete_index( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-rust/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..d3ebd3de3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete-migration.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + tables_db.delete_migration( + "<DATABASE_ID>", + "<MIGRATION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/delete-row.md b/examples/2.3.x/server-rust/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..e6da0e2e3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete-row.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + tables_db.delete_row( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + Some("<TRANSACTION_ID>") // optional + ).await?; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..92520ae1c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete-rows.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.delete_rows( + "<DATABASE_ID>", + "<TABLE_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/delete-table.md b/examples/2.3.x/server-rust/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..2838cac73 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete-table.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + tables_db.delete_table( + "<DATABASE_ID>", + "<TABLE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-rust/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..5fdc148af --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete-transaction.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + tables_db.delete_transaction( + "<TRANSACTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/delete.md b/examples/2.3.x/server-rust/examples/tablesdb/delete.md new file mode 100644 index 000000000..3be7ac0c7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + tables_db.delete( + "<DATABASE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get-column.md b/examples/2.3.x/server-rust/examples/tablesdb/get-column.md new file mode 100644 index 000000000..d7b1bd093 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get-column.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get-index.md b/examples/2.3.x/server-rust/examples/tablesdb/get-index.md new file mode 100644 index 000000000..cc9c1246d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get-index.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get_index( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get-migration.md b/examples/2.3.x/server-rust/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..56164069f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get-migration.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get_migration( + "<DATABASE_ID>", + "<MIGRATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-rust/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..b1bf4e30c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get-replicas.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get_replicas( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get-row.md b/examples/2.3.x/server-rust/examples/tablesdb/get-row.md new file mode 100644 index 000000000..0c4dd7b97 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get-row.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get_row( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get-status.md b/examples/2.3.x/server-rust/examples/tablesdb/get-status.md new file mode 100644 index 000000000..e81607226 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get-status.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get_status( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get-table.md b/examples/2.3.x/server-rust/examples/tablesdb/get-table.md new file mode 100644 index 000000000..17299f315 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get-table.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get_table( + "<DATABASE_ID>", + "<TABLE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-rust/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..957072d93 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get_transaction( + "<TRANSACTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/get.md b/examples/2.3.x/server-rust/examples/tablesdb/get.md new file mode 100644 index 000000000..a5400206c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.get( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-rust/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..d618d082b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/increment-row-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.increment_row_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "<COLUMN>", + Some(1), // optional + Some(100), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list-columns.md b/examples/2.3.x/server-rust/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..12f276c8f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-columns.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list_columns( + "<DATABASE_ID>", + "<TABLE_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-rust/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..8153a1ec4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-indexes.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list_indexes( + "<DATABASE_ID>", + "<TABLE_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-rust/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..e6418f4cd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-migrations.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list_migrations( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list-operations.md b/examples/2.3.x/server-rust/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..f1458c350 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-operations.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list_operations( + "<DATABASE_ID>", + Some("queued"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list-rows.md b/examples/2.3.x/server-rust/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..7d6e8aede --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-rows.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list_rows( + "<DATABASE_ID>", + "<TABLE_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>"), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-rust/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..20e7e344a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-specifications.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list_specifications().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list-tables.md b/examples/2.3.x/server-rust/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..4102c92a4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-tables.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list_tables( + "<DATABASE_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..047974237 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-transactions.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list_transactions( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list.md b/examples/2.3.x/server-rust/examples/tablesdb/list.md new file mode 100644 index 000000000..40543cd76 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.list( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..1f0eabd06 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_big_int_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(0), + Some(0), // optional + Some(1000000), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..3a65cab6b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_boolean_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(false), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..612a1cb56 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_datetime_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("2020-10-15T06:38:00.000+00:00"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..c6f29c74e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-email-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_email_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("email@example.com"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..7806f9cb5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-enum-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_enum_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + vec!["active".into(), "inactive".into()], + false, + Some("active"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..25b5ad2c1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-float-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_float_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(10.5), + Some(0), // optional + Some(100), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..7053a0d4b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-integer-column.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_integer_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(10), + Some(0), // optional + Some(100), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..261a8cee4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-ip-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_ip_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("192.0.2.0"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..a87f09830 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-line-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_line_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(vec![serde_json::json!([1,2]), serde_json::json!([3,4]), serde_json::json!([5,6])]), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..a5629b317 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_longtext_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("Hello World"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..4a8162dbc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_mediumtext_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("Hello World"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..33f4d27ab --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-point-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_point_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(vec![1, 2]), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..c3504e678 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_polygon_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some(vec![serde_json::json!([[1,2],[3,4],[5,6],[1,2]])]), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..8c83d0d48 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_relationship_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + Some(appwrite::enums::RelationMutate::Cascade), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-row.md b/examples/2.3.x/server-rust/examples/tablesdb/update-row.md new file mode 100644 index 000000000..b81fbc7c7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-row.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_row( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-rows.md b/examples/2.3.x/server-rust/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..582a9b33f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-rows.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_rows( + "<DATABASE_ID>", + "<TABLE_ID>", + Some(serde_json::json!({})), // optional + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..ea6dde7dc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-string-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_string_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("Hello World"), + Some(1), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-table.md b/examples/2.3.x/server-rust/examples/tablesdb/update-table.md new file mode 100644 index 000000000..184d9d6d4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-table.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_table( + "<DATABASE_ID>", + "<TABLE_ID>", + Some("<NAME>"), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..f9376ca24 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-text-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_text_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("Hello World"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-rust/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..39259fffd --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-transaction.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_transaction( + "<TRANSACTION_ID>", + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..57afcdcc6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-url-column.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_url_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("https://example.com"), + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-rust/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..02d74b30a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update-varchar-column.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update_varchar_column( + "<DATABASE_ID>", + "<TABLE_ID>", + "<KEY>", + false, + Some("Hello World"), + Some(1), // optional + Some("<NEW_KEY>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/update.md b/examples/2.3.x/server-rust/examples/tablesdb/update.md new file mode 100644 index 000000000..33a35a279 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/update.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.update( + "<DATABASE_ID>", + Some("<NAME>"), // optional + Some(false), // optional + Some("serverless"), // optional + Some(0), // optional + Some("async") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-rust/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..150504999 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/upsert-row.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.upsert_row( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..ba84a600a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tablesdb/upsert-rows.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::TablesDB; + +#[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 tables_db = TablesDB::new(&client); + + let result = tables_db.upsert_rows( + "<DATABASE_ID>", + "<TABLE_ID>", + vec![], + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/create-installation.md b/examples/2.3.x/server-rust/examples/teams/create-installation.md new file mode 100644 index 000000000..f735696e3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/create-installation.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box<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 teams = Teams::new(&client); + + let result = teams.create_installation( + "<TEAM_ID>", + "<APP_ID>", + Some("<AUTHORIZATION_DETAILS>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..5366d5e28 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/create-membership.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.create_membership( + "<TEAM_ID>", + vec![], + Some("email@example.com"), // optional + Some("<USER_ID>"), // optional + Some("+12065550100"), // optional + Some("https://example.com"), // optional + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/create.md b/examples/2.3.x/server-rust/examples/teams/create.md new file mode 100644 index 000000000..5877bdc93 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/create.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.create( + "<TEAM_ID>", + "<NAME>", + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/delete-installation.md b/examples/2.3.x/server-rust/examples/teams/delete-installation.md new file mode 100644 index 000000000..6af98a554 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/delete-installation.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + teams.delete_installation( + "<TEAM_ID>", + "<INSTALLATION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/delete-membership.md b/examples/2.3.x/server-rust/examples/teams/delete-membership.md new file mode 100644 index 000000000..6ed7d458f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/delete-membership.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + teams.delete_membership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/delete.md b/examples/2.3.x/server-rust/examples/teams/delete.md new file mode 100644 index 000000000..c13da3a0e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + teams.delete( + "<TEAM_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/get-installation.md b/examples/2.3.x/server-rust/examples/teams/get-installation.md new file mode 100644 index 000000000..15db5b20d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/get-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box<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 teams = Teams::new(&client); + + let result = teams.get_installation( + "<TEAM_ID>", + "<INSTALLATION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/get-membership.md b/examples/2.3.x/server-rust/examples/teams/get-membership.md new file mode 100644 index 000000000..595ed8ce1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/get-membership.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.get_membership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/get-prefs.md b/examples/2.3.x/server-rust/examples/teams/get-prefs.md new file mode 100644 index 000000000..10db6fcc0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/get-prefs.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.get_prefs( + "<TEAM_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/get.md b/examples/2.3.x/server-rust/examples/teams/get.md new file mode 100644 index 000000000..ddaa9ae57 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.get( + "<TEAM_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/list-installations.md b/examples/2.3.x/server-rust/examples/teams/list-installations.md new file mode 100644 index 000000000..3d66223d9 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/list-installations.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box<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 teams = Teams::new(&client); + + let result = teams.list_installations( + "<TEAM_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/list-memberships.md b/examples/2.3.x/server-rust/examples/teams/list-memberships.md new file mode 100644 index 000000000..6390127f5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/list-memberships.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.list_memberships( + "<TEAM_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/list.md b/examples/2.3.x/server-rust/examples/teams/list.md new file mode 100644 index 000000000..8e55273ca --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.list( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/update-installation.md b/examples/2.3.x/server-rust/examples/teams/update-installation.md new file mode 100644 index 000000000..9a49db2c6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/update-installation.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box<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 teams = Teams::new(&client); + + let result = teams.update_installation( + "<TEAM_ID>", + "<INSTALLATION_ID>", + Some("<AUTHORIZATION_DETAILS>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/update-membership-status.md b/examples/2.3.x/server-rust/examples/teams/update-membership-status.md new file mode 100644 index 000000000..d6a143bb8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/update-membership-status.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.update_membership_status( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + "<USER_ID>", + "<SECRET>" + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..6c6d0d792 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/update-membership.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.update_membership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + vec![] + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/update-name.md b/examples/2.3.x/server-rust/examples/teams/update-name.md new file mode 100644 index 000000000..47e6e6c58 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/update-name.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.update_name( + "<TEAM_ID>", + "<NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/teams/update-prefs.md b/examples/2.3.x/server-rust/examples/teams/update-prefs.md new file mode 100644 index 000000000..dd19536b7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/teams/update-prefs.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[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 teams = Teams::new(&client); + + let result = teams.update_prefs( + "<TEAM_ID>", + serde_json::json!({}) + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tokens/create-file-token.md b/examples/2.3.x/server-rust/examples/tokens/create-file-token.md new file mode 100644 index 000000000..e1577cd44 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tokens/create-file-token.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Tokens; + +#[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 tokens = Tokens::new(&client); + + let result = tokens.create_file_token( + "<BUCKET_ID>", + "<FILE_ID>", + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tokens/delete.md b/examples/2.3.x/server-rust/examples/tokens/delete.md new file mode 100644 index 000000000..e44ed7c27 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tokens/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Tokens; + +#[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 tokens = Tokens::new(&client); + + tokens.delete( + "<TOKEN_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tokens/get.md b/examples/2.3.x/server-rust/examples/tokens/get.md new file mode 100644 index 000000000..769a18cbf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tokens/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Tokens; + +#[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 tokens = Tokens::new(&client); + + let result = tokens.get( + "<TOKEN_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tokens/list.md b/examples/2.3.x/server-rust/examples/tokens/list.md new file mode 100644 index 000000000..b399512d2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tokens/list.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Tokens; + +#[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 tokens = Tokens::new(&client); + + let result = tokens.list( + "<BUCKET_ID>", + "<FILE_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/tokens/update.md b/examples/2.3.x/server-rust/examples/tokens/update.md new file mode 100644 index 000000000..b6db1f7c3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/tokens/update.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Tokens; + +#[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 tokens = Tokens::new(&client); + + let result = tokens.update( + "<TOKEN_ID>", + Some("2020-10-15T06:38:00.000+00:00") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-argon-2-user.md b/examples/2.3.x/server-rust/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..5e58b7b26 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-argon-2-user.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_argon2_user( + "<USER_ID>", + "email@example.com", + "password", + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-rust/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..39cfbeb1d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-bcrypt-user.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_bcrypt_user( + "<USER_ID>", + "email@example.com", + "password", + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-jwt.md b/examples/2.3.x/server-rust/examples/users/create-jwt.md new file mode 100644 index 000000000..d728829e8 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-jwt.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_jwt( + "<USER_ID>", + Some("recent()"), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-md-5-user.md b/examples/2.3.x/server-rust/examples/users/create-md-5-user.md new file mode 100644 index 000000000..04c3f4a16 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-md-5-user.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_md5_user( + "<USER_ID>", + "email@example.com", + "password", + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-rust/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..791bfc22c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_mfa_recovery_codes( + "<USER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-rust/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..62d0b5fef --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-ph-pass-user.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_ph_pass_user( + "<USER_ID>", + "email@example.com", + "password", + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-rust/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..f576eec58 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_scrypt_modified_user( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + "<PASSWORD_SALT_SEPARATOR>", + "<PASSWORD_SIGNER_KEY>", + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-scrypt-user.md b/examples/2.3.x/server-rust/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..f87ef4adf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-scrypt-user.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_scrypt_user( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + 8, + 65536, + 1, + 64, + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-session.md b/examples/2.3.x/server-rust/examples/users/create-session.md new file mode 100644 index 000000000..b19e7b8a1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-session.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_session( + "<USER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-sha-user.md b/examples/2.3.x/server-rust/examples/users/create-sha-user.md new file mode 100644 index 000000000..f4024a84f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-sha-user.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_sha_user( + "<USER_ID>", + "email@example.com", + "password", + Some(appwrite::enums::PasswordHash::Sha1), // optional + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-target.md b/examples/2.3.x/server-rust/examples/users/create-target.md new file mode 100644 index 000000000..680706db7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-target.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_target( + "<USER_ID>", + "<TARGET_ID>", + appwrite::enums::MessagingProviderType::Email, + "<IDENTIFIER>", + Some("<PROVIDER_ID>"), // optional + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create-token.md b/examples/2.3.x/server-rust/examples/users/create-token.md new file mode 100644 index 000000000..cfa329308 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create-token.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create_token( + "<USER_ID>", + Some(4), // optional + Some(60) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/create.md b/examples/2.3.x/server-rust/examples/users/create.md new file mode 100644 index 000000000..c22ebd52e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/create.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.create( + "<USER_ID>", + Some("email@example.com"), // optional + Some("+12065550100"), // optional + Some("password"), // optional + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/delete-identity.md b/examples/2.3.x/server-rust/examples/users/delete-identity.md new file mode 100644 index 000000000..928edf662 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/delete-identity.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + users.delete_identity( + "<IDENTITY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-rust/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..2078f128d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + users.delete_mfa_authenticator( + "<USER_ID>", + appwrite::enums::AuthenticatorType::Totp + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/delete-session.md b/examples/2.3.x/server-rust/examples/users/delete-session.md new file mode 100644 index 000000000..4f3003832 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/delete-session.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + users.delete_session( + "<USER_ID>", + "<SESSION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/delete-sessions.md b/examples/2.3.x/server-rust/examples/users/delete-sessions.md new file mode 100644 index 000000000..1ef60aa4c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/delete-sessions.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + users.delete_sessions( + "<USER_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/delete-target.md b/examples/2.3.x/server-rust/examples/users/delete-target.md new file mode 100644 index 000000000..f3977c77a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/delete-target.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + users.delete_target( + "<USER_ID>", + "<TARGET_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/delete.md b/examples/2.3.x/server-rust/examples/users/delete.md new file mode 100644 index 000000000..841831dfc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + users.delete( + "<USER_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-rust/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..b15bbf303 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/get-mfa-challenge.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.get_mfa_challenge( + "<USER_ID>", + "<CHALLENGE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-rust/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..33362296c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.get_mfa_recovery_codes( + "<USER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/get-prefs.md b/examples/2.3.x/server-rust/examples/users/get-prefs.md new file mode 100644 index 000000000..17447150c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/get-prefs.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.get_prefs( + "<USER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/get-target.md b/examples/2.3.x/server-rust/examples/users/get-target.md new file mode 100644 index 000000000..1a82ad773 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/get-target.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.get_target( + "<USER_ID>", + "<TARGET_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/get.md b/examples/2.3.x/server-rust/examples/users/get.md new file mode 100644 index 000000000..9c1628ae3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.get( + "<USER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/list-identities.md b/examples/2.3.x/server-rust/examples/users/list-identities.md new file mode 100644 index 000000000..4cb2d54da --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/list-identities.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.list_identities( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/list-memberships.md b/examples/2.3.x/server-rust/examples/users/list-memberships.md new file mode 100644 index 000000000..f9a3de4b4 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/list-memberships.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.list_memberships( + "<USER_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/list-mfa-factors.md b/examples/2.3.x/server-rust/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..4af4a7961 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/list-mfa-factors.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.list_mfa_factors( + "<USER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/list-sessions.md b/examples/2.3.x/server-rust/examples/users/list-sessions.md new file mode 100644 index 000000000..d2337f6dc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/list-sessions.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.list_sessions( + "<USER_ID>", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/list-targets.md b/examples/2.3.x/server-rust/examples/users/list-targets.md new file mode 100644 index 000000000..591432196 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/list-targets.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.list_targets( + "<USER_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/list.md b/examples/2.3.x/server-rust/examples/users/list.md new file mode 100644 index 000000000..108a0a3ea --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.list( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-email-verification.md b/examples/2.3.x/server-rust/examples/users/update-email-verification.md new file mode 100644 index 000000000..e562d5b1f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-email-verification.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_email_verification( + "<USER_ID>", + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-email.md b/examples/2.3.x/server-rust/examples/users/update-email.md new file mode 100644 index 000000000..24a073fee --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-email.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_email( + "<USER_ID>", + "email@example.com" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-impersonator.md b/examples/2.3.x/server-rust/examples/users/update-impersonator.md new file mode 100644 index 000000000..22a85a04b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-impersonator.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_impersonator( + "<USER_ID>", + false + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..00922e3c2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-labels.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_labels( + "<USER_ID>", + vec![] + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-rust/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..f50cec106 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_mfa_recovery_codes( + "<USER_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-mfa.md b/examples/2.3.x/server-rust/examples/users/update-mfa.md new file mode 100644 index 000000000..0fad27cd1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-mfa.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_mfa( + "<USER_ID>", + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-name.md b/examples/2.3.x/server-rust/examples/users/update-name.md new file mode 100644 index 000000000..8dafad72b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-name.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_name( + "<USER_ID>", + "<NAME>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-password.md b/examples/2.3.x/server-rust/examples/users/update-password.md new file mode 100644 index 000000000..dc1aab353 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-password.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_password( + "<USER_ID>", + "password" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-phone-verification.md b/examples/2.3.x/server-rust/examples/users/update-phone-verification.md new file mode 100644 index 000000000..bd60510d2 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-phone-verification.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_phone_verification( + "<USER_ID>", + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-phone.md b/examples/2.3.x/server-rust/examples/users/update-phone.md new file mode 100644 index 000000000..ea226002e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-phone.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_phone( + "<USER_ID>", + "+12065550100" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-prefs.md b/examples/2.3.x/server-rust/examples/users/update-prefs.md new file mode 100644 index 000000000..117845eab --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-prefs.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_prefs( + "<USER_ID>", + serde_json::json!({}) + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-status.md b/examples/2.3.x/server-rust/examples/users/update-status.md new file mode 100644 index 000000000..c34e76f18 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-status.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_status( + "<USER_ID>", + false + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/users/update-target.md b/examples/2.3.x/server-rust/examples/users/update-target.md new file mode 100644 index 000000000..a31537871 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/users/update-target.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Users; + +#[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 users = Users::new(&client); + + let result = users.update_target( + "<USER_ID>", + "<TARGET_ID>", + Some("<IDENTIFIER>"), // optional + Some("<PROVIDER_ID>"), // optional + Some("<NAME>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..101028800 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-collection.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + 1, + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create-document.md b/examples/2.3.x/server-rust/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..bac5bd1d0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + serde_json::json!({}), + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..d2aff1f09 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + vec![], + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-rust/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..5af7a6b97 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-failover.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_failover( + "<DATABASE_ID>", + Some("<TARGET_REPLICA_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..02d30e230 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-index.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>", + appwrite::enums::VectorsDBIndexType::HnswEuclidean, + vec![], + Some(vec![appwrite::enums::OrderBy::Asc]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..cc1aaca69 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-operations.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + 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 + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create-query.md b/examples/2.3.x/server-rust/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..72ea46b9b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-query.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_query( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>"), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-rust/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..a7b1919bc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_transaction( + Some(60) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create.md b/examples/2.3.x/server-rust/examples/vectorsdb/create.md new file mode 100644 index 000000000..bfcf81fea --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create( + "<DATABASE_ID>", + "<NAME>", + Some(false), // optional + Some("serverless"), // optional + Some(0), // optional + Some("async") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-rust/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..4a500dc9b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/delete-collection.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + vectors_db.delete_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-rust/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..0899b84ef --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/delete-document.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + vectors_db.delete_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some("<TRANSACTION_ID>") // optional + ).await?; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..a69a6a7eb --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/delete-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.delete_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-rust/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..865864fe5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/delete-index.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + vectors_db.delete_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-rust/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..1e2be2be7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + vectors_db.delete_transaction( + "<TRANSACTION_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/delete.md b/examples/2.3.x/server-rust/examples/vectorsdb/delete.md new file mode 100644 index 000000000..daea46232 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + vectors_db.delete( + "<DATABASE_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-rust/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..2aa56e75c --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/get-collection.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/get-document.md b/examples/2.3.x/server-rust/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..382353105 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/get-document.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/get-index.md b/examples/2.3.x/server-rust/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..e707c6818 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/get-index.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_index( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<KEY>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-rust/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..fa3c4c15d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/get-replicas.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_replicas( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/get-status.md b/examples/2.3.x/server-rust/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..a390b9a9a --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/get-status.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_status( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-rust/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..d3ddeaedc --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/get-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_transaction( + "<TRANSACTION_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/get.md b/examples/2.3.x/server-rust/examples/vectorsdb/get.md new file mode 100644 index 000000000..4009249d1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get( + "<DATABASE_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-rust/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..900820c09 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/list-collections.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_collections( + "<DATABASE_ID>", + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-rust/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..bea7001a6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/list-documents.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some("<TRANSACTION_ID>"), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-rust/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..0a28c93f0 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/list-indexes.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_indexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-rust/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..6a4fa7875 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/list-operations.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_operations( + "<DATABASE_ID>", + Some("queued"), // optional + Some(1), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-rust/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..40a4e2988 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/list-specifications.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_specifications().await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..214670d44 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/list-transactions.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_transactions( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/list.md b/examples/2.3.x/server-rust/examples/vectorsdb/list.md new file mode 100644 index 000000000..7920c3c9e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/list.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..86309ba68 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/update-collection.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update_collection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + Some(1), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/update-document.md b/examples/2.3.x/server-rust/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..738c3c0ad --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/update-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-rust/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..d616e7305 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/update-documents.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + Some(serde_json::json!({})), // optional + Some(vec![]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-rust/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..75f9534c3 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/update-transaction.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update_transaction( + "<TRANSACTION_ID>", + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/update.md b/examples/2.3.x/server-rust/examples/vectorsdb/update.md new file mode 100644 index 000000000..d1a4703ad --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/update.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update( + "<DATABASE_ID>", + "<NAME>", + Some(false), // optional + Some("serverless"), // optional + Some(0), // optional + Some("async") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-rust/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..3bc89cca7 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/upsert-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.upsert_document( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` 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 new file mode 100644 index 000000000..c55611852 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box<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 vectors_db = VectorsDB::new(&client); + + let result = vectors_db.upsert_documents( + "<DATABASE_ID>", + "<COLLECTION_ID>", + vec![], + Some("<TRANSACTION_ID>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/webhooks/create.md b/examples/2.3.x/server-rust/examples/webhooks/create.md new file mode 100644 index 000000000..a14a6c1a5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/webhooks/create.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Webhooks; + +#[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 webhooks = Webhooks::new(&client); + + let result = webhooks.create( + "<WEBHOOK_ID>", + "https://example.com/webhook", + "<NAME>", + vec![], + Some(false), // optional + Some(false), // optional + Some("<AUTH_USERNAME>"), // optional + Some("password"), // optional + Some("<SECRET>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/webhooks/delete.md b/examples/2.3.x/server-rust/examples/webhooks/delete.md new file mode 100644 index 000000000..de187be5b --- /dev/null +++ b/examples/2.3.x/server-rust/examples/webhooks/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Webhooks; + +#[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 webhooks = Webhooks::new(&client); + + webhooks.delete( + "<WEBHOOK_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/webhooks/get.md b/examples/2.3.x/server-rust/examples/webhooks/get.md new file mode 100644 index 000000000..a2ccad14d --- /dev/null +++ b/examples/2.3.x/server-rust/examples/webhooks/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Webhooks; + +#[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 webhooks = Webhooks::new(&client); + + let result = webhooks.get( + "<WEBHOOK_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/webhooks/list.md b/examples/2.3.x/server-rust/examples/webhooks/list.md new file mode 100644 index 000000000..9da468e6e --- /dev/null +++ b/examples/2.3.x/server-rust/examples/webhooks/list.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Webhooks; + +#[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 webhooks = Webhooks::new(&client); + + let result = webhooks.list( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/webhooks/update-secret.md b/examples/2.3.x/server-rust/examples/webhooks/update-secret.md new file mode 100644 index 000000000..d27ecbb31 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/webhooks/update-secret.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Webhooks; + +#[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 webhooks = Webhooks::new(&client); + + let result = webhooks.update_secret( + "<WEBHOOK_ID>", + Some("<SECRET>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/webhooks/update.md b/examples/2.3.x/server-rust/examples/webhooks/update.md new file mode 100644 index 000000000..73d636ded --- /dev/null +++ b/examples/2.3.x/server-rust/examples/webhooks/update.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Webhooks; + +#[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 webhooks = Webhooks::new(&client); + + let result = webhooks.update( + "<WEBHOOK_ID>", + "<NAME>", + "https://example.com/webhook", + vec![], + Some(false), // optional + Some(false), // optional + Some("<AUTH_USERNAME>"), // optional + Some("password") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-anonymous-session.md b/examples/2.3.x/server-swift/examples/account/create-anonymous-session.md new file mode 100644 index 000000000..a47dc0f54 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-anonymous-session.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 account = Account(client) + +let session = try await account.createAnonymousSession() + +``` 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 new file mode 100644 index 000000000..d3a5acf12 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-email-password-session.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let session = try await account.createEmailPasswordSession( + email: "email@example.com", + password: "password" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-email-token.md b/examples/2.3.x/server-swift/examples/account/create-email-token.md new file mode 100644 index 000000000..179c7e808 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-email-token.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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-swift/examples/account/create-email-verification-otp.md new file mode 100644 index 000000000..39e797437 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-email-verification-otp.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 account = Account(client) + +let token = try await account.createEmailVerificationOTP( + phrase: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-email-verification.md b/examples/2.3.x/server-swift/examples/account/create-email-verification.md new file mode 100644 index 000000000..c7ea6491d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-email-verification.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 account = Account(client) + +let token = try await account.createEmailVerification( + url: "https://example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-id-token-session.md b/examples/2.3.x/server-swift/examples/account/create-id-token-session.md new file mode 100644 index 000000000..59bc127c1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-id-token-session.md @@ -0,0 +1,21 @@ +```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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.createIdTokenSession( + provider: .apple, + idToken: "<ID_TOKEN>", + nonce: "<NONCE>", // optional + accessToken: "<ACCESS_TOKEN>", // optional + accessTokenExpiry: 0, // optional + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-magic-url-token.md b/examples/2.3.x/server-swift/examples/account/create-magic-url-token.md new file mode 100644 index 000000000..fb168c7e5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-magic-url-token.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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-swift/examples/account/create-mfa-authenticator.md new file mode 100644 index 000000000..6a8d37ebe --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-mfa-authenticator.md @@ -0,0 +1,16 @@ +```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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaType = try await account.createMFAAuthenticator( + type: .totp +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-swift/examples/account/create-mfa-challenge.md new file mode 100644 index 000000000..d6a19b858 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-mfa-challenge.md @@ -0,0 +1,16 @@ +```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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaChallenge = try await account.createMFAChallenge( + factor: .email +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-swift/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 000000000..9c3147002 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-mfa-recovery-codes.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 account = Account(client) + +let mfaRecoveryCodes = try await account.createMFARecoveryCodes() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-o-auth-2-token.md b/examples/2.3.x/server-swift/examples/account/create-o-auth-2-token.md new file mode 100644 index 000000000..b33820893 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-o-auth-2-token.md @@ -0,0 +1,19 @@ +```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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let success = try await account.createOAuth2Token( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-phone-token.md b/examples/2.3.x/server-swift/examples/account/create-phone-token.md new file mode 100644 index 000000000..9d43ba674 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-phone-token.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let token = try await account.createPhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-phone-verification.md b/examples/2.3.x/server-swift/examples/account/create-phone-verification.md new file mode 100644 index 000000000..87973f65d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-phone-verification.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 account = Account(client) + +let token = try await account.createPhoneVerification() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-recovery-otp.md b/examples/2.3.x/server-swift/examples/account/create-recovery-otp.md new file mode 100644 index 000000000..6ffd3fbf2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-recovery-otp.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let token = try await account.createRecoveryOTP( + email: "email@example.com", + phrase: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-recovery.md b/examples/2.3.x/server-swift/examples/account/create-recovery.md new file mode 100644 index 000000000..6f88360ff --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-session.md b/examples/2.3.x/server-swift/examples/account/create-session.md new file mode 100644 index 000000000..4d64f2fd1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-session.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let session = try await account.createSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create-verification.md b/examples/2.3.x/server-swift/examples/account/create-verification.md new file mode 100644 index 000000000..deb8a0b52 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create-verification.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 account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/create.md b/examples/2.3.x/server-swift/examples/account/create.md new file mode 100644 index 000000000..8161264be --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/create.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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.create( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/delete-consent-token.md b/examples/2.3.x/server-swift/examples/account/delete-consent-token.md new file mode 100644 index 000000000..60f94ca3f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/delete-consent-token.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let result = try await account.deleteConsentToken( + consentId: "<CONSENT_ID>", + tokenId: "<TOKEN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/delete-consent.md b/examples/2.3.x/server-swift/examples/account/delete-consent.md new file mode 100644 index 000000000..0168d06e0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/delete-consent.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 account = Account(client) + +let result = try await account.deleteConsent( + consentId: "<CONSENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/delete-identity.md b/examples/2.3.x/server-swift/examples/account/delete-identity.md new file mode 100644 index 000000000..87827cd1f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/delete-identity.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 account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "<IDENTITY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/delete-mfa-authenticator.md b/examples/2.3.x/server-swift/examples/account/delete-mfa-authenticator.md new file mode 100644 index 000000000..3d002f5a2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +```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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteMFAAuthenticator( + type: .totp +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/delete-session.md b/examples/2.3.x/server-swift/examples/account/delete-session.md new file mode 100644 index 000000000..e1523301c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/delete-session.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 account = Account(client) + +let result = try await account.deleteSession( + sessionId: "<SESSION_ID>" +) + +``` 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 new file mode 100644 index 000000000..23d87c694 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/delete-sessions.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 account = Account(client) + +let result = try await account.deleteSessions() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/get-consent-token.md b/examples/2.3.x/server-swift/examples/account/get-consent-token.md new file mode 100644 index 000000000..2785a2846 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/get-consent-token.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let oauth2ConsentToken = try await account.getConsentToken( + consentId: "<CONSENT_ID>", + tokenId: "<TOKEN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/get-consent.md b/examples/2.3.x/server-swift/examples/account/get-consent.md new file mode 100644 index 000000000..4a0a5fa82 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/get-consent.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 account = Account(client) + +let oauth2Consent = try await account.getConsent( + consentId: "<CONSENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-swift/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 000000000..812a074ad --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/get-mfa-recovery-codes.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 account = Account(client) + +let mfaRecoveryCodes = try await account.getMFARecoveryCodes() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/get-prefs.md b/examples/2.3.x/server-swift/examples/account/get-prefs.md new file mode 100644 index 000000000..c2c23ea16 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/get-prefs.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 account = Account(client) + +let preferences = try await account.getPrefs() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/get-session.md b/examples/2.3.x/server-swift/examples/account/get-session.md new file mode 100644 index 000000000..2d8eeeb20 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/get-session.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 account = Account(client) + +let session = try await account.getSession( + sessionId: "<SESSION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/get.md b/examples/2.3.x/server-swift/examples/account/get.md new file mode 100644 index 000000000..4ef00b6eb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/get.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 account = Account(client) + +let user = try await account.get() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/list-consent-tokens.md b/examples/2.3.x/server-swift/examples/account/list-consent-tokens.md new file mode 100644 index 000000000..832bc12c8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/list-consent-tokens.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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let oauth2ConsentTokenList = try await account.listConsentTokens( + consentId: "<CONSENT_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/list-consents.md b/examples/2.3.x/server-swift/examples/account/list-consents.md new file mode 100644 index 000000000..68ba060a2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/list-consents.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let oauth2ConsentList = try await account.listConsents( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/list-identities.md b/examples/2.3.x/server-swift/examples/account/list-identities.md new file mode 100644 index 000000000..ed5b85750 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/list-identities.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let identityList = try await account.listIdentities( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/list-mfa-factors.md b/examples/2.3.x/server-swift/examples/account/list-mfa-factors.md new file mode 100644 index 000000000..996528898 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/list-mfa-factors.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 account = Account(client) + +let mfaFactors = try await account.listMFAFactors() + +``` 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 new file mode 100644 index 000000000..7e263e7d2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/list-sessions.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 account = Account(client) + +let sessionList = try await account.listSessions() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-swift/examples/account/update-email-verification-otp.md new file mode 100644 index 000000000..7339bf2dd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-email-verification-otp.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let token = try await account.updateEmailVerificationOTP( + userId: "<USER_ID>", + secret: "<SECRET>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-email-verification.md b/examples/2.3.x/server-swift/examples/account/update-email-verification.md new file mode 100644 index 000000000..8822d0cda --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-email-verification.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let token = try await account.updateEmailVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-email.md b/examples/2.3.x/server-swift/examples/account/update-email.md new file mode 100644 index 000000000..df903fe29 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-email.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-magic-url-session.md b/examples/2.3.x/server-swift/examples/account/update-magic-url-session.md new file mode 100644 index 000000000..5bc71b01c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-magic-url-session.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-swift/examples/account/update-mfa-authenticator.md new file mode 100644 index 000000000..4c156a2ca --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-mfa-authenticator.md @@ -0,0 +1,17 @@ +```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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateMFAAuthenticator( + type: .totp, + otp: "<OTP>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-swift/examples/account/update-mfa-challenge.md new file mode 100644 index 000000000..9ee045d03 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-mfa-challenge.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let session = try await account.updateMFAChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-swift/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 000000000..fabf3ff02 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-mfa-recovery-codes.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 account = Account(client) + +let mfaRecoveryCodes = try await account.updateMFARecoveryCodes() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-mfa.md b/examples/2.3.x/server-swift/examples/account/update-mfa.md new file mode 100644 index 000000000..a989d4aa8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-mfa.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 account = Account(client) + +let user = try await account.updateMFA( + mfa: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-name.md b/examples/2.3.x/server-swift/examples/account/update-name.md new file mode 100644 index 000000000..eaa7cd1f8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-name.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 account = Account(client) + +let user = try await account.updateName( + name: "<NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-password.md b/examples/2.3.x/server-swift/examples/account/update-password.md new file mode 100644 index 000000000..96e97e047 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-password.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let user = try await account.updatePassword( + password: "password", + oldPassword: "password" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-phone-session.md b/examples/2.3.x/server-swift/examples/account/update-phone-session.md new file mode 100644 index 000000000..90bade476 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-phone-session.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-phone-verification.md b/examples/2.3.x/server-swift/examples/account/update-phone-verification.md new file mode 100644 index 000000000..66a3428af --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-phone-verification.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-phone.md b/examples/2.3.x/server-swift/examples/account/update-phone.md new file mode 100644 index 000000000..d89e96275 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-phone.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-prefs.md b/examples/2.3.x/server-swift/examples/account/update-prefs.md new file mode 100644 index 000000000..b6e9f9cc4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-prefs.md @@ -0,0 +1,19 @@ +```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 account = Account(client) + +let user = try await account.updatePrefs( + prefs: [ + "language": "en", + "timezone": "UTC", + "darkTheme": true + ] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-recovery-otp.md b/examples/2.3.x/server-swift/examples/account/update-recovery-otp.md new file mode 100644 index 000000000..65800f342 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-recovery-otp.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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updateRecoveryOTP( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "password" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-recovery.md b/examples/2.3.x/server-swift/examples/account/update-recovery.md new file mode 100644 index 000000000..27eaa78ee --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-recovery.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 + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "password" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-session.md b/examples/2.3.x/server-swift/examples/account/update-session.md new file mode 100644 index 000000000..62af972c8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-session.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 account = Account(client) + +let session = try await account.updateSession( + sessionId: "<SESSION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-status.md b/examples/2.3.x/server-swift/examples/account/update-status.md new file mode 100644 index 000000000..8b779636c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-status.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 account = Account(client) + +let user = try await account.updateStatus() + +``` diff --git a/examples/2.3.x/server-swift/examples/account/update-verification.md b/examples/2.3.x/server-swift/examples/account/update-verification.md new file mode 100644 index 000000000..68e1fb772 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/account/update-verification.md @@ -0,0 +1,16 @@ +```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 account = Account(client) + +let token = try await account.updateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/activities/get-event.md b/examples/2.3.x/server-swift/examples/activities/get-event.md new file mode 100644 index 000000000..0e27cbe5c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/activities/get-event.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 activities = Activities(client) + +let activityEvent = try await activities.getEvent( + eventId: "<EVENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/activities/list-events.md b/examples/2.3.x/server-swift/examples/activities/list-events.md new file mode 100644 index 000000000..54ca82727 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/activities/list-events.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 activities = Activities(client) + +let activityEventList = try await activities.listEvents( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/advisor/delete-report.md b/examples/2.3.x/server-swift/examples/advisor/delete-report.md new file mode 100644 index 000000000..693968935 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/advisor/delete-report.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 advisor = Advisor(client) + +let result = try await advisor.deleteReport( + reportId: "<REPORT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/advisor/get-insight.md b/examples/2.3.x/server-swift/examples/advisor/get-insight.md new file mode 100644 index 000000000..648d5036b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/advisor/get-insight.md @@ -0,0 +1,16 @@ +```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 advisor = Advisor(client) + +let insight = try await advisor.getInsight( + reportId: "<REPORT_ID>", + insightId: "<INSIGHT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/advisor/get-report.md b/examples/2.3.x/server-swift/examples/advisor/get-report.md new file mode 100644 index 000000000..14682be0b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/advisor/get-report.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 advisor = Advisor(client) + +let report = try await advisor.getReport( + reportId: "<REPORT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/advisor/list-insights.md b/examples/2.3.x/server-swift/examples/advisor/list-insights.md new file mode 100644 index 000000000..73ccd6b19 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/advisor/list-insights.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 advisor = Advisor(client) + +let insightList = try await advisor.listInsights( + reportId: "<REPORT_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/advisor/list-reports.md b/examples/2.3.x/server-swift/examples/advisor/list-reports.md new file mode 100644 index 000000000..a59bd944a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/advisor/list-reports.md @@ -0,0 +1,16 @@ +```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 advisor = Advisor(client) + +let reportList = try await advisor.listReports( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/create-installation-token.md b/examples/2.3.x/server-swift/examples/apps/create-installation-token.md new file mode 100644 index 000000000..c2104ab66 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let oauth2Token = try await apps.createInstallationToken( + appId: "<APP_ID>", + installationId: "<INSTALLATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/create-key.md b/examples/2.3.x/server-swift/examples/apps/create-key.md new file mode 100644 index 000000000..2ad8a38b5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/create-key.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 apps = Apps(client) + +let appKey = try await apps.createKey( + appId: "<APP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/create-secret.md b/examples/2.3.x/server-swift/examples/apps/create-secret.md new file mode 100644 index 000000000..e6f07a23c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/create-secret.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 apps = Apps(client) + +let appSecretPlaintext = try await apps.createSecret( + appId: "<APP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/create.md b/examples/2.3.x/server-swift/examples/apps/create.md new file mode 100644 index 000000000..cb13e99ef --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/create.md @@ -0,0 +1,33 @@ +```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 apps = Apps(client) + +let app = try await apps.create( + appId: "<APP_ID>", + name: "<NAME>", + redirectUris: [], + description: "<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: "<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: "<TEAM_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/delete-installation.md b/examples/2.3.x/server-swift/examples/apps/delete-installation.md new file mode 100644 index 000000000..36d1bd1ee --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/delete-installation.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let result = try await apps.deleteInstallation( + appId: "<APP_ID>", + installationId: "<INSTALLATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/delete-key.md b/examples/2.3.x/server-swift/examples/apps/delete-key.md new file mode 100644 index 000000000..90c76a344 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let result = try await apps.deleteKey( + appId: "<APP_ID>", + keyId: "<KEY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/delete-secret.md b/examples/2.3.x/server-swift/examples/apps/delete-secret.md new file mode 100644 index 000000000..c797d76ce --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/delete-secret.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let result = try await apps.deleteSecret( + appId: "<APP_ID>", + secretId: "<SECRET_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/delete-tokens.md b/examples/2.3.x/server-swift/examples/apps/delete-tokens.md new file mode 100644 index 000000000..6495eda9b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/delete-tokens.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 apps = Apps(client) + +let result = try await apps.deleteTokens( + appId: "<APP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/delete.md b/examples/2.3.x/server-swift/examples/apps/delete.md new file mode 100644 index 000000000..eec807732 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/delete.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 apps = Apps(client) + +let result = try await apps.delete( + appId: "<APP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/get-installation.md b/examples/2.3.x/server-swift/examples/apps/get-installation.md new file mode 100644 index 000000000..bdd4e4767 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/get-installation.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let appInstallation = try await apps.getInstallation( + appId: "<APP_ID>", + installationId: "<INSTALLATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/get-key.md b/examples/2.3.x/server-swift/examples/apps/get-key.md new file mode 100644 index 000000000..2afb01e28 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/get-key.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let appKey = try await apps.getKey( + appId: "<APP_ID>", + keyId: "<KEY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/get-secret.md b/examples/2.3.x/server-swift/examples/apps/get-secret.md new file mode 100644 index 000000000..b00854e78 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/get-secret.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let appSecret = try await apps.getSecret( + appId: "<APP_ID>", + secretId: "<SECRET_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/get.md b/examples/2.3.x/server-swift/examples/apps/get.md new file mode 100644 index 000000000..97df280f1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/get.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 apps = Apps(client) + +let app = try await apps.get( + appId: "<APP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-swift/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..b19112a29 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/list-installation-scopes.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 apps = Apps(client) + +let appScopeList = try await apps.listInstallationScopes() + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/list-installations.md b/examples/2.3.x/server-swift/examples/apps/list-installations.md new file mode 100644 index 000000000..4a8012d2a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/list-installations.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 + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appInstallationList = try await apps.listInstallations( + appId: "<APP_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/list-keys.md b/examples/2.3.x/server-swift/examples/apps/list-keys.md new file mode 100644 index 000000000..7f0938cdb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/list-keys.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 + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appKeyList = try await apps.listKeys( + appId: "<APP_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-swift/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..834730e8e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/list-o-auth-2-scopes.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 apps = Apps(client) + +let appScopeList = try await apps.listOAuth2Scopes() + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/list-secrets.md b/examples/2.3.x/server-swift/examples/apps/list-secrets.md new file mode 100644 index 000000000..2f7c4f22f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/list-secrets.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 + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appSecretList = try await apps.listSecrets( + appId: "<APP_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/list.md b/examples/2.3.x/server-swift/examples/apps/list.md new file mode 100644 index 000000000..6cdff191d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/list.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let appsList = try await apps.list( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/update-labels.md b/examples/2.3.x/server-swift/examples/apps/update-labels.md new file mode 100644 index 000000000..39d670fc8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/update-labels.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let app = try await apps.updateLabels( + appId: "<APP_ID>", + labels: [] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/update-team.md b/examples/2.3.x/server-swift/examples/apps/update-team.md new file mode 100644 index 000000000..d848ef4e8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/update-team.md @@ -0,0 +1,16 @@ +```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 apps = Apps(client) + +let app = try await apps.updateTeam( + appId: "<APP_ID>", + teamId: "<TEAM_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/apps/update.md b/examples/2.3.x/server-swift/examples/apps/update.md new file mode 100644 index 000000000..e6a115d0b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/apps/update.md @@ -0,0 +1,34 @@ +```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 apps = Apps(client) + +let app = try await apps.update( + appId: "<APP_ID>", + name: "<NAME>", + description: "<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: "<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/server-swift/examples/avatars/get-browser.md b/examples/2.3.x/server-swift/examples/avatars/get-browser.md new file mode 100644 index 000000000..324540b47 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-browser.md @@ -0,0 +1,19 @@ +```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 + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getBrowser( + code: .avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/get-credit-card.md b/examples/2.3.x/server-swift/examples/avatars/get-credit-card.md new file mode 100644 index 000000000..45b7d4bef --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-credit-card.md @@ -0,0 +1,19 @@ +```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 + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getCreditCard( + code: .americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/get-favicon.md b/examples/2.3.x/server-swift/examples/avatars/get-favicon.md new file mode 100644 index 000000000..f0945dcaf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-favicon.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 bytes = try await avatars.getFavicon( + url: "https://example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/get-flag.md b/examples/2.3.x/server-swift/examples/avatars/get-flag.md new file mode 100644 index 000000000..d7cc8c6ab --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-flag.md @@ -0,0 +1,19 @@ +```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 + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getFlag( + code: .afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/get-image.md b/examples/2.3.x/server-swift/examples/avatars/get-image.md new file mode 100644 index 000000000..4f18af5a2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-image.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 + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/get-initials.md b/examples/2.3.x/server-swift/examples/avatars/get-initials.md new file mode 100644 index 000000000..b4e902277 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-initials.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 + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getInitials( + name: "<NAME>", // optional + width: 0, // optional + height: 0, // optional + background: "FFFFFF" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/get-photo.md b/examples/2.3.x/server-swift/examples/avatars/get-photo.md new file mode 100644 index 000000000..29ea9fa5d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-photo.md @@ -0,0 +1,22 @@ +```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 bytes = try await avatars.getPhoto( + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: "png", // optional + rating: "g", // optional + userId: "current()", // optional + emailHash: "<EMAIL_HASH>", // optional + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/get-qr.md b/examples/2.3.x/server-swift/examples/avatars/get-qr.md new file mode 100644 index 000000000..c5bfa168e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-qr.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 + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getQR( + text: "<TEXT>", + size: 1, // optional + margin: 0, // optional + download: false // optional +) + +``` 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 new file mode 100644 index 000000000..482905ea9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/get-screenshot.md @@ -0,0 +1,38 @@ +```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 + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getScreenshot( + url: "https://example.com", + headers: [ + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + ], // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional + theme: .dark, // optional + userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // optional + fullpage: true, // optional + locale: "en-US", // optional + timezone: .africaAbidjan, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: [.geolocation, .notifications], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional + output: .jpeg // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/create-archive.md b/examples/2.3.x/server-swift/examples/backups/create-archive.md new file mode 100644 index 000000000..ec92ce0b7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/create-archive.md @@ -0,0 +1,17 @@ +```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 backups = Backups(client) + +let backupArchive = try await backups.createArchive( + services: [.databases], + resourceId: "<RESOURCE_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/create-policy.md b/examples/2.3.x/server-swift/examples/backups/create-policy.md new file mode 100644 index 000000000..9e97b8872 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/create-policy.md @@ -0,0 +1,22 @@ +```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 backups = Backups(client) + +let backupPolicy = try await backups.createPolicy( + policyId: "<POLICY_ID>", + services: [.databases], + retention: 1, + schedule: "", + name: "<NAME>", // optional + resourceId: "<RESOURCE_ID>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/create-restoration.md b/examples/2.3.x/server-swift/examples/backups/create-restoration.md new file mode 100644 index 000000000..b709fa751 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/create-restoration.md @@ -0,0 +1,19 @@ +```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 backups = Backups(client) + +let backupRestoration = try await backups.createRestoration( + archiveId: "<ARCHIVE_ID>", + services: [.databases], + newResourceId: "<NEW_RESOURCE_ID>", // optional + newResourceName: "<NEW_RESOURCE_NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/delete-archive.md b/examples/2.3.x/server-swift/examples/backups/delete-archive.md new file mode 100644 index 000000000..a0201d3e2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/delete-archive.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 backups = Backups(client) + +let result = try await backups.deleteArchive( + archiveId: "<ARCHIVE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/delete-policy.md b/examples/2.3.x/server-swift/examples/backups/delete-policy.md new file mode 100644 index 000000000..75b469266 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/delete-policy.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 backups = Backups(client) + +let result = try await backups.deletePolicy( + policyId: "<POLICY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/get-archive.md b/examples/2.3.x/server-swift/examples/backups/get-archive.md new file mode 100644 index 000000000..c35f21d7e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/get-archive.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 backups = Backups(client) + +let backupArchive = try await backups.getArchive( + archiveId: "<ARCHIVE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/get-policy.md b/examples/2.3.x/server-swift/examples/backups/get-policy.md new file mode 100644 index 000000000..969113a8d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/get-policy.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 backups = Backups(client) + +let backupPolicy = try await backups.getPolicy( + policyId: "<POLICY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/get-restoration.md b/examples/2.3.x/server-swift/examples/backups/get-restoration.md new file mode 100644 index 000000000..35d370af7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/get-restoration.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 backups = Backups(client) + +let backupRestoration = try await backups.getRestoration( + restorationId: "<RESTORATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/list-archives.md b/examples/2.3.x/server-swift/examples/backups/list-archives.md new file mode 100644 index 000000000..9761b35e4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/list-archives.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 backups = Backups(client) + +let backupArchiveList = try await backups.listArchives( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/list-policies.md b/examples/2.3.x/server-swift/examples/backups/list-policies.md new file mode 100644 index 000000000..5af3f4af0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/list-policies.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 backups = Backups(client) + +let backupPolicyList = try await backups.listPolicies( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/list-restorations.md b/examples/2.3.x/server-swift/examples/backups/list-restorations.md new file mode 100644 index 000000000..b140e6436 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/list-restorations.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 backups = Backups(client) + +let backupRestorationList = try await backups.listRestorations( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/backups/update-policy.md b/examples/2.3.x/server-swift/examples/backups/update-policy.md new file mode 100644 index 000000000..c00f847ba --- /dev/null +++ b/examples/2.3.x/server-swift/examples/backups/update-policy.md @@ -0,0 +1,19 @@ +```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 backups = Backups(client) + +let backupPolicy = try await backups.updatePolicy( + policyId: "<POLICY_ID>", + name: "<NAME>", // optional + retention: 1, // optional + schedule: "", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-big-int-attribute.md new file mode 100644 index 000000000..506a044fc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-big-int-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributeBigint = try await databases.createBigIntAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 1000000, // optional + default: 0, // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-boolean-attribute.md new file mode 100644 index 000000000..4c3dc0c04 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeBoolean = try await databases.createBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: false, // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-collection.md b/examples/2.3.x/server-swift/examples/databases/create-collection.md new file mode 100644 index 000000000..6d90e7ea4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-collection.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let collection = try await databases.createCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-datetime-attribute.md new file mode 100644 index 000000000..cd336603e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-datetime-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeDatetime = try await databases.createDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-document.md b/examples/2.3.x/server-swift/examples/databases/create-document.md new file mode 100644 index 000000000..24829794d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-document.md @@ -0,0 +1,26 @@ +```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 databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` 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 new file mode 100644 index 000000000..1763ab133 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-documents.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 databases = Databases(client) + +let documentList = try await databases.createDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-email-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-email-attribute.md new file mode 100644 index 000000000..f26a08208 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-email-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeEmail = try await databases.createEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-enum-attribute.md new file mode 100644 index 000000000..7f8c7e4d2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-enum-attribute.md @@ -0,0 +1,24 @@ +```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 databases = Databases(client) + +let attributeEnum = try await databases.createEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + elements: [ + "active", + "inactive" + ], + required: false, + default: "active", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-float-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-float-attribute.md new file mode 100644 index 000000000..47420d27f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-float-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributeFloat = try await databases.createFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 100, // optional + default: 10.5, // optional + array: false // 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 new file mode 100644 index 000000000..ad4459aad --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-index.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let index = try await databases.createIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: .key, + attributes: [], + orders: [.asc], // optional + lengths: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-integer-attribute.md new file mode 100644 index 000000000..d17899163 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-integer-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributeInteger = try await databases.createIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 100, // optional + default: 10, // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-ip-attribute.md new file mode 100644 index 000000000..4156aa576 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-ip-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeIp = try await databases.createIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-line-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-line-attribute.md new file mode 100644 index 000000000..af55d16e4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-line-attribute.md @@ -0,0 +1,32 @@ +```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 databases = Databases(client) + +let attributeLine = try await databases.createLineAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-longtext-attribute.md new file mode 100644 index 000000000..59e3287a4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-longtext-attribute.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 databases = Databases(client) + +let attributeLongtext = try await databases.createLongtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-mediumtext-attribute.md new file mode 100644 index 000000000..b73a3b0fd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-mediumtext-attribute.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 databases = Databases(client) + +let attributeMediumtext = try await databases.createMediumtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-operations.md b/examples/2.3.x/server-swift/examples/databases/create-operations.md new file mode 100644 index 000000000..7257cc83a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-operations.md @@ -0,0 +1,26 @@ +```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 databases = Databases(client) + +let transaction = try await databases.createOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + [ + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": [ + "name": "Walter O'Brien" + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-point-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-point-attribute.md new file mode 100644 index 000000000..b3f70cf1c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-point-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributePoint = try await databases.createPointAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [ + 1, + 2 + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-polygon-attribute.md new file mode 100644 index 000000000..03f00ac22 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-polygon-attribute.md @@ -0,0 +1,38 @@ +```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 databases = Databases(client) + +let attributePolygon = try await databases.createPolygonAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [ + [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ], + [ + 1, + 2 + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-relationship-attribute.md new file mode 100644 index 000000000..4fb4e00a5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-relationship-attribute.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 databases = Databases(client) + +let attributeRelationship = try await databases.createRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "<KEY>", // optional + twoWayKey: "<TWO_WAY_KEY>", // optional + onDelete: .cascade // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-string-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-string-attribute.md new file mode 100644 index 000000000..55a9e98df --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-string-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributeString = try await databases.createStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-text-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-text-attribute.md new file mode 100644 index 000000000..930240354 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-text-attribute.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 databases = Databases(client) + +let attributeText = try await databases.createTextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-transaction.md b/examples/2.3.x/server-swift/examples/databases/create-transaction.md new file mode 100644 index 000000000..993d15609 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-transaction.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 databases = Databases(client) + +let transaction = try await databases.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-url-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-url-attribute.md new file mode 100644 index 000000000..cfb6dbf28 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-url-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeUrl = try await databases.createUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-swift/examples/databases/create-varchar-attribute.md new file mode 100644 index 000000000..cd4e90bf1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create-varchar-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributeVarchar = try await databases.createVarcharAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create.md b/examples/2.3.x/server-swift/examples/databases/create.md new file mode 100644 index 000000000..d2ef3bb6c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/create.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 databases = Databases(client) + +let database = try await databases.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-swift/examples/databases/decrement-document-attribute.md new file mode 100644 index 000000000..ef2f7eb03 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/decrement-document-attribute.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 + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.decrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, // optional + min: 0, // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/delete-attribute.md b/examples/2.3.x/server-swift/examples/databases/delete-attribute.md new file mode 100644 index 000000000..acb437bf4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/delete-attribute.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 databases = Databases(client) + +let result = try await databases.deleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/delete-collection.md b/examples/2.3.x/server-swift/examples/databases/delete-collection.md new file mode 100644 index 000000000..2c41909c0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/delete-collection.md @@ -0,0 +1,16 @@ +```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 databases = Databases(client) + +let result = try await databases.deleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/delete-document.md b/examples/2.3.x/server-swift/examples/databases/delete-document.md new file mode 100644 index 000000000..84559d0ec --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/delete-document.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 + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..81a24778d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/delete-documents.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 databases = Databases(client) + +let documentList = try await databases.deleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/delete-index.md b/examples/2.3.x/server-swift/examples/databases/delete-index.md new file mode 100644 index 000000000..d10399a64 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/delete-index.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 databases = Databases(client) + +let result = try await databases.deleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/delete-transaction.md b/examples/2.3.x/server-swift/examples/databases/delete-transaction.md new file mode 100644 index 000000000..220ad79b5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/delete-transaction.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 databases = Databases(client) + +let result = try await databases.deleteTransaction( + transactionId: "<TRANSACTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/delete.md b/examples/2.3.x/server-swift/examples/databases/delete.md new file mode 100644 index 000000000..162c59bd2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/delete.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 databases = Databases(client) + +let result = try await databases.delete( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/get-attribute.md b/examples/2.3.x/server-swift/examples/databases/get-attribute.md new file mode 100644 index 000000000..a92d4f9aa --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/get-attribute.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 databases = Databases(client) + +let result = try await databases.getAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/get-collection.md b/examples/2.3.x/server-swift/examples/databases/get-collection.md new file mode 100644 index 000000000..af43c69b4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/get-collection.md @@ -0,0 +1,16 @@ +```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 databases = Databases(client) + +let collection = try await databases.getCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/get-document.md b/examples/2.3.x/server-swift/examples/databases/get-document.md new file mode 100644 index 000000000..02daf3531 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/get-document.md @@ -0,0 +1,19 @@ +```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 databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/get-index.md b/examples/2.3.x/server-swift/examples/databases/get-index.md new file mode 100644 index 000000000..749c1f184 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/get-index.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 databases = Databases(client) + +let index = try await databases.getIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/get-transaction.md b/examples/2.3.x/server-swift/examples/databases/get-transaction.md new file mode 100644 index 000000000..41139294f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/get-transaction.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 databases = Databases(client) + +let transaction = try await databases.getTransaction( + transactionId: "<TRANSACTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/get.md b/examples/2.3.x/server-swift/examples/databases/get.md new file mode 100644 index 000000000..7f5817cfd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/get.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 databases = Databases(client) + +let database = try await databases.get( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-swift/examples/databases/increment-document-attribute.md new file mode 100644 index 000000000..1e7947ef9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/increment-document-attribute.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 + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.incrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, // optional + max: 100, // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/list-attributes.md b/examples/2.3.x/server-swift/examples/databases/list-attributes.md new file mode 100644 index 000000000..04be770e2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/list-attributes.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 databases = Databases(client) + +let attributeList = try await databases.listAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/list-collections.md b/examples/2.3.x/server-swift/examples/databases/list-collections.md new file mode 100644 index 000000000..961399d56 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/list-collections.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 databases = Databases(client) + +let collectionList = try await databases.listCollections( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/list-documents.md b/examples/2.3.x/server-swift/examples/databases/list-documents.md new file mode 100644 index 000000000..75ef8c7b8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/list-documents.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/list-indexes.md b/examples/2.3.x/server-swift/examples/databases/list-indexes.md new file mode 100644 index 000000000..45c3ea543 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/list-indexes.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 databases = Databases(client) + +let indexList = try await databases.listIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + total: false // 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 new file mode 100644 index 000000000..4059ddbf3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/list-transactions.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 databases = Databases(client) + +let transactionList = try await databases.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/list.md b/examples/2.3.x/server-swift/examples/databases/list.md new file mode 100644 index 000000000..88b98c25a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/list.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 databases = Databases(client) + +let databaseList = try await databases.list( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-big-int-attribute.md new file mode 100644 index 000000000..a7705878f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-big-int-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributeBigint = try await databases.updateBigIntAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 0, + min: 0, // optional + max: 1000000, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-boolean-attribute.md new file mode 100644 index 000000000..51916d405 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeBoolean = try await databases.updateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: false, + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-collection.md b/examples/2.3.x/server-swift/examples/databases/update-collection.md new file mode 100644 index 000000000..13d4dd51e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-collection.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 databases = Databases(client) + +let collection = try await databases.updateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", // optional + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-datetime-attribute.md new file mode 100644 index 000000000..5f5336af8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-datetime-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeDatetime = try await databases.updateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-document.md b/examples/2.3.x/server-swift/examples/databases/update-document.md new file mode 100644 index 000000000..d1e0bde06 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-document.md @@ -0,0 +1,26 @@ +```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 databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + ], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-documents.md b/examples/2.3.x/server-swift/examples/databases/update-documents.md new file mode 100644 index 000000000..7f7e641ce --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-documents.md @@ -0,0 +1,25 @@ +```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 databases = Databases(client) + +let documentList = try await databases.updateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + ], // optional + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-email-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-email-attribute.md new file mode 100644 index 000000000..fd627699f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-email-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeEmail = try await databases.updateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-enum-attribute.md new file mode 100644 index 000000000..57d2dc49d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-enum-attribute.md @@ -0,0 +1,24 @@ +```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 databases = Databases(client) + +let attributeEnum = try await databases.updateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + elements: [ + "active", + "inactive" + ], + required: false, + default: "active", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-float-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-float-attribute.md new file mode 100644 index 000000000..7e9d31dcf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-float-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributeFloat = try await databases.updateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 10.5, + min: 0, // optional + max: 100, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-integer-attribute.md new file mode 100644 index 000000000..0add61b47 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-integer-attribute.md @@ -0,0 +1,22 @@ +```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 databases = Databases(client) + +let attributeInteger = try await databases.updateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: 10, + min: 0, // optional + max: 100, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-ip-attribute.md new file mode 100644 index 000000000..f0ba0c439 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-ip-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeIp = try await databases.updateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-line-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-line-attribute.md new file mode 100644 index 000000000..fae9572f6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-line-attribute.md @@ -0,0 +1,33 @@ +```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 databases = Databases(client) + +let attributeLine = try await databases.updateLineAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ], // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-longtext-attribute.md new file mode 100644 index 000000000..f75217088 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-longtext-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeLongtext = try await databases.updateLongtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-mediumtext-attribute.md new file mode 100644 index 000000000..490236cbb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-mediumtext-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeMediumtext = try await databases.updateMediumtextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-point-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-point-attribute.md new file mode 100644 index 000000000..029c98d4c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-point-attribute.md @@ -0,0 +1,23 @@ +```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 databases = Databases(client) + +let attributePoint = try await databases.updatePointAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [ + 1, + 2 + ], // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-polygon-attribute.md new file mode 100644 index 000000000..a712e4df4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-polygon-attribute.md @@ -0,0 +1,39 @@ +```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 databases = Databases(client) + +let attributePolygon = try await databases.updatePolygonAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: [ + [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ], + [ + 1, + 2 + ] + ] + ], // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-relationship-attribute.md new file mode 100644 index 000000000..d3945db87 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-relationship-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeRelationship = try await databases.updateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + onDelete: .cascade, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-string-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-string-attribute.md new file mode 100644 index 000000000..c438659b8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-string-attribute.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 databases = Databases(client) + +let attributeString = try await databases.updateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-text-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-text-attribute.md new file mode 100644 index 000000000..5b1d6d23e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-text-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeText = try await databases.updateTextAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-transaction.md b/examples/2.3.x/server-swift/examples/databases/update-transaction.md new file mode 100644 index 000000000..7212240f2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-transaction.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 databases = Databases(client) + +let transaction = try await databases.updateTransaction( + transactionId: "<TRANSACTION_ID>", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-url-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-url-attribute.md new file mode 100644 index 000000000..842a1efd4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-url-attribute.md @@ -0,0 +1,20 @@ +```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 databases = Databases(client) + +let attributeUrl = try await databases.updateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-swift/examples/databases/update-varchar-attribute.md new file mode 100644 index 000000000..251d97ff5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update-varchar-attribute.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 databases = Databases(client) + +let attributeVarchar = try await databases.updateVarcharAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/update.md b/examples/2.3.x/server-swift/examples/databases/update.md new file mode 100644 index 000000000..f60d38ab4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/update.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 databases = Databases(client) + +let database = try await databases.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/upsert-document.md b/examples/2.3.x/server-swift/examples/databases/upsert-document.md new file mode 100644 index 000000000..ca7363fa6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/upsert-document.md @@ -0,0 +1,26 @@ +```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 databases = Databases(client) + +let document = try await databases.upsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..dbcc58e5e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/databases/upsert-documents.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 databases = Databases(client) + +let documentList = try await databases.upsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/create-collection.md b/examples/2.3.x/server-swift/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..fc6bb0447 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-collection.md @@ -0,0 +1,22 @@ +```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 documentsDB = DocumentsDB(client) + +let collection = try await documentsDB.createCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/create-document.md b/examples/2.3.x/server-swift/examples/documentsdb/create-document.md new file mode 100644 index 000000000..fda294ad1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-document.md @@ -0,0 +1,26 @@ +```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 documentsDB = DocumentsDB(client) + +let document = try await documentsDB.createDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], + permissions: [Permission.read(Role.any())], // optional + 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 new file mode 100644 index 000000000..9b61a9eb4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-documents.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 + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.createDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/create-failover.md b/examples/2.3.x/server-swift/examples/documentsdb/create-failover.md new file mode 100644 index 000000000..73b8f59f8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-failover.md @@ -0,0 +1,16 @@ +```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 documentsDB = DocumentsDB(client) + +let dedicatedDatabase = try await documentsDB.createFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_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 new file mode 100644 index 000000000..fae314f85 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-index.md @@ -0,0 +1,22 @@ +```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 documentsDB = DocumentsDB(client) + +let index = try await documentsDB.createIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: .key, + attributes: [], + orders: [.asc], // optional + lengths: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/create-operations.md b/examples/2.3.x/server-swift/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..8e5cdebeb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-operations.md @@ -0,0 +1,26 @@ +```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 documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.createOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + [ + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": [ + "name": "Walter O'Brien" + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-swift/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..9c31bf1b7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-transaction.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 documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/create.md b/examples/2.3.x/server-swift/examples/documentsdb/create.md new file mode 100644 index 000000000..6e3550864 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/create.md @@ -0,0 +1,20 @@ +```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 documentsDB = DocumentsDB(client) + +let database = try await documentsDB.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-swift/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..ae6daf0cd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/decrement-document-attribute.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 + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.decrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, // optional + min: 0, // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/delete-collection.md b/examples/2.3.x/server-swift/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..a1c703437 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/delete-collection.md @@ -0,0 +1,16 @@ +```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 documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/delete-document.md b/examples/2.3.x/server-swift/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..a596a9baf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/delete-document.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 + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..9c6e9c6ff --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/delete-documents.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 documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.deleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/delete-index.md b/examples/2.3.x/server-swift/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..12651993d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/delete-index.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 documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/delete-transaction.md b/examples/2.3.x/server-swift/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..8f9f12ad2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/delete-transaction.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 documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteTransaction( + transactionId: "<TRANSACTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/delete.md b/examples/2.3.x/server-swift/examples/documentsdb/delete.md new file mode 100644 index 000000000..7c34c3de9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/delete.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 documentsDB = DocumentsDB(client) + +let result = try await documentsDB.delete( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/get-collection.md b/examples/2.3.x/server-swift/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..177ff7430 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/get-collection.md @@ -0,0 +1,16 @@ +```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 documentsDB = DocumentsDB(client) + +let collection = try await documentsDB.getCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/get-document.md b/examples/2.3.x/server-swift/examples/documentsdb/get-document.md new file mode 100644 index 000000000..ec0ed9035 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/get-document.md @@ -0,0 +1,19 @@ +```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 documentsDB = DocumentsDB(client) + +let document = try await documentsDB.getDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/get-index.md b/examples/2.3.x/server-swift/examples/documentsdb/get-index.md new file mode 100644 index 000000000..19f3fb151 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/get-index.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 documentsDB = DocumentsDB(client) + +let index = try await documentsDB.getIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-swift/examples/documentsdb/get-replicas.md new file mode 100644 index 000000000..efff2fd43 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/get-replicas.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 documentsDB = DocumentsDB(client) + +let dedicatedDatabaseReplicas = try await documentsDB.getReplicas( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/get-status.md b/examples/2.3.x/server-swift/examples/documentsdb/get-status.md new file mode 100644 index 000000000..05c60a91b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/get-status.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 documentsDB = DocumentsDB(client) + +let databaseStatus = try await documentsDB.getStatus( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-swift/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..90ca83f84 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/get-transaction.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 documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.getTransaction( + transactionId: "<TRANSACTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/get.md b/examples/2.3.x/server-swift/examples/documentsdb/get.md new file mode 100644 index 000000000..87646fbbf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/get.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 documentsDB = DocumentsDB(client) + +let database = try await documentsDB.get( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-swift/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..d8abb8f08 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/increment-document-attribute.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 + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.incrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "<ATTRIBUTE>", + value: 1, // optional + max: 100, // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/list-collections.md b/examples/2.3.x/server-swift/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..42f4384e1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/list-collections.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 documentsDB = DocumentsDB(client) + +let collectionList = try await documentsDB.listCollections( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/list-documents.md b/examples/2.3.x/server-swift/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..72b84c013 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/list-documents.md @@ -0,0 +1,20 @@ +```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 documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.listDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-swift/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..9140f3c67 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/list-indexes.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 documentsDB = DocumentsDB(client) + +let indexList = try await documentsDB.listIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/list-operations.md b/examples/2.3.x/server-swift/examples/documentsdb/list-operations.md new file mode 100644 index 000000000..ef7bca270 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/list-operations.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 documentsDB = DocumentsDB(client) + +let dedicatedDatabaseOperationList = try await documentsDB.listOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-swift/examples/documentsdb/list-specifications.md new file mode 100644 index 000000000..2620ae2d4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/list-specifications.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let dedicatedDatabaseSpecificationList = try await documentsDB.listSpecifications() + +``` 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 new file mode 100644 index 000000000..f6eec7146 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/list-transactions.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 documentsDB = DocumentsDB(client) + +let transactionList = try await documentsDB.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/list.md b/examples/2.3.x/server-swift/examples/documentsdb/list.md new file mode 100644 index 000000000..461681ed5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/list.md @@ -0,0 +1,16 @@ +```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 documentsDB = DocumentsDB(client) + +let databaseList = try await documentsDB.list( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/update-collection.md b/examples/2.3.x/server-swift/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..1e7df8c71 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/update-collection.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 documentsDB = DocumentsDB(client) + +let collection = try await documentsDB.updateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/update-document.md b/examples/2.3.x/server-swift/examples/documentsdb/update-document.md new file mode 100644 index 000000000..e74e305a0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```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 documentsDB = DocumentsDB(client) + +let document = try await documentsDB.updateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/update-documents.md b/examples/2.3.x/server-swift/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..8931c91d0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/update-documents.md @@ -0,0 +1,19 @@ +```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 documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.updateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [:], // optional + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-swift/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..77ec18ea8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/update-transaction.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 documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.updateTransaction( + transactionId: "<TRANSACTION_ID>", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/update.md b/examples/2.3.x/server-swift/examples/documentsdb/update.md new file mode 100644 index 000000000..98311f0f2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/update.md @@ -0,0 +1,20 @@ +```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 documentsDB = DocumentsDB(client) + +let database = try await documentsDB.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-swift/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..c3b603089 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```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 documentsDB = DocumentsDB(client) + +let document = try await documentsDB.upsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..6e6ad9ea9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/documentsdb/upsert-documents.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 documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.upsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-swift/examples/domains/create-preset-google-workspace.md new file mode 100644 index 000000000..697ecd862 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-preset-google-workspace.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 domains = Domains(client) + +let dnsRecordsList = try await domains.createPresetGoogleWorkspace( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-swift/examples/domains/create-preset-i-cloud.md new file mode 100644 index 000000000..6d6958e42 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-preset-i-cloud.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 domains = Domains(client) + +let dnsRecordsList = try await domains.createPresetICloud( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-swift/examples/domains/create-preset-mailgun.md new file mode 100644 index 000000000..8529bf6ac --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-preset-mailgun.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 domains = Domains(client) + +let dnsRecordsList = try await domains.createPresetMailgun( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-swift/examples/domains/create-preset-outlook.md new file mode 100644 index 000000000..829a7191d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-preset-outlook.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 domains = Domains(client) + +let dnsRecordsList = try await domains.createPresetOutlook( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-swift/examples/domains/create-preset-proton-mail.md new file mode 100644 index 000000000..275aa96d9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-preset-proton-mail.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 domains = Domains(client) + +let dnsRecordsList = try await domains.createPresetProtonMail( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-swift/examples/domains/create-preset-zoho.md new file mode 100644 index 000000000..8f2a270e4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-preset-zoho.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 domains = Domains(client) + +let dnsRecordsList = try await domains.createPresetZoho( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-a.md b/examples/2.3.x/server-swift/examples/domains/create-record-a.md new file mode 100644 index 000000000..930213556 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-a.md @@ -0,0 +1,19 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-swift/examples/domains/create-record-aaaa.md new file mode 100644 index 000000000..00fa6716e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-aaaa.md @@ -0,0 +1,19 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordAAAA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-alias.md b/examples/2.3.x/server-swift/examples/domains/create-record-alias.md new file mode 100644 index 000000000..a6eb32b03 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-alias.md @@ -0,0 +1,19 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordAlias( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-caa.md b/examples/2.3.x/server-swift/examples/domains/create-record-caa.md new file mode 100644 index 000000000..8b997f0e0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-caa.md @@ -0,0 +1,19 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordCAA( + domainId: "<DOMAIN_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-cname.md b/examples/2.3.x/server-swift/examples/domains/create-record-cname.md new file mode 100644 index 000000000..a217350fc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-cname.md @@ -0,0 +1,19 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordCNAME( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-https.md b/examples/2.3.x/server-swift/examples/domains/create-record-https.md new file mode 100644 index 000000000..4a38d1a0d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-https.md @@ -0,0 +1,19 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordHTTPS( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-mx.md b/examples/2.3.x/server-swift/examples/domains/create-record-mx.md new file mode 100644 index 000000000..ca0b05d93 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-mx.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordMX( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-ns.md b/examples/2.3.x/server-swift/examples/domains/create-record-ns.md new file mode 100644 index 000000000..b6101585f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-ns.md @@ -0,0 +1,19 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordNS( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-srv.md b/examples/2.3.x/server-swift/examples/domains/create-record-srv.md new file mode 100644 index 000000000..e6c6624d7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-srv.md @@ -0,0 +1,22 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordSRV( + domainId: "<DOMAIN_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create-record-txt.md b/examples/2.3.x/server-swift/examples/domains/create-record-txt.md new file mode 100644 index 000000000..8615af386 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create-record-txt.md @@ -0,0 +1,19 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.createRecordTXT( + domainId: "<DOMAIN_ID>", + name: "", + ttl: 1, + value: "<VALUE>", // optional + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/create.md b/examples/2.3.x/server-swift/examples/domains/create.md new file mode 100644 index 000000000..6a4b0017e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/create.md @@ -0,0 +1,16 @@ +```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 domains = Domains(client) + +let domain = try await domains.create( + teamId: "<TEAM_ID>", + domain: "example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/delete-record.md b/examples/2.3.x/server-swift/examples/domains/delete-record.md new file mode 100644 index 000000000..2df4e80e7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/delete-record.md @@ -0,0 +1,16 @@ +```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 domains = Domains(client) + +let result = try await domains.deleteRecord( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/delete.md b/examples/2.3.x/server-swift/examples/domains/delete.md new file mode 100644 index 000000000..3028729d3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/delete.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 domains = Domains(client) + +let result = try await domains.delete( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-swift/examples/domains/get-preset-google-workspace.md new file mode 100644 index 000000000..d633b0b94 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-preset-google-workspace.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 domains = Domains(client) + +let dnsRecordsList = try await domains.getPresetGoogleWorkspace( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-swift/examples/domains/get-preset-i-cloud.md new file mode 100644 index 000000000..297c189f5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-preset-i-cloud.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 domains = Domains(client) + +let dnsRecordsList = try await domains.getPresetICloud( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-swift/examples/domains/get-preset-mailgun.md new file mode 100644 index 000000000..f388758c0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-preset-mailgun.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 domains = Domains(client) + +let dnsRecordsList = try await domains.getPresetMailgun( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-swift/examples/domains/get-preset-outlook.md new file mode 100644 index 000000000..ecf69dacf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-preset-outlook.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 domains = Domains(client) + +let dnsRecordsList = try await domains.getPresetOutlook( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-swift/examples/domains/get-preset-proton-mail.md new file mode 100644 index 000000000..666cde984 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-preset-proton-mail.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 domains = Domains(client) + +let dnsRecordsList = try await domains.getPresetProtonMail( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-swift/examples/domains/get-preset-zoho.md new file mode 100644 index 000000000..07841df22 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-preset-zoho.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 domains = Domains(client) + +let dnsRecordsList = try await domains.getPresetZoho( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-price.md b/examples/2.3.x/server-swift/examples/domains/get-price.md new file mode 100644 index 000000000..29a19a766 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-price.md @@ -0,0 +1,18 @@ +```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 domains = Domains(client) + +let domainPrice = try await domains.getPrice( + domain: "example.com", + periodYears: 0, // optional + registrationType: .new // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-record.md b/examples/2.3.x/server-swift/examples/domains/get-record.md new file mode 100644 index 000000000..e0d64994b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-record.md @@ -0,0 +1,16 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.getRecord( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-transfer-status.md b/examples/2.3.x/server-swift/examples/domains/get-transfer-status.md new file mode 100644 index 000000000..540f9ea0d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-transfer-status.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 domains = Domains(client) + +let domainTransferStatus = try await domains.getTransferStatus( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get-zone.md b/examples/2.3.x/server-swift/examples/domains/get-zone.md new file mode 100644 index 000000000..a9b60ef85 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get-zone.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 domains = Domains(client) + +let result = try await domains.getZone( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/get.md b/examples/2.3.x/server-swift/examples/domains/get.md new file mode 100644 index 000000000..199d7ce52 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/get.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 domains = Domains(client) + +let domain = try await domains.get( + domainId: "<DOMAIN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/list-prices.md b/examples/2.3.x/server-swift/examples/domains/list-prices.md new file mode 100644 index 000000000..2110e9fdb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/list-prices.md @@ -0,0 +1,18 @@ +```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 domains = Domains(client) + +let domainPricesList = try await domains.listPrices( + domains: [], + periodYears: 0, // optional + registrationType: .new // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/list-records.md b/examples/2.3.x/server-swift/examples/domains/list-records.md new file mode 100644 index 000000000..a64038e3a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/list-records.md @@ -0,0 +1,16 @@ +```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 domains = Domains(client) + +let dnsRecordsList = try await domains.listRecords( + domainId: "<DOMAIN_ID>", + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/list.md b/examples/2.3.x/server-swift/examples/domains/list.md new file mode 100644 index 000000000..2255280ff --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/list.md @@ -0,0 +1,16 @@ +```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 domains = Domains(client) + +let domainsList = try await domains.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-nameservers.md b/examples/2.3.x/server-swift/examples/domains/update-nameservers.md new file mode 100644 index 000000000..c399f27b9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-nameservers.md @@ -0,0 +1,16 @@ +```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 domains = Domains(client) + +let domain = try await domains.updateNameservers( + domainId: "<DOMAIN_ID>", + nameservers: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-a.md b/examples/2.3.x/server-swift/examples/domains/update-record-a.md new file mode 100644 index 000000000..c1bc889a6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-a.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-swift/examples/domains/update-record-aaaa.md new file mode 100644 index 000000000..166d49938 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-aaaa.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordAAAA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-alias.md b/examples/2.3.x/server-swift/examples/domains/update-record-alias.md new file mode 100644 index 000000000..1ca8f8c95 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-alias.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordAlias( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-caa.md b/examples/2.3.x/server-swift/examples/domains/update-record-caa.md new file mode 100644 index 000000000..43f79daaa --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-caa.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordCAA( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-cname.md b/examples/2.3.x/server-swift/examples/domains/update-record-cname.md new file mode 100644 index 000000000..720e3b50b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-cname.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordCNAME( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-https.md b/examples/2.3.x/server-swift/examples/domains/update-record-https.md new file mode 100644 index 000000000..d380a9869 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-https.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordHTTPS( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-mx.md b/examples/2.3.x/server-swift/examples/domains/update-record-mx.md new file mode 100644 index 000000000..c5ba8bcb0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-mx.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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordMX( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-ns.md b/examples/2.3.x/server-swift/examples/domains/update-record-ns.md new file mode 100644 index 000000000..6a1b42189 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-ns.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordNS( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-srv.md b/examples/2.3.x/server-swift/examples/domains/update-record-srv.md new file mode 100644 index 000000000..80c4f32b4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-srv.md @@ -0,0 +1,23 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordSRV( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + priority: 0, + weight: 0, + port: 0, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-record-txt.md b/examples/2.3.x/server-swift/examples/domains/update-record-txt.md new file mode 100644 index 000000000..a721d733d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-record-txt.md @@ -0,0 +1,20 @@ +```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 domains = Domains(client) + +let dnsRecord = try await domains.updateRecordTXT( + domainId: "<DOMAIN_ID>", + recordId: "<RECORD_ID>", + name: "", + value: "<VALUE>", + ttl: 1, + comment: "<COMMENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-team.md b/examples/2.3.x/server-swift/examples/domains/update-team.md new file mode 100644 index 000000000..c0e88863e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-team.md @@ -0,0 +1,16 @@ +```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 domains = Domains(client) + +let domain = try await domains.updateTeam( + domainId: "<DOMAIN_ID>", + teamId: "<TEAM_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/update-zone.md b/examples/2.3.x/server-swift/examples/domains/update-zone.md new file mode 100644 index 000000000..ab7a658b9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/update-zone.md @@ -0,0 +1,16 @@ +```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 domains = Domains(client) + +let domain = try await domains.updateZone( + domainId: "<DOMAIN_ID>", + content: "<CONTENT>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/domains/verify-nameservers.md b/examples/2.3.x/server-swift/examples/domains/verify-nameservers.md new file mode 100644 index 000000000..3df3730d7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/domains/verify-nameservers.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 domains = Domains(client) + +let domain = try await domains.verifyNameservers( + domainId: "<DOMAIN_ID>" +) + +``` 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 new file mode 100644 index 000000000..85afbc743 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/embeddings/create-text-embeddings.md @@ -0,0 +1,17 @@ +```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 embeddings = Embeddings(client) + +let embeddingList = try await embeddings.createTextEmbeddings( + texts: [], + model: .nomicEmbedText // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/create-deployment.md b/examples/2.3.x/server-swift/examples/functions/create-deployment.md new file mode 100644 index 000000000..b38a94405 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/create-deployment.md @@ -0,0 +1,19 @@ +```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 functions = Functions(client) + +let deployment = try await functions.createDeployment( + functionId: "<FUNCTION_ID>", + code: InputFile.fromPath("file.png"), + activate: false, + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-swift/examples/functions/create-duplicate-deployment.md new file mode 100644 index 000000000..4133a8adf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/create-duplicate-deployment.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 functions = Functions(client) + +let deployment = try await functions.createDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/create-execution.md b/examples/2.3.x/server-swift/examples/functions/create-execution.md new file mode 100644 index 000000000..25c96eec9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/create-execution.md @@ -0,0 +1,22 @@ +```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 + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", // optional + async: false, // optional + path: "<PATH>", // optional + method: .gET, // optional + headers: [:], // optional + scheduledAt: "<SCHEDULED_AT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/create-template-deployment.md b/examples/2.3.x/server-swift/examples/functions/create-template-deployment.md new file mode 100644 index 000000000..65cba8d6b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/create-template-deployment.md @@ -0,0 +1,22 @@ +```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 functions = Functions(client) + +let deployment = try await functions.createTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + type: .commit, + reference: "<REFERENCE>", + activate: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/create-variable.md b/examples/2.3.x/server-swift/examples/functions/create-variable.md new file mode 100644 index 000000000..6cc280ffd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/create-variable.md @@ -0,0 +1,19 @@ +```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 functions = Functions(client) + +let variable = try await functions.createVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-swift/examples/functions/create-vcs-deployment.md new file mode 100644 index 000000000..d15745b6b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/create-vcs-deployment.md @@ -0,0 +1,19 @@ +```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 functions = Functions(client) + +let deployment = try await functions.createVcsDeployment( + functionId: "<FUNCTION_ID>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/create.md b/examples/2.3.x/server-swift/examples/functions/create.md new file mode 100644 index 000000000..a6cc75278 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/create.md @@ -0,0 +1,39 @@ +```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 functions = Functions(client) + +let function = try await functions.create( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .node145, + execute: [ + "any" + ], // optional + events: [], // optional + schedule: "0 0 * * *", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: [.projectRead], // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: "s-1vcpu-512mb", // optional + runtimeSpecification: "s-1vcpu-512mb", // optional + deploymentRetention: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/delete-deployment.md b/examples/2.3.x/server-swift/examples/functions/delete-deployment.md new file mode 100644 index 000000000..5aa4a29c1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/delete-deployment.md @@ -0,0 +1,16 @@ +```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 functions = Functions(client) + +let result = try await functions.deleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/delete-execution.md b/examples/2.3.x/server-swift/examples/functions/delete-execution.md new file mode 100644 index 000000000..3f38299de --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/delete-execution.md @@ -0,0 +1,16 @@ +```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 functions = Functions(client) + +let result = try await functions.deleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/delete-variable.md b/examples/2.3.x/server-swift/examples/functions/delete-variable.md new file mode 100644 index 000000000..c62fbdb1c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/delete-variable.md @@ -0,0 +1,16 @@ +```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 functions = Functions(client) + +let result = try await functions.deleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/delete.md b/examples/2.3.x/server-swift/examples/functions/delete.md new file mode 100644 index 000000000..26694f6e2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/delete.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 functions = Functions(client) + +let result = try await functions.delete( + functionId: "<FUNCTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/get-deployment-download.md b/examples/2.3.x/server-swift/examples/functions/get-deployment-download.md new file mode 100644 index 000000000..6d3674e3f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/get-deployment-download.md @@ -0,0 +1,19 @@ +```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 functions = Functions(client) + +let bytes = try await functions.getDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: .source, // optional + token: "<TOKEN>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/get-deployment.md b/examples/2.3.x/server-swift/examples/functions/get-deployment.md new file mode 100644 index 000000000..f0bfe2d5e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/get-deployment.md @@ -0,0 +1,16 @@ +```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 functions = Functions(client) + +let deployment = try await functions.getDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/get-execution.md b/examples/2.3.x/server-swift/examples/functions/get-execution.md new file mode 100644 index 000000000..93f301a11 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +```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 functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/get-variable.md b/examples/2.3.x/server-swift/examples/functions/get-variable.md new file mode 100644 index 000000000..2d1d6b268 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/get-variable.md @@ -0,0 +1,16 @@ +```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 functions = Functions(client) + +let variable = try await functions.getVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/get.md b/examples/2.3.x/server-swift/examples/functions/get.md new file mode 100644 index 000000000..b3a2694ff --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/get.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 functions = Functions(client) + +let function = try await functions.get( + functionId: "<FUNCTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/list-deployments.md b/examples/2.3.x/server-swift/examples/functions/list-deployments.md new file mode 100644 index 000000000..16a263249 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/list-deployments.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 functions = Functions(client) + +let deploymentList = try await functions.listDeployments( + functionId: "<FUNCTION_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/list-executions.md b/examples/2.3.x/server-swift/examples/functions/list-executions.md new file mode 100644 index 000000000..86d87d8d1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/list-executions.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 + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "<FUNCTION_ID>", + queries: [], // optional + total: false // 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 new file mode 100644 index 000000000..447e11eb3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/list-runtimes.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let runtimeList = try await functions.listRuntimes() + +``` 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 new file mode 100644 index 000000000..f351a57b1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/list-specifications.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 functions = Functions(client) + +let specificationList = try await functions.listSpecifications( + type: "runtimes" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/list-variables.md b/examples/2.3.x/server-swift/examples/functions/list-variables.md new file mode 100644 index 000000000..ff4d60c8f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/list-variables.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 functions = Functions(client) + +let variableList = try await functions.listVariables( + functionId: "<FUNCTION_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/list.md b/examples/2.3.x/server-swift/examples/functions/list.md new file mode 100644 index 000000000..a8f641ed0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/list.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 functions = Functions(client) + +let functionList = try await functions.list( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/update-deployment-status.md b/examples/2.3.x/server-swift/examples/functions/update-deployment-status.md new file mode 100644 index 000000000..a6c23a57b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/update-deployment-status.md @@ -0,0 +1,16 @@ +```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 functions = Functions(client) + +let deployment = try await functions.updateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/update-function-deployment.md b/examples/2.3.x/server-swift/examples/functions/update-function-deployment.md new file mode 100644 index 000000000..71a50fa6c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/update-function-deployment.md @@ -0,0 +1,16 @@ +```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 functions = Functions(client) + +let function = try await functions.updateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/update-variable.md b/examples/2.3.x/server-swift/examples/functions/update-variable.md new file mode 100644 index 000000000..829e7fb5b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/update-variable.md @@ -0,0 +1,19 @@ +```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 functions = Functions(client) + +let variable = try await functions.updateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", // optional + value: "<VALUE>", // optional + secret: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/functions/update.md b/examples/2.3.x/server-swift/examples/functions/update.md new file mode 100644 index 000000000..2e6e5695c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/functions/update.md @@ -0,0 +1,39 @@ +```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 functions = Functions(client) + +let function = try await functions.update( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .node145, // optional + execute: [ + "any" + ], // optional + events: [], // optional + schedule: "0 0 * * *", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: [.projectRead], // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: "s-1vcpu-512mb", // optional + runtimeSpecification: "s-1vcpu-512mb", // optional + deploymentRetention: 0 // 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 new file mode 100644 index 000000000..9c3cf1168 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/graphql/mutation.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 graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/graphql/query.md b/examples/2.3.x/server-swift/examples/graphql/query.md new file mode 100644 index 000000000..9ce16dcc7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/graphql/query.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 graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/locale/get.md b/examples/2.3.x/server-swift/examples/locale/get.md new file mode 100644 index 000000000..ca305c0dc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/locale/get.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 locale = Locale(client) + +let locale = try await locale.get() + +``` 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 new file mode 100644 index 000000000..dd0f9fb63 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/locale/list-codes.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 locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + +``` 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 new file mode 100644 index 000000000..f37daceff --- /dev/null +++ b/examples/2.3.x/server-swift/examples/locale/list-continents.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 locale = Locale(client) + +let continentList = try await locale.listContinents() + +``` 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 new file mode 100644 index 000000000..b858b31d9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/locale/list-countries-eu.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 locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + +``` 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 new file mode 100644 index 000000000..739c490ba --- /dev/null +++ b/examples/2.3.x/server-swift/examples/locale/list-countries-phones.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 locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + +``` 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 new file mode 100644 index 000000000..8aa3bcf75 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/locale/list-countries.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 locale = Locale(client) + +let countryList = try await locale.listCountries() + +``` 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 new file mode 100644 index 000000000..d1ce956b6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/locale/list-currencies.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 locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + +``` 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 new file mode 100644 index 000000000..ed444bf58 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/locale/list-languages.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 locale = Locale(client) + +let languageList = try await locale.listLanguages() + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-apns-provider.md new file mode 100644 index 000000000..5330efd9d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-apns-provider.md @@ -0,0 +1,22 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createAPNSProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false, // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-appwrite-provider.md new file mode 100644 index 000000000..54dccdcbc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-appwrite-provider.md @@ -0,0 +1,19 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createAppwriteProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, // optional + qos: 0, // optional + expiry: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-email.md b/examples/2.3.x/server-swift/examples/messaging/create-email.md new file mode 100644 index 000000000..82c4bbb37 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-email.md @@ -0,0 +1,28 @@ +```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 messaging = Messaging(client) + +let message = try await messaging.createEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: [], // optional + users: [], // optional + targets: [], // 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 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-fcm-provider.md new file mode 100644 index 000000000..5b80c5ad8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-fcm-provider.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 messaging = Messaging(client) + +let provider = try await messaging.createFCMProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: [:], // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-mailgun-provider.md new file mode 100644 index 000000000..03407e5c3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,24 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + domain: "example.com", // optional + isEuRegion: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-msg-91-provider.md new file mode 100644 index 000000000..674eff6b4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-msg-91-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>", // optional + enabled: 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 new file mode 100644 index 000000000..e2db2e6de --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-push.md @@ -0,0 +1,34 @@ +```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 messaging = Messaging(client) + +let message = try await messaging.createPush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: [:], // optional + action: "<ACTION>", // optional + image: "<ID1:ID2>", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-resend-provider.md new file mode 100644 index 000000000..77a8e24ed --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-resend-provider.md @@ -0,0 +1,22 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createResendProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 000000000..c6046018a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,22 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-ses-provider.md new file mode 100644 index 000000000..5184d79a2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-ses-provider.md @@ -0,0 +1,24 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createSesProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + accessKey: "<ACCESS_KEY>", // optional + secretKey: "<SECRET_KEY>", // optional + region: "<REGION>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-sms.md b/examples/2.3.x/server-swift/examples/messaging/create-sms.md new file mode 100644 index 000000000..d2a1a7c48 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-sms.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 messaging = Messaging(client) + +let message = try await messaging.createSMS( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: "2020-10-15T06:38:00.000+00:00" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-smtp-provider.md new file mode 100644 index 000000000..763770b3f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-smtp-provider.md @@ -0,0 +1,29 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createSMTPProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 587, // optional + username: "<USERNAME>", // optional + password: "password", // optional + encryption: .none, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-subscriber.md b/examples/2.3.x/server-swift/examples/messaging/create-subscriber.md new file mode 100644 index 000000000..124604063 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-subscriber.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 + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let messaging = Messaging(client) + +let subscriber = try await messaging.createSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-telesign-provider.md new file mode 100644 index 000000000..984ca29df --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-telesign-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-textmagic-provider.md new file mode 100644 index 000000000..49a7ae2e7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-topic.md b/examples/2.3.x/server-swift/examples/messaging/create-topic.md new file mode 100644 index 000000000..642b33c11 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-topic.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 messaging = Messaging(client) + +let topic = try await messaging.createTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: [ + "any" + ], // optional + qos: 0, // optional + expiry: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-twilio-provider.md new file mode 100644 index 000000000..87af6c33b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-twilio-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "<FROM>", // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-swift/examples/messaging/create-vonage-provider.md new file mode 100644 index 000000000..59a592078 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/create-vonage-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.createVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/delete-provider.md b/examples/2.3.x/server-swift/examples/messaging/delete-provider.md new file mode 100644 index 000000000..b4ec57801 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/delete-provider.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 messaging = Messaging(client) + +let result = try await messaging.deleteProvider( + providerId: "<PROVIDER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/delete-subscriber.md b/examples/2.3.x/server-swift/examples/messaging/delete-subscriber.md new file mode 100644 index 000000000..f1b06dede --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let messaging = Messaging(client) + +let result = try await messaging.deleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/delete-topic.md b/examples/2.3.x/server-swift/examples/messaging/delete-topic.md new file mode 100644 index 000000000..5f6c33ffe --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/delete-topic.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 messaging = Messaging(client) + +let result = try await messaging.deleteTopic( + topicId: "<TOPIC_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/delete.md b/examples/2.3.x/server-swift/examples/messaging/delete.md new file mode 100644 index 000000000..0c5e13461 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/delete.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 messaging = Messaging(client) + +let result = try await messaging.delete( + messageId: "<MESSAGE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/get-message.md b/examples/2.3.x/server-swift/examples/messaging/get-message.md new file mode 100644 index 000000000..ca7b9dd7d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/get-message.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 messaging = Messaging(client) + +let message = try await messaging.getMessage( + messageId: "<MESSAGE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/get-provider.md b/examples/2.3.x/server-swift/examples/messaging/get-provider.md new file mode 100644 index 000000000..9331f7bad --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/get-provider.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 messaging = Messaging(client) + +let provider = try await messaging.getProvider( + providerId: "<PROVIDER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/get-subscriber.md b/examples/2.3.x/server-swift/examples/messaging/get-subscriber.md new file mode 100644 index 000000000..ece8b41f3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/get-subscriber.md @@ -0,0 +1,16 @@ +```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 messaging = Messaging(client) + +let subscriber = try await messaging.getSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/get-topic.md b/examples/2.3.x/server-swift/examples/messaging/get-topic.md new file mode 100644 index 000000000..4f19c7181 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/get-topic.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 messaging = Messaging(client) + +let topic = try await messaging.getTopic( + topicId: "<TOPIC_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/list-messages.md b/examples/2.3.x/server-swift/examples/messaging/list-messages.md new file mode 100644 index 000000000..e4da82c87 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/list-messages.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 messaging = Messaging(client) + +let messageList = try await messaging.listMessages( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/list-providers.md b/examples/2.3.x/server-swift/examples/messaging/list-providers.md new file mode 100644 index 000000000..36f83d38d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/list-providers.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 messaging = Messaging(client) + +let providerList = try await messaging.listProviders( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/list-subscribers.md b/examples/2.3.x/server-swift/examples/messaging/list-subscribers.md new file mode 100644 index 000000000..cc84e6cd7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/list-subscribers.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 messaging = Messaging(client) + +let subscriberList = try await messaging.listSubscribers( + topicId: "<TOPIC_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/list-targets.md b/examples/2.3.x/server-swift/examples/messaging/list-targets.md new file mode 100644 index 000000000..8927e8853 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/list-targets.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 messaging = Messaging(client) + +let targetList = try await messaging.listTargets( + messageId: "<MESSAGE_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/list-topics.md b/examples/2.3.x/server-swift/examples/messaging/list-topics.md new file mode 100644 index 000000000..57526d45f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/list-topics.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 messaging = Messaging(client) + +let topicList = try await messaging.listTopics( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-apns-provider.md new file mode 100644 index 000000000..a5a5aa12b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-apns-provider.md @@ -0,0 +1,22 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateAPNSProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-appwrite-provider.md new file mode 100644 index 000000000..43f6f0ea8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-appwrite-provider.md @@ -0,0 +1,19 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateAppwriteProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + qos: 0, // optional + expiry: 0 // 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 new file mode 100644 index 000000000..287807776 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-email.md @@ -0,0 +1,28 @@ +```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 messaging = Messaging(client) + +let message = try await messaging.updateEmail( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + replyToEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional + attachments: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-fcm-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-fcm-provider.md new file mode 100644 index 000000000..bc98b1c9f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-fcm-provider.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 messaging = Messaging(client) + +let provider = try await messaging.updateFCMProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + serviceAccountJSON: [:] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-mailgun-provider.md new file mode 100644 index 000000000..afecdef11 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,24 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + apiKey: "<API_KEY>", // optional + domain: "example.com", // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-msg-91-provider.md new file mode 100644 index 000000000..adaf9bd14 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-msg-91-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>" // 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 new file mode 100644 index 000000000..3266d4af4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-push.md @@ -0,0 +1,34 @@ +```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 messaging = Messaging(client) + +let message = try await messaging.updatePush( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + title: "<TITLE>", // optional + body: "<BODY>", // optional + data: [:], // optional + action: "<ACTION>", // optional + image: "<ID1:ID2>", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 1, // optional + draft: false, // optional + scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-resend-provider.md new file mode 100644 index 000000000..a36982b2c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-resend-provider.md @@ -0,0 +1,22 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateResendProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 000000000..28b489ac5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,22 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-ses-provider.md new file mode 100644 index 000000000..3a3b9387d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-ses-provider.md @@ -0,0 +1,24 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateSesProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accessKey: "<ACCESS_KEY>", // optional + secretKey: "<SECRET_KEY>", // optional + region: "<REGION>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // 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 new file mode 100644 index 000000000..668625ffe --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-sms.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 messaging = Messaging(client) + +let message = try await messaging.updateSMS( + messageId: "<MESSAGE_ID>", + 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/messaging/update-smtp-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-smtp-provider.md new file mode 100644 index 000000000..c9d2a5e5f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-smtp-provider.md @@ -0,0 +1,29 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateSMTPProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + host: "<HOST>", // optional + port: 1, // optional + username: "<USERNAME>", // optional + password: "password", // optional + encryption: .none, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-telesign-provider.md new file mode 100644 index 000000000..2ce8a03ea --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-telesign-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-textmagic-provider.md new file mode 100644 index 000000000..b43d55ae1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-topic.md b/examples/2.3.x/server-swift/examples/messaging/update-topic.md new file mode 100644 index 000000000..bca858d30 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-topic.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 messaging = Messaging(client) + +let topic = try await messaging.updateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", // optional + subscribe: [ + "any" + ], // optional + qos: 0, // optional + expiry: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-twilio-provider.md new file mode 100644 index 000000000..959f7f9e4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-twilio-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + from: "<FROM>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-swift/examples/messaging/update-vonage-provider.md new file mode 100644 index 000000000..fc1ed2487 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/messaging/update-vonage-provider.md @@ -0,0 +1,20 @@ +```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 messaging = Messaging(client) + +let provider = try await messaging.updateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + from: "<FROM>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-swift/examples/mongo/create-backup-policy.md new file mode 100644 index 000000000..14a2ddbee --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/create-backup-policy.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 mongo = Mongo(client) + +let backupPolicy = try await mongo.createBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/create-backup.md b/examples/2.3.x/server-swift/examples/mongo/create-backup.md new file mode 100644 index 000000000..64c1021d9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/create-backup.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabaseBackup = try await mongo.createBackup( + databaseId: "<DATABASE_ID>", + type: "full" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/create-branch.md b/examples/2.3.x/server-swift/examples/mongo/create-branch.md new file mode 100644 index 000000000..9be5484be --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/create-branch.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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.createBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>", // optional + ttl: 300 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/create-failover.md b/examples/2.3.x/server-swift/examples/mongo/create-failover.md new file mode 100644 index 000000000..75508b430 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/create-failover.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.createFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/create-migration.md b/examples/2.3.x/server-swift/examples/mongo/create-migration.md new file mode 100644 index 000000000..0abf58050 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/create-migration.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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.createMigration( + databaseId: "<DATABASE_ID>", + targetType: "shared", + specification: "<SPECIFICATION>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/create-restoration.md b/examples/2.3.x/server-swift/examples/mongo/create-restoration.md new file mode 100644 index 000000000..ba257648b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/create-restoration.md @@ -0,0 +1,19 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabaseRestoration = try await mongo.createRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", // optional + backupId: "<BACKUP_ID>", // optional + targetDatabaseId: "<TARGET_DATABASE_ID>", // optional + targetTime: "2020-10-15T06:38:00.000+00:00" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/create-upgrade.md b/examples/2.3.x/server-swift/examples/mongo/create-upgrade.md new file mode 100644 index 000000000..3404f200b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/create-upgrade.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.createUpgrade( + databaseId: "<DATABASE_ID>", + targetVersion: "<TARGET_VERSION>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/create.md b/examples/2.3.x/server-swift/examples/mongo/create.md new file mode 100644 index 000000000..7644f6806 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/create.md @@ -0,0 +1,28 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/delete-backup-policy.md b/examples/2.3.x/server-swift/examples/mongo/delete-backup-policy.md new file mode 100644 index 000000000..90f989f33 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/delete-backup-policy.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let result = try await mongo.deleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/delete-backup.md b/examples/2.3.x/server-swift/examples/mongo/delete-backup.md new file mode 100644 index 000000000..3297e9b3d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/delete-backup.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let result = try await mongo.deleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/delete-branch.md b/examples/2.3.x/server-swift/examples/mongo/delete-branch.md new file mode 100644 index 000000000..d81731144 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/delete-branch.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.deleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/delete.md b/examples/2.3.x/server-swift/examples/mongo/delete.md new file mode 100644 index 000000000..6948720fb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/delete.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 mongo = Mongo(client) + +let result = try await mongo.delete( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-swift/examples/mongo/get-backup-policy.md new file mode 100644 index 000000000..a67314ade --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/get-backup-policy.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let backupPolicy = try await mongo.getBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/get-backup.md b/examples/2.3.x/server-swift/examples/mongo/get-backup.md new file mode 100644 index 000000000..5d70aeb95 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/get-backup.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabaseBackup = try await mongo.getBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/get-pitr.md b/examples/2.3.x/server-swift/examples/mongo/get-pitr.md new file mode 100644 index 000000000..a53f857ee --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/get-pitr.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 mongo = Mongo(client) + +let dedicatedDatabasePITRWindows = try await mongo.getPitr( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/get-replicas.md b/examples/2.3.x/server-swift/examples/mongo/get-replicas.md new file mode 100644 index 000000000..66474da76 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/get-replicas.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 mongo = Mongo(client) + +let dedicatedDatabaseReplicas = try await mongo.getReplicas( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/get-restoration.md b/examples/2.3.x/server-swift/examples/mongo/get-restoration.md new file mode 100644 index 000000000..00f87cb34 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/get-restoration.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabaseRestoration = try await mongo.getRestoration( + databaseId: "<DATABASE_ID>", + restorationId: "<RESTORATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/get-status.md b/examples/2.3.x/server-swift/examples/mongo/get-status.md new file mode 100644 index 000000000..91f4fe37f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/get-status.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 mongo = Mongo(client) + +let databaseStatus = try await mongo.getStatus( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/get.md b/examples/2.3.x/server-swift/examples/mongo/get.md new file mode 100644 index 000000000..acfa35516 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/get.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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.get( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-swift/examples/mongo/list-backup-policies.md new file mode 100644 index 000000000..0c3a190b7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/list-backup-policies.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let backupPolicyList = try await mongo.listBackupPolicies( + databaseId: "<DATABASE_ID>", + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/list-backups.md b/examples/2.3.x/server-swift/examples/mongo/list-backups.md new file mode 100644 index 000000000..c75d180b4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/list-backups.md @@ -0,0 +1,16 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabaseBackupList = try await mongo.listBackups( + databaseId: "<DATABASE_ID>", + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/list-branches.md b/examples/2.3.x/server-swift/examples/mongo/list-branches.md new file mode 100644 index 000000000..3986e1456 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/list-branches.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 mongo = Mongo(client) + +let dedicatedDatabaseBranchList = try await mongo.listBranches( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/list-operations.md b/examples/2.3.x/server-swift/examples/mongo/list-operations.md new file mode 100644 index 000000000..3aaf08a68 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/list-operations.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 mongo = Mongo(client) + +let dedicatedDatabaseOperationList = try await mongo.listOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/list-restorations.md b/examples/2.3.x/server-swift/examples/mongo/list-restorations.md new file mode 100644 index 000000000..a01ac3494 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/list-restorations.md @@ -0,0 +1,19 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabaseRestorationList = try await mongo.listRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", // optional + type: "backup", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/list-specifications.md b/examples/2.3.x/server-swift/examples/mongo/list-specifications.md new file mode 100644 index 000000000..99b064661 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/list-specifications.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let mongo = Mongo(client) + +let dedicatedDatabaseSpecificationList = try await mongo.listSpecifications() + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/list.md b/examples/2.3.x/server-swift/examples/mongo/list.md new file mode 100644 index 000000000..685acdaff --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/list.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 mongo = Mongo(client) + +let dedicatedDatabaseList = try await mongo.list( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-swift/examples/mongo/update-backup-policy.md new file mode 100644 index 000000000..b54e45116 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/update-backup-policy.md @@ -0,0 +1,20 @@ +```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 mongo = Mongo(client) + +let backupPolicy = try await mongo.updateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", // optional + schedule: "", // optional + retention: 1, // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-swift/examples/mongo/update-backup-storage.md new file mode 100644 index 000000000..1468ff092 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/update-backup-storage.md @@ -0,0 +1,22 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabaseBackupStorage = try await mongo.updateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", // optional + prefix: "<PREFIX>", // optional + endpoint: "<ENDPOINT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/update-credentials.md b/examples/2.3.x/server-swift/examples/mongo/update-credentials.md new file mode 100644 index 000000000..992d05ec1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/update-credentials.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 mongo = Mongo(client) + +let dedicatedDatabaseOperation = try await mongo.updateCredentials( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/update-maintenance.md b/examples/2.3.x/server-swift/examples/mongo/update-maintenance.md new file mode 100644 index 000000000..3be57593a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/update-maintenance.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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.updateMaintenance( + databaseId: "<DATABASE_ID>", + day: "sun", + hourUtc: 0 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mongo/update.md b/examples/2.3.x/server-swift/examples/mongo/update.md new file mode 100644 index 000000000..ebae3c3df --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mongo/update.md @@ -0,0 +1,35 @@ +```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 mongo = Mongo(client) + +let dedicatedDatabase = try await mongo.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + status: "ready", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: 0, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-swift/examples/mysql/create-backup-policy.md new file mode 100644 index 000000000..9e71afd6d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create-backup-policy.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 mysql = Mysql(client) + +let backupPolicy = try await mysql.createBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create-backup.md b/examples/2.3.x/server-swift/examples/mysql/create-backup.md new file mode 100644 index 000000000..c19260930 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create-backup.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabaseBackup = try await mysql.createBackup( + databaseId: "<DATABASE_ID>", + type: "full" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create-branch.md b/examples/2.3.x/server-swift/examples/mysql/create-branch.md new file mode 100644 index 000000000..80c1f2515 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create-branch.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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.createBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>", // optional + ttl: 300 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create-execution.md b/examples/2.3.x/server-swift/examples/mysql/create-execution.md new file mode 100644 index 000000000..25666b72e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create-execution.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 mysql = Mysql(client) + +let dedicatedDatabaseExecution = try await mysql.createExecution( + databaseId: "<DATABASE_ID>", + sql: "<SQL>", + bindings: [:], // optional + timeoutSeconds: 1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create-failover.md b/examples/2.3.x/server-swift/examples/mysql/create-failover.md new file mode 100644 index 000000000..ee3c0875b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create-failover.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.createFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create-migration.md b/examples/2.3.x/server-swift/examples/mysql/create-migration.md new file mode 100644 index 000000000..622bb08c4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create-migration.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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.createMigration( + databaseId: "<DATABASE_ID>", + targetType: "shared", + specification: "<SPECIFICATION>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create-restoration.md b/examples/2.3.x/server-swift/examples/mysql/create-restoration.md new file mode 100644 index 000000000..ef1e17b67 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create-restoration.md @@ -0,0 +1,19 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabaseRestoration = try await mysql.createRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", // optional + backupId: "<BACKUP_ID>", // optional + targetDatabaseId: "<TARGET_DATABASE_ID>", // optional + targetTime: "2020-10-15T06:38:00.000+00:00" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create-upgrade.md b/examples/2.3.x/server-swift/examples/mysql/create-upgrade.md new file mode 100644 index 000000000..bf5a2da15 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create-upgrade.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.createUpgrade( + databaseId: "<DATABASE_ID>", + targetVersion: "<TARGET_VERSION>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/create.md b/examples/2.3.x/server-swift/examples/mysql/create.md new file mode 100644 index 000000000..293d3f263 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/create.md @@ -0,0 +1,28 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/delete-backup-policy.md b/examples/2.3.x/server-swift/examples/mysql/delete-backup-policy.md new file mode 100644 index 000000000..a8e72caf3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/delete-backup-policy.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let result = try await mysql.deleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/delete-backup.md b/examples/2.3.x/server-swift/examples/mysql/delete-backup.md new file mode 100644 index 000000000..2883e512f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/delete-backup.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let result = try await mysql.deleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/delete-branch.md b/examples/2.3.x/server-swift/examples/mysql/delete-branch.md new file mode 100644 index 000000000..4a1623873 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/delete-branch.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.deleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/delete.md b/examples/2.3.x/server-swift/examples/mysql/delete.md new file mode 100644 index 000000000..40eb0b6d4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/delete.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 mysql = Mysql(client) + +let result = try await mysql.delete( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-swift/examples/mysql/get-backup-policy.md new file mode 100644 index 000000000..4200631f9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/get-backup-policy.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let backupPolicy = try await mysql.getBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/get-backup.md b/examples/2.3.x/server-swift/examples/mysql/get-backup.md new file mode 100644 index 000000000..b2d938e25 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/get-backup.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabaseBackup = try await mysql.getBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/get-pitr.md b/examples/2.3.x/server-swift/examples/mysql/get-pitr.md new file mode 100644 index 000000000..4a37ab4b3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/get-pitr.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 mysql = Mysql(client) + +let dedicatedDatabasePITRWindows = try await mysql.getPitr( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/get-pooler.md b/examples/2.3.x/server-swift/examples/mysql/get-pooler.md new file mode 100644 index 000000000..3c905dda5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/get-pooler.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 mysql = Mysql(client) + +let dedicatedDatabasePooler = try await mysql.getPooler( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/get-replicas.md b/examples/2.3.x/server-swift/examples/mysql/get-replicas.md new file mode 100644 index 000000000..e7f492a24 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/get-replicas.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 mysql = Mysql(client) + +let dedicatedDatabaseReplicas = try await mysql.getReplicas( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/get-restoration.md b/examples/2.3.x/server-swift/examples/mysql/get-restoration.md new file mode 100644 index 000000000..2e792425d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/get-restoration.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabaseRestoration = try await mysql.getRestoration( + databaseId: "<DATABASE_ID>", + restorationId: "<RESTORATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/get-status.md b/examples/2.3.x/server-swift/examples/mysql/get-status.md new file mode 100644 index 000000000..59cf8a552 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/get-status.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 mysql = Mysql(client) + +let databaseStatus = try await mysql.getStatus( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/get.md b/examples/2.3.x/server-swift/examples/mysql/get.md new file mode 100644 index 000000000..f9b8a8a3b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/get.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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.get( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-swift/examples/mysql/list-backup-policies.md new file mode 100644 index 000000000..a59b39b1f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/list-backup-policies.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let backupPolicyList = try await mysql.listBackupPolicies( + databaseId: "<DATABASE_ID>", + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/list-backups.md b/examples/2.3.x/server-swift/examples/mysql/list-backups.md new file mode 100644 index 000000000..42b578275 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/list-backups.md @@ -0,0 +1,16 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabaseBackupList = try await mysql.listBackups( + databaseId: "<DATABASE_ID>", + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/list-branches.md b/examples/2.3.x/server-swift/examples/mysql/list-branches.md new file mode 100644 index 000000000..83b804a55 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/list-branches.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 mysql = Mysql(client) + +let dedicatedDatabaseBranchList = try await mysql.listBranches( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/list-operations.md b/examples/2.3.x/server-swift/examples/mysql/list-operations.md new file mode 100644 index 000000000..d187df90c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/list-operations.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 mysql = Mysql(client) + +let dedicatedDatabaseOperationList = try await mysql.listOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/list-restorations.md b/examples/2.3.x/server-swift/examples/mysql/list-restorations.md new file mode 100644 index 000000000..0ec9a9f2e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/list-restorations.md @@ -0,0 +1,19 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabaseRestorationList = try await mysql.listRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", // optional + type: "backup", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/list-specifications.md b/examples/2.3.x/server-swift/examples/mysql/list-specifications.md new file mode 100644 index 000000000..3646d7692 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/list-specifications.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let mysql = Mysql(client) + +let dedicatedDatabaseSpecificationList = try await mysql.listSpecifications() + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/list.md b/examples/2.3.x/server-swift/examples/mysql/list.md new file mode 100644 index 000000000..efc00869f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/list.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 mysql = Mysql(client) + +let dedicatedDatabaseList = try await mysql.list( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-swift/examples/mysql/update-backup-policy.md new file mode 100644 index 000000000..390ccb1ed --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/update-backup-policy.md @@ -0,0 +1,20 @@ +```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 mysql = Mysql(client) + +let backupPolicy = try await mysql.updateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", // optional + schedule: "", // optional + retention: 1, // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-swift/examples/mysql/update-backup-storage.md new file mode 100644 index 000000000..03a210d41 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/update-backup-storage.md @@ -0,0 +1,22 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabaseBackupStorage = try await mysql.updateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", // optional + prefix: "<PREFIX>", // optional + endpoint: "<ENDPOINT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/update-credentials.md b/examples/2.3.x/server-swift/examples/mysql/update-credentials.md new file mode 100644 index 000000000..46b70e647 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/update-credentials.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 mysql = Mysql(client) + +let dedicatedDatabaseOperation = try await mysql.updateCredentials( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/update-maintenance.md b/examples/2.3.x/server-swift/examples/mysql/update-maintenance.md new file mode 100644 index 000000000..85c02c1d0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/update-maintenance.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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.updateMaintenance( + databaseId: "<DATABASE_ID>", + day: "sun", + hourUtc: 0 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/update-pooler.md b/examples/2.3.x/server-swift/examples/mysql/update-pooler.md new file mode 100644 index 000000000..cba4cf82b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/update-pooler.md @@ -0,0 +1,23 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabasePooler = try await mysql.updatePooler( + databaseId: "<DATABASE_ID>", + mode: "transaction", // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: "<POOLER_CPU_REQUEST>", // optional + poolerCpuLimit: "<POOLER_CPU_LIMIT>", // optional + poolerMemoryRequest: "<POOLER_MEMORY_REQUEST>", // optional + poolerMemoryLimit: "<POOLER_MEMORY_LIMIT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/mysql/update.md b/examples/2.3.x/server-swift/examples/mysql/update.md new file mode 100644 index 000000000..2bb205f54 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/mysql/update.md @@ -0,0 +1,35 @@ +```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 mysql = Mysql(client) + +let dedicatedDatabase = try await mysql.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + status: "ready", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: 0, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/approve.md b/examples/2.3.x/server-swift/examples/oauth2/approve.md new file mode 100644 index 000000000..29328f52f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/approve.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 + .setSession("") // The user session to authenticate with + +let oauth2 = Oauth2(client) + +let oauth2Approve = try await oauth2.approve( + grant_id: "<GRANT_ID>", + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + scope: "<SCOPE>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/authorize-post.md b/examples/2.3.x/server-swift/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..3404c7725 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/authorize-post.md @@ -0,0 +1,28 @@ +```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 oauth2 = Oauth2(client) + +let oauth2Authorize = try await oauth2.authorizePost( + client_id: "<CLIENT_ID>", // optional + redirect_uri: "https://example.com", // optional + response_type: "", // optional + scope: "<SCOPE>", // optional + state: "<STATE>", // optional + nonce: "<NONCE>", // optional + code_challenge: "<CODE_CHALLENGE>", // optional + code_challenge_method: "s256", // optional + prompt: "<PROMPT>", // optional + max_age: 0, // optional + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + resource: "", // optional + audience: "<AUDIENCE>", // optional + request_uri: "<REQUEST_URI>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/authorize.md b/examples/2.3.x/server-swift/examples/oauth2/authorize.md new file mode 100644 index 000000000..abfbbbccb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/authorize.md @@ -0,0 +1,28 @@ +```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 oauth2 = Oauth2(client) + +let oauth2Authorize = try await oauth2.authorize( + client_id: "<CLIENT_ID>", // optional + redirect_uri: "https://example.com", // optional + response_type: "", // optional + scope: "<SCOPE>", // optional + state: "<STATE>", // optional + nonce: "<NONCE>", // optional + code_challenge: "<CODE_CHALLENGE>", // optional + code_challenge_method: "s256", // optional + prompt: "<PROMPT>", // optional + max_age: 0, // optional + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + resource: "", // optional + audience: "<AUDIENCE>", // optional + request_uri: "<REQUEST_URI>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-swift/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..925773fc7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/create-device-authorization.md @@ -0,0 +1,19 @@ +```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 oauth2 = Oauth2(client) + +let oauth2DeviceAuthorization = try await oauth2.createDeviceAuthorization( + client_id: "<CLIENT_ID>", // optional + scope: "<SCOPE>", // optional + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + resource: "", // optional + audience: "<AUDIENCE>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/create-grant.md b/examples/2.3.x/server-swift/examples/oauth2/create-grant.md new file mode 100644 index 000000000..3df571079 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/create-grant.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 oauth2 = Oauth2(client) + +let oauth2Grant = try await oauth2.createGrant( + user_code: "<USER_CODE>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/create-par.md b/examples/2.3.x/server-swift/examples/oauth2/create-par.md new file mode 100644 index 000000000..7fab6713f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/create-par.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 oauth2 = Oauth2(client) + +let oauth2PAR = try await oauth2.createPAR( + client_id: "<CLIENT_ID>", + redirect_uri: "https://example.com", + response_type: "code", + scope: "<SCOPE>", // optional + state: "<STATE>", // optional + nonce: "<NONCE>", // optional + code_challenge: "<CODE_CHALLENGE>", // optional + code_challenge_method: "s256", // optional + prompt: "<PROMPT>", // optional + max_age: 0, // optional + authorization_details: "<AUTHORIZATION_DETAILS>", // optional + resource: "", // optional + audience: "<AUDIENCE>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/create-token.md b/examples/2.3.x/server-swift/examples/oauth2/create-token.md new file mode 100644 index 000000000..d519b8ef9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```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 oauth2 = Oauth2(client) + +let oauth2Token = try await oauth2.createToken( + grant_type: "<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 + resource: "", // optional + audience: "<AUDIENCE>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/get-grant.md b/examples/2.3.x/server-swift/examples/oauth2/get-grant.md new file mode 100644 index 000000000..448dcc3cb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/get-grant.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 oauth2 = Oauth2(client) + +let oauth2Grant = try await oauth2.getGrant( + grant_id: "<GRANT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/list-organizations.md b/examples/2.3.x/server-swift/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..35a590f75 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/list-organizations.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 + .setSession("") // The user session to authenticate with + +let oauth2 = Oauth2(client) + +let oauth2OrganizationList = try await oauth2.listOrganizations( + limit: 1, // optional + offset: 0, // optional + search: "<SEARCH>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/list-projects.md b/examples/2.3.x/server-swift/examples/oauth2/list-projects.md new file mode 100644 index 000000000..a4077b8b5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/list-projects.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 + .setSession("") // The user session to authenticate with + +let oauth2 = Oauth2(client) + +let oauth2ProjectList = try await oauth2.listProjects( + limit: 1, // optional + offset: 0, // optional + search: "<SEARCH>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/reject.md b/examples/2.3.x/server-swift/examples/oauth2/reject.md new file mode 100644 index 000000000..d64d5a9e8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/reject.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 oauth2 = Oauth2(client) + +let oauth2Reject = try await oauth2.reject( + grant_id: "<GRANT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/oauth2/revoke.md b/examples/2.3.x/server-swift/examples/oauth2/revoke.md new file mode 100644 index 000000000..8df5da07a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/revoke.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 + .setSession("") // The user session to authenticate with + +let oauth2 = Oauth2(client) + +let result = try await oauth2.revoke( + 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 new file mode 100644 index 000000000..b5678349b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/create-ephemeral-project-key.md @@ -0,0 +1,18 @@ +```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 organization = Organization(client) + +let ephemeralKey = try await organization.createEphemeralProjectKey( + projectId: "<PROJECT_ID>", + scopes: [.projectRead], + duration: 600 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/create-installation.md b/examples/2.3.x/server-swift/examples/organization/create-installation.md new file mode 100644 index 000000000..6a5652113 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```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 organization = Organization(client) + +let appInstallation = try await organization.createInstallation( + appId: "<APP_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/create-membership.md b/examples/2.3.x/server-swift/examples/organization/create-membership.md new file mode 100644 index 000000000..61f0d91e9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/create-membership.md @@ -0,0 +1,20 @@ +```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 organization = Organization(client) + +let membership = try await organization.createMembership( + roles: [], + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/create-project.md b/examples/2.3.x/server-swift/examples/organization/create-project.md new file mode 100644 index 000000000..41c4c811b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/create-project.md @@ -0,0 +1,18 @@ +```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 organization = Organization(client) + +let project = try await organization.createProject( + projectId: "<PROJECT_ID>", + name: "<NAME>", + region: .fra // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/delete-installation.md b/examples/2.3.x/server-swift/examples/organization/delete-installation.md new file mode 100644 index 000000000..151a86f23 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/delete-installation.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 organization = Organization(client) + +let result = try await organization.deleteInstallation( + installationId: "<INSTALLATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/delete-membership.md b/examples/2.3.x/server-swift/examples/organization/delete-membership.md new file mode 100644 index 000000000..a35000cf5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/delete-membership.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 organization = Organization(client) + +let result = try await organization.deleteMembership( + membershipId: "<MEMBERSHIP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/delete-project-key.md b/examples/2.3.x/server-swift/examples/organization/delete-project-key.md new file mode 100644 index 000000000..8b5e1a1ef --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/delete-project-key.md @@ -0,0 +1,16 @@ +```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 organization = Organization(client) + +let result = try await organization.deleteProjectKey( + projectId: "<PROJECT_ID>", + keyId: "<KEY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/delete-project.md b/examples/2.3.x/server-swift/examples/organization/delete-project.md new file mode 100644 index 000000000..4906d7d0b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/delete-project.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 organization = Organization(client) + +let result = try await organization.deleteProject( + projectId: "<PROJECT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/delete.md b/examples/2.3.x/server-swift/examples/organization/delete.md new file mode 100644 index 000000000..5ed7a9faa --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/delete.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let organization = Organization(client) + +let result = try await organization.delete() + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/get-installation.md b/examples/2.3.x/server-swift/examples/organization/get-installation.md new file mode 100644 index 000000000..cc6ee9c02 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/get-installation.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 organization = Organization(client) + +let appInstallation = try await organization.getInstallation( + installationId: "<INSTALLATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/get-membership.md b/examples/2.3.x/server-swift/examples/organization/get-membership.md new file mode 100644 index 000000000..49be24adc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/get-membership.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 organization = Organization(client) + +let membership = try await organization.getMembership( + membershipId: "<MEMBERSHIP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/get-project-key.md b/examples/2.3.x/server-swift/examples/organization/get-project-key.md new file mode 100644 index 000000000..38a4d91f6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/get-project-key.md @@ -0,0 +1,16 @@ +```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 organization = Organization(client) + +let key = try await organization.getProjectKey( + projectId: "<PROJECT_ID>", + keyId: "<KEY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/get-project.md b/examples/2.3.x/server-swift/examples/organization/get-project.md new file mode 100644 index 000000000..b0180fb10 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/get-project.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 organization = Organization(client) + +let project = try await organization.getProject( + projectId: "<PROJECT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/get.md b/examples/2.3.x/server-swift/examples/organization/get.md new file mode 100644 index 000000000..c2cfbcd7e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/get.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let organization = Organization(client) + +let organization = try await organization.get() + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/list-installations.md b/examples/2.3.x/server-swift/examples/organization/list-installations.md new file mode 100644 index 000000000..ba8ae0a6a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```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 organization = Organization(client) + +let appInstallationList = try await organization.listInstallations( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/list-memberships.md b/examples/2.3.x/server-swift/examples/organization/list-memberships.md new file mode 100644 index 000000000..f7402bc4e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/list-memberships.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 organization = Organization(client) + +let membershipList = try await organization.listMemberships( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/list-project-keys.md b/examples/2.3.x/server-swift/examples/organization/list-project-keys.md new file mode 100644 index 000000000..2fcb24c20 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/list-project-keys.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 organization = Organization(client) + +let keyList = try await organization.listProjectKeys( + projectId: "<PROJECT_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/list-projects.md b/examples/2.3.x/server-swift/examples/organization/list-projects.md new file mode 100644 index 000000000..b4a93bce5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/list-projects.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 organization = Organization(client) + +let projectList = try await organization.listProjects( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/update-installation.md b/examples/2.3.x/server-swift/examples/organization/update-installation.md new file mode 100644 index 000000000..49071f89c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```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 organization = Organization(client) + +let appInstallation = try await organization.updateInstallation( + installationId: "<INSTALLATION_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/update-membership.md b/examples/2.3.x/server-swift/examples/organization/update-membership.md new file mode 100644 index 000000000..c2cb9e01b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/update-membership.md @@ -0,0 +1,16 @@ +```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 organization = Organization(client) + +let membership = try await organization.updateMembership( + membershipId: "<MEMBERSHIP_ID>", + roles: [] +) + +``` 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 new file mode 100644 index 000000000..b90e8a377 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/update-project-key.md @@ -0,0 +1,20 @@ +```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 organization = Organization(client) + +let key = try await organization.updateProjectKey( + projectId: "<PROJECT_ID>", + keyId: "<KEY_ID>", + name: "<NAME>", + scopes: [.projectRead], + expire: "2020-10-15T06:38:00.000+00:00" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/update-project.md b/examples/2.3.x/server-swift/examples/organization/update-project.md new file mode 100644 index 000000000..63fb44dbf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/update-project.md @@ -0,0 +1,16 @@ +```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 organization = Organization(client) + +let project = try await organization.updateProject( + projectId: "<PROJECT_ID>", + name: "<NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/update.md b/examples/2.3.x/server-swift/examples/organization/update.md new file mode 100644 index 000000000..353c266e6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/organization/update.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 organization = Organization(client) + +let organization = try await organization.update( + name: "<NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-swift/examples/postgresql/create-backup-policy.md new file mode 100644 index 000000000..36c27b7d7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-backup-policy.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 postgresql = Postgresql(client) + +let backupPolicy = try await postgresql.createBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", + schedule: "", + retention: 1, + type: "full", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-backup.md b/examples/2.3.x/server-swift/examples/postgresql/create-backup.md new file mode 100644 index 000000000..957193742 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-backup.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabaseBackup = try await postgresql.createBackup( + databaseId: "<DATABASE_ID>", + type: "full" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-branch.md b/examples/2.3.x/server-swift/examples/postgresql/create-branch.md new file mode 100644 index 000000000..ce18b8106 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-branch.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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.createBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>", // optional + ttl: 300 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-execution.md b/examples/2.3.x/server-swift/examples/postgresql/create-execution.md new file mode 100644 index 000000000..d7b7088a9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-execution.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 postgresql = Postgresql(client) + +let dedicatedDatabaseExecution = try await postgresql.createExecution( + databaseId: "<DATABASE_ID>", + sql: "<SQL>", + bindings: [:], // optional + timeoutSeconds: 1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-extension.md b/examples/2.3.x/server-swift/examples/postgresql/create-extension.md new file mode 100644 index 000000000..ce48399d2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-extension.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.createExtension( + databaseId: "<DATABASE_ID>", + name: "<NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-failover.md b/examples/2.3.x/server-swift/examples/postgresql/create-failover.md new file mode 100644 index 000000000..8449bd7c2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-failover.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.createFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-migration.md b/examples/2.3.x/server-swift/examples/postgresql/create-migration.md new file mode 100644 index 000000000..8af6ee1ab --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-migration.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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.createMigration( + databaseId: "<DATABASE_ID>", + targetType: "shared", + specification: "<SPECIFICATION>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-restoration.md b/examples/2.3.x/server-swift/examples/postgresql/create-restoration.md new file mode 100644 index 000000000..1b57f74d5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-restoration.md @@ -0,0 +1,19 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabaseRestoration = try await postgresql.createRestoration( + databaseId: "<DATABASE_ID>", + type: "backup", // optional + backupId: "<BACKUP_ID>", // optional + targetDatabaseId: "<TARGET_DATABASE_ID>", // optional + targetTime: "2020-10-15T06:38:00.000+00:00" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-swift/examples/postgresql/create-upgrade.md new file mode 100644 index 000000000..e6b141ff0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create-upgrade.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.createUpgrade( + databaseId: "<DATABASE_ID>", + targetVersion: "<TARGET_VERSION>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/create.md b/examples/2.3.x/server-swift/examples/postgresql/create.md new file mode 100644 index 000000000..54334c006 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/create.md @@ -0,0 +1,28 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + version: "17", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/delete-backup-policy.md b/examples/2.3.x/server-swift/examples/postgresql/delete-backup-policy.md new file mode 100644 index 000000000..e2fbdc244 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/delete-backup-policy.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let result = try await postgresql.deleteBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/delete-backup.md b/examples/2.3.x/server-swift/examples/postgresql/delete-backup.md new file mode 100644 index 000000000..2784785da --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/delete-backup.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let result = try await postgresql.deleteBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/delete-branch.md b/examples/2.3.x/server-swift/examples/postgresql/delete-branch.md new file mode 100644 index 000000000..a04e11dfb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/delete-branch.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.deleteBranch( + databaseId: "<DATABASE_ID>", + branchId: "<BRANCH_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/delete-extension.md b/examples/2.3.x/server-swift/examples/postgresql/delete-extension.md new file mode 100644 index 000000000..a5456fd33 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/delete-extension.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.deleteExtension( + databaseId: "<DATABASE_ID>", + extensionName: "<EXTENSION_NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/delete.md b/examples/2.3.x/server-swift/examples/postgresql/delete.md new file mode 100644 index 000000000..c7d6db89e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/delete.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 postgresql = Postgresql(client) + +let result = try await postgresql.delete( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-swift/examples/postgresql/get-backup-policy.md new file mode 100644 index 000000000..c820cf858 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/get-backup-policy.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let backupPolicy = try await postgresql.getBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/get-backup.md b/examples/2.3.x/server-swift/examples/postgresql/get-backup.md new file mode 100644 index 000000000..553e3529d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/get-backup.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabaseBackup = try await postgresql.getBackup( + databaseId: "<DATABASE_ID>", + backupId: "<BACKUP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/get-pitr.md b/examples/2.3.x/server-swift/examples/postgresql/get-pitr.md new file mode 100644 index 000000000..59b9c38b8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/get-pitr.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 postgresql = Postgresql(client) + +let dedicatedDatabasePITRWindows = try await postgresql.getPitr( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/get-pooler.md b/examples/2.3.x/server-swift/examples/postgresql/get-pooler.md new file mode 100644 index 000000000..098d70460 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/get-pooler.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 postgresql = Postgresql(client) + +let dedicatedDatabasePooler = try await postgresql.getPooler( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/get-replicas.md b/examples/2.3.x/server-swift/examples/postgresql/get-replicas.md new file mode 100644 index 000000000..3a2022f8f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/get-replicas.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 postgresql = Postgresql(client) + +let dedicatedDatabaseReplicas = try await postgresql.getReplicas( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/get-restoration.md b/examples/2.3.x/server-swift/examples/postgresql/get-restoration.md new file mode 100644 index 000000000..c6282310f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/get-restoration.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabaseRestoration = try await postgresql.getRestoration( + databaseId: "<DATABASE_ID>", + restorationId: "<RESTORATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/get-status.md b/examples/2.3.x/server-swift/examples/postgresql/get-status.md new file mode 100644 index 000000000..3cc0cd165 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/get-status.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 postgresql = Postgresql(client) + +let databaseStatus = try await postgresql.getStatus( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/get.md b/examples/2.3.x/server-swift/examples/postgresql/get.md new file mode 100644 index 000000000..ad090d981 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/get.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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.get( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-swift/examples/postgresql/list-backup-policies.md new file mode 100644 index 000000000..0f01fcbdc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/list-backup-policies.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let backupPolicyList = try await postgresql.listBackupPolicies( + databaseId: "<DATABASE_ID>", + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/list-backups.md b/examples/2.3.x/server-swift/examples/postgresql/list-backups.md new file mode 100644 index 000000000..5ed16ce72 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/list-backups.md @@ -0,0 +1,16 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabaseBackupList = try await postgresql.listBackups( + databaseId: "<DATABASE_ID>", + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/list-branches.md b/examples/2.3.x/server-swift/examples/postgresql/list-branches.md new file mode 100644 index 000000000..60ae120ad --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/list-branches.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 postgresql = Postgresql(client) + +let dedicatedDatabaseBranchList = try await postgresql.listBranches( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/list-extensions.md b/examples/2.3.x/server-swift/examples/postgresql/list-extensions.md new file mode 100644 index 000000000..b9e55e9bf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/list-extensions.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 postgresql = Postgresql(client) + +let dedicatedDatabaseExtensions = try await postgresql.listExtensions( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/list-operations.md b/examples/2.3.x/server-swift/examples/postgresql/list-operations.md new file mode 100644 index 000000000..3901fdc5d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/list-operations.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 postgresql = Postgresql(client) + +let dedicatedDatabaseOperationList = try await postgresql.listOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/list-restorations.md b/examples/2.3.x/server-swift/examples/postgresql/list-restorations.md new file mode 100644 index 000000000..958663dfb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/list-restorations.md @@ -0,0 +1,19 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabaseRestorationList = try await postgresql.listRestorations( + databaseId: "<DATABASE_ID>", + status: "pending", // optional + type: "backup", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/list-specifications.md b/examples/2.3.x/server-swift/examples/postgresql/list-specifications.md new file mode 100644 index 000000000..890f257c4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/list-specifications.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let postgresql = Postgresql(client) + +let dedicatedDatabaseSpecificationList = try await postgresql.listSpecifications() + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/list.md b/examples/2.3.x/server-swift/examples/postgresql/list.md new file mode 100644 index 000000000..5df20396f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/list.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 postgresql = Postgresql(client) + +let dedicatedDatabaseList = try await postgresql.list( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-swift/examples/postgresql/update-backup-policy.md new file mode 100644 index 000000000..fe09b96c1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/update-backup-policy.md @@ -0,0 +1,20 @@ +```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 postgresql = Postgresql(client) + +let backupPolicy = try await postgresql.updateBackupPolicy( + databaseId: "<DATABASE_ID>", + policyId: "<POLICY_ID>", + name: "<NAME>", // optional + schedule: "", // optional + retention: 1, // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-swift/examples/postgresql/update-backup-storage.md new file mode 100644 index 000000000..88cd09995 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/update-backup-storage.md @@ -0,0 +1,22 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabaseBackupStorage = try await postgresql.updateBackupStorage( + databaseId: "<DATABASE_ID>", + provider: "s3", + bucket: "<BUCKET>", + accessKey: "<ACCESS_KEY>", + secretKey: "<SECRET_KEY>", + region: "<REGION>", // optional + prefix: "<PREFIX>", // optional + endpoint: "<ENDPOINT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/update-credentials.md b/examples/2.3.x/server-swift/examples/postgresql/update-credentials.md new file mode 100644 index 000000000..2aac69e44 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/update-credentials.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 postgresql = Postgresql(client) + +let dedicatedDatabaseOperation = try await postgresql.updateCredentials( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-swift/examples/postgresql/update-maintenance.md new file mode 100644 index 000000000..a028d62d3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/update-maintenance.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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.updateMaintenance( + databaseId: "<DATABASE_ID>", + day: "sun", + hourUtc: 0 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/update-pooler.md b/examples/2.3.x/server-swift/examples/postgresql/update-pooler.md new file mode 100644 index 000000000..3ba7b0953 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/update-pooler.md @@ -0,0 +1,23 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabasePooler = try await postgresql.updatePooler( + databaseId: "<DATABASE_ID>", + mode: "transaction", // optional + maxConnections: 10, // optional + defaultPoolSize: 1, // optional + readWriteSplitting: false, // optional + poolerCpuRequest: "<POOLER_CPU_REQUEST>", // optional + poolerCpuLimit: "<POOLER_CPU_LIMIT>", // optional + poolerMemoryRequest: "<POOLER_MEMORY_REQUEST>", // optional + poolerMemoryLimit: "<POOLER_MEMORY_LIMIT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/postgresql/update.md b/examples/2.3.x/server-swift/examples/postgresql/update.md new file mode 100644 index 000000000..d684a101f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/postgresql/update.md @@ -0,0 +1,35 @@ +```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 postgresql = Postgresql(client) + +let dedicatedDatabase = try await postgresql.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + status: "ready", // optional + specification: "<SPECIFICATION>", // optional + replicas: 0, // optional + syncMode: "async", // optional + networkIdleTimeoutSeconds: 60, // optional + networkIPAllowlist: [], // optional + idleTimeoutMinutes: 5, // optional + pitr: false, // optional + pitrRetentionDays: 1, // optional + storageAutoscaling: false, // optional + storageAutoscalingThresholdPercent: 50, // optional + storageAutoscalingMaxGb: 0, // optional + metricsTraceSampleRate: 0, // optional + metricsSlowQueryLogThresholdMs: 0, // optional + sqlApiEnabled: false, // optional + sqlApiAllowedStatements: [], // optional + sqlApiMaxRows: 1, // optional + sqlApiMaxBytes: 1024, // optional + sqlApiTimeoutSeconds: 1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/presences/delete.md b/examples/2.3.x/server-swift/examples/presences/delete.md new file mode 100644 index 000000000..80d57c887 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/presences/delete.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 presences = Presences(client) + +let result = try await presences.delete( + presenceId: "<PRESENCE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/presences/get.md b/examples/2.3.x/server-swift/examples/presences/get.md new file mode 100644 index 000000000..802d74f62 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/presences/get.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 presences = Presences(client) + +let presence = try await presences.get( + presenceId: "<PRESENCE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/presences/list.md b/examples/2.3.x/server-swift/examples/presences/list.md new file mode 100644 index 000000000..1123abd00 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/presences/list.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 presences = Presences(client) + +let presenceList = try await presences.list( + queries: [], // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/presences/update.md b/examples/2.3.x/server-swift/examples/presences/update.md new file mode 100644 index 000000000..67a993e96 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/presences/update.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 presences = Presences(client) + +let presence = try await presences.update( + presenceId: "<PRESENCE_ID>", + userId: "<USER_ID>", + status: "<STATUS>", // optional + expiresAt: "2020-10-15T06:38:00.000+00:00", // optional + metadata: [:], // optional + permissions: [Permission.read(Role.any())], // optional + purge: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/presences/upsert.md b/examples/2.3.x/server-swift/examples/presences/upsert.md new file mode 100644 index 000000000..edba3b102 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/presences/upsert.md @@ -0,0 +1,20 @@ +```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 presences = Presences(client) + +let presence = try await presences.upsert( + presenceId: "<PRESENCE_ID>", + userId: "<USER_ID>", + status: "<STATUS>", + permissions: [Permission.read(Role.any())], // optional + expiresAt: "2020-10-15T06:38:00.000+00:00", // optional + metadata: [:] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/create-android-platform.md b/examples/2.3.x/server-swift/examples/project/create-android-platform.md new file mode 100644 index 000000000..c024b4222 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-android-platform.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 platformAndroid = try await project.createAndroidPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + applicationId: "<APPLICATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/create-apple-platform.md b/examples/2.3.x/server-swift/examples/project/create-apple-platform.md new file mode 100644 index 000000000..88556791d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-apple-platform.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 platformApple = try await project.createApplePlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + bundleIdentifier: "<BUNDLE_IDENTIFIER>" +) + +``` 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 new file mode 100644 index 000000000..c4310ecf7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-ephemeral-key.md @@ -0,0 +1,17 @@ +```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 project = Project(client) + +let ephemeralKey = try await project.createEphemeralKey( + scopes: [.projectRead], + duration: 600 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/create-linux-platform.md b/examples/2.3.x/server-swift/examples/project/create-linux-platform.md new file mode 100644 index 000000000..276eea1a9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-linux-platform.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 platformLinux = try await project.createLinuxPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + packageName: "<PACKAGE_NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/create-mock-phone.md b/examples/2.3.x/server-swift/examples/project/create-mock-phone.md new file mode 100644 index 000000000..d55045e52 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-mock-phone.md @@ -0,0 +1,16 @@ +```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 mockNumber = try await project.createMockPhone( + number: "+12065550100", + otp: "<OTP>" +) + +``` 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 new file mode 100644 index 000000000..7f58a2797 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-smtp-test.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 project = Project(client) + +let result = try await project.createSMTPTest( + emails: [] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/create-variable.md b/examples/2.3.x/server-swift/examples/project/create-variable.md new file mode 100644 index 000000000..f9a6c3999 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-variable.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 project = Project(client) + +let variable = try await project.createVariable( + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/create-web-platform.md b/examples/2.3.x/server-swift/examples/project/create-web-platform.md new file mode 100644 index 000000000..4623c92a2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-web-platform.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 platformWeb = try await project.createWebPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + hostname: "app.example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/create-windows-platform.md b/examples/2.3.x/server-swift/examples/project/create-windows-platform.md new file mode 100644 index 000000000..764da9d02 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/create-windows-platform.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 platformWindows = try await project.createWindowsPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + packageIdentifierName: "<PACKAGE_IDENTIFIER_NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/delete-key.md b/examples/2.3.x/server-swift/examples/project/delete-key.md new file mode 100644 index 000000000..4552cc726 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/delete-key.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 project = Project(client) + +let result = try await project.deleteKey( + keyId: "<KEY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/delete-mock-phone.md b/examples/2.3.x/server-swift/examples/project/delete-mock-phone.md new file mode 100644 index 000000000..b7276924a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/delete-mock-phone.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 project = Project(client) + +let result = try await project.deleteMockPhone( + number: "+12065550100" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/delete-platform.md b/examples/2.3.x/server-swift/examples/project/delete-platform.md new file mode 100644 index 000000000..744ca26bf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/delete-platform.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 project = Project(client) + +let result = try await project.deletePlatform( + platformId: "<PLATFORM_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/delete-variable.md b/examples/2.3.x/server-swift/examples/project/delete-variable.md new file mode 100644 index 000000000..e9fc657d2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/delete-variable.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 project = Project(client) + +let result = try await project.deleteVariable( + variableId: "<VARIABLE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/delete.md b/examples/2.3.x/server-swift/examples/project/delete.md new file mode 100644 index 000000000..e21a359a3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/delete.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let project = Project(client) + +let result = try await project.delete() + +``` diff --git a/examples/2.3.x/server-swift/examples/project/get-email-template.md b/examples/2.3.x/server-swift/examples/project/get-email-template.md new file mode 100644 index 000000000..7d32751a8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/get-email-template.md @@ -0,0 +1,17 @@ +```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 project = Project(client) + +let emailTemplate = try await project.getEmailTemplate( + templateId: .verification, + locale: .af // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/get-key.md b/examples/2.3.x/server-swift/examples/project/get-key.md new file mode 100644 index 000000000..d988df3cc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/get-key.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 project = Project(client) + +let key = try await project.getKey( + keyId: "<KEY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/get-mock-phone.md b/examples/2.3.x/server-swift/examples/project/get-mock-phone.md new file mode 100644 index 000000000..c37f50f95 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/get-mock-phone.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 project = Project(client) + +let mockNumber = try await project.getMockPhone( + number: "+12065550100" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-swift/examples/project/get-o-auth-2-provider.md new file mode 100644 index 000000000..3fc503cdf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/get-o-auth-2-provider.md @@ -0,0 +1,16 @@ +```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 project = Project(client) + +let result = try await project.getOAuth2Provider( + providerId: .amazon +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/get-platform.md b/examples/2.3.x/server-swift/examples/project/get-platform.md new file mode 100644 index 000000000..407f92fd1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/get-platform.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 project = Project(client) + +let result = try await project.getPlatform( + platformId: "<PLATFORM_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/get-policy.md b/examples/2.3.x/server-swift/examples/project/get-policy.md new file mode 100644 index 000000000..56a46ff13 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/get-policy.md @@ -0,0 +1,16 @@ +```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 project = Project(client) + +let result = try await project.getPolicy( + policyId: .passwordDictionary +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/get-variable.md b/examples/2.3.x/server-swift/examples/project/get-variable.md new file mode 100644 index 000000000..33b8c9695 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/get-variable.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 project = Project(client) + +let variable = try await project.getVariable( + variableId: "<VARIABLE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/get.md b/examples/2.3.x/server-swift/examples/project/get.md new file mode 100644 index 000000000..6302f484a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/get.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let project = Project(client) + +let project = try await project.get() + +``` diff --git a/examples/2.3.x/server-swift/examples/project/list-email-templates.md b/examples/2.3.x/server-swift/examples/project/list-email-templates.md new file mode 100644 index 000000000..e135eb231 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/list-email-templates.md @@ -0,0 +1,16 @@ +```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 emailTemplateList = try await project.listEmailTemplates( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/list-keys.md b/examples/2.3.x/server-swift/examples/project/list-keys.md new file mode 100644 index 000000000..ad3eb7e55 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/list-keys.md @@ -0,0 +1,16 @@ +```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 keyList = try await project.listKeys( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/list-mock-phones.md b/examples/2.3.x/server-swift/examples/project/list-mock-phones.md new file mode 100644 index 000000000..5a1119297 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/list-mock-phones.md @@ -0,0 +1,16 @@ +```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 mockNumberList = try await project.listMockPhones( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-swift/examples/project/list-o-auth-2-providers.md new file mode 100644 index 000000000..06b53932f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/list-o-auth-2-providers.md @@ -0,0 +1,16 @@ +```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 oAuth2ProviderList = try await project.listOAuth2Providers( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/list-platforms.md b/examples/2.3.x/server-swift/examples/project/list-platforms.md new file mode 100644 index 000000000..c4d8d038d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/list-platforms.md @@ -0,0 +1,16 @@ +```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 platformList = try await project.listPlatforms( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/list-policies.md b/examples/2.3.x/server-swift/examples/project/list-policies.md new file mode 100644 index 000000000..5dd4fc41c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/list-policies.md @@ -0,0 +1,16 @@ +```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 policyList = try await project.listPolicies( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/list-variables.md b/examples/2.3.x/server-swift/examples/project/list-variables.md new file mode 100644 index 000000000..fd6d6a03f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/list-variables.md @@ -0,0 +1,16 @@ +```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 variableList = try await project.listVariables( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-android-platform.md b/examples/2.3.x/server-swift/examples/project/update-android-platform.md new file mode 100644 index 000000000..e881bfece --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-android-platform.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 platformAndroid = try await project.updateAndroidPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + applicationId: "<APPLICATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-apple-platform.md b/examples/2.3.x/server-swift/examples/project/update-apple-platform.md new file mode 100644 index 000000000..8e4bdcb2b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-apple-platform.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 platformApple = try await project.updateApplePlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + bundleIdentifier: "<BUNDLE_IDENTIFIER>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-auth-method.md b/examples/2.3.x/server-swift/examples/project/update-auth-method.md new file mode 100644 index 000000000..1512ab09b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-auth-method.md @@ -0,0 +1,17 @@ +```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 project = Project(client) + +let project = try await project.updateAuthMethod( + methodId: .emailPassword, + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-swift/examples/project/update-deny-aliased-email-policy.md new file mode 100644 index 000000000..712daf818 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-deny-aliased-email-policy.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 project = Project(client) + +let project = try await project.updateDenyAliasedEmailPolicy( + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-swift/examples/project/update-deny-corporate-email-policy.md new file mode 100644 index 000000000..b1b08fd00 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-deny-corporate-email-policy.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 project = Project(client) + +let project = try await project.updateDenyCorporateEmailPolicy( + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-swift/examples/project/update-deny-disposable-email-policy.md new file mode 100644 index 000000000..011241cb5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-deny-disposable-email-policy.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 project = Project(client) + +let project = try await project.updateDenyDisposableEmailPolicy( + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-swift/examples/project/update-deny-free-email-policy.md new file mode 100644 index 000000000..07734dc11 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-deny-free-email-policy.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 project = Project(client) + +let project = try await project.updateDenyFreeEmailPolicy( + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-email-template.md b/examples/2.3.x/server-swift/examples/project/update-email-template.md new file mode 100644 index 000000000..917e169cb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-email-template.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 project = Project(client) + +let emailTemplate = try await project.updateEmailTemplate( + templateId: .verification, + locale: .af, // optional + subject: "<SUBJECT>", // optional + message: "<MESSAGE>", // optional + senderName: "<SENDER_NAME>", // optional + senderEmail: "email@example.com", // optional + replyToEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>" // optional +) + +``` 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 new file mode 100644 index 000000000..b94b74f13 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-key.md @@ -0,0 +1,19 @@ +```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 project = Project(client) + +let key = try await project.updateKey( + keyId: "<KEY_ID>", + name: "<NAME>", + scopes: [.projectRead], + 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 new file mode 100644 index 000000000..fe290de25 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-labels.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 project = Project(client) + +let project = try await project.updateLabels( + labels: [] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-linux-platform.md b/examples/2.3.x/server-swift/examples/project/update-linux-platform.md new file mode 100644 index 000000000..6d079a677 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-linux-platform.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 platformLinux = try await project.updateLinuxPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + packageName: "<PACKAGE_NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-swift/examples/project/update-membership-privacy-policy.md new file mode 100644 index 000000000..70c29fc5a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,20 @@ +```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 project = try await project.updateMembershipPrivacyPolicy( + userId: false, // optional + userEmail: false, // optional + userPhone: false, // optional + userName: false, // optional + userMFA: false, // optional + userAccessedAt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-swift/examples/project/update-mfa-factors-policy.md new file mode 100644 index 000000000..73b1652e1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-mfa-factors-policy.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 project = Project(client) + +let project = try await project.updateMFAFactorsPolicy( + totp: false, // optional + email: false, // optional + phone: false, // optional + custom: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-mock-phone.md b/examples/2.3.x/server-swift/examples/project/update-mock-phone.md new file mode 100644 index 000000000..4181189b3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-mock-phone.md @@ -0,0 +1,16 @@ +```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 mockNumber = try await project.updateMockPhone( + number: "+12065550100", + otp: "<OTP>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-amazon.md new file mode 100644 index 000000000..729f57b2e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-amazon.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 oAuth2Amazon = try await project.updateOAuth2Amazon( + 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-apple.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-apple.md new file mode 100644 index 000000000..195eb7468 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-apple.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 project = Project(client) + +let oAuth2Apple = try await project.updateOAuth2Apple( + serviceId: "<SERVICE_ID>", // optional + keyId: "<KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + p8File: "<P8_FILE>", // optional + nativeClientIds: [], // optional + enabled: false, // optional + nativeEnabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-appwrite.md new file mode 100644 index 000000000..6af65dfd3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-appwrite.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 oAuth2Appwrite = try await project.updateOAuth2Appwrite( + 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-auth-0.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-auth-0.md new file mode 100644 index 000000000..32fa12df4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-auth-0.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 project = Project(client) + +let oAuth2Auth0 = try await project.updateOAuth2Auth0( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + endpoint: "<ENDPOINT>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-authentik.md new file mode 100644 index 000000000..e627e0e36 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-authentik.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 project = Project(client) + +let oAuth2Authentik = try await project.updateOAuth2Authentik( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + endpoint: "<ENDPOINT>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-autodesk.md new file mode 100644 index 000000000..a20dc1a0b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-autodesk.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 oAuth2Autodesk = try await project.updateOAuth2Autodesk( + 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-bitbucket.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-bitbucket.md new file mode 100644 index 000000000..d147529b3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-bitbucket.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 oAuth2Bitbucket = try await project.updateOAuth2Bitbucket( + key: "<KEY>", // optional + secret: "<SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-bitly.md new file mode 100644 index 000000000..5d4e87c98 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-bitly.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 oAuth2Bitly = try await project.updateOAuth2Bitly( + 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-box.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-box.md new file mode 100644 index 000000000..9a11d94d3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-box.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 oAuth2Box = try await project.updateOAuth2Box( + 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-cloudflare.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-cloudflare.md new file mode 100644 index 000000000..fc092bb9d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-cloudflare.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 oAuth2Cloudflare = try await project.updateOAuth2Cloudflare( + 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-dailymotion.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-dailymotion.md new file mode 100644 index 000000000..598ae75eb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-dailymotion.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 oAuth2Dailymotion = try await project.updateOAuth2Dailymotion( + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // 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 new file mode 100644 index 000000000..bdab08003 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-discord.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 oAuth2Discord = try await project.updateOAuth2Discord( + 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-disqus.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-disqus.md new file mode 100644 index 000000000..ec7f71955 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-disqus.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 oAuth2Disqus = try await project.updateOAuth2Disqus( + publicKey: "<PUBLIC_KEY>", // optional + secretKey: "<SECRET_KEY>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-dropbox.md new file mode 100644 index 000000000..81a1fde31 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-dropbox.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 oAuth2Dropbox = try await project.updateOAuth2Dropbox( + appKey: "<APP_KEY>", // optional + appSecret: "<APP_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-etsy.md new file mode 100644 index 000000000..252eb52eb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-etsy.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 oAuth2Etsy = try await project.updateOAuth2Etsy( + keyString: "<KEY_STRING>", // optional + sharedSecret: "<SHARED_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-facebook.md new file mode 100644 index 000000000..b2775c8af --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-facebook.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 oAuth2Facebook = try await project.updateOAuth2Facebook( + appId: "<APP_ID>", // optional + appSecret: "<APP_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-figma.md new file mode 100644 index 000000000..a29c713d1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-figma.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 oAuth2Figma = try await project.updateOAuth2Figma( + 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-fusion-auth.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-fusion-auth.md new file mode 100644 index 000000000..64adf24f5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-fusion-auth.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 project = Project(client) + +let oAuth2FusionAuth = try await project.updateOAuth2FusionAuth( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + endpoint: "<ENDPOINT>", // 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 new file mode 100644 index 000000000..3a31b270c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-git-hub.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 oAuth2Github = try await project.updateOAuth2GitHub( + 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-gitlab.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-gitlab.md new file mode 100644 index 000000000..35fd4da04 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-gitlab.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 project = Project(client) + +let oAuth2Gitlab = try await project.updateOAuth2Gitlab( + applicationId: "<APPLICATION_ID>", // optional + secret: "<SECRET>", // optional + endpoint: "https://example.com", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-google.md new file mode 100644 index 000000000..452a24b96 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-google.md @@ -0,0 +1,21 @@ +```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 project = Project(client) + +let oAuth2Google = try await project.updateOAuth2Google( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + prompt: [.none], // optional + nativeClientIds: [], // optional + enabled: false, // optional + nativeEnabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-hugging-face.md new file mode 100644 index 000000000..7c0750e03 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-hugging-face.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 oAuth2HuggingFace = try await project.updateOAuth2HuggingFace( + 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-kakao.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kakao.md new file mode 100644 index 000000000..d28b0dbe7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kakao.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 oAuth2Kakao = try await project.updateOAuth2Kakao( + 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-keycloak.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-keycloak.md new file mode 100644 index 000000000..90f37c1c1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-keycloak.md @@ -0,0 +1,19 @@ +```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 oAuth2Keycloak = try await project.updateOAuth2Keycloak( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + endpoint: "<ENDPOINT>", // optional + realmName: "<REALM_NAME>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kick.md new file mode 100644 index 000000000..091f4651e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kick.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 oAuth2Kick = try await project.updateOAuth2Kick( + 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-linkedin.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-linkedin.md new file mode 100644 index 000000000..5045d05aa --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-linkedin.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 oAuth2Linkedin = try await project.updateOAuth2Linkedin( + clientId: "<CLIENT_ID>", // optional + primaryClientSecret: "<PRIMARY_CLIENT_SECRET>", // 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 new file mode 100644 index 000000000..1ec4428ba --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-microsoft.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 project = Project(client) + +let oAuth2Microsoft = try await project.updateOAuth2Microsoft( + applicationId: "<APPLICATION_ID>", // optional + applicationSecret: "<APPLICATION_SECRET>", // optional + tenant: "<TENANT>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-notion.md new file mode 100644 index 000000000..531a55591 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-notion.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 oAuth2Notion = try await project.updateOAuth2Notion( + oauthClientId: "<OAUTH_CLIENT_ID>", // optional + oauthClientSecret: "<OAUTH_CLIENT_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-oidc.md new file mode 100644 index 000000000..8fe0ed2c3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-oidc.md @@ -0,0 +1,24 @@ +```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 project = Project(client) + +let oAuth2Oidc = try await project.updateOAuth2Oidc( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + wellKnownURL: "https://example.com", // optional + authorizationURL: "https://example.com", // optional + tokenURL: "https://example.com", // optional + userInfoURL: "https://example.com", // optional + prompt: [.none], // optional + maxAge: 0, // 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 new file mode 100644 index 000000000..51331bee7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-okta.md @@ -0,0 +1,19 @@ +```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 oAuth2Okta = try await project.updateOAuth2Okta( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + domain: "example.com", // optional + authorizationServerId: "<AUTHORIZATION_SERVER_ID>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-paypal-sandbox.md new file mode 100644 index 000000000..148ac7c30 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-paypal-sandbox.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 oAuth2Paypal = try await project.updateOAuth2PaypalSandbox( + clientId: "<CLIENT_ID>", // optional + secretKey: "<SECRET_KEY>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-paypal.md new file mode 100644 index 000000000..893314fb9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-paypal.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 oAuth2Paypal = try await project.updateOAuth2Paypal( + clientId: "<CLIENT_ID>", // optional + secretKey: "<SECRET_KEY>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-podio.md new file mode 100644 index 000000000..489d1b47a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-podio.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 oAuth2Podio = try await project.updateOAuth2Podio( + 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-resend.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-resend.md new file mode 100644 index 000000000..5c16e7d11 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-resend.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 oAuth2Resend = try await project.updateOAuth2Resend( + 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-salesforce.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-salesforce.md new file mode 100644 index 000000000..65eb7468b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-salesforce.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 oAuth2Salesforce = try await project.updateOAuth2Salesforce( + customerKey: "<CUSTOMER_KEY>", // optional + customerSecret: "<CUSTOMER_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-server.md new file mode 100644 index 000000000..1872f6d98 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-server.md @@ -0,0 +1,30 @@ +```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 project = try await project.updateOAuth2Server( + enabled: false, + authorizationUrl: "https://example.com", + scopes: [], // optional + authorizationDetailsTypes: [], // optional + accessTokenDuration: 60, // optional + refreshTokenDuration: 60, // optional + publicAccessTokenDuration: 60, // optional + publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional + confidentialPkce: false, // optional + verificationUrl: "https://example.com", // optional + userCodeLength: 6, // optional + userCodeFormat: "numeric", // optional + deviceCodeDuration: 60, // optional + defaultScopes: [], // optional + installationScopes: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-slack.md new file mode 100644 index 000000000..b60e30216 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-slack.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 oAuth2Slack = try await project.updateOAuth2Slack( + 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-spotify.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-spotify.md new file mode 100644 index 000000000..6d7570eec --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-spotify.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 oAuth2Spotify = try await project.updateOAuth2Spotify( + 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-stripe.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-stripe.md new file mode 100644 index 000000000..a600e6f99 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-stripe.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 oAuth2Stripe = try await project.updateOAuth2Stripe( + clientId: "<CLIENT_ID>", // optional + apiSecretKey: "<API_SECRET_KEY>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-tik-tok.md new file mode 100644 index 000000000..526b5b696 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-tik-tok.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 oAuth2TikTok = try await project.updateOAuth2TikTok( + 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-tradeshift-sandbox.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-tradeshift-sandbox.md new file mode 100644 index 000000000..bbfad0edf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-tradeshift-sandbox.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 oAuth2Tradeshift = try await project.updateOAuth2TradeshiftSandbox( + oauth2ClientId: "<OAUTH2_CLIENT_ID>", // optional + oauth2ClientSecret: "<OAUTH2_CLIENT_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-tradeshift.md new file mode 100644 index 000000000..83f93be73 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-tradeshift.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 oAuth2Tradeshift = try await project.updateOAuth2Tradeshift( + oauth2ClientId: "<OAUTH2_CLIENT_ID>", // optional + oauth2ClientSecret: "<OAUTH2_CLIENT_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-twitch.md new file mode 100644 index 000000000..b2bcda440 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-twitch.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 oAuth2Twitch = try await project.updateOAuth2Twitch( + 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-word-press.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-word-press.md new file mode 100644 index 000000000..0025d2e5c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-word-press.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 oAuth2WordPress = try await project.updateOAuth2WordPress( + 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-yahoo.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-yahoo.md new file mode 100644 index 000000000..dd6bb966f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-yahoo.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 oAuth2Yahoo = try await project.updateOAuth2Yahoo( + 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-yandex.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-yandex.md new file mode 100644 index 000000000..0aa910d35 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-yandex.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 oAuth2Yandex = try await project.updateOAuth2Yandex( + 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 new file mode 100644 index 000000000..db4f04043 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-zoho.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 oAuth2Zoho = try await project.updateOAuth2Zoho( + 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-zoom.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-zoom.md new file mode 100644 index 000000000..2adc273c8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-zoom.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 oAuth2Zoom = try await project.updateOAuth2Zoom( + 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-2x.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2x.md new file mode 100644 index 000000000..e04f13b25 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2x.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 oAuth2X = try await project.updateOAuth2X( + customerKey: "<CUSTOMER_KEY>", // optional + secretKey: "<SECRET_KEY>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-swift/examples/project/update-password-dictionary-policy.md new file mode 100644 index 000000000..dd32d0e74 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-password-dictionary-policy.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 project = Project(client) + +let project = try await project.updatePasswordDictionaryPolicy( + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-password-history-policy.md b/examples/2.3.x/server-swift/examples/project/update-password-history-policy.md new file mode 100644 index 000000000..8c864e9cc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-password-history-policy.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 project = Project(client) + +let project = try await project.updatePasswordHistoryPolicy( + total: 1 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-swift/examples/project/update-password-personal-data-policy.md new file mode 100644 index 000000000..155a9fa73 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-password-personal-data-policy.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 project = Project(client) + +let project = try await project.updatePasswordPersonalDataPolicy( + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-swift/examples/project/update-password-pwned-policy.md new file mode 100644 index 000000000..fb9929bab --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-password-pwned-policy.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 project = try await project.updatePasswordPwnedPolicy( + enabled: false, // optional + sessions: false, // optional + users: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-swift/examples/project/update-password-strength-policy.md new file mode 100644 index 000000000..57b127903 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-password-strength-policy.md @@ -0,0 +1,19 @@ +```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 policyPasswordStrength = try await project.updatePasswordStrengthPolicy( + min: 8, // optional + uppercase: false, // optional + lowercase: false, // optional + number: false, // optional + symbols: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-protocol.md b/examples/2.3.x/server-swift/examples/project/update-protocol.md new file mode 100644 index 000000000..e2b7637f6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-protocol.md @@ -0,0 +1,17 @@ +```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 project = Project(client) + +let project = try await project.updateProtocol( + protocolId: .rest, + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-service.md b/examples/2.3.x/server-swift/examples/project/update-service.md new file mode 100644 index 000000000..fc4edf817 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-service.md @@ -0,0 +1,17 @@ +```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 project = Project(client) + +let project = try await project.updateService( + serviceId: .account, + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-swift/examples/project/update-session-alert-policy.md new file mode 100644 index 000000000..b6391d595 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-session-alert-policy.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 project = Project(client) + +let project = try await project.updateSessionAlertPolicy( + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-swift/examples/project/update-session-duration-policy.md new file mode 100644 index 000000000..1463c84a1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-session-duration-policy.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 project = Project(client) + +let project = try await project.updateSessionDurationPolicy( + duration: 60 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-swift/examples/project/update-session-invalidation-policy.md new file mode 100644 index 000000000..c7ae97a54 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-session-invalidation-policy.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 project = Project(client) + +let project = try await project.updateSessionInvalidationPolicy( + enabled: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-swift/examples/project/update-session-limit-policy.md new file mode 100644 index 000000000..bbff0f750 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-session-limit-policy.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 project = Project(client) + +let project = try await project.updateSessionLimitPolicy( + total: 1 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-smtp.md b/examples/2.3.x/server-swift/examples/project/update-smtp.md new file mode 100644 index 000000000..4bee4d119 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-smtp.md @@ -0,0 +1,25 @@ +```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 project = Project(client) + +let project = try await project.updateSMTP( + host: "example.com", // optional + port: 587, // optional + username: "<USERNAME>", // optional + password: "password", // optional + senderEmail: "email@example.com", // optional + senderName: "<SENDER_NAME>", // optional + replyToEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + secure: .tls, // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-swift/examples/project/update-user-limit-policy.md new file mode 100644 index 000000000..e8080b6a8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-user-limit-policy.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 project = Project(client) + +let project = try await project.updateUserLimitPolicy( + total: 0 +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-variable.md b/examples/2.3.x/server-swift/examples/project/update-variable.md new file mode 100644 index 000000000..a7df7adad --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-variable.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 project = Project(client) + +let variable = try await project.updateVariable( + variableId: "<VARIABLE_ID>", + key: "<KEY>", // optional + value: "<VALUE>", // optional + secret: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-web-platform.md b/examples/2.3.x/server-swift/examples/project/update-web-platform.md new file mode 100644 index 000000000..3e78f60e5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-web-platform.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 platformWeb = try await project.updateWebPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + hostname: "app.example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-windows-platform.md b/examples/2.3.x/server-swift/examples/project/update-windows-platform.md new file mode 100644 index 000000000..26b028f26 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-windows-platform.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 platformWindows = try await project.updateWindowsPlatform( + platformId: "<PLATFORM_ID>", + name: "<NAME>", + packageIdentifierName: "<PACKAGE_IDENTIFIER_NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/create-api-rule.md b/examples/2.3.x/server-swift/examples/proxy/create-api-rule.md new file mode 100644 index 000000000..38671549c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/create-api-rule.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 proxy = Proxy(client) + +let proxyRule = try await proxy.createAPIRule( + domain: "example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/create-function-rule.md b/examples/2.3.x/server-swift/examples/proxy/create-function-rule.md new file mode 100644 index 000000000..b7d074fd4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/create-function-rule.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 proxy = Proxy(client) + +let proxyRule = try await proxy.createFunctionRule( + domain: "example.com", + functionId: "<FUNCTION_ID>", + branch: "<BRANCH>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/create-invalidation.md b/examples/2.3.x/server-swift/examples/proxy/create-invalidation.md new file mode 100644 index 000000000..49ce68656 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/create-invalidation.md @@ -0,0 +1,18 @@ +```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 proxy = Proxy(client) + +let proxyInvalidation = try await proxy.createInvalidation( + domain: "example.com", + type: .tag, + reference: "<REFERENCE>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-swift/examples/proxy/create-redirect-rule.md new file mode 100644 index 000000000..ba2b280dc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/create-redirect-rule.md @@ -0,0 +1,20 @@ +```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 proxy = Proxy(client) + +let proxyRule = try await proxy.createRedirectRule( + domain: "example.com", + url: "https://example.com", + statusCode: .movedPermanently, + resourceId: "<RESOURCE_ID>", + resourceType: .site +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/create-site-rule.md b/examples/2.3.x/server-swift/examples/proxy/create-site-rule.md new file mode 100644 index 000000000..f03efbe5c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/create-site-rule.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 proxy = Proxy(client) + +let proxyRule = try await proxy.createSiteRule( + domain: "example.com", + siteId: "<SITE_ID>", + branch: "<BRANCH>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/delete-rule.md b/examples/2.3.x/server-swift/examples/proxy/delete-rule.md new file mode 100644 index 000000000..019361f8a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/delete-rule.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 proxy = Proxy(client) + +let result = try await proxy.deleteRule( + ruleId: "<RULE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/get-rule.md b/examples/2.3.x/server-swift/examples/proxy/get-rule.md new file mode 100644 index 000000000..0a91b3cf7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/get-rule.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 proxy = Proxy(client) + +let proxyRule = try await proxy.getRule( + ruleId: "<RULE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/list-rules.md b/examples/2.3.x/server-swift/examples/proxy/list-rules.md new file mode 100644 index 000000000..bb252ac88 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/list-rules.md @@ -0,0 +1,16 @@ +```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 proxy = Proxy(client) + +let proxyRuleList = try await proxy.listRules( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/proxy/update-rule-status.md b/examples/2.3.x/server-swift/examples/proxy/update-rule-status.md new file mode 100644 index 000000000..fc65fbfab --- /dev/null +++ b/examples/2.3.x/server-swift/examples/proxy/update-rule-status.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 proxy = Proxy(client) + +let proxyRule = try await proxy.updateRuleStatus( + ruleId: "<RULE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/create-deployment.md b/examples/2.3.x/server-swift/examples/sites/create-deployment.md new file mode 100644 index 000000000..9dd28d874 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/create-deployment.md @@ -0,0 +1,20 @@ +```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 sites = Sites(client) + +let deployment = try await sites.createDeployment( + siteId: "<SITE_ID>", + code: InputFile.fromPath("file.png"), + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + activate: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-swift/examples/sites/create-duplicate-deployment.md new file mode 100644 index 000000000..713f301c8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let deployment = try await sites.createDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/create-template-deployment.md b/examples/2.3.x/server-swift/examples/sites/create-template-deployment.md new file mode 100644 index 000000000..3bd90c077 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/create-template-deployment.md @@ -0,0 +1,22 @@ +```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 sites = Sites(client) + +let deployment = try await sites.createTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/create-variable.md b/examples/2.3.x/server-swift/examples/sites/create-variable.md new file mode 100644 index 000000000..12f8beb62 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/create-variable.md @@ -0,0 +1,19 @@ +```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 sites = Sites(client) + +let variable = try await sites.createVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-swift/examples/sites/create-vcs-deployment.md new file mode 100644 index 000000000..aac865a02 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/create-vcs-deployment.md @@ -0,0 +1,19 @@ +```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 sites = Sites(client) + +let deployment = try await sites.createVcsDeployment( + siteId: "<SITE_ID>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/create.md b/examples/2.3.x/server-swift/examples/sites/create.md new file mode 100644 index 000000000..2bcf4a707 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/create.md @@ -0,0 +1,39 @@ +```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 sites = Sites(client) + +let site = try await sites.create( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .analog, + buildRuntime: .node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + startCommand: "<START_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + adapter: .static, // optional + installationId: "<INSTALLATION_ID>", // optional + fallbackFile: "<FALLBACK_FILE>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: "s-1vcpu-512mb", // optional + runtimeSpecification: "s-1vcpu-512mb", // optional + deploymentRetention: 0, // optional + scopes: [.projectRead] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/delete-deployment.md b/examples/2.3.x/server-swift/examples/sites/delete-deployment.md new file mode 100644 index 000000000..018be7a4b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/delete-deployment.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let result = try await sites.deleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/delete-log.md b/examples/2.3.x/server-swift/examples/sites/delete-log.md new file mode 100644 index 000000000..2b88a5650 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/delete-log.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let result = try await sites.deleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/delete-variable.md b/examples/2.3.x/server-swift/examples/sites/delete-variable.md new file mode 100644 index 000000000..513b8232e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/delete-variable.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let result = try await sites.deleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/delete.md b/examples/2.3.x/server-swift/examples/sites/delete.md new file mode 100644 index 000000000..c71618cf7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/delete.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 sites = Sites(client) + +let result = try await sites.delete( + siteId: "<SITE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/get-deployment-download.md b/examples/2.3.x/server-swift/examples/sites/get-deployment-download.md new file mode 100644 index 000000000..d3e391ccd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/get-deployment-download.md @@ -0,0 +1,19 @@ +```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 sites = Sites(client) + +let bytes = try await sites.getDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: .source, // optional + token: "<TOKEN>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/get-deployment.md b/examples/2.3.x/server-swift/examples/sites/get-deployment.md new file mode 100644 index 000000000..03413bb40 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/get-deployment.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let deployment = try await sites.getDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/get-log.md b/examples/2.3.x/server-swift/examples/sites/get-log.md new file mode 100644 index 000000000..608a2611a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/get-log.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let execution = try await sites.getLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/get-variable.md b/examples/2.3.x/server-swift/examples/sites/get-variable.md new file mode 100644 index 000000000..4f22a1905 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/get-variable.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let variable = try await sites.getVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/get.md b/examples/2.3.x/server-swift/examples/sites/get.md new file mode 100644 index 000000000..be7ab735d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/get.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 sites = Sites(client) + +let site = try await sites.get( + siteId: "<SITE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/list-deployments.md b/examples/2.3.x/server-swift/examples/sites/list-deployments.md new file mode 100644 index 000000000..3427c09f3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/list-deployments.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 sites = Sites(client) + +let deploymentList = try await sites.listDeployments( + siteId: "<SITE_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: 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 new file mode 100644 index 000000000..f4fe3a699 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/list-frameworks.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let frameworkList = try await sites.listFrameworks() + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/list-logs.md b/examples/2.3.x/server-swift/examples/sites/list-logs.md new file mode 100644 index 000000000..bc532302e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/list-logs.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 sites = Sites(client) + +let executionList = try await sites.listLogs( + siteId: "<SITE_ID>", + queries: [], // optional + 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 new file mode 100644 index 000000000..a75edd555 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/list-specifications.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 sites = Sites(client) + +let specificationList = try await sites.listSpecifications( + type: "runtimes" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/list-variables.md b/examples/2.3.x/server-swift/examples/sites/list-variables.md new file mode 100644 index 000000000..a32762a53 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/list-variables.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 sites = Sites(client) + +let variableList = try await sites.listVariables( + siteId: "<SITE_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/list.md b/examples/2.3.x/server-swift/examples/sites/list.md new file mode 100644 index 000000000..9d5f7763f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/list.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 sites = Sites(client) + +let siteList = try await sites.list( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/update-deployment-status.md b/examples/2.3.x/server-swift/examples/sites/update-deployment-status.md new file mode 100644 index 000000000..4b9364be2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/update-deployment-status.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let deployment = try await sites.updateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/update-site-deployment.md b/examples/2.3.x/server-swift/examples/sites/update-site-deployment.md new file mode 100644 index 000000000..880060d0b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/update-site-deployment.md @@ -0,0 +1,16 @@ +```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 sites = Sites(client) + +let site = try await sites.updateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/update-variable.md b/examples/2.3.x/server-swift/examples/sites/update-variable.md new file mode 100644 index 000000000..a79f3a4bb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/update-variable.md @@ -0,0 +1,19 @@ +```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 sites = Sites(client) + +let variable = try await sites.updateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", // optional + value: "<VALUE>", // optional + secret: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/sites/update.md b/examples/2.3.x/server-swift/examples/sites/update.md new file mode 100644 index 000000000..1cb9a5d25 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/sites/update.md @@ -0,0 +1,39 @@ +```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 sites = Sites(client) + +let site = try await sites.update( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + startCommand: "<START_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + buildRuntime: .node145, // optional + adapter: .static, // optional + fallbackFile: "<FALLBACK_FILE>", // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + providerBranches: [], // optional + providerPaths: [], // optional + buildSpecification: "s-1vcpu-512mb", // optional + runtimeSpecification: "s-1vcpu-512mb", // optional + deploymentRetention: 0, // optional + scopes: [.projectRead] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/create-bucket.md b/examples/2.3.x/server-swift/examples/storage/create-bucket.md new file mode 100644 index 000000000..89ccc8e43 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/create-bucket.md @@ -0,0 +1,26 @@ +```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 storage = Storage(client) + +let bucket = try await storage.createBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: [Permission.read(Role.any())], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: .none, // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/create-file.md b/examples/2.3.x/server-swift/examples/storage/create-file.md new file mode 100644 index 000000000..fb714398c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/create-file.md @@ -0,0 +1,19 @@ +```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 storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + file: InputFile.fromPath("file.png"), + permissions: [Permission.read(Role.any())], // optional + folder: "photos/2026" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/delete-bucket.md b/examples/2.3.x/server-swift/examples/storage/delete-bucket.md new file mode 100644 index 000000000..43c58231f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/delete-bucket.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 storage = Storage(client) + +let result = try await storage.deleteBucket( + bucketId: "<BUCKET_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/delete-file.md b/examples/2.3.x/server-swift/examples/storage/delete-file.md new file mode 100644 index 000000000..2f6295244 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +```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 storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/get-bucket.md b/examples/2.3.x/server-swift/examples/storage/get-bucket.md new file mode 100644 index 000000000..e261e7b69 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/get-bucket.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 storage = Storage(client) + +let bucket = try await storage.getBucket( + bucketId: "<BUCKET_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/get-file-download.md b/examples/2.3.x/server-swift/examples/storage/get-file-download.md new file mode 100644 index 000000000..2efb755f7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/get-file-download.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 + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/get-file-preview.md b/examples/2.3.x/server-swift/examples/storage/get-file-preview.md new file mode 100644 index 000000000..2b10c805f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/get-file-preview.md @@ -0,0 +1,29 @@ +```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 + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, // optional + height: 0, // optional + gravity: .auto, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "FFFFFF", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "FFFFFF", // optional + output: .jpg, // optional + token: "<TOKEN>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/get-file-view.md b/examples/2.3.x/server-swift/examples/storage/get-file-view.md new file mode 100644 index 000000000..df514f7e4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/get-file-view.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 + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/get-file.md b/examples/2.3.x/server-swift/examples/storage/get-file.md new file mode 100644 index 000000000..36b999cff --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/get-file.md @@ -0,0 +1,16 @@ +```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 storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/list-buckets.md b/examples/2.3.x/server-swift/examples/storage/list-buckets.md new file mode 100644 index 000000000..86e84bd34 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/list-buckets.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 storage = Storage(client) + +let bucketList = try await storage.listBuckets( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/list-files.md b/examples/2.3.x/server-swift/examples/storage/list-files.md new file mode 100644 index 000000000..7102270f3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/list-files.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 + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "<BUCKET_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/update-bucket.md b/examples/2.3.x/server-swift/examples/storage/update-bucket.md new file mode 100644 index 000000000..a5b66e39f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/update-bucket.md @@ -0,0 +1,26 @@ +```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 storage = Storage(client) + +let bucket = try await storage.updateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: [Permission.read(Role.any())], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: .none, // optional + encryption: false, // optional + antivirus: false, // optional + transformations: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/storage/update-file.md b/examples/2.3.x/server-swift/examples/storage/update-file.md new file mode 100644 index 000000000..aa02fd86f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/storage/update-file.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 + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", // optional + permissions: [Permission.read(Role.any())] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-big-int-column.md new file mode 100644 index 000000000..e00c1f02c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-big-int-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnBigint = try await tablesDB.createBigIntColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 1000000, // optional + default: 0, // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-boolean-column.md new file mode 100644 index 000000000..34774998e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnBoolean = try await tablesDB.createBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: false, // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-swift/examples/tablesdb/create-cutover.md new file mode 100644 index 000000000..d489930e4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-cutover.md @@ -0,0 +1,16 @@ +```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 tablesDB = TablesDB(client) + +let databaseMigration = try await tablesDB.createCutover( + databaseId: "<DATABASE_ID>", + migrationId: "<MIGRATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-datetime-column.md new file mode 100644 index 000000000..52f91f641 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnDatetime = try await tablesDB.createDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-email-column.md new file mode 100644 index 000000000..46ea4b22a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-email-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnEmail = try await tablesDB.createEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-enum-column.md new file mode 100644 index 000000000..f99c30e58 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-enum-column.md @@ -0,0 +1,24 @@ +```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 tablesDB = TablesDB(client) + +let columnEnum = try await tablesDB.createEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + elements: [ + "active", + "inactive" + ], + required: false, + default: "active", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-failover.md b/examples/2.3.x/server-swift/examples/tablesdb/create-failover.md new file mode 100644 index 000000000..b8ee06b7f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-failover.md @@ -0,0 +1,16 @@ +```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 tablesDB = TablesDB(client) + +let dedicatedDatabase = try await tablesDB.createFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-float-column.md new file mode 100644 index 000000000..54146f430 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-float-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnFloat = try await tablesDB.createFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 100, // optional + default: 10.5, // optional + array: 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 new file mode 100644 index 000000000..ae3723efc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-index.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnIndex = try await tablesDB.createIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + type: .key, + columns: [], + orders: [.asc], // optional + lengths: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-integer-column.md new file mode 100644 index 000000000..4d1dca993 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-integer-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnInteger = try await tablesDB.createIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + min: 0, // optional + max: 100, // optional + default: 10, // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-ip-column.md new file mode 100644 index 000000000..da8c34979 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-ip-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnIp = try await tablesDB.createIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-line-column.md new file mode 100644 index 000000000..174a85964 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-line-column.md @@ -0,0 +1,32 @@ +```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 tablesDB = TablesDB(client) + +let columnLine = try await tablesDB.createLineColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-longtext-column.md new file mode 100644 index 000000000..85152c302 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-longtext-column.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 tablesDB = TablesDB(client) + +let columnLongtext = try await tablesDB.createLongtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-mediumtext-column.md new file mode 100644 index 000000000..f32f56299 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-mediumtext-column.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 tablesDB = TablesDB(client) + +let columnMediumtext = try await tablesDB.createMediumtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-migration.md b/examples/2.3.x/server-swift/examples/tablesdb/create-migration.md new file mode 100644 index 000000000..9870ce998 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-migration.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 tablesDB = TablesDB(client) + +let databaseMigration = try await tablesDB.createMigration( + databaseId: "<DATABASE_ID>", + specification: "s-1vcpu-1gb", + autoCutover: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-operations.md b/examples/2.3.x/server-swift/examples/tablesdb/create-operations.md new file mode 100644 index 000000000..2117beedf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-operations.md @@ -0,0 +1,26 @@ +```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 tablesDB = TablesDB(client) + +let transaction = try await tablesDB.createOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + [ + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": [ + "name": "Walter O'Brien" + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-point-column.md new file mode 100644 index 000000000..774121ec1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-point-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnPoint = try await tablesDB.createPointColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [ + 1, + 2 + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-polygon-column.md new file mode 100644 index 000000000..057942b0c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-polygon-column.md @@ -0,0 +1,38 @@ +```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 tablesDB = TablesDB(client) + +let columnPolygon = try await tablesDB.createPolygonColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [ + [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ], + [ + 1, + 2 + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-relationship-column.md new file mode 100644 index 000000000..ec981e369 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-relationship-column.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 tablesDB = TablesDB(client) + +let columnRelationship = try await tablesDB.createRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "<KEY>", // optional + twoWayKey: "<TWO_WAY_KEY>", // optional + onDelete: .cascade // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-row.md b/examples/2.3.x/server-swift/examples/tablesdb/create-row.md new file mode 100644 index 000000000..535ee521e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-row.md @@ -0,0 +1,26 @@ +```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 tablesDB = TablesDB(client) + +let row = try await tablesDB.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..0a8380717 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-rows.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 tablesDB = TablesDB(client) + +let rowList = try await tablesDB.createRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [], + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-string-column.md new file mode 100644 index 000000000..c59ec1e35 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-string-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnString = try await tablesDB.createStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-table.md b/examples/2.3.x/server-swift/examples/tablesdb/create-table.md new file mode 100644 index 000000000..d8c537dcc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-table.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let table = try await tablesDB.createTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: [Permission.read(Role.any())], // optional + rowSecurity: false, // optional + enabled: false, // optional + columns: [], // optional + indexes: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-text-column.md new file mode 100644 index 000000000..cb79ec132 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-text-column.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 tablesDB = TablesDB(client) + +let columnText = try await tablesDB.createTextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-swift/examples/tablesdb/create-transaction.md new file mode 100644 index 000000000..efa765097 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-transaction.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 tablesDB = TablesDB(client) + +let transaction = try await tablesDB.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-url-column.md new file mode 100644 index 000000000..958904df8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-url-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnUrl = try await tablesDB.createUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", // optional + array: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-swift/examples/tablesdb/create-varchar-column.md new file mode 100644 index 000000000..1845b7ad3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-varchar-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnVarchar = try await tablesDB.createVarcharColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + size: 1, + required: false, + default: "Hello World", // optional + array: false, // optional + encrypt: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create.md b/examples/2.3.x/server-swift/examples/tablesdb/create.md new file mode 100644 index 000000000..bfbf1380e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/create.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let database = try await tablesDB.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-swift/examples/tablesdb/decrement-row-column.md new file mode 100644 index 000000000..2a36505fc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/decrement-row-column.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 + .setSession("") // The user session to authenticate with + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.decrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "<COLUMN>", + value: 1, // optional + min: 0, // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/delete-column.md b/examples/2.3.x/server-swift/examples/tablesdb/delete-column.md new file mode 100644 index 000000000..fe4d718b4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete-column.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 tablesDB = TablesDB(client) + +let result = try await tablesDB.deleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/delete-index.md b/examples/2.3.x/server-swift/examples/tablesdb/delete-index.md new file mode 100644 index 000000000..1eaf3f493 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete-index.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 tablesDB = TablesDB(client) + +let result = try await tablesDB.deleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/delete-migration.md b/examples/2.3.x/server-swift/examples/tablesdb/delete-migration.md new file mode 100644 index 000000000..784a9ebf1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete-migration.md @@ -0,0 +1,16 @@ +```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 tablesDB = TablesDB(client) + +let result = try await tablesDB.deleteMigration( + databaseId: "<DATABASE_ID>", + migrationId: "<MIGRATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/delete-row.md b/examples/2.3.x/server-swift/examples/tablesdb/delete-row.md new file mode 100644 index 000000000..89b575fc0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete-row.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 + .setSession("") // The user session to authenticate with + +let tablesDB = TablesDB(client) + +let result = try await tablesDB.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + 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 new file mode 100644 index 000000000..0ab77ec63 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete-rows.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 tablesDB = TablesDB(client) + +let rowList = try await tablesDB.deleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/delete-table.md b/examples/2.3.x/server-swift/examples/tablesdb/delete-table.md new file mode 100644 index 000000000..b5e613f4c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete-table.md @@ -0,0 +1,16 @@ +```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 tablesDB = TablesDB(client) + +let result = try await tablesDB.deleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/delete-transaction.md b/examples/2.3.x/server-swift/examples/tablesdb/delete-transaction.md new file mode 100644 index 000000000..90c4c4b77 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete-transaction.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 tablesDB = TablesDB(client) + +let result = try await tablesDB.deleteTransaction( + transactionId: "<TRANSACTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/delete.md b/examples/2.3.x/server-swift/examples/tablesdb/delete.md new file mode 100644 index 000000000..0341da342 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete.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 tablesDB = TablesDB(client) + +let result = try await tablesDB.delete( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get-column.md b/examples/2.3.x/server-swift/examples/tablesdb/get-column.md new file mode 100644 index 000000000..f9ede3ea6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get-column.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 tablesDB = TablesDB(client) + +let result = try await tablesDB.getColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get-index.md b/examples/2.3.x/server-swift/examples/tablesdb/get-index.md new file mode 100644 index 000000000..62cf2ebb4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get-index.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 tablesDB = TablesDB(client) + +let columnIndex = try await tablesDB.getIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get-migration.md b/examples/2.3.x/server-swift/examples/tablesdb/get-migration.md new file mode 100644 index 000000000..6a2b64efc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get-migration.md @@ -0,0 +1,16 @@ +```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 tablesDB = TablesDB(client) + +let databaseMigration = try await tablesDB.getMigration( + databaseId: "<DATABASE_ID>", + migrationId: "<MIGRATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-swift/examples/tablesdb/get-replicas.md new file mode 100644 index 000000000..7a9d8c101 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get-replicas.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 tablesDB = TablesDB(client) + +let dedicatedDatabaseReplicas = try await tablesDB.getReplicas( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get-row.md b/examples/2.3.x/server-swift/examples/tablesdb/get-row.md new file mode 100644 index 000000000..72ef92fec --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get-row.md @@ -0,0 +1,19 @@ +```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 tablesDB = TablesDB(client) + +let row = try await tablesDB.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get-status.md b/examples/2.3.x/server-swift/examples/tablesdb/get-status.md new file mode 100644 index 000000000..6705823f7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get-status.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 tablesDB = TablesDB(client) + +let databaseStatus = try await tablesDB.getStatus( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get-table.md b/examples/2.3.x/server-swift/examples/tablesdb/get-table.md new file mode 100644 index 000000000..b3a68b5de --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get-table.md @@ -0,0 +1,16 @@ +```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 tablesDB = TablesDB(client) + +let table = try await tablesDB.getTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-swift/examples/tablesdb/get-transaction.md new file mode 100644 index 000000000..faf6677a3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get-transaction.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 tablesDB = TablesDB(client) + +let transaction = try await tablesDB.getTransaction( + transactionId: "<TRANSACTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/get.md b/examples/2.3.x/server-swift/examples/tablesdb/get.md new file mode 100644 index 000000000..b94686d2a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/get.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 tablesDB = TablesDB(client) + +let database = try await tablesDB.get( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-swift/examples/tablesdb/increment-row-column.md new file mode 100644 index 000000000..23eedda53 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/increment-row-column.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 + .setSession("") // The user session to authenticate with + +let tablesDB = TablesDB(client) + +let row = try await tablesDB.incrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "<COLUMN>", + value: 1, // optional + max: 100, // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list-columns.md b/examples/2.3.x/server-swift/examples/tablesdb/list-columns.md new file mode 100644 index 000000000..1a4ce6b19 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-columns.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 tablesDB = TablesDB(client) + +let columnList = try await tablesDB.listColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-swift/examples/tablesdb/list-indexes.md new file mode 100644 index 000000000..49cb529a8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-indexes.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 tablesDB = TablesDB(client) + +let columnIndexList = try await tablesDB.listIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-swift/examples/tablesdb/list-migrations.md new file mode 100644 index 000000000..05c26a021 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-migrations.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 tablesDB = TablesDB(client) + +let databaseMigrationList = try await tablesDB.listMigrations( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list-operations.md b/examples/2.3.x/server-swift/examples/tablesdb/list-operations.md new file mode 100644 index 000000000..1932f26f6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-operations.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 tablesDB = TablesDB(client) + +let dedicatedDatabaseOperationList = try await tablesDB.listOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list-rows.md b/examples/2.3.x/server-swift/examples/tablesdb/list-rows.md new file mode 100644 index 000000000..6be251796 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-rows.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let rowList = try await tablesDB.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-swift/examples/tablesdb/list-specifications.md new file mode 100644 index 000000000..9b228a9ba --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-specifications.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDB = TablesDB(client) + +let dedicatedDatabaseSpecificationList = try await tablesDB.listSpecifications() + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list-tables.md b/examples/2.3.x/server-swift/examples/tablesdb/list-tables.md new file mode 100644 index 000000000..a611a8f4a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-tables.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 tablesDB = TablesDB(client) + +let tableList = try await tablesDB.listTables( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // 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 new file mode 100644 index 000000000..bf51907bd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-transactions.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 tablesDB = TablesDB(client) + +let transactionList = try await tablesDB.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list.md b/examples/2.3.x/server-swift/examples/tablesdb/list.md new file mode 100644 index 000000000..4ac684caf --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/list.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 tablesDB = TablesDB(client) + +let databaseList = try await tablesDB.list( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-big-int-column.md new file mode 100644 index 000000000..880db9b10 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-big-int-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnBigint = try await tablesDB.updateBigIntColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 0, + min: 0, // optional + max: 1000000, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-boolean-column.md new file mode 100644 index 000000000..36a31cd4c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnBoolean = try await tablesDB.updateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: false, + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-datetime-column.md new file mode 100644 index 000000000..beff84768 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnDatetime = try await tablesDB.updateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "2020-10-15T06:38:00.000+00:00", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-email-column.md new file mode 100644 index 000000000..7983ca694 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-email-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnEmail = try await tablesDB.updateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "email@example.com", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-enum-column.md new file mode 100644 index 000000000..310827c63 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-enum-column.md @@ -0,0 +1,24 @@ +```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 tablesDB = TablesDB(client) + +let columnEnum = try await tablesDB.updateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + elements: [ + "active", + "inactive" + ], + required: false, + default: "active", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-float-column.md new file mode 100644 index 000000000..731075c4c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-float-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnFloat = try await tablesDB.updateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 10.5, + min: 0, // optional + max: 100, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-integer-column.md new file mode 100644 index 000000000..14e7294f4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-integer-column.md @@ -0,0 +1,22 @@ +```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 tablesDB = TablesDB(client) + +let columnInteger = try await tablesDB.updateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: 10, + min: 0, // optional + max: 100, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-ip-column.md new file mode 100644 index 000000000..81b5f61bc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-ip-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnIp = try await tablesDB.updateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "192.0.2.0", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-line-column.md new file mode 100644 index 000000000..0e2f9a646 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-line-column.md @@ -0,0 +1,33 @@ +```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 tablesDB = TablesDB(client) + +let columnLine = try await tablesDB.updateLineColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ], // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-longtext-column.md new file mode 100644 index 000000000..575b069e0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-longtext-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnLongtext = try await tablesDB.updateLongtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-mediumtext-column.md new file mode 100644 index 000000000..e1da8afbd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-mediumtext-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnMediumtext = try await tablesDB.updateMediumtextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-point-column.md new file mode 100644 index 000000000..aab1b6646 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-point-column.md @@ -0,0 +1,23 @@ +```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 tablesDB = TablesDB(client) + +let columnPoint = try await tablesDB.updatePointColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [ + 1, + 2 + ], // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-polygon-column.md new file mode 100644 index 000000000..fc45975c8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-polygon-column.md @@ -0,0 +1,39 @@ +```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 tablesDB = TablesDB(client) + +let columnPolygon = try await tablesDB.updatePolygonColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: [ + [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ], + [ + 1, + 2 + ] + ] + ], // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-relationship-column.md new file mode 100644 index 000000000..1690fa461 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnRelationship = try await tablesDB.updateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + onDelete: .cascade, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-row.md b/examples/2.3.x/server-swift/examples/tablesdb/update-row.md new file mode 100644 index 000000000..da34394b6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-row.md @@ -0,0 +1,26 @@ +```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 tablesDB = TablesDB(client) + +let row = try await tablesDB.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + ], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-rows.md b/examples/2.3.x/server-swift/examples/tablesdb/update-rows.md new file mode 100644 index 000000000..934e441e3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-rows.md @@ -0,0 +1,25 @@ +```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 tablesDB = TablesDB(client) + +let rowList = try await tablesDB.updateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + ], // optional + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-string-column.md new file mode 100644 index 000000000..4e8c2a12d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-string-column.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 tablesDB = TablesDB(client) + +let columnString = try await tablesDB.updateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-table.md b/examples/2.3.x/server-swift/examples/tablesdb/update-table.md new file mode 100644 index 000000000..f05bb4c86 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-table.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 tablesDB = TablesDB(client) + +let table = try await tablesDB.updateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", // optional + permissions: [Permission.read(Role.any())], // optional + rowSecurity: false, // optional + enabled: false, // optional + purge: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-text-column.md new file mode 100644 index 000000000..457b396e2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-text-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnText = try await tablesDB.updateTextColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-swift/examples/tablesdb/update-transaction.md new file mode 100644 index 000000000..69abac950 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-transaction.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 tablesDB = TablesDB(client) + +let transaction = try await tablesDB.updateTransaction( + transactionId: "<TRANSACTION_ID>", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-url-column.md new file mode 100644 index 000000000..0230f3092 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-url-column.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let columnUrl = try await tablesDB.updateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "https://example.com", + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-swift/examples/tablesdb/update-varchar-column.md new file mode 100644 index 000000000..c3d2d0d8c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update-varchar-column.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 tablesDB = TablesDB(client) + +let columnVarchar = try await tablesDB.updateVarcharColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "<KEY>", + required: false, + default: "Hello World", + size: 1, // optional + newKey: "<NEW_KEY>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/update.md b/examples/2.3.x/server-swift/examples/tablesdb/update.md new file mode 100644 index 000000000..772b2421e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/update.md @@ -0,0 +1,20 @@ +```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 tablesDB = TablesDB(client) + +let database = try await tablesDB.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", // optional + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-swift/examples/tablesdb/upsert-row.md new file mode 100644 index 000000000..c84ee4b98 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/upsert-row.md @@ -0,0 +1,26 @@ +```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 tablesDB = TablesDB(client) + +let row = try await tablesDB.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + ], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..457ea5c58 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tablesdb/upsert-rows.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 tablesDB = TablesDB(client) + +let rowList = try await tablesDB.upsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [], + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/create-installation.md b/examples/2.3.x/server-swift/examples/teams/create-installation.md new file mode 100644 index 000000000..05139e436 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/create-installation.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let appInstallation = try await teams.createInstallation( + teamId: "<TEAM_ID>", + appId: "<APP_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>" // 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 new file mode 100644 index 000000000..bed0624bc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/create-membership.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "<TEAM_ID>", + roles: [], + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/create.md b/examples/2.3.x/server-swift/examples/teams/create.md new file mode 100644 index 000000000..0aadb201a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/create.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/delete-installation.md b/examples/2.3.x/server-swift/examples/teams/delete-installation.md new file mode 100644 index 000000000..c478164c0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```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 teams = Teams(client) + +let result = try await teams.deleteInstallation( + teamId: "<TEAM_ID>", + installationId: "<INSTALLATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/delete-membership.md b/examples/2.3.x/server-swift/examples/teams/delete-membership.md new file mode 100644 index 000000000..fb1c47830 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +```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 teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/delete.md b/examples/2.3.x/server-swift/examples/teams/delete.md new file mode 100644 index 000000000..e6b1dcbf2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/delete.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 teams = Teams(client) + +let result = try await teams.delete( + teamId: "<TEAM_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/get-installation.md b/examples/2.3.x/server-swift/examples/teams/get-installation.md new file mode 100644 index 000000000..7b133b858 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```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 teams = Teams(client) + +let appInstallation = try await teams.getInstallation( + teamId: "<TEAM_ID>", + installationId: "<INSTALLATION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/get-membership.md b/examples/2.3.x/server-swift/examples/teams/get-membership.md new file mode 100644 index 000000000..a2d73f27f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +```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 teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/get-prefs.md b/examples/2.3.x/server-swift/examples/teams/get-prefs.md new file mode 100644 index 000000000..210d6c99a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/get-prefs.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 teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "<TEAM_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/get.md b/examples/2.3.x/server-swift/examples/teams/get.md new file mode 100644 index 000000000..fc7734ffb --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/get.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 teams = Teams(client) + +let team = try await teams.get( + teamId: "<TEAM_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/list-installations.md b/examples/2.3.x/server-swift/examples/teams/list-installations.md new file mode 100644 index 000000000..cce51c35e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/list-installations.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let appInstallationList = try await teams.listInstallations( + teamId: "<TEAM_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/list-memberships.md b/examples/2.3.x/server-swift/examples/teams/list-memberships.md new file mode 100644 index 000000000..0df4809fc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/list-memberships.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "<TEAM_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/list.md b/examples/2.3.x/server-swift/examples/teams/list.md new file mode 100644 index 000000000..4b36faf54 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/list.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let teamList = try await teams.list( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/update-installation.md b/examples/2.3.x/server-swift/examples/teams/update-installation.md new file mode 100644 index 000000000..19e18d487 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/update-installation.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let appInstallation = try await teams.updateInstallation( + teamId: "<TEAM_ID>", + installationId: "<INSTALLATION_ID>", + authorizationDetails: "<AUTHORIZATION_DETAILS>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/update-membership-status.md b/examples/2.3.x/server-swift/examples/teams/update-membership-status.md new file mode 100644 index 000000000..b03cdb4b4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/update-membership-status.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" +) + +``` 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 new file mode 100644 index 000000000..b2cce9df7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/update-membership.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 + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: [] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/update-name.md b/examples/2.3.x/server-swift/examples/teams/update-name.md new file mode 100644 index 000000000..e2e9b1c0e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/update-name.md @@ -0,0 +1,16 @@ +```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 teams = Teams(client) + +let team = try await teams.updateName( + teamId: "<TEAM_ID>", + name: "<NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/teams/update-prefs.md b/examples/2.3.x/server-swift/examples/teams/update-prefs.md new file mode 100644 index 000000000..572f32b37 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/teams/update-prefs.md @@ -0,0 +1,16 @@ +```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 teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "<TEAM_ID>", + prefs: [:] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tokens/create-file-token.md b/examples/2.3.x/server-swift/examples/tokens/create-file-token.md new file mode 100644 index 000000000..a1502fe6c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tokens/create-file-token.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 tokens = Tokens(client) + +let resourceToken = try 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-swift/examples/tokens/delete.md b/examples/2.3.x/server-swift/examples/tokens/delete.md new file mode 100644 index 000000000..fc82daf5a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tokens/delete.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 tokens = Tokens(client) + +let result = try await tokens.delete( + tokenId: "<TOKEN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tokens/get.md b/examples/2.3.x/server-swift/examples/tokens/get.md new file mode 100644 index 000000000..825d8d68a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tokens/get.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 tokens = Tokens(client) + +let resourceToken = try await tokens.get( + tokenId: "<TOKEN_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tokens/list.md b/examples/2.3.x/server-swift/examples/tokens/list.md new file mode 100644 index 000000000..3429e2c3f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tokens/list.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 tokens = Tokens(client) + +let resourceTokenList = try await tokens.list( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/tokens/update.md b/examples/2.3.x/server-swift/examples/tokens/update.md new file mode 100644 index 000000000..276a9e751 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/tokens/update.md @@ -0,0 +1,16 @@ +```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 tokens = Tokens(client) + +let resourceToken = try await tokens.update( + tokenId: "<TOKEN_ID>", + expire: "2020-10-15T06:38:00.000+00:00" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-argon-2-user.md b/examples/2.3.x/server-swift/examples/users/create-argon-2-user.md new file mode 100644 index 000000000..b2233a91c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-argon-2-user.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 users = Users(client) + +let user = try await users.createArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-swift/examples/users/create-bcrypt-user.md new file mode 100644 index 000000000..58e32f4de --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-bcrypt-user.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 users = Users(client) + +let user = try await users.createBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-jwt.md b/examples/2.3.x/server-swift/examples/users/create-jwt.md new file mode 100644 index 000000000..e5d210802 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-jwt.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 users = Users(client) + +let jwt = try await users.createJWT( + userId: "<USER_ID>", + sessionId: "recent()", // optional + duration: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-md-5-user.md b/examples/2.3.x/server-swift/examples/users/create-md-5-user.md new file mode 100644 index 000000000..979548e20 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-md-5-user.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 users = Users(client) + +let user = try await users.createMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-swift/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 000000000..a9c3a8479 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-mfa-recovery-codes.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 users = Users(client) + +let mfaRecoveryCodes = try await users.createMFARecoveryCodes( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-swift/examples/users/create-ph-pass-user.md new file mode 100644 index 000000000..2df63ec2c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-ph-pass-user.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 users = Users(client) + +let user = try await users.createPHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-swift/examples/users/create-scrypt-modified-user.md new file mode 100644 index 000000000..707db0d0f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-scrypt-modified-user.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 users = Users(client) + +let user = try await users.createScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-scrypt-user.md b/examples/2.3.x/server-swift/examples/users/create-scrypt-user.md new file mode 100644 index 000000000..0c2591d6f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-scrypt-user.md @@ -0,0 +1,23 @@ +```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 users = Users(client) + +let user = try await users.createScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 8, + passwordMemory: 65536, + passwordParallel: 1, + passwordLength: 64, + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-session.md b/examples/2.3.x/server-swift/examples/users/create-session.md new file mode 100644 index 000000000..46849ece0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-session.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 users = Users(client) + +let session = try await users.createSession( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-sha-user.md b/examples/2.3.x/server-swift/examples/users/create-sha-user.md new file mode 100644 index 000000000..efbf7b7cd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-sha-user.md @@ -0,0 +1,20 @@ +```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 users = Users(client) + +let user = try await users.createSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: .sha1, // optional + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-target.md b/examples/2.3.x/server-swift/examples/users/create-target.md new file mode 100644 index 000000000..e0d7d2c6f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-target.md @@ -0,0 +1,21 @@ +```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 users = Users(client) + +let target = try await users.createTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: .email, + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create-token.md b/examples/2.3.x/server-swift/examples/users/create-token.md new file mode 100644 index 000000000..ec1957fd8 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create-token.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 users = Users(client) + +let token = try await users.createToken( + userId: "<USER_ID>", + length: 4, // optional + expire: 60 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/create.md b/examples/2.3.x/server-swift/examples/users/create.md new file mode 100644 index 000000000..fb168bbd6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/create.md @@ -0,0 +1,19 @@ +```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 users = Users(client) + +let user = try await users.create( + userId: "<USER_ID>", + email: "email@example.com", // optional + phone: "+12065550100", // optional + password: "password", // optional + name: "<NAME>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/delete-identity.md b/examples/2.3.x/server-swift/examples/users/delete-identity.md new file mode 100644 index 000000000..5c9a22254 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/delete-identity.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 users = Users(client) + +let result = try await users.deleteIdentity( + identityId: "<IDENTITY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/delete-mfa-authenticator.md b/examples/2.3.x/server-swift/examples/users/delete-mfa-authenticator.md new file mode 100644 index 000000000..92cc125c1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,17 @@ +```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 users = Users(client) + +let result = try await users.deleteMFAAuthenticator( + userId: "<USER_ID>", + type: .totp +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/delete-session.md b/examples/2.3.x/server-swift/examples/users/delete-session.md new file mode 100644 index 000000000..f54504e1b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/delete-session.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let result = try await users.deleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/delete-sessions.md b/examples/2.3.x/server-swift/examples/users/delete-sessions.md new file mode 100644 index 000000000..f719e6ad3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/delete-sessions.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 users = Users(client) + +let result = try await users.deleteSessions( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/delete-target.md b/examples/2.3.x/server-swift/examples/users/delete-target.md new file mode 100644 index 000000000..b2fee1ae9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/delete-target.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let result = try await users.deleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/delete.md b/examples/2.3.x/server-swift/examples/users/delete.md new file mode 100644 index 000000000..57c549cb5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/delete.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 users = Users(client) + +let result = try await users.delete( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-swift/examples/users/get-mfa-challenge.md new file mode 100644 index 000000000..5726db874 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/get-mfa-challenge.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let mfaChallengeSecret = try await users.getMFAChallenge( + userId: "<USER_ID>", + challengeId: "<CHALLENGE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-swift/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 000000000..bca1a13fc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/get-mfa-recovery-codes.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 users = Users(client) + +let mfaRecoveryCodes = try await users.getMFARecoveryCodes( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/get-prefs.md b/examples/2.3.x/server-swift/examples/users/get-prefs.md new file mode 100644 index 000000000..5ed3429a0 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/get-prefs.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 users = Users(client) + +let preferences = try await users.getPrefs( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/get-target.md b/examples/2.3.x/server-swift/examples/users/get-target.md new file mode 100644 index 000000000..8b211888a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/get-target.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let target = try await users.getTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/get.md b/examples/2.3.x/server-swift/examples/users/get.md new file mode 100644 index 000000000..2ced7fb3c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/get.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 users = Users(client) + +let user = try await users.get( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/list-identities.md b/examples/2.3.x/server-swift/examples/users/list-identities.md new file mode 100644 index 000000000..d2617efe3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/list-identities.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 users = Users(client) + +let identityList = try await users.listIdentities( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/list-memberships.md b/examples/2.3.x/server-swift/examples/users/list-memberships.md new file mode 100644 index 000000000..b2311539b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/list-memberships.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 users = Users(client) + +let membershipList = try await users.listMemberships( + userId: "<USER_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/list-mfa-factors.md b/examples/2.3.x/server-swift/examples/users/list-mfa-factors.md new file mode 100644 index 000000000..ac8ca02de --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/list-mfa-factors.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 users = Users(client) + +let mfaFactors = try await users.listMFAFactors( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/list-sessions.md b/examples/2.3.x/server-swift/examples/users/list-sessions.md new file mode 100644 index 000000000..8f084c40e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/list-sessions.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let sessionList = try await users.listSessions( + userId: "<USER_ID>", + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/list-targets.md b/examples/2.3.x/server-swift/examples/users/list-targets.md new file mode 100644 index 000000000..f0428187e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/list-targets.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 users = Users(client) + +let targetList = try await users.listTargets( + userId: "<USER_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/list.md b/examples/2.3.x/server-swift/examples/users/list.md new file mode 100644 index 000000000..4720e0443 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/list.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 users = Users(client) + +let userList = try await users.list( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-email-verification.md b/examples/2.3.x/server-swift/examples/users/update-email-verification.md new file mode 100644 index 000000000..c8889edb6 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-email-verification.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updateEmailVerification( + userId: "<USER_ID>", + emailVerification: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-email.md b/examples/2.3.x/server-swift/examples/users/update-email.md new file mode 100644 index 000000000..f3f705c90 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-email.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updateEmail( + userId: "<USER_ID>", + email: "email@example.com" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-impersonator.md b/examples/2.3.x/server-swift/examples/users/update-impersonator.md new file mode 100644 index 000000000..86cd532c5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-impersonator.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updateImpersonator( + userId: "<USER_ID>", + impersonator: false +) + +``` 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 new file mode 100644 index 000000000..67d4b95dd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-labels.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updateLabels( + userId: "<USER_ID>", + labels: [] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-swift/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 000000000..987cd941d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-mfa-recovery-codes.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 users = Users(client) + +let mfaRecoveryCodes = try await users.updateMFARecoveryCodes( + userId: "<USER_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-mfa.md b/examples/2.3.x/server-swift/examples/users/update-mfa.md new file mode 100644 index 000000000..56b44f33a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-mfa.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updateMFA( + userId: "<USER_ID>", + mfa: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-name.md b/examples/2.3.x/server-swift/examples/users/update-name.md new file mode 100644 index 000000000..38c63415d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-name.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updateName( + userId: "<USER_ID>", + name: "<NAME>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-password.md b/examples/2.3.x/server-swift/examples/users/update-password.md new file mode 100644 index 000000000..b0bcd862f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-password.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updatePassword( + userId: "<USER_ID>", + password: "password" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-phone-verification.md b/examples/2.3.x/server-swift/examples/users/update-phone-verification.md new file mode 100644 index 000000000..91e332422 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-phone-verification.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-phone.md b/examples/2.3.x/server-swift/examples/users/update-phone.md new file mode 100644 index 000000000..17d0095fe --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-phone.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updatePhone( + userId: "<USER_ID>", + number: "+12065550100" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-prefs.md b/examples/2.3.x/server-swift/examples/users/update-prefs.md new file mode 100644 index 000000000..21d2ef06c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-prefs.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let preferences = try await users.updatePrefs( + userId: "<USER_ID>", + prefs: [:] +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-status.md b/examples/2.3.x/server-swift/examples/users/update-status.md new file mode 100644 index 000000000..fdf0dcac3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-status.md @@ -0,0 +1,16 @@ +```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 users = Users(client) + +let user = try await users.updateStatus( + userId: "<USER_ID>", + status: false +) + +``` diff --git a/examples/2.3.x/server-swift/examples/users/update-target.md b/examples/2.3.x/server-swift/examples/users/update-target.md new file mode 100644 index 000000000..7114e7e90 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/users/update-target.md @@ -0,0 +1,19 @@ +```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 users = Users(client) + +let target = try await users.updateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", // optional + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +) + +``` 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 new file mode 100644 index 000000000..27682380d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-collection.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 vectorsDB = VectorsDB(client) + +let vectorsdbCollection = try await vectorsDB.createCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + dimension: 1, + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create-document.md b/examples/2.3.x/server-swift/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..7f3740003 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-document.md @@ -0,0 +1,30 @@ +```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 vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.createDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [ + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": [ + "key": "value" + ] + ], + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..c25ee2bc3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-documents.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 vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.createDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-swift/examples/vectorsdb/create-failover.md new file mode 100644 index 000000000..167dd8937 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-failover.md @@ -0,0 +1,16 @@ +```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 vectorsDB = VectorsDB(client) + +let dedicatedDatabase = try await vectorsDB.createFailover( + databaseId: "<DATABASE_ID>", + targetReplicaId: "<TARGET_REPLICA_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 new file mode 100644 index 000000000..9aca64180 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-index.md @@ -0,0 +1,22 @@ +```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 vectorsDB = VectorsDB(client) + +let index = try await vectorsDB.createIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>", + type: .hnswEuclidean, + attributes: [], + 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 new file mode 100644 index 000000000..7e3c4be10 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-operations.md @@ -0,0 +1,26 @@ +```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 vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.createOperations( + transactionId: "<TRANSACTION_ID>", + operations: [ + [ + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": [ + "name": "Walter O'Brien" + ] + ] + ] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create-query.md b/examples/2.3.x/server-swift/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..7191e8718 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```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 vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.createQuery( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-swift/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..981b1946a --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-transaction.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 vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create.md b/examples/2.3.x/server-swift/examples/vectorsdb/create.md new file mode 100644 index 000000000..fd811b1f2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create.md @@ -0,0 +1,20 @@ +```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 vectorsDB = VectorsDB(client) + +let database = try await vectorsDB.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/delete-collection.md b/examples/2.3.x/server-swift/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..1cd184c69 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/delete-collection.md @@ -0,0 +1,16 @@ +```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 vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/delete-document.md b/examples/2.3.x/server-swift/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..0bd2dd424 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/delete-document.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 + .setSession("") // The user session to authenticate with + +let vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..54211abdc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/delete-documents.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 vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.deleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/delete-index.md b/examples/2.3.x/server-swift/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..e8ddd15d7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/delete-index.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 vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/delete-transaction.md b/examples/2.3.x/server-swift/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..9f7c88ff7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/delete-transaction.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 vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteTransaction( + transactionId: "<TRANSACTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/delete.md b/examples/2.3.x/server-swift/examples/vectorsdb/delete.md new file mode 100644 index 000000000..eb1383f47 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/delete.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 vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.delete( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-swift/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..7be38081c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/get-collection.md @@ -0,0 +1,16 @@ +```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 vectorsDB = VectorsDB(client) + +let vectorsdbCollection = try await vectorsDB.getCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/get-document.md b/examples/2.3.x/server-swift/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..7f8d004f7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/get-document.md @@ -0,0 +1,19 @@ +```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 vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.getDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/get-index.md b/examples/2.3.x/server-swift/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..9fe7ba8c4 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/get-index.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 vectorsDB = VectorsDB(client) + +let index = try await vectorsDB.getIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "<KEY>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-swift/examples/vectorsdb/get-replicas.md new file mode 100644 index 000000000..e63a34b21 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/get-replicas.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 vectorsDB = VectorsDB(client) + +let dedicatedDatabaseReplicas = try await vectorsDB.getReplicas( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/get-status.md b/examples/2.3.x/server-swift/examples/vectorsdb/get-status.md new file mode 100644 index 000000000..31ec0c23f --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/get-status.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 vectorsDB = VectorsDB(client) + +let databaseStatus = try await vectorsDB.getStatus( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-swift/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..83908c55d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/get-transaction.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 vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.getTransaction( + transactionId: "<TRANSACTION_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/get.md b/examples/2.3.x/server-swift/examples/vectorsdb/get.md new file mode 100644 index 000000000..18ef8466d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/get.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 vectorsDB = VectorsDB(client) + +let database = try await vectorsDB.get( + databaseId: "<DATABASE_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-swift/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..0c002b62c --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/list-collections.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 vectorsDB = VectorsDB(client) + +let vectorsdbCollectionList = try await vectorsDB.listCollections( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-swift/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..f09c4d06d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/list-documents.md @@ -0,0 +1,20 @@ +```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 vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.listDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + transactionId: "<TRANSACTION_ID>", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-swift/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..bafc8eaa9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/list-indexes.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 vectorsDB = VectorsDB(client) + +let indexList = try await vectorsDB.listIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-swift/examples/vectorsdb/list-operations.md new file mode 100644 index 000000000..3074e7225 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/list-operations.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 vectorsDB = VectorsDB(client) + +let dedicatedDatabaseOperationList = try await vectorsDB.listOperations( + databaseId: "<DATABASE_ID>", + status: "queued", // optional + limit: 1, // optional + offset: 0 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-swift/examples/vectorsdb/list-specifications.md new file mode 100644 index 000000000..307fff506 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/list-specifications.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 + .setKey("<YOUR_API_KEY>") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let dedicatedDatabaseSpecificationList = try await vectorsDB.listSpecifications() + +``` 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 new file mode 100644 index 000000000..5a4f5e63d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/list-transactions.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 vectorsDB = VectorsDB(client) + +let transactionList = try await vectorsDB.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/list.md b/examples/2.3.x/server-swift/examples/vectorsdb/list.md new file mode 100644 index 000000000..e2d0a197e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/list.md @@ -0,0 +1,16 @@ +```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 vectorsDB = VectorsDB(client) + +let databaseList = try await vectorsDB.list( + 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 new file mode 100644 index 000000000..0abc0fc0b --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/update-collection.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 vectorsDB = VectorsDB(client) + +let vectorsdbCollection = try await vectorsDB.updateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + dimension: 1, // optional + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/update-document.md b/examples/2.3.x/server-swift/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..b60a0edee --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```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 vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.updateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-swift/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..c89d78e93 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/update-documents.md @@ -0,0 +1,19 @@ +```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 vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.updateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [:], // optional + queries: [], // optional + transactionId: "<TRANSACTION_ID>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-swift/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..17d502901 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/update-transaction.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 vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.updateTransaction( + transactionId: "<TRANSACTION_ID>", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/update.md b/examples/2.3.x/server-swift/examples/vectorsdb/update.md new file mode 100644 index 000000000..597a3e6f1 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/update.md @@ -0,0 +1,20 @@ +```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 vectorsDB = VectorsDB(client) + +let database = try await vectorsDB.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false, // optional + specification: "serverless", // optional + replicas: 0, // optional + syncMode: "async" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-swift/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..c91a48004 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```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 vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.upsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "<TRANSACTION_ID>" // 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 new file mode 100644 index 000000000..32d773bce --- /dev/null +++ b/examples/2.3.x/server-swift/examples/vectorsdb/upsert-documents.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 vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.upsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [], + 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 new file mode 100644 index 000000000..b9ff80bf5 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/webhooks/create.md @@ -0,0 +1,23 @@ +```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 webhooks = Webhooks(client) + +let webhook = try await webhooks.create( + webhookId: "<WEBHOOK_ID>", + url: "https://example.com/webhook", + name: "<NAME>", + events: [], + enabled: false, // optional + tls: false, // optional + authUsername: "<AUTH_USERNAME>", // optional + authPassword: "password", // optional + secret: "<SECRET>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/webhooks/delete.md b/examples/2.3.x/server-swift/examples/webhooks/delete.md new file mode 100644 index 000000000..337c001cd --- /dev/null +++ b/examples/2.3.x/server-swift/examples/webhooks/delete.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 webhooks = Webhooks(client) + +let result = try await webhooks.delete( + webhookId: "<WEBHOOK_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/webhooks/get.md b/examples/2.3.x/server-swift/examples/webhooks/get.md new file mode 100644 index 000000000..7710218d7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/webhooks/get.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 webhooks = Webhooks(client) + +let webhook = try await webhooks.get( + webhookId: "<WEBHOOK_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/webhooks/list.md b/examples/2.3.x/server-swift/examples/webhooks/list.md new file mode 100644 index 000000000..d6dbf7713 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/webhooks/list.md @@ -0,0 +1,16 @@ +```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 webhooks = Webhooks(client) + +let webhookList = try await webhooks.list( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/webhooks/update-secret.md b/examples/2.3.x/server-swift/examples/webhooks/update-secret.md new file mode 100644 index 000000000..1a29763f7 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/webhooks/update-secret.md @@ -0,0 +1,16 @@ +```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 webhooks = Webhooks(client) + +let webhook = try await webhooks.updateSecret( + webhookId: "<WEBHOOK_ID>", + secret: "<SECRET>" // 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 new file mode 100644 index 000000000..063639128 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/webhooks/update.md @@ -0,0 +1,22 @@ +```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 webhooks = Webhooks(client) + +let webhook = try await webhooks.update( + webhookId: "<WEBHOOK_ID>", + name: "<NAME>", + url: "https://example.com/webhook", + events: [], + enabled: false, // optional + tls: false, // optional + authUsername: "<AUTH_USERNAME>", // optional + authPassword: "password" // 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 new file mode 100644 index 000000000..f221f306b --- /dev/null +++ b/specs/2.3.x/open-api3-2.3.x.json @@ -0,0 +1,154404 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "2.3.0", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", + "termsOfService": "https:\/\/appwrite.io\/policy\/terms", + "contact": { + "name": "Appwrite Team", + "url": "https:\/\/appwrite.io\/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" + } + }, + "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1", + "description": "Appwrite Cloud endpoint." + }, + { + "url": "https:\/\/{region}.cloud.appwrite.io\/v1", + "description": "Appwrite Cloud regional endpoint. Replace `{region}` with your project region.", + "variables": { + "region": { + "default": "fra", + "description": "Appwrite Cloud region." + } + } + } + ], + "paths": { + "\/account": { + "get": { + "summary": "Get account", + "operationId": "accountGet", + "tags": [ + "account" + ], + "description": "Get the currently logged in user.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create account", + "operationId": "accountCreate", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailSession).", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "New user password. Must be between 8 and 256 chars.", + "type": "string", + "example": "password", + "format": "password" + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete account", + "operationId": "accountDelete", + "tags": [ + "account" + ], + "description": "Delete the currently logged in user.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/account\/billing-addresses": { + "get": { + "summary": "List billing addresses", + "operationId": "accountListBillingAddresses", + "tags": [ + "account" + ], + "description": "List all billing addresses for a user.", + "responses": { + "200": { + "description": "Billing address list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingAddressList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/list-billing-addresses.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create billing address", + "operationId": "accountCreateBillingAddress", + "tags": [ + "account" + ], + "description": "Add a new billing address to a user's account.", + "responses": { + "201": { + "description": "Address", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingAddress" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/create-billing-address.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "country": { + "description": "Country", + "type": "string", + "example": "<COUNTRY>" + }, + "city": { + "description": "City", + "type": "string", + "example": "<CITY>" + }, + "streetAddress": { + "description": "Street address", + "type": "string", + "example": "<STREET_ADDRESS>" + }, + "addressLine2": { + "description": "Address line 2", + "type": "string", + "default": "", + "example": "<ADDRESS_LINE2>" + }, + "state": { + "description": "State or province", + "type": "string", + "default": "", + "example": "<STATE>" + }, + "postalCode": { + "description": "Postal code", + "type": "string", + "default": "", + "example": "<POSTAL_CODE>" + } + }, + "required": [ + "country", + "city", + "streetAddress" + ] + } + } + } + } + } + }, + "\/account\/billing-addresses\/{billingAddressId}": { + "get": { + "summary": "Get billing address", + "operationId": "accountGetBillingAddress", + "tags": [ + "account" + ], + "description": "Get a specific billing address for a user using it's ID.", + "responses": { + "200": { + "description": "Address", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingAddress" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/get-billing-address.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "billingAddressId", + "description": "Unique ID of billing address", + "required": true, + "schema": { + "type": "string", + "example": "<BILLING_ADDRESS_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update billing address", + "operationId": "accountUpdateBillingAddress", + "tags": [ + "account" + ], + "description": "Update a specific billing address using it's ID.", + "responses": { + "200": { + "description": "Address", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingAddress" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/update-billing-address.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "billingAddressId", + "description": "Unique ID of billing address", + "required": true, + "schema": { + "type": "string", + "example": "<BILLING_ADDRESS_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "country": { + "description": "Country", + "type": "string", + "example": "<COUNTRY>" + }, + "city": { + "description": "City", + "type": "string", + "example": "<CITY>" + }, + "streetAddress": { + "description": "Street address", + "type": "string", + "example": "<STREET_ADDRESS>" + }, + "addressLine2": { + "description": "Address line 2", + "type": "string", + "default": "", + "example": "<ADDRESS_LINE2>" + }, + "state": { + "description": "State or province", + "type": "string", + "default": "", + "example": "<STATE>" + }, + "postalCode": { + "description": "Postal code", + "type": "string", + "default": "", + "example": "<POSTAL_CODE>" + } + }, + "required": [ + "country", + "city", + "streetAddress" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete billing address", + "operationId": "accountDeleteBillingAddress", + "tags": [ + "account" + ], + "description": "Delete a specific billing address using it's ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/delete-billing-address.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "billingAddressId", + "description": "Billing address unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<BILLING_ADDRESS_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/consents": { + "get": { + "summary": "List consents", + "operationId": "accountListConsents", + "tags": [ + "account" + ], + "description": "Get a list of the OAuth2 consents the current user has given to third-party apps.", + "responses": { + "200": { + "description": "OAuth2 consents list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "consents", + "demo": "account\/list-consents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/consents\/{consentId}": { + "get": { + "summary": "Get consent", + "operationId": "accountGetConsent", + "tags": [ + "account" + ], + "description": "Get an OAuth2 consent the current user has given to a third-party app by its unique ID.", + "responses": { + "200": { + "description": "OAuth2 Consent", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Consent" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "consents", + "demo": "account\/get-consent.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<CONSENT_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete consent", + "operationId": "accountDeleteConsent", + "tags": [ + "account" + ], + "description": "Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "consents", + "demo": "account\/delete-consent.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<CONSENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/consents\/{consentId}\/tokens": { + "get": { + "summary": "List consent tokens", + "operationId": "accountListConsentTokens", + "tags": [ + "account" + ], + "description": "Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned.", + "responses": { + "200": { + "description": "OAuth2 consent tokens list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentTokenList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "consents", + "demo": "account\/list-consent-tokens.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<CONSENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/consents\/{consentId}\/tokens\/{tokenId}": { + "get": { + "summary": "Get consent token", + "operationId": "accountGetConsentToken", + "tags": [ + "account" + ], + "description": "Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned.", + "responses": { + "200": { + "description": "OAuth2 Consent Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "consents", + "demo": "account\/get-consent-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<CONSENT_ID>" + }, + "in": "path" + }, + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete consent token", + "operationId": "accountDeleteConsentToken", + "tags": [ + "account" + ], + "description": "Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "consents", + "demo": "account\/delete-consent-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<CONSENT_ID>" + }, + "in": "path" + }, + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/coupons\/{couponId}": { + "get": { + "summary": "Get coupon details", + "operationId": "accountGetCoupon", + "tags": [ + "account" + ], + "description": "Get coupon details for an account.", + "responses": { + "200": { + "description": "Coupon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/coupon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/get-coupon.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "couponId", + "description": "ID of the coupon", + "required": true, + "schema": { + "type": "string", + "example": "<COUPON_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/email": { + "patch": { + "summary": "Update email", + "operationId": "accountUpdateEmail", + "tags": [ + "account" + ], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password. Must be at least 8 chars.", + "type": "string", + "example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", + "tags": [ + "account" + ], + "description": "Get the list of identities for the currently logged in user.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "identities", + "demo": "account\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", + "tags": [ + "account" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "identities", + "demo": "account\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "example": "<IDENTITY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/invoices": { + "get": { + "summary": "List invoices", + "operationId": "accountListInvoices", + "tags": [ + "account" + ], + "description": "List all invoices tied to an account.", + "responses": { + "200": { + "description": "Billing invoices list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/invoiceList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/list-invoices.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/jwts": { + "post": { + "summary": "Create JWT", + "operationId": "accountCreateJWT", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/jwt" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "account\/create-jwt.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "duration": { + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "type": "integer", + "default": 900, + "example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/account\/keys": { + "get": { + "summary": "List account key", + "operationId": "accountListKeys", + "tags": [ + "account" + ], + "description": "Get a list of all API keys from the current account.", + "responses": { + "200": { + "description": "API Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/keyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "account\/list-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "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" + } + ] + }, + "post": { + "summary": "Create account key", + "operationId": "accountCreateKey", + "tags": [ + "account" + ], + "description": "Create a new account API key.", + "responses": { + "201": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "account\/create-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Key name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "AccountKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "account" + ], + "title": "account" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + } + ] + } + }, + "expire": { + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + } + } + } + }, + "\/account\/keys\/{keyId}": { + "get": { + "summary": "Get account key", + "operationId": "accountGetKey", + "tags": [ + "account" + ], + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your account including it's scopes.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "account\/get-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update account key", + "operationId": "accountUpdateKey", + "tags": [ + "account" + ], + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "account\/update-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Key name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "AccountKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "account" + ], + "title": "account" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + } + ] + } + }, + "expire": { + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete account key", + "operationId": "accountDeleteKey", + "tags": [ + "account" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "account\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mfa", + "demo": "account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "description": "Enable or disable MFA.", + "type": "boolean", + "example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "responses": { + "200": { + "description": "MFAType", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaType" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/create-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + }, + "methods": [ + { + "name": "createMfaAuthenticator", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAAuthenticator" + } + }, + { + "name": "createMFAAuthenticator", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaType" + } + ], + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "schema": { + "type": "string", + "example": "totp", + "title": "AuthenticatorType", + "oneOf": [ + { + "type": "string", + "enum": [ + "totp" + ], + "title": "totp" + } + ] + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update authenticator (confirmation)", + "operationId": "accountUpdateMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/update-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + }, + "methods": [ + { + "name": "updateMfaAuthenticator", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAAuthenticator" + } + }, + { + "name": "updateMFAAuthenticator", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "example": "totp", + "title": "AuthenticatorType", + "oneOf": [ + { + "type": "string", + "enum": [ + "totp" + ], + "title": "totp" + } + ] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "description": "Valid verification token.", + "type": "string", + "example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", + "tags": [ + "account" + ], + "description": "Delete an authenticator for a user by ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "type" + ], + "required": [ + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "example": "totp", + "title": "AuthenticatorType", + "oneOf": [ + { + "type": "string", + "enum": [ + "totp" + ], + "title": "totp" + } + ] + }, + "in": "path" + } + ] + } + }, + "\/account\/mfa\/challenges": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", + "tags": [ + "account" + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Challenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaChallenge" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/create-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + }, + "methods": [ + { + "name": "createMfaChallenge", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFAChallenge" + } + }, + { + "name": "createMFAChallenge", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" + } + ], + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "factor": { + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`.", + "type": "string", + "example": "email", + "title": "AuthenticationFactor", + "oneOf": [ + { + "type": "string", + "enum": [ + "email" + ], + "title": "email" + }, + { + "type": "string", + "enum": [ + "phone" + ], + "title": "phone" + }, + { + "type": "string", + "enum": [ + "totp" + ], + "title": "totp" + }, + { + "type": "string", + "enum": [ + "recoverycode" + ], + "title": "recoverycode" + }, + { + "type": "string", + "enum": [ + "custom" + ], + "title": "custom" + } + ] + } + }, + "required": [ + "factor" + ] + } + } + } + } + }, + "put": { + "summary": "Update MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", + "tags": [ + "account" + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/update-mfa-challenge.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},challengeId:{param-challengeId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "challengeId": { + "description": "ID of the challenge.", + "type": "string", + "example": "<CHALLENGE_ID>" + }, + "otp": { + "description": "Valid verification token.", + "type": "string", + "example": "<OTP>" + } + }, + "required": [ + "challengeId", + "otp" + ] + } + } + } + } + } + }, + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", + "tags": [ + "account" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/mfa\/recovery-codes": { + "get": { + "summary": "List MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "accountUpdateMfaRecoveryCodes", + "tags": [ + "account" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "account\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update name", + "operationId": "accountUpdateName", + "tags": [ + "account" + ], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/account\/password": { + "patch": { + "summary": "Update password", + "operationId": "accountUpdatePassword", + "tags": [ + "account" + ], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/update-password.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "description": "New user password. Must be at least 8 chars.", + "type": "string", + "example": "password", + "format": "password" + }, + "oldPassword": { + "description": "Current user password. Max length: 256 chars.", + "type": "string", + "default": "", + "example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/account\/payment-methods": { + "get": { + "summary": "List payment methods", + "operationId": "accountListPaymentMethods", + "tags": [ + "account" + ], + "description": "List payment methods for this account.", + "responses": { + "200": { + "description": "Payment methods list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/paymentMethodList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/list-payment-methods.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create new payment method", + "operationId": "accountCreatePaymentMethod", + "tags": [ + "account" + ], + "description": "Create a new payment method for the current user account.", + "responses": { + "201": { + "description": "paymentMethod", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/paymentMethod" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/create-payment-method.md", + "rate-limit": 10, + "rate-time": 86400, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/account\/payment-methods\/{paymentMethodId}": { + "get": { + "summary": "Get payment method", + "operationId": "accountGetPaymentMethod", + "tags": [ + "account" + ], + "description": "Get a specific payment method for the user.", + "responses": { + "200": { + "description": "paymentMethod", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/paymentMethod" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/get-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "paymentMethodId", + "description": "Unique ID of payment method", + "required": true, + "schema": { + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update payment method", + "operationId": "accountUpdatePaymentMethod", + "tags": [ + "account" + ], + "description": "Update a new payment method for the current user account.", + "responses": { + "200": { + "description": "paymentMethod", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/paymentMethod" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/update-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "paymentMethodId", + "description": "Unique ID of payment method", + "required": true, + "schema": { + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "expiryMonth": { + "description": "Payment expiry month", + "type": "integer", + "example": 1, + "format": "int32" + }, + "expiryYear": { + "description": "Expiry year", + "type": "integer", + "example": 2026, + "format": "int32" + }, + "state": { + "description": "State of the payment method country", + "type": "string", + "example": "<STATE>" + } + }, + "required": [ + "expiryMonth", + "expiryYear" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete payment method", + "operationId": "accountDeletePaymentMethod", + "tags": [ + "account" + ], + "description": "Delete a specific payment method from a user's account.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/delete-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "paymentMethodId", + "description": "Unique ID of payment method", + "required": true, + "schema": { + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/payment-methods\/{paymentMethodId}\/provider": { + "patch": { + "summary": "Update payment method provider id", + "operationId": "accountUpdatePaymentMethodProvider", + "tags": [ + "account" + ], + "description": "Update payment method provider.", + "responses": { + "200": { + "description": "paymentMethod", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/paymentMethod" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/update-payment-method-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "paymentMethodId", + "description": "Unique ID of payment method", + "required": true, + "schema": { + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerMethodId": { + "description": "Payment method ID from the payment provider", + "type": "string", + "example": "<PROVIDER_METHOD_ID>" + }, + "name": { + "description": "Name in the payment method", + "type": "string", + "example": "<NAME>" + }, + "state": { + "description": "State of the payment method country", + "type": "string", + "example": "<STATE>", + "nullable": true + } + }, + "required": [ + "providerMethodId", + "name" + ] + } + } + } + } + } + }, + "\/account\/payment-methods\/{paymentMethodId}\/setup": { + "patch": { + "summary": "Update payment method with new setup with mandates for indian cards", + "operationId": "accountUpdatePaymentMethodMandateOptions", + "tags": [ + "account" + ], + "description": "Update payment method mandate options.", + "responses": { + "200": { + "description": "paymentMethod", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/paymentMethod" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "account\/update-payment-method-mandate-options.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "paymentMethodId", + "description": "Unique ID of payment method", + "required": true, + "schema": { + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", + "tags": [ + "account" + ], + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phone": { + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "example": "+12065550100", + "format": "phone" + }, + "password": { + "description": "User password. Must be at least 8 chars.", + "type": "string", + "example": "password", + "format": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + } + } + } + }, + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", + "tags": [ + "account" + ], + "description": "Get the preferences as a key-value object for the currently logged in user.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "patch": { + "summary": "Update preferences", + "operationId": "accountUpdatePrefs", + "tags": [ + "account" + ], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "description": "Prefs key-value JSON object.", + "type": "object", + "default": {}, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/account\/recovery": { + "post": { + "summary": "Create password recovery", + "operationId": "accountCreateRecovery", + "tags": [ + "account" + ], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "recovery", + "demo": "account\/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "url": { + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "email", + "url" + ] + } + } + } + } + }, + "put": { + "summary": "Update password recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "recovery", + "demo": "account\/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Valid reset token.", + "type": "string", + "example": "<SECRET>" + }, + "password": { + "description": "New user password. Must be between 8 and 256 chars.", + "type": "string", + "example": "password", + "format": "password" + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + } + } + } + }, + "\/account\/recovery\/otp": { + "post": { + "summary": "Create password recovery (OTP)", + "operationId": "accountCreateRecoveryOTP", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a 6-digit password recovery code to the user's email address. Unlike [createRecovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a recovery page. Learn more about how to [complete the recovery process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecoveryOTP). The code sent to the user's email address is valid for 15 minutes.\n\nEnable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "recovery", + "demo": "account\/create-recovery-otp.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "phrase": { + "description": "Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "email" + ] + } + } + } + } + }, + "put": { + "summary": "Update password recovery (OTP)", + "operationId": "accountUpdateRecoveryOTP", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated.\n", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "recovery", + "demo": "account\/update-recovery-otp.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Valid recovery OTP code.", + "type": "string", + "example": "<SECRET>" + }, + "password": { + "description": "New user password. Must be between 8 and 256 chars.", + "type": "string", + "example": "password", + "format": "password" + } + }, + "required": [ + "userId", + "secret", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions": { + "get": { + "summary": "List sessions", + "operationId": "accountListSessions", + "tags": [ + "account" + ], + "description": "Get the list of active sessions across different devices for the currently logged in user.", + "responses": { + "200": { + "description": "Sessions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/sessionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "delete": { + "summary": "Delete sessions", + "operationId": "accountDeleteSessions", + "tags": [ + "account" + ], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/anonymous": { + "post": { + "summary": "Create anonymous session", + "operationId": "accountCreateAnonymousSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/create-anonymous-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", + "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).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/create-email-password-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password. Must be at least 8 chars.", + "type": "string", + "example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } + } + } + } + }, + "\/account\/sessions\/id-token": { + "post": { + "summary": "Create ID token session", + "operationId": "accountCreateIdTokenSession", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using an OpenID Connect ID token obtained natively from the OAuth2 provider, for example via Google Credential Manager on Android or Sign in with Apple on iOS. No browser or redirect is involved: the ID token is verified against the provider's published signing keys and a session is created in a single request.\n\nNative sign-in is switched on per provider with its nativeEnabled setting. It is independent of the browser-based flow's enabled setting, which has no effect on this endpoint. The token's audience must match the provider's configured client ID or one of its native client IDs; tokens issued for any other client ID are rejected. For Sign in with Apple, register your app's bundle ID as a native client ID. For Google, the web client ID used by Credential Manager is usually the configured client ID; add your Android and iOS client IDs as native client IDs if your app requests tokens for them.\n\nPass the raw nonce used when requesting the ID token so it can be validated against the token's nonce claim. When signing in with Apple, the nonce is required: hash it with SHA-256 before passing it to the Apple SDK, and send the raw value here - Apple tokens requested without a nonce are rejected. For Google the nonce is optional: it is validated whenever the token carries one, and ignored when the provider issued the token without one. Apple only returns the user's name on the first authorization, and never inside the ID token - capture it on the client and pass it via the name parameter.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the verified email received from the provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nThis flow does not return provider refresh tokens. You may pass an access token the provider handed your client, along with its lifetime, to store it on the session - but Appwrite cannot renew it once it expires. If your app needs long-lived access to provider APIs, use the browser-based OAuth2 flow instead.\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).\n", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/create-id-token-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "description": "OAuth2 provider that issued the ID token. Currently, supported providers are: apple, google.", + "type": "string", + "example": "apple", + "title": "IdTokenProvider", + "oneOf": [ + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "google" + ], + "title": "google" + } + ] + }, + "idToken": { + "description": "OpenID Connect ID token (JWT) obtained natively from the provider, for example via Google Credential Manager or Sign in with Apple.", + "type": "string", + "example": "<ID_TOKEN>" + }, + "nonce": { + "description": "Raw nonce used when requesting the ID token. Required for Apple, and whenever the token carries a nonce claim, which must match it. Ignored when the provider issued the token without a nonce.", + "type": "string", + "default": "", + "example": "<NONCE>" + }, + "accessToken": { + "description": "Provider access token to store alongside the session for calling provider APIs. Never used for authentication.", + "type": "string", + "default": "", + "example": "<ACCESS_TOKEN>" + }, + "accessTokenExpiry": { + "description": "Seconds until the provider access token expires, as reported by the provider. Stored so clients can tell when the stored token goes stale.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "name": { + "description": "User name. Only used when creating a new user and the ID token has no name claim, such as on the first Sign in with Apple authorization.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "provider", + "idToken" + ] + } + } + } + } + } + }, + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "sessions", + "demo": "account\/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Valid verification token.", + "type": "string", + "example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 session", + "operationId": "accountCreateOAuth2Session", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new 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).\n", + "responses": { + "301": { + "description": "No content", + "content": { + "text\/html": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/create-o-auth-2-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "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.", + "required": true, + "schema": { + "type": "string", + "example": "amazon", + "title": "OAuthProvider", + "oneOf": [ + { + "type": "string", + "enum": [ + "amazon" + ], + "title": "amazon" + }, + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "appwrite" + ], + "title": "appwrite" + }, + { + "type": "string", + "enum": [ + "auth0" + ], + "title": "auth0" + }, + { + "type": "string", + "enum": [ + "authentik" + ], + "title": "authentik" + }, + { + "type": "string", + "enum": [ + "autodesk" + ], + "title": "autodesk" + }, + { + "type": "string", + "enum": [ + "bitbucket" + ], + "title": "bitbucket" + }, + { + "type": "string", + "enum": [ + "bitly" + ], + "title": "bitly" + }, + { + "type": "string", + "enum": [ + "box" + ], + "title": "box" + }, + { + "type": "string", + "enum": [ + "cloudflare" + ], + "title": "cloudflare" + }, + { + "type": "string", + "enum": [ + "dailymotion" + ], + "title": "dailymotion" + }, + { + "type": "string", + "enum": [ + "discord" + ], + "title": "discord" + }, + { + "type": "string", + "enum": [ + "disqus" + ], + "title": "disqus" + }, + { + "type": "string", + "enum": [ + "dropbox" + ], + "title": "dropbox" + }, + { + "type": "string", + "enum": [ + "etsy" + ], + "title": "etsy" + }, + { + "type": "string", + "enum": [ + "facebook" + ], + "title": "facebook" + }, + { + "type": "string", + "enum": [ + "figma" + ], + "title": "figma" + }, + { + "type": "string", + "enum": [ + "fusionauth" + ], + "title": "fusionauth" + }, + { + "type": "string", + "enum": [ + "github" + ], + "title": "github" + }, + { + "type": "string", + "enum": [ + "gitlab" + ], + "title": "gitlab" + }, + { + "type": "string", + "enum": [ + "google" + ], + "title": "google" + }, + { + "type": "string", + "enum": [ + "huggingface" + ], + "title": "huggingface" + }, + { + "type": "string", + "enum": [ + "kakao" + ], + "title": "kakao" + }, + { + "type": "string", + "enum": [ + "keycloak" + ], + "title": "keycloak" + }, + { + "type": "string", + "enum": [ + "kick" + ], + "title": "kick" + }, + { + "type": "string", + "enum": [ + "linkedin" + ], + "title": "linkedin" + }, + { + "type": "string", + "enum": [ + "microsoft" + ], + "title": "microsoft" + }, + { + "type": "string", + "enum": [ + "notion" + ], + "title": "notion" + }, + { + "type": "string", + "enum": [ + "oidc" + ], + "title": "oidc" + }, + { + "type": "string", + "enum": [ + "okta" + ], + "title": "okta" + }, + { + "type": "string", + "enum": [ + "paypal" + ], + "title": "paypal" + }, + { + "type": "string", + "enum": [ + "paypalSandbox" + ], + "title": "paypalSandbox" + }, + { + "type": "string", + "enum": [ + "podio" + ], + "title": "podio" + }, + { + "type": "string", + "enum": [ + "resend" + ], + "title": "resend" + }, + { + "type": "string", + "enum": [ + "salesforce" + ], + "title": "salesforce" + }, + { + "type": "string", + "enum": [ + "slack" + ], + "title": "slack" + }, + { + "type": "string", + "enum": [ + "spotify" + ], + "title": "spotify" + }, + { + "type": "string", + "enum": [ + "stripe" + ], + "title": "stripe" + }, + { + "type": "string", + "enum": [ + "tiktok" + ], + "title": "tiktok" + }, + { + "type": "string", + "enum": [ + "tradeshift" + ], + "title": "tradeshift" + }, + { + "type": "string", + "enum": [ + "tradeshiftBox" + ], + "title": "tradeshiftBox" + }, + { + "type": "string", + "enum": [ + "twitch" + ], + "title": "twitch" + }, + { + "type": "string", + "enum": [ + "wordpress" + ], + "title": "wordpress" + }, + { + "type": "string", + "enum": [ + "x" + ], + "title": "x" + }, + { + "type": "string", + "enum": [ + "yahoo" + ], + "title": "yahoo" + }, + { + "type": "string", + "enum": [ + "yammer" + ], + "title": "yammer" + }, + { + "type": "string", + "enum": [ + "yandex" + ], + "title": "yandex" + }, + { + "type": "string", + "enum": [ + "zoho" + ], + "title": "zoho" + }, + { + "type": "string", + "enum": [ + "zoom" + ], + "title": "zoom" + } + ] + }, + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/sessions\/phone": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "sessions", + "demo": "account\/update-phone-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Valid verification token.", + "type": "string", + "example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "type": "string", + "example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "operationId": "accountGetSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "schema": { + "type": "string", + "example": "<SESSION_ID>", + "default": "current" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "schema": { + "type": "string", + "example": "<SESSION_ID>", + "default": "current" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "account\/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "schema": { + "type": "string", + "example": "<SESSION_ID>", + "default": "current" + }, + "in": "path" + } + ] + } + }, + "\/account\/status": { + "patch": { + "summary": "Update status", + "operationId": "accountUpdateStatus", + "tags": [ + "account" + ], + "description": "Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "account", + "demo": "account\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/targets\/push": { + "post": { + "summary": "Create push target", + "operationId": "accountCreatePushTarget", + "tags": [ + "account" + ], + "description": "Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. A session holds one push target per provider, so if one already exists this endpoint updates and returns that target instead of creating a second one, and a device that rotates its token is never notified twice.", + "responses": { + "201": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pushTargets", + "demo": "account\/create-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetId": { + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<TARGET_ID>" + }, + "identifier": { + "description": "The target identifier (token, email, phone etc.)", + "type": "string", + "example": "<IDENTIFIER>" + }, + "providerId": { + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "type": "string", + "default": "", + "example": "<PROVIDER_ID>" + } + }, + "required": [ + "targetId", + "identifier" + ] + } + } + } + } + } + }, + "\/account\/targets\/{targetId}\/push": { + "put": { + "summary": "Update push target", + "operationId": "accountUpdatePushTarget", + "tags": [ + "account" + ], + "description": "Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pushTargets", + "demo": "account\/update-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TARGET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "description": "The target identifier (token, email, phone etc.)", + "type": "string", + "example": "<IDENTIFIER>" + } + }, + "required": [ + "identifier" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete push target", + "operationId": "accountDeletePushTarget", + "tags": [ + "account" + ], + "description": "Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pushTargets", + "demo": "account\/delete-push-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "targets.write", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TARGET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/tokens\/email": { + "post": { + "summary": "Create email token (OTP)", + "operationId": "accountCreateEmailToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\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).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "account\/create-email-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "phrase": { + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/magic-url": { + "post": { + "summary": "Create magic URL token", + "operationId": "accountCreateMagicURLToken", + "tags": [ + "account" + ], + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.\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).\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "account\/create-magic-url-token.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "url": { + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "phrase": { + "description": "Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "userId", + "email" + ] + } + } + } + } + } + }, + "\/account\/tokens\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 token", + "operationId": "accountCreateOAuth2Token", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nIf there is already an active session, the OAuth2 identity is attached to the logged-in account and that session stays active until the token is exchanged for a new one.\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": { + "301": { + "description": "No content", + "content": { + "text\/html": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "account\/create-o-auth-2-token.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "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.", + "required": true, + "schema": { + "type": "string", + "example": "amazon", + "title": "OAuthProvider", + "oneOf": [ + { + "type": "string", + "enum": [ + "amazon" + ], + "title": "amazon" + }, + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "appwrite" + ], + "title": "appwrite" + }, + { + "type": "string", + "enum": [ + "auth0" + ], + "title": "auth0" + }, + { + "type": "string", + "enum": [ + "authentik" + ], + "title": "authentik" + }, + { + "type": "string", + "enum": [ + "autodesk" + ], + "title": "autodesk" + }, + { + "type": "string", + "enum": [ + "bitbucket" + ], + "title": "bitbucket" + }, + { + "type": "string", + "enum": [ + "bitly" + ], + "title": "bitly" + }, + { + "type": "string", + "enum": [ + "box" + ], + "title": "box" + }, + { + "type": "string", + "enum": [ + "cloudflare" + ], + "title": "cloudflare" + }, + { + "type": "string", + "enum": [ + "dailymotion" + ], + "title": "dailymotion" + }, + { + "type": "string", + "enum": [ + "discord" + ], + "title": "discord" + }, + { + "type": "string", + "enum": [ + "disqus" + ], + "title": "disqus" + }, + { + "type": "string", + "enum": [ + "dropbox" + ], + "title": "dropbox" + }, + { + "type": "string", + "enum": [ + "etsy" + ], + "title": "etsy" + }, + { + "type": "string", + "enum": [ + "facebook" + ], + "title": "facebook" + }, + { + "type": "string", + "enum": [ + "figma" + ], + "title": "figma" + }, + { + "type": "string", + "enum": [ + "fusionauth" + ], + "title": "fusionauth" + }, + { + "type": "string", + "enum": [ + "github" + ], + "title": "github" + }, + { + "type": "string", + "enum": [ + "gitlab" + ], + "title": "gitlab" + }, + { + "type": "string", + "enum": [ + "google" + ], + "title": "google" + }, + { + "type": "string", + "enum": [ + "huggingface" + ], + "title": "huggingface" + }, + { + "type": "string", + "enum": [ + "kakao" + ], + "title": "kakao" + }, + { + "type": "string", + "enum": [ + "keycloak" + ], + "title": "keycloak" + }, + { + "type": "string", + "enum": [ + "kick" + ], + "title": "kick" + }, + { + "type": "string", + "enum": [ + "linkedin" + ], + "title": "linkedin" + }, + { + "type": "string", + "enum": [ + "microsoft" + ], + "title": "microsoft" + }, + { + "type": "string", + "enum": [ + "notion" + ], + "title": "notion" + }, + { + "type": "string", + "enum": [ + "oidc" + ], + "title": "oidc" + }, + { + "type": "string", + "enum": [ + "okta" + ], + "title": "okta" + }, + { + "type": "string", + "enum": [ + "paypal" + ], + "title": "paypal" + }, + { + "type": "string", + "enum": [ + "paypalSandbox" + ], + "title": "paypalSandbox" + }, + { + "type": "string", + "enum": [ + "podio" + ], + "title": "podio" + }, + { + "type": "string", + "enum": [ + "resend" + ], + "title": "resend" + }, + { + "type": "string", + "enum": [ + "salesforce" + ], + "title": "salesforce" + }, + { + "type": "string", + "enum": [ + "slack" + ], + "title": "slack" + }, + { + "type": "string", + "enum": [ + "spotify" + ], + "title": "spotify" + }, + { + "type": "string", + "enum": [ + "stripe" + ], + "title": "stripe" + }, + { + "type": "string", + "enum": [ + "tiktok" + ], + "title": "tiktok" + }, + { + "type": "string", + "enum": [ + "tradeshift" + ], + "title": "tradeshift" + }, + { + "type": "string", + "enum": [ + "tradeshiftBox" + ], + "title": "tradeshiftBox" + }, + { + "type": "string", + "enum": [ + "twitch" + ], + "title": "twitch" + }, + { + "type": "string", + "enum": [ + "wordpress" + ], + "title": "wordpress" + }, + { + "type": "string", + "enum": [ + "x" + ], + "title": "x" + }, + { + "type": "string", + "enum": [ + "yahoo" + ], + "title": "yahoo" + }, + { + "type": "string", + "enum": [ + "yammer" + ], + "title": "yammer" + }, + { + "type": "string", + "enum": [ + "yandex" + ], + "title": "yandex" + }, + { + "type": "string", + "enum": [ + "zoho" + ], + "title": "zoho" + }, + { + "type": "string", + "enum": [ + "zoom" + ], + "title": "zoom" + } + ] + }, + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/account\/tokens\/phone": { + "post": { + "summary": "Create phone token", + "operationId": "accountCreatePhoneToken", + "tags": [ + "account" + ], + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\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": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "account\/create-phone-token.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},phone:{param-phone}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", + "type": "string", + "example": "<USER_ID>" + }, + "phone": { + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "userId", + "phone" + ] + } + } + } + } + } + }, + "\/account\/verifications\/email": { + "post": { + "summary": "Create email verification", + "operationId": "accountCreateEmailVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "verification", + "demo": "account\/create-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "createEmailVerification", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-email-verification.md", + "public": true + }, + { + "name": "createVerification", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "url" + ], + "required": [ + "url" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "demo": "account\/create-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createEmailVerification" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "url" + ] + } + } + } + } + }, + "put": { + "summary": "Update email verification (confirmation)", + "operationId": "accountUpdateEmailVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "verification", + "demo": "account\/update-email-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "updateEmailVerification", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-email-verification.md", + "public": true + }, + { + "name": "updateVerification", + "namespace": "account", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "userId", + "secret" + ], + "required": [ + "userId", + "secret" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/token" + } + ], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "demo": "account\/update-verification.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateEmailVerification" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Valid verification token.", + "type": "string", + "example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/verifications\/email\/otp": { + "post": { + "summary": "Create email verification (OTP)", + "operationId": "accountCreateEmailVerificationOTP", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a 6-digit verification code to the currently logged in user's email address. Unlike [createEmailVerification](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailVerification), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a verification page. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmailVerificationOTP). The code sent to the user's email address is valid for 15 minutes.\n\nEnable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "verification", + "demo": "account\/create-email-verification-otp.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phrase": { + "description": "Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.", + "type": "boolean", + "default": false, + "example": false + } + } + } + } + } + } + }, + "put": { + "summary": "Update email verification (OTP)", + "operationId": "accountUpdateEmailVerificationOTP", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user email verification process using the 6-digit code that was emailed by [createEmailVerificationOTP](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createEmailVerificationOTP). Pass the **userId** of the user being verified along with the **secret** code from the email. If confirmed, this route will return a 200 status code and the code is consumed.\n", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "verification", + "demo": "account\/update-email-verification-otp.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Valid verification OTP code.", + "type": "string", + "example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/verifications\/phone": { + "post": { + "summary": "Create phone verification", + "operationId": "accountCreatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "verification", + "demo": "account\/create-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},userId:{userId}", + "url:{url},ip:{ip}" + ], + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update phone verification (confirmation)", + "operationId": "accountUpdatePhoneVerification", + "tags": [ + "account" + ], + "description": "Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "verification", + "demo": "account\/update-phone-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "userId:{param-userId}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Valid verification token.", + "type": "string", + "example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/activities\/events": { + "get": { + "summary": "List events", + "operationId": "activitiesListEvents", + "tags": [ + "activities" + ], + "description": "List all events for selected filters.", + "responses": { + "200": { + "description": "Activity event list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/activityEventList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "activities\/list-events.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "events.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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/activities\/events\/{eventId}": { + "get": { + "summary": "Get event", + "operationId": "activitiesGetEvent", + "tags": [ + "activities" + ], + "description": "Get event by ID.\n", + "responses": { + "200": { + "description": "ActivityEvent", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/activityEvent" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "events", + "demo": "activities\/get-event.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "events.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "eventId", + "description": "Event ID.", + "required": true, + "schema": { + "type": "string", + "example": "<EVENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/affiliates\/links": { + "get": { + "summary": "List affiliate links", + "operationId": "affiliatesListLinks", + "tags": [ + "affiliates" + ], + "description": "List affiliate links for the current account.\n", + "responses": { + "200": { + "description": "Affiliate links list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/affiliateLinkList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "links", + "demo": "affiliates\/list-links.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, status", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create affiliate link", + "operationId": "affiliatesCreateLink", + "tags": [ + "affiliates" + ], + "description": "Create a shareable affiliate link for the current account. Every console user is automatically in the affiliates program.\n", + "responses": { + "201": { + "description": "AffiliateLink", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/affiliateLink" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "links", + "demo": "affiliates\/create-link.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "linkId": { + "description": "Link ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. This ID is the shareable referral code.", + "type": "string", + "example": "<LINK_ID>" + }, + "name": { + "description": "Link name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "linkId" + ] + } + } + } + } + } + }, + "\/affiliates\/links\/{linkId}": { + "get": { + "summary": "Get affiliate link", + "operationId": "affiliatesGetLink", + "tags": [ + "affiliates" + ], + "description": "Get a single affiliate link owned by the current account.\n", + "responses": { + "200": { + "description": "AffiliateLink", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/affiliateLink" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "links", + "demo": "affiliates\/get-link.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "linkId", + "description": "Link ID.", + "required": true, + "schema": { + "type": "string", + "example": "<LINK_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete affiliate link", + "operationId": "affiliatesDeleteLink", + "tags": [ + "affiliates" + ], + "description": "Delete an affiliate link owned by the current account. Existing referrals and rewards keep their stored link IDs for history.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "links", + "demo": "affiliates\/delete-link.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "linkId", + "description": "Link ID.", + "required": true, + "schema": { + "type": "string", + "example": "<LINK_ID>" + }, + "in": "path" + } + ] + } + }, + "\/affiliates\/referrals": { + "get": { + "summary": "List affiliate referrals", + "operationId": "affiliatesListReferrals", + "tags": [ + "affiliates" + ], + "description": "List referrals attributed to the current account's affiliate links. Responses include privacy-safe metadata only (truncated user ID and signup country), never email or name. Referrals are created automatically on signup when the invite cookie is present.\n", + "responses": { + "200": { + "description": "Affiliate referrals list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/affiliateReferralList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "referrals", + "demo": "affiliates\/list-referrals.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referredUserMaskedId, referredUserCountry, status, attributedAt, expiresAt, convertedAt", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/affiliates\/rewards": { + "get": { + "summary": "List affiliate rewards", + "operationId": "affiliatesListRewards", + "tags": [ + "affiliates" + ], + "description": "List rewards earned by the current account from affiliate link conversions.\n", + "responses": { + "200": { + "description": "Affiliate rewards list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/affiliateRewardList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rewards", + "demo": "affiliates\/list-rewards.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referralId, amount, status, teamId, creditId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/affiliates\/rewards\/{rewardId}": { + "patch": { + "summary": "Update affiliate reward", + "operationId": "affiliatesUpdateReward", + "tags": [ + "affiliates" + ], + "description": "Claim a pending affiliate reward by setting its status to `claimed`. Creates organization credits for the target organization. The current user must be an owner of that organization.\n", + "responses": { + "200": { + "description": "AffiliateReward", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/affiliateReward" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rewards", + "demo": "affiliates\/update-reward.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "rewardId", + "description": "Reward ID", + "required": true, + "schema": { + "type": "string", + "example": "<REWARD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "description": "New reward status. Use `claimed` to claim the reward as organization credits.", + "type": "string", + "example": "claimed" + }, + "organizationId": { + "description": "Organization ID to apply credits to when claiming.", + "type": "string", + "example": "<ORGANIZATION_ID>" + } + }, + "required": [ + "status", + "organizationId" + ] + } + } + } + } + } + }, + "\/apps": { + "get": { + "summary": "List Applications", + "operationId": "appsList", + "tags": [ + "apps" + ], + "description": "List applications.", + "responses": { + "200": { + "description": "Apps list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "apps", + "demo": "apps\/list.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Application", + "operationId": "appsCreate", + "tags": [ + "apps" + ], + "description": "Create a new application.", + "responses": { + "201": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "apps", + "demo": "apps\/create.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "description": "Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<APP_ID>" + }, + "name": { + "description": "Application name.", + "type": "string", + "example": "<NAME>" + }, + "description": { + "description": "Application description shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "<DESCRIPTION>" + }, + "clientUri": { + "description": "Application homepage URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "logoUri": { + "description": "Application logo URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "privacyPolicyUrl": { + "description": "Application privacy policy URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "termsUrl": { + "description": "Application terms of service URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "contacts": { + "description": "Application support or security contact emails. Maximum of 100 contacts are allowed.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "tagline": { + "description": "Application tagline shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "<TAGLINE>" + }, + "tags": { + "description": "Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "images": { + "description": "Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "supportUrl": { + "description": "Application support URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "dataDeletionUrl": { + "description": "Application data deletion URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "redirectUris": { + "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.", + "type": "array", + "items": { + "type": "string" + } + }, + "postLogoutRedirectUris": { + "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "enabled": { + "description": "Is application enabled?", + "type": "boolean", + "default": true, + "example": false + }, + "type": { + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "type": "string", + "default": "confidential", + "example": "public" + }, + "deviceFlow": { + "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.", + "type": "boolean", + "default": false, + "example": false + }, + "teamId": { + "description": "Team unique ID.", + "type": "string", + "default": "", + "example": "<TEAM_ID>" + } + }, + "required": [ + "appId", + "name", + "redirectUris" + ] + } + } + } + } + } + }, + "\/apps\/scopes\/installations": { + "get": { + "summary": "List Installation Scopes", + "operationId": "appsListInstallationScopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request when installed on a team.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "scopes", + "demo": "apps\/list-installation-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/apps\/scopes\/oauth2": { + "get": { + "summary": "List OAuth2 Scopes", + "operationId": "appsListOAuth2Scopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request during the OAuth2 flow.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "scopes", + "demo": "apps\/list-o-auth-2-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/apps\/{appId}": { + "get": { + "summary": "Get Application", + "operationId": "appsGet", + "tags": [ + "apps" + ], + "description": "Get an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "apps", + "demo": "apps\/get.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Application", + "operationId": "appsUpdate", + "tags": [ + "apps" + ], + "description": "Update an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "apps", + "demo": "apps\/update.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Application name.", + "type": "string", + "example": "<NAME>" + }, + "description": { + "description": "Application description shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "<DESCRIPTION>" + }, + "clientUri": { + "description": "Application homepage URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "logoUri": { + "description": "Application logo URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "privacyPolicyUrl": { + "description": "Application privacy policy URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "termsUrl": { + "description": "Application terms of service URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "contacts": { + "description": "Application support or security contact emails. Maximum of 100 contacts are allowed.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "tagline": { + "description": "Application tagline shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "<TAGLINE>" + }, + "tags": { + "description": "Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "images": { + "description": "Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "supportUrl": { + "description": "Application support URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "dataDeletionUrl": { + "description": "Application data deletion URL shown to users during OAuth2 consent.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "enabled": { + "description": "Is application enabled?", + "type": "boolean", + "default": true, + "example": false + }, + "redirectUris": { + "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "postLogoutRedirectUris": { + "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "type": { + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "type": "string", + "default": "confidential", + "example": "public" + }, + "deviceFlow": { + "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.", + "type": "boolean", + "default": false, + "example": false + }, + "installationScopes": { + "description": "Scopes the application requests when installed on a team. Only scopes allowed by the project's OAuth2 server installation scopes configuration are accepted; use the list installation scopes endpoint to discover available values. Maximum of 100 scopes are allowed.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "installationRedirectUrl": { + "description": "URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete Application", + "operationId": "appsDelete", + "tags": [ + "apps" + ], + "description": "Delete an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "apps", + "demo": "apps\/delete.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/installations": { + "get": { + "summary": "List Installations", + "operationId": "appsListInstallations", + "tags": [ + "apps" + ], + "description": "List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "apps\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.read", + "apps.installations.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/apps\/{appId}\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "appsGetInstallation", + "tags": [ + "apps" + ], + "description": "Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "apps\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.read", + "apps.installations.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Installation", + "operationId": "appsDeleteInstallation", + "tags": [ + "apps" + ], + "description": "Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "apps\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/installations\/{installationId}\/tokens": { + "post": { + "summary": "Create Installation Token", + "operationId": "appsCreateInstallationToken", + "tags": [ + "apps" + ], + "description": "Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.", + "responses": { + "201": { + "description": "OAuth2 Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "apps\/create-installation-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.write", + "apps.tokens.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/keys": { + "get": { + "summary": "List App Keys", + "operationId": "appsListKeys", + "tags": [ + "apps" + ], + "description": "List app keys for an application.", + "responses": { + "200": { + "description": "App keys list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appKeyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "apps\/list-keys.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create App Key", + "operationId": "appsCreateKey", + "tags": [ + "apps" + ], + "description": "Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.", + "responses": { + "201": { + "description": "AppKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "apps\/create-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/keys\/{keyId}": { + "get": { + "summary": "Get App Key", + "operationId": "appsGetKey", + "tags": [ + "apps" + ], + "description": "Get an app key by its unique ID.", + "responses": { + "200": { + "description": "AppKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "apps\/get-key.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "App key unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete App Key", + "operationId": "appsDeleteKey", + "tags": [ + "apps" + ], + "description": "Delete an app key by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "apps\/delete-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "App key unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/labels": { + "put": { + "summary": "Update Application Labels", + "operationId": "appsUpdateLabels", + "tags": [ + "apps" + ], + "description": "Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "apps", + "demo": "apps\/update-labels.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "description": "Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long. Reserved labels are rejected.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/apps\/{appId}\/secrets": { + "get": { + "summary": "List Secrets", + "operationId": "appsListSecrets", + "tags": [ + "apps" + ], + "description": "List client secrets for an application.", + "responses": { + "200": { + "description": "App secrets list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "secrets", + "demo": "apps\/list-secrets.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", + "tags": [ + "apps" + ], + "description": "Create a new client secret for an application.", + "responses": { + "201": { + "description": "AppSecretPlaintext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretPlaintext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "secrets", + "demo": "apps\/create-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets\/{secretId}": { + "get": { + "summary": "Get Secret", + "operationId": "appsGetSecret", + "tags": [ + "apps" + ], + "description": "Get an application client secret by its unique ID.", + "responses": { + "200": { + "description": "AppSecret", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecret" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "secrets", + "demo": "apps\/get-secret.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SECRET_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "secrets", + "demo": "apps\/delete-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SECRET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "apps", + "demo": "apps\/update-team.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "description": "Team ID of the team to transfer application to.", + "type": "string", + "example": "<TEAM_ID>" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/apps\/{appId}\/tokens": { + "delete": { + "summary": "Delete Tokens", + "operationId": "appsDeleteTokens", + "tags": [ + "apps" + ], + "description": "Revoke all tokens for an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "apps", + "demo": "apps\/delete-tokens.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<APP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "schema": { + "type": "string", + "example": "aa", + "title": "Browser", + "oneOf": [ + { + "type": "string", + "enum": [ + "aa" + ], + "title": "Avant Browser" + }, + { + "type": "string", + "enum": [ + "an" + ], + "title": "Android WebView Beta" + }, + { + "type": "string", + "enum": [ + "ch" + ], + "title": "Google Chrome" + }, + { + "type": "string", + "enum": [ + "ci" + ], + "title": "Google Chrome (iOS)" + }, + { + "type": "string", + "enum": [ + "cm" + ], + "title": "Google Chrome (Mobile)" + }, + { + "type": "string", + "enum": [ + "cr" + ], + "title": "Chromium" + }, + { + "type": "string", + "enum": [ + "ff" + ], + "title": "Mozilla Firefox" + }, + { + "type": "string", + "enum": [ + "sf" + ], + "title": "Safari" + }, + { + "type": "string", + "enum": [ + "mf" + ], + "title": "Mobile Safari" + }, + { + "type": "string", + "enum": [ + "ps" + ], + "title": "Microsoft Edge" + }, + { + "type": "string", + "enum": [ + "oi" + ], + "title": "Microsoft Edge (iOS)" + }, + { + "type": "string", + "enum": [ + "om" + ], + "title": "Opera Mini" + }, + { + "type": "string", + "enum": [ + "op" + ], + "title": "Opera" + }, + { + "type": "string", + "enum": [ + "on" + ], + "title": "Opera (Next)" + } + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/credit-cards\/{code}": { + "get": { + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", + "tags": [ + "avatars" + ], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "required": true, + "schema": { + "type": "string", + "example": "amex", + "title": "CreditCard", + "oneOf": [ + { + "type": "string", + "enum": [ + "amex" + ], + "title": "American Express" + }, + { + "type": "string", + "enum": [ + "argencard" + ], + "title": "Argencard" + }, + { + "type": "string", + "enum": [ + "cabal" + ], + "title": "Cabal" + }, + { + "type": "string", + "enum": [ + "cencosud" + ], + "title": "Cencosud" + }, + { + "type": "string", + "enum": [ + "diners" + ], + "title": "Diners Club" + }, + { + "type": "string", + "enum": [ + "discover" + ], + "title": "Discover" + }, + { + "type": "string", + "enum": [ + "elo" + ], + "title": "Elo" + }, + { + "type": "string", + "enum": [ + "hipercard" + ], + "title": "Hipercard" + }, + { + "type": "string", + "enum": [ + "jcb" + ], + "title": "JCB" + }, + { + "type": "string", + "enum": [ + "mastercard" + ], + "title": "Mastercard" + }, + { + "type": "string", + "enum": [ + "naranja" + ], + "title": "Naranja" + }, + { + "type": "string", + "enum": [ + "targeta-shopping" + ], + "title": "Tarjeta Shopping" + }, + { + "type": "string", + "enum": [ + "unionpay" + ], + "title": "Union Pay" + }, + { + "type": "string", + "enum": [ + "visa" + ], + "title": "Visa" + }, + { + "type": "string", + "enum": [ + "mir" + ], + "title": "MIR" + }, + { + "type": "string", + "enum": [ + "maestro" + ], + "title": "Maestro" + }, + { + "type": "string", + "enum": [ + "rupay" + ], + "title": "Rupay" + } + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "schema": { + "type": "string", + "example": "af", + "title": "Flag", + "oneOf": [ + { + "type": "string", + "enum": [ + "af" + ], + "title": "Afghanistan" + }, + { + "type": "string", + "enum": [ + "ao" + ], + "title": "Angola" + }, + { + "type": "string", + "enum": [ + "al" + ], + "title": "Albania" + }, + { + "type": "string", + "enum": [ + "ad" + ], + "title": "Andorra" + }, + { + "type": "string", + "enum": [ + "ae" + ], + "title": "United Arab Emirates" + }, + { + "type": "string", + "enum": [ + "ar" + ], + "title": "Argentina" + }, + { + "type": "string", + "enum": [ + "am" + ], + "title": "Armenia" + }, + { + "type": "string", + "enum": [ + "ag" + ], + "title": "Antigua and Barbuda" + }, + { + "type": "string", + "enum": [ + "au" + ], + "title": "Australia" + }, + { + "type": "string", + "enum": [ + "at" + ], + "title": "Austria" + }, + { + "type": "string", + "enum": [ + "az" + ], + "title": "Azerbaijan" + }, + { + "type": "string", + "enum": [ + "bi" + ], + "title": "Burundi" + }, + { + "type": "string", + "enum": [ + "be" + ], + "title": "Belgium" + }, + { + "type": "string", + "enum": [ + "bj" + ], + "title": "Benin" + }, + { + "type": "string", + "enum": [ + "bf" + ], + "title": "Burkina Faso" + }, + { + "type": "string", + "enum": [ + "bd" + ], + "title": "Bangladesh" + }, + { + "type": "string", + "enum": [ + "bg" + ], + "title": "Bulgaria" + }, + { + "type": "string", + "enum": [ + "bh" + ], + "title": "Bahrain" + }, + { + "type": "string", + "enum": [ + "bs" + ], + "title": "Bahamas" + }, + { + "type": "string", + "enum": [ + "ba" + ], + "title": "Bosnia and Herzegovina" + }, + { + "type": "string", + "enum": [ + "by" + ], + "title": "Belarus" + }, + { + "type": "string", + "enum": [ + "bz" + ], + "title": "Belize" + }, + { + "type": "string", + "enum": [ + "bo" + ], + "title": "Bolivia" + }, + { + "type": "string", + "enum": [ + "br" + ], + "title": "Brazil" + }, + { + "type": "string", + "enum": [ + "bb" + ], + "title": "Barbados" + }, + { + "type": "string", + "enum": [ + "bn" + ], + "title": "Brunei Darussalam" + }, + { + "type": "string", + "enum": [ + "bt" + ], + "title": "Bhutan" + }, + { + "type": "string", + "enum": [ + "bw" + ], + "title": "Botswana" + }, + { + "type": "string", + "enum": [ + "cf" + ], + "title": "Central African Republic" + }, + { + "type": "string", + "enum": [ + "ca" + ], + "title": "Canada" + }, + { + "type": "string", + "enum": [ + "ch" + ], + "title": "Switzerland" + }, + { + "type": "string", + "enum": [ + "cl" + ], + "title": "Chile" + }, + { + "type": "string", + "enum": [ + "cn" + ], + "title": "China" + }, + { + "type": "string", + "enum": [ + "ci" + ], + "title": "C\u00f4te d'Ivoire" + }, + { + "type": "string", + "enum": [ + "cm" + ], + "title": "Cameroon" + }, + { + "type": "string", + "enum": [ + "cd" + ], + "title": "Democratic Republic of the Congo" + }, + { + "type": "string", + "enum": [ + "cg" + ], + "title": "Republic of the Congo" + }, + { + "type": "string", + "enum": [ + "co" + ], + "title": "Colombia" + }, + { + "type": "string", + "enum": [ + "km" + ], + "title": "Comoros" + }, + { + "type": "string", + "enum": [ + "cv" + ], + "title": "Cape Verde" + }, + { + "type": "string", + "enum": [ + "cr" + ], + "title": "Costa Rica" + }, + { + "type": "string", + "enum": [ + "cu" + ], + "title": "Cuba" + }, + { + "type": "string", + "enum": [ + "cy" + ], + "title": "Cyprus" + }, + { + "type": "string", + "enum": [ + "cz" + ], + "title": "Czech Republic" + }, + { + "type": "string", + "enum": [ + "de" + ], + "title": "Germany" + }, + { + "type": "string", + "enum": [ + "dj" + ], + "title": "Djibouti" + }, + { + "type": "string", + "enum": [ + "dm" + ], + "title": "Dominica" + }, + { + "type": "string", + "enum": [ + "dk" + ], + "title": "Denmark" + }, + { + "type": "string", + "enum": [ + "do" + ], + "title": "Dominican Republic" + }, + { + "type": "string", + "enum": [ + "dz" + ], + "title": "Algeria" + }, + { + "type": "string", + "enum": [ + "ec" + ], + "title": "Ecuador" + }, + { + "type": "string", + "enum": [ + "eg" + ], + "title": "Egypt" + }, + { + "type": "string", + "enum": [ + "er" + ], + "title": "Eritrea" + }, + { + "type": "string", + "enum": [ + "es" + ], + "title": "Spain" + }, + { + "type": "string", + "enum": [ + "ee" + ], + "title": "Estonia" + }, + { + "type": "string", + "enum": [ + "et" + ], + "title": "Ethiopia" + }, + { + "type": "string", + "enum": [ + "fi" + ], + "title": "Finland" + }, + { + "type": "string", + "enum": [ + "fj" + ], + "title": "Fiji" + }, + { + "type": "string", + "enum": [ + "fr" + ], + "title": "France" + }, + { + "type": "string", + "enum": [ + "fm" + ], + "title": "Micronesia (Federated States of)" + }, + { + "type": "string", + "enum": [ + "ga" + ], + "title": "Gabon" + }, + { + "type": "string", + "enum": [ + "gb" + ], + "title": "United Kingdom" + }, + { + "type": "string", + "enum": [ + "ge" + ], + "title": "Georgia" + }, + { + "type": "string", + "enum": [ + "gh" + ], + "title": "Ghana" + }, + { + "type": "string", + "enum": [ + "gn" + ], + "title": "Guinea" + }, + { + "type": "string", + "enum": [ + "gm" + ], + "title": "Gambia" + }, + { + "type": "string", + "enum": [ + "gw" + ], + "title": "Guinea-Bissau" + }, + { + "type": "string", + "enum": [ + "gq" + ], + "title": "Equatorial Guinea" + }, + { + "type": "string", + "enum": [ + "gr" + ], + "title": "Greece" + }, + { + "type": "string", + "enum": [ + "gd" + ], + "title": "Grenada" + }, + { + "type": "string", + "enum": [ + "gt" + ], + "title": "Guatemala" + }, + { + "type": "string", + "enum": [ + "gy" + ], + "title": "Guyana" + }, + { + "type": "string", + "enum": [ + "hn" + ], + "title": "Honduras" + }, + { + "type": "string", + "enum": [ + "hr" + ], + "title": "Croatia" + }, + { + "type": "string", + "enum": [ + "ht" + ], + "title": "Haiti" + }, + { + "type": "string", + "enum": [ + "hu" + ], + "title": "Hungary" + }, + { + "type": "string", + "enum": [ + "id" + ], + "title": "Indonesia" + }, + { + "type": "string", + "enum": [ + "in" + ], + "title": "India" + }, + { + "type": "string", + "enum": [ + "ie" + ], + "title": "Ireland" + }, + { + "type": "string", + "enum": [ + "ir" + ], + "title": "Iran (Islamic Republic of)" + }, + { + "type": "string", + "enum": [ + "iq" + ], + "title": "Iraq" + }, + { + "type": "string", + "enum": [ + "is" + ], + "title": "Iceland" + }, + { + "type": "string", + "enum": [ + "il" + ], + "title": "Israel" + }, + { + "type": "string", + "enum": [ + "it" + ], + "title": "Italy" + }, + { + "type": "string", + "enum": [ + "jm" + ], + "title": "Jamaica" + }, + { + "type": "string", + "enum": [ + "jo" + ], + "title": "Jordan" + }, + { + "type": "string", + "enum": [ + "jp" + ], + "title": "Japan" + }, + { + "type": "string", + "enum": [ + "kz" + ], + "title": "Kazakhstan" + }, + { + "type": "string", + "enum": [ + "ke" + ], + "title": "Kenya" + }, + { + "type": "string", + "enum": [ + "kg" + ], + "title": "Kyrgyzstan" + }, + { + "type": "string", + "enum": [ + "kh" + ], + "title": "Cambodia" + }, + { + "type": "string", + "enum": [ + "ki" + ], + "title": "Kiribati" + }, + { + "type": "string", + "enum": [ + "kn" + ], + "title": "Saint Kitts and Nevis" + }, + { + "type": "string", + "enum": [ + "kr" + ], + "title": "South Korea" + }, + { + "type": "string", + "enum": [ + "kw" + ], + "title": "Kuwait" + }, + { + "type": "string", + "enum": [ + "la" + ], + "title": "Lao People's Democratic Republic" + }, + { + "type": "string", + "enum": [ + "lb" + ], + "title": "Lebanon" + }, + { + "type": "string", + "enum": [ + "lr" + ], + "title": "Liberia" + }, + { + "type": "string", + "enum": [ + "ly" + ], + "title": "Libya" + }, + { + "type": "string", + "enum": [ + "lc" + ], + "title": "Saint Lucia" + }, + { + "type": "string", + "enum": [ + "li" + ], + "title": "Liechtenstein" + }, + { + "type": "string", + "enum": [ + "lk" + ], + "title": "Sri Lanka" + }, + { + "type": "string", + "enum": [ + "ls" + ], + "title": "Lesotho" + }, + { + "type": "string", + "enum": [ + "lt" + ], + "title": "Lithuania" + }, + { + "type": "string", + "enum": [ + "lu" + ], + "title": "Luxembourg" + }, + { + "type": "string", + "enum": [ + "lv" + ], + "title": "Latvia" + }, + { + "type": "string", + "enum": [ + "ma" + ], + "title": "Morocco" + }, + { + "type": "string", + "enum": [ + "mc" + ], + "title": "Monaco" + }, + { + "type": "string", + "enum": [ + "md" + ], + "title": "Moldova" + }, + { + "type": "string", + "enum": [ + "mg" + ], + "title": "Madagascar" + }, + { + "type": "string", + "enum": [ + "mv" + ], + "title": "Maldives" + }, + { + "type": "string", + "enum": [ + "mx" + ], + "title": "Mexico" + }, + { + "type": "string", + "enum": [ + "mh" + ], + "title": "Marshall Islands" + }, + { + "type": "string", + "enum": [ + "mk" + ], + "title": "North Macedonia" + }, + { + "type": "string", + "enum": [ + "ml" + ], + "title": "Mali" + }, + { + "type": "string", + "enum": [ + "mt" + ], + "title": "Malta" + }, + { + "type": "string", + "enum": [ + "mm" + ], + "title": "Myanmar" + }, + { + "type": "string", + "enum": [ + "me" + ], + "title": "Montenegro" + }, + { + "type": "string", + "enum": [ + "mn" + ], + "title": "Mongolia" + }, + { + "type": "string", + "enum": [ + "mz" + ], + "title": "Mozambique" + }, + { + "type": "string", + "enum": [ + "mr" + ], + "title": "Mauritania" + }, + { + "type": "string", + "enum": [ + "mu" + ], + "title": "Mauritius" + }, + { + "type": "string", + "enum": [ + "mw" + ], + "title": "Malawi" + }, + { + "type": "string", + "enum": [ + "my" + ], + "title": "Malaysia" + }, + { + "type": "string", + "enum": [ + "na" + ], + "title": "Namibia" + }, + { + "type": "string", + "enum": [ + "ne" + ], + "title": "Niger" + }, + { + "type": "string", + "enum": [ + "ng" + ], + "title": "Nigeria" + }, + { + "type": "string", + "enum": [ + "ni" + ], + "title": "Nicaragua" + }, + { + "type": "string", + "enum": [ + "nl" + ], + "title": "Netherlands" + }, + { + "type": "string", + "enum": [ + "no" + ], + "title": "Norway" + }, + { + "type": "string", + "enum": [ + "np" + ], + "title": "Nepal" + }, + { + "type": "string", + "enum": [ + "nr" + ], + "title": "Nauru" + }, + { + "type": "string", + "enum": [ + "nz" + ], + "title": "New Zealand" + }, + { + "type": "string", + "enum": [ + "om" + ], + "title": "Oman" + }, + { + "type": "string", + "enum": [ + "pk" + ], + "title": "Pakistan" + }, + { + "type": "string", + "enum": [ + "pa" + ], + "title": "Panama" + }, + { + "type": "string", + "enum": [ + "pe" + ], + "title": "Peru" + }, + { + "type": "string", + "enum": [ + "ph" + ], + "title": "Philippines" + }, + { + "type": "string", + "enum": [ + "pw" + ], + "title": "Palau" + }, + { + "type": "string", + "enum": [ + "pg" + ], + "title": "Papua New Guinea" + }, + { + "type": "string", + "enum": [ + "pl" + ], + "title": "Poland" + }, + { + "type": "string", + "enum": [ + "pf" + ], + "title": "French Polynesia" + }, + { + "type": "string", + "enum": [ + "kp" + ], + "title": "North Korea" + }, + { + "type": "string", + "enum": [ + "pt" + ], + "title": "Portugal" + }, + { + "type": "string", + "enum": [ + "py" + ], + "title": "Paraguay" + }, + { + "type": "string", + "enum": [ + "qa" + ], + "title": "Qatar" + }, + { + "type": "string", + "enum": [ + "ro" + ], + "title": "Romania" + }, + { + "type": "string", + "enum": [ + "ru" + ], + "title": "Russia" + }, + { + "type": "string", + "enum": [ + "rw" + ], + "title": "Rwanda" + }, + { + "type": "string", + "enum": [ + "sa" + ], + "title": "Saudi Arabia" + }, + { + "type": "string", + "enum": [ + "sd" + ], + "title": "Sudan" + }, + { + "type": "string", + "enum": [ + "sn" + ], + "title": "Senegal" + }, + { + "type": "string", + "enum": [ + "sg" + ], + "title": "Singapore" + }, + { + "type": "string", + "enum": [ + "sb" + ], + "title": "Solomon Islands" + }, + { + "type": "string", + "enum": [ + "sl" + ], + "title": "Sierra Leone" + }, + { + "type": "string", + "enum": [ + "sv" + ], + "title": "El Salvador" + }, + { + "type": "string", + "enum": [ + "sm" + ], + "title": "San Marino" + }, + { + "type": "string", + "enum": [ + "so" + ], + "title": "Somalia" + }, + { + "type": "string", + "enum": [ + "rs" + ], + "title": "Serbia" + }, + { + "type": "string", + "enum": [ + "ss" + ], + "title": "South Sudan" + }, + { + "type": "string", + "enum": [ + "st" + ], + "title": "Sao Tome and Principe" + }, + { + "type": "string", + "enum": [ + "sr" + ], + "title": "Suriname" + }, + { + "type": "string", + "enum": [ + "sk" + ], + "title": "Slovakia" + }, + { + "type": "string", + "enum": [ + "si" + ], + "title": "Slovenia" + }, + { + "type": "string", + "enum": [ + "se" + ], + "title": "Sweden" + }, + { + "type": "string", + "enum": [ + "sz" + ], + "title": "Eswatini" + }, + { + "type": "string", + "enum": [ + "sc" + ], + "title": "Seychelles" + }, + { + "type": "string", + "enum": [ + "sy" + ], + "title": "Syria" + }, + { + "type": "string", + "enum": [ + "td" + ], + "title": "Chad" + }, + { + "type": "string", + "enum": [ + "tg" + ], + "title": "Togo" + }, + { + "type": "string", + "enum": [ + "th" + ], + "title": "Thailand" + }, + { + "type": "string", + "enum": [ + "tj" + ], + "title": "Tajikistan" + }, + { + "type": "string", + "enum": [ + "tm" + ], + "title": "Turkmenistan" + }, + { + "type": "string", + "enum": [ + "tl" + ], + "title": "Timor-Leste" + }, + { + "type": "string", + "enum": [ + "to" + ], + "title": "Tonga" + }, + { + "type": "string", + "enum": [ + "tt" + ], + "title": "Trinidad and Tobago" + }, + { + "type": "string", + "enum": [ + "tn" + ], + "title": "Tunisia" + }, + { + "type": "string", + "enum": [ + "tr" + ], + "title": "Turkey" + }, + { + "type": "string", + "enum": [ + "tv" + ], + "title": "Tuvalu" + }, + { + "type": "string", + "enum": [ + "tz" + ], + "title": "Tanzania" + }, + { + "type": "string", + "enum": [ + "ug" + ], + "title": "Uganda" + }, + { + "type": "string", + "enum": [ + "ua" + ], + "title": "Ukraine" + }, + { + "type": "string", + "enum": [ + "uy" + ], + "title": "Uruguay" + }, + { + "type": "string", + "enum": [ + "us" + ], + "title": "United States" + }, + { + "type": "string", + "enum": [ + "uz" + ], + "title": "Uzbekistan" + }, + { + "type": "string", + "enum": [ + "va" + ], + "title": "Vatican City" + }, + { + "type": "string", + "enum": [ + "vc" + ], + "title": "Saint Vincent and the Grenadines" + }, + { + "type": "string", + "enum": [ + "ve" + ], + "title": "Venezuela" + }, + { + "type": "string", + "enum": [ + "vn" + ], + "title": "Vietnam" + }, + { + "type": "string", + "enum": [ + "vu" + ], + "title": "Vanuatu" + }, + { + "type": "string", + "enum": [ + "ws" + ], + "title": "Samoa" + }, + { + "type": "string", + "enum": [ + "ye" + ], + "title": "Yemen" + }, + { + "type": "string", + "enum": [ + "za" + ], + "title": "South Africa" + }, + { + "type": "string", + "enum": [ + "zm" + ], + "title": "Zambia" + }, + { + "type": "string", + "enum": [ + "zw" + ], + "title": "Zimbabwe" + } + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 400 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 400 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/initials": { + "get": { + "summary": "Get user initials", + "operationId": "avatarsGetInitials", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<NAME>", + "default": "" + }, + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "schema": { + "type": "string", + "example": "FFFFFF", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/photo": { + "get": { + "summary": "Get user photo", + "operationId": "avatarsGetPhoto", + "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.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-photo.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "width", + "description": "Output image width in pixels. Pass an integer between 0 and 2000. Defaults to 256.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 256 + }, + "in": "query" + }, + { + "name": "height", + "description": "Output image height in pixels. Pass an integer between 0 and 2000. Defaults to 256.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 256 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Output image quality between 0 and 100. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 100 + }, + "in": "query" + }, + { + "name": "output", + "description": "Output image format. Defaults to 'png'.", + "required": false, + "schema": { + "type": "string", + "example": "png", + "default": "png" + }, + "in": "query" + }, + { + "name": "rating", + "description": "Maximum image rating to fetch from Gravatar\/Libravatar. Defaults to 'g'.", + "required": false, + "schema": { + "type": "string", + "example": "g", + "default": "g" + }, + "in": "query" + }, + { + "name": "userId", + "description": "User ID to resolve the photo for. Pass 'current()' for the currently authenticated user. When omitted, the session user is used only if no emailHash and no name is passed.", + "required": false, + "schema": { + "type": "string", + "example": "current()", + "default": "" + }, + "in": "query" + }, + { + "name": "emailHash", + "description": "SHA256 hash of the lowercase, trimmed email address to look up on Gravatar and Libravatar instead of the user's own email. Pass the hash, never the address itself.", + "required": false, + "schema": { + "type": "string", + "example": "<EMAIL_HASH>", + "default": "" + }, + "in": "query" + }, + { + "name": "name", + "description": "Name to render initials from instead of the user's own name. Max length: 128 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<NAME>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/qr": { + "get": { + "summary": "Get QR code", + "operationId": "avatarsGetQR", + "tags": [ + "avatars" + ], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "schema": { + "type": "string", + "example": "<TEXT>" + }, + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 400 + }, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": false + }, + "in": "query" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "schema": { + "type": "object", + "default": {}, + "example": { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + } + }, + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1920, + "default": 1280 + }, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1080, + "default": 720 + }, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "example": 2, + "default": 1 + }, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "schema": { + "type": "string", + "example": "dark", + "title": "BrowserTheme", + "oneOf": [ + { + "type": "string", + "enum": [ + "light" + ], + "title": "light" + }, + { + "type": "string", + "enum": [ + "dark" + ], + "title": "dark" + } + ], + "default": "light" + }, + "in": "query" + }, + { + "name": "userAgent", + "description": "Custom user agent string. Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", + "default": "" + }, + "in": "query" + }, + { + "name": "fullpage", + "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "example": true, + "default": false + }, + "in": "query" + }, + { + "name": "locale", + "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "example": "en-US", + "default": "" + }, + "in": "query" + }, + { + "name": "timezone", + "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "example": "America\/New_York", + "title": "Timezone", + "oneOf": [ + { + "type": "string", + "enum": [ + "africa\/abidjan" + ], + "title": "africa\/abidjan" + }, + { + "type": "string", + "enum": [ + "africa\/accra" + ], + "title": "africa\/accra" + }, + { + "type": "string", + "enum": [ + "africa\/addis_ababa" + ], + "title": "africa\/addis_ababa" + }, + { + "type": "string", + "enum": [ + "africa\/algiers" + ], + "title": "africa\/algiers" + }, + { + "type": "string", + "enum": [ + "africa\/asmara" + ], + "title": "africa\/asmara" + }, + { + "type": "string", + "enum": [ + "africa\/bamako" + ], + "title": "africa\/bamako" + }, + { + "type": "string", + "enum": [ + "africa\/bangui" + ], + "title": "africa\/bangui" + }, + { + "type": "string", + "enum": [ + "africa\/banjul" + ], + "title": "africa\/banjul" + }, + { + "type": "string", + "enum": [ + "africa\/bissau" + ], + "title": "africa\/bissau" + }, + { + "type": "string", + "enum": [ + "africa\/blantyre" + ], + "title": "africa\/blantyre" + }, + { + "type": "string", + "enum": [ + "africa\/brazzaville" + ], + "title": "africa\/brazzaville" + }, + { + "type": "string", + "enum": [ + "africa\/bujumbura" + ], + "title": "africa\/bujumbura" + }, + { + "type": "string", + "enum": [ + "africa\/cairo" + ], + "title": "africa\/cairo" + }, + { + "type": "string", + "enum": [ + "africa\/casablanca" + ], + "title": "africa\/casablanca" + }, + { + "type": "string", + "enum": [ + "africa\/ceuta" + ], + "title": "africa\/ceuta" + }, + { + "type": "string", + "enum": [ + "africa\/conakry" + ], + "title": "africa\/conakry" + }, + { + "type": "string", + "enum": [ + "africa\/dakar" + ], + "title": "africa\/dakar" + }, + { + "type": "string", + "enum": [ + "africa\/dar_es_salaam" + ], + "title": "africa\/dar_es_salaam" + }, + { + "type": "string", + "enum": [ + "africa\/djibouti" + ], + "title": "africa\/djibouti" + }, + { + "type": "string", + "enum": [ + "africa\/douala" + ], + "title": "africa\/douala" + }, + { + "type": "string", + "enum": [ + "africa\/el_aaiun" + ], + "title": "africa\/el_aaiun" + }, + { + "type": "string", + "enum": [ + "africa\/freetown" + ], + "title": "africa\/freetown" + }, + { + "type": "string", + "enum": [ + "africa\/gaborone" + ], + "title": "africa\/gaborone" + }, + { + "type": "string", + "enum": [ + "africa\/harare" + ], + "title": "africa\/harare" + }, + { + "type": "string", + "enum": [ + "africa\/johannesburg" + ], + "title": "africa\/johannesburg" + }, + { + "type": "string", + "enum": [ + "africa\/juba" + ], + "title": "africa\/juba" + }, + { + "type": "string", + "enum": [ + "africa\/kampala" + ], + "title": "africa\/kampala" + }, + { + "type": "string", + "enum": [ + "africa\/khartoum" + ], + "title": "africa\/khartoum" + }, + { + "type": "string", + "enum": [ + "africa\/kigali" + ], + "title": "africa\/kigali" + }, + { + "type": "string", + "enum": [ + "africa\/kinshasa" + ], + "title": "africa\/kinshasa" + }, + { + "type": "string", + "enum": [ + "africa\/lagos" + ], + "title": "africa\/lagos" + }, + { + "type": "string", + "enum": [ + "africa\/libreville" + ], + "title": "africa\/libreville" + }, + { + "type": "string", + "enum": [ + "africa\/lome" + ], + "title": "africa\/lome" + }, + { + "type": "string", + "enum": [ + "africa\/luanda" + ], + "title": "africa\/luanda" + }, + { + "type": "string", + "enum": [ + "africa\/lubumbashi" + ], + "title": "africa\/lubumbashi" + }, + { + "type": "string", + "enum": [ + "africa\/lusaka" + ], + "title": "africa\/lusaka" + }, + { + "type": "string", + "enum": [ + "africa\/malabo" + ], + "title": "africa\/malabo" + }, + { + "type": "string", + "enum": [ + "africa\/maputo" + ], + "title": "africa\/maputo" + }, + { + "type": "string", + "enum": [ + "africa\/maseru" + ], + "title": "africa\/maseru" + }, + { + "type": "string", + "enum": [ + "africa\/mbabane" + ], + "title": "africa\/mbabane" + }, + { + "type": "string", + "enum": [ + "africa\/mogadishu" + ], + "title": "africa\/mogadishu" + }, + { + "type": "string", + "enum": [ + "africa\/monrovia" + ], + "title": "africa\/monrovia" + }, + { + "type": "string", + "enum": [ + "africa\/nairobi" + ], + "title": "africa\/nairobi" + }, + { + "type": "string", + "enum": [ + "africa\/ndjamena" + ], + "title": "africa\/ndjamena" + }, + { + "type": "string", + "enum": [ + "africa\/niamey" + ], + "title": "africa\/niamey" + }, + { + "type": "string", + "enum": [ + "africa\/nouakchott" + ], + "title": "africa\/nouakchott" + }, + { + "type": "string", + "enum": [ + "africa\/ouagadougou" + ], + "title": "africa\/ouagadougou" + }, + { + "type": "string", + "enum": [ + "africa\/porto-novo" + ], + "title": "africa\/porto-novo" + }, + { + "type": "string", + "enum": [ + "africa\/sao_tome" + ], + "title": "africa\/sao_tome" + }, + { + "type": "string", + "enum": [ + "africa\/tripoli" + ], + "title": "africa\/tripoli" + }, + { + "type": "string", + "enum": [ + "africa\/tunis" + ], + "title": "africa\/tunis" + }, + { + "type": "string", + "enum": [ + "africa\/windhoek" + ], + "title": "africa\/windhoek" + }, + { + "type": "string", + "enum": [ + "america\/adak" + ], + "title": "america\/adak" + }, + { + "type": "string", + "enum": [ + "america\/anchorage" + ], + "title": "america\/anchorage" + }, + { + "type": "string", + "enum": [ + "america\/anguilla" + ], + "title": "america\/anguilla" + }, + { + "type": "string", + "enum": [ + "america\/antigua" + ], + "title": "america\/antigua" + }, + { + "type": "string", + "enum": [ + "america\/araguaina" + ], + "title": "america\/araguaina" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/buenos_aires" + ], + "title": "america\/argentina\/buenos_aires" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/catamarca" + ], + "title": "america\/argentina\/catamarca" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/cordoba" + ], + "title": "america\/argentina\/cordoba" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/jujuy" + ], + "title": "america\/argentina\/jujuy" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/la_rioja" + ], + "title": "america\/argentina\/la_rioja" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/mendoza" + ], + "title": "america\/argentina\/mendoza" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/rio_gallegos" + ], + "title": "america\/argentina\/rio_gallegos" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/salta" + ], + "title": "america\/argentina\/salta" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/san_juan" + ], + "title": "america\/argentina\/san_juan" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/san_luis" + ], + "title": "america\/argentina\/san_luis" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/tucuman" + ], + "title": "america\/argentina\/tucuman" + }, + { + "type": "string", + "enum": [ + "america\/argentina\/ushuaia" + ], + "title": "america\/argentina\/ushuaia" + }, + { + "type": "string", + "enum": [ + "america\/aruba" + ], + "title": "america\/aruba" + }, + { + "type": "string", + "enum": [ + "america\/asuncion" + ], + "title": "america\/asuncion" + }, + { + "type": "string", + "enum": [ + "america\/atikokan" + ], + "title": "america\/atikokan" + }, + { + "type": "string", + "enum": [ + "america\/bahia" + ], + "title": "america\/bahia" + }, + { + "type": "string", + "enum": [ + "america\/bahia_banderas" + ], + "title": "america\/bahia_banderas" + }, + { + "type": "string", + "enum": [ + "america\/barbados" + ], + "title": "america\/barbados" + }, + { + "type": "string", + "enum": [ + "america\/belem" + ], + "title": "america\/belem" + }, + { + "type": "string", + "enum": [ + "america\/belize" + ], + "title": "america\/belize" + }, + { + "type": "string", + "enum": [ + "america\/blanc-sablon" + ], + "title": "america\/blanc-sablon" + }, + { + "type": "string", + "enum": [ + "america\/boa_vista" + ], + "title": "america\/boa_vista" + }, + { + "type": "string", + "enum": [ + "america\/bogota" + ], + "title": "america\/bogota" + }, + { + "type": "string", + "enum": [ + "america\/boise" + ], + "title": "america\/boise" + }, + { + "type": "string", + "enum": [ + "america\/cambridge_bay" + ], + "title": "america\/cambridge_bay" + }, + { + "type": "string", + "enum": [ + "america\/campo_grande" + ], + "title": "america\/campo_grande" + }, + { + "type": "string", + "enum": [ + "america\/cancun" + ], + "title": "america\/cancun" + }, + { + "type": "string", + "enum": [ + "america\/caracas" + ], + "title": "america\/caracas" + }, + { + "type": "string", + "enum": [ + "america\/cayenne" + ], + "title": "america\/cayenne" + }, + { + "type": "string", + "enum": [ + "america\/cayman" + ], + "title": "america\/cayman" + }, + { + "type": "string", + "enum": [ + "america\/chicago" + ], + "title": "america\/chicago" + }, + { + "type": "string", + "enum": [ + "america\/chihuahua" + ], + "title": "america\/chihuahua" + }, + { + "type": "string", + "enum": [ + "america\/ciudad_juarez" + ], + "title": "america\/ciudad_juarez" + }, + { + "type": "string", + "enum": [ + "america\/costa_rica" + ], + "title": "america\/costa_rica" + }, + { + "type": "string", + "enum": [ + "america\/coyhaique" + ], + "title": "america\/coyhaique" + }, + { + "type": "string", + "enum": [ + "america\/creston" + ], + "title": "america\/creston" + }, + { + "type": "string", + "enum": [ + "america\/cuiaba" + ], + "title": "america\/cuiaba" + }, + { + "type": "string", + "enum": [ + "america\/curacao" + ], + "title": "america\/curacao" + }, + { + "type": "string", + "enum": [ + "america\/danmarkshavn" + ], + "title": "america\/danmarkshavn" + }, + { + "type": "string", + "enum": [ + "america\/dawson" + ], + "title": "america\/dawson" + }, + { + "type": "string", + "enum": [ + "america\/dawson_creek" + ], + "title": "america\/dawson_creek" + }, + { + "type": "string", + "enum": [ + "america\/denver" + ], + "title": "america\/denver" + }, + { + "type": "string", + "enum": [ + "america\/detroit" + ], + "title": "america\/detroit" + }, + { + "type": "string", + "enum": [ + "america\/dominica" + ], + "title": "america\/dominica" + }, + { + "type": "string", + "enum": [ + "america\/edmonton" + ], + "title": "america\/edmonton" + }, + { + "type": "string", + "enum": [ + "america\/eirunepe" + ], + "title": "america\/eirunepe" + }, + { + "type": "string", + "enum": [ + "america\/el_salvador" + ], + "title": "america\/el_salvador" + }, + { + "type": "string", + "enum": [ + "america\/fort_nelson" + ], + "title": "america\/fort_nelson" + }, + { + "type": "string", + "enum": [ + "america\/fortaleza" + ], + "title": "america\/fortaleza" + }, + { + "type": "string", + "enum": [ + "america\/glace_bay" + ], + "title": "america\/glace_bay" + }, + { + "type": "string", + "enum": [ + "america\/goose_bay" + ], + "title": "america\/goose_bay" + }, + { + "type": "string", + "enum": [ + "america\/grand_turk" + ], + "title": "america\/grand_turk" + }, + { + "type": "string", + "enum": [ + "america\/grenada" + ], + "title": "america\/grenada" + }, + { + "type": "string", + "enum": [ + "america\/guadeloupe" + ], + "title": "america\/guadeloupe" + }, + { + "type": "string", + "enum": [ + "america\/guatemala" + ], + "title": "america\/guatemala" + }, + { + "type": "string", + "enum": [ + "america\/guayaquil" + ], + "title": "america\/guayaquil" + }, + { + "type": "string", + "enum": [ + "america\/guyana" + ], + "title": "america\/guyana" + }, + { + "type": "string", + "enum": [ + "america\/halifax" + ], + "title": "america\/halifax" + }, + { + "type": "string", + "enum": [ + "america\/havana" + ], + "title": "america\/havana" + }, + { + "type": "string", + "enum": [ + "america\/hermosillo" + ], + "title": "america\/hermosillo" + }, + { + "type": "string", + "enum": [ + "america\/indiana\/indianapolis" + ], + "title": "america\/indiana\/indianapolis" + }, + { + "type": "string", + "enum": [ + "america\/indiana\/knox" + ], + "title": "america\/indiana\/knox" + }, + { + "type": "string", + "enum": [ + "america\/indiana\/marengo" + ], + "title": "america\/indiana\/marengo" + }, + { + "type": "string", + "enum": [ + "america\/indiana\/petersburg" + ], + "title": "america\/indiana\/petersburg" + }, + { + "type": "string", + "enum": [ + "america\/indiana\/tell_city" + ], + "title": "america\/indiana\/tell_city" + }, + { + "type": "string", + "enum": [ + "america\/indiana\/vevay" + ], + "title": "america\/indiana\/vevay" + }, + { + "type": "string", + "enum": [ + "america\/indiana\/vincennes" + ], + "title": "america\/indiana\/vincennes" + }, + { + "type": "string", + "enum": [ + "america\/indiana\/winamac" + ], + "title": "america\/indiana\/winamac" + }, + { + "type": "string", + "enum": [ + "america\/inuvik" + ], + "title": "america\/inuvik" + }, + { + "type": "string", + "enum": [ + "america\/iqaluit" + ], + "title": "america\/iqaluit" + }, + { + "type": "string", + "enum": [ + "america\/jamaica" + ], + "title": "america\/jamaica" + }, + { + "type": "string", + "enum": [ + "america\/juneau" + ], + "title": "america\/juneau" + }, + { + "type": "string", + "enum": [ + "america\/kentucky\/louisville" + ], + "title": "america\/kentucky\/louisville" + }, + { + "type": "string", + "enum": [ + "america\/kentucky\/monticello" + ], + "title": "america\/kentucky\/monticello" + }, + { + "type": "string", + "enum": [ + "america\/kralendijk" + ], + "title": "america\/kralendijk" + }, + { + "type": "string", + "enum": [ + "america\/la_paz" + ], + "title": "america\/la_paz" + }, + { + "type": "string", + "enum": [ + "america\/lima" + ], + "title": "america\/lima" + }, + { + "type": "string", + "enum": [ + "america\/los_angeles" + ], + "title": "america\/los_angeles" + }, + { + "type": "string", + "enum": [ + "america\/lower_princes" + ], + "title": "america\/lower_princes" + }, + { + "type": "string", + "enum": [ + "america\/maceio" + ], + "title": "america\/maceio" + }, + { + "type": "string", + "enum": [ + "america\/managua" + ], + "title": "america\/managua" + }, + { + "type": "string", + "enum": [ + "america\/manaus" + ], + "title": "america\/manaus" + }, + { + "type": "string", + "enum": [ + "america\/marigot" + ], + "title": "america\/marigot" + }, + { + "type": "string", + "enum": [ + "america\/martinique" + ], + "title": "america\/martinique" + }, + { + "type": "string", + "enum": [ + "america\/matamoros" + ], + "title": "america\/matamoros" + }, + { + "type": "string", + "enum": [ + "america\/mazatlan" + ], + "title": "america\/mazatlan" + }, + { + "type": "string", + "enum": [ + "america\/menominee" + ], + "title": "america\/menominee" + }, + { + "type": "string", + "enum": [ + "america\/merida" + ], + "title": "america\/merida" + }, + { + "type": "string", + "enum": [ + "america\/metlakatla" + ], + "title": "america\/metlakatla" + }, + { + "type": "string", + "enum": [ + "america\/mexico_city" + ], + "title": "america\/mexico_city" + }, + { + "type": "string", + "enum": [ + "america\/miquelon" + ], + "title": "america\/miquelon" + }, + { + "type": "string", + "enum": [ + "america\/moncton" + ], + "title": "america\/moncton" + }, + { + "type": "string", + "enum": [ + "america\/monterrey" + ], + "title": "america\/monterrey" + }, + { + "type": "string", + "enum": [ + "america\/montevideo" + ], + "title": "america\/montevideo" + }, + { + "type": "string", + "enum": [ + "america\/montserrat" + ], + "title": "america\/montserrat" + }, + { + "type": "string", + "enum": [ + "america\/nassau" + ], + "title": "america\/nassau" + }, + { + "type": "string", + "enum": [ + "america\/new_york" + ], + "title": "america\/new_york" + }, + { + "type": "string", + "enum": [ + "america\/nome" + ], + "title": "america\/nome" + }, + { + "type": "string", + "enum": [ + "america\/noronha" + ], + "title": "america\/noronha" + }, + { + "type": "string", + "enum": [ + "america\/north_dakota\/beulah" + ], + "title": "america\/north_dakota\/beulah" + }, + { + "type": "string", + "enum": [ + "america\/north_dakota\/center" + ], + "title": "america\/north_dakota\/center" + }, + { + "type": "string", + "enum": [ + "america\/north_dakota\/new_salem" + ], + "title": "america\/north_dakota\/new_salem" + }, + { + "type": "string", + "enum": [ + "america\/nuuk" + ], + "title": "america\/nuuk" + }, + { + "type": "string", + "enum": [ + "america\/ojinaga" + ], + "title": "america\/ojinaga" + }, + { + "type": "string", + "enum": [ + "america\/panama" + ], + "title": "america\/panama" + }, + { + "type": "string", + "enum": [ + "america\/paramaribo" + ], + "title": "america\/paramaribo" + }, + { + "type": "string", + "enum": [ + "america\/phoenix" + ], + "title": "america\/phoenix" + }, + { + "type": "string", + "enum": [ + "america\/port-au-prince" + ], + "title": "america\/port-au-prince" + }, + { + "type": "string", + "enum": [ + "america\/port_of_spain" + ], + "title": "america\/port_of_spain" + }, + { + "type": "string", + "enum": [ + "america\/porto_velho" + ], + "title": "america\/porto_velho" + }, + { + "type": "string", + "enum": [ + "america\/puerto_rico" + ], + "title": "america\/puerto_rico" + }, + { + "type": "string", + "enum": [ + "america\/punta_arenas" + ], + "title": "america\/punta_arenas" + }, + { + "type": "string", + "enum": [ + "america\/rankin_inlet" + ], + "title": "america\/rankin_inlet" + }, + { + "type": "string", + "enum": [ + "america\/recife" + ], + "title": "america\/recife" + }, + { + "type": "string", + "enum": [ + "america\/regina" + ], + "title": "america\/regina" + }, + { + "type": "string", + "enum": [ + "america\/resolute" + ], + "title": "america\/resolute" + }, + { + "type": "string", + "enum": [ + "america\/rio_branco" + ], + "title": "america\/rio_branco" + }, + { + "type": "string", + "enum": [ + "america\/santarem" + ], + "title": "america\/santarem" + }, + { + "type": "string", + "enum": [ + "america\/santiago" + ], + "title": "america\/santiago" + }, + { + "type": "string", + "enum": [ + "america\/santo_domingo" + ], + "title": "america\/santo_domingo" + }, + { + "type": "string", + "enum": [ + "america\/sao_paulo" + ], + "title": "america\/sao_paulo" + }, + { + "type": "string", + "enum": [ + "america\/scoresbysund" + ], + "title": "america\/scoresbysund" + }, + { + "type": "string", + "enum": [ + "america\/sitka" + ], + "title": "america\/sitka" + }, + { + "type": "string", + "enum": [ + "america\/st_barthelemy" + ], + "title": "america\/st_barthelemy" + }, + { + "type": "string", + "enum": [ + "america\/st_johns" + ], + "title": "america\/st_johns" + }, + { + "type": "string", + "enum": [ + "america\/st_kitts" + ], + "title": "america\/st_kitts" + }, + { + "type": "string", + "enum": [ + "america\/st_lucia" + ], + "title": "america\/st_lucia" + }, + { + "type": "string", + "enum": [ + "america\/st_thomas" + ], + "title": "america\/st_thomas" + }, + { + "type": "string", + "enum": [ + "america\/st_vincent" + ], + "title": "america\/st_vincent" + }, + { + "type": "string", + "enum": [ + "america\/swift_current" + ], + "title": "america\/swift_current" + }, + { + "type": "string", + "enum": [ + "america\/tegucigalpa" + ], + "title": "america\/tegucigalpa" + }, + { + "type": "string", + "enum": [ + "america\/thule" + ], + "title": "america\/thule" + }, + { + "type": "string", + "enum": [ + "america\/tijuana" + ], + "title": "america\/tijuana" + }, + { + "type": "string", + "enum": [ + "america\/toronto" + ], + "title": "america\/toronto" + }, + { + "type": "string", + "enum": [ + "america\/tortola" + ], + "title": "america\/tortola" + }, + { + "type": "string", + "enum": [ + "america\/vancouver" + ], + "title": "america\/vancouver" + }, + { + "type": "string", + "enum": [ + "america\/whitehorse" + ], + "title": "america\/whitehorse" + }, + { + "type": "string", + "enum": [ + "america\/winnipeg" + ], + "title": "america\/winnipeg" + }, + { + "type": "string", + "enum": [ + "america\/yakutat" + ], + "title": "america\/yakutat" + }, + { + "type": "string", + "enum": [ + "antarctica\/casey" + ], + "title": "antarctica\/casey" + }, + { + "type": "string", + "enum": [ + "antarctica\/davis" + ], + "title": "antarctica\/davis" + }, + { + "type": "string", + "enum": [ + "antarctica\/dumontdurville" + ], + "title": "antarctica\/dumontdurville" + }, + { + "type": "string", + "enum": [ + "antarctica\/macquarie" + ], + "title": "antarctica\/macquarie" + }, + { + "type": "string", + "enum": [ + "antarctica\/mawson" + ], + "title": "antarctica\/mawson" + }, + { + "type": "string", + "enum": [ + "antarctica\/mcmurdo" + ], + "title": "antarctica\/mcmurdo" + }, + { + "type": "string", + "enum": [ + "antarctica\/palmer" + ], + "title": "antarctica\/palmer" + }, + { + "type": "string", + "enum": [ + "antarctica\/rothera" + ], + "title": "antarctica\/rothera" + }, + { + "type": "string", + "enum": [ + "antarctica\/syowa" + ], + "title": "antarctica\/syowa" + }, + { + "type": "string", + "enum": [ + "antarctica\/troll" + ], + "title": "antarctica\/troll" + }, + { + "type": "string", + "enum": [ + "antarctica\/vostok" + ], + "title": "antarctica\/vostok" + }, + { + "type": "string", + "enum": [ + "arctic\/longyearbyen" + ], + "title": "arctic\/longyearbyen" + }, + { + "type": "string", + "enum": [ + "asia\/aden" + ], + "title": "asia\/aden" + }, + { + "type": "string", + "enum": [ + "asia\/almaty" + ], + "title": "asia\/almaty" + }, + { + "type": "string", + "enum": [ + "asia\/amman" + ], + "title": "asia\/amman" + }, + { + "type": "string", + "enum": [ + "asia\/anadyr" + ], + "title": "asia\/anadyr" + }, + { + "type": "string", + "enum": [ + "asia\/aqtau" + ], + "title": "asia\/aqtau" + }, + { + "type": "string", + "enum": [ + "asia\/aqtobe" + ], + "title": "asia\/aqtobe" + }, + { + "type": "string", + "enum": [ + "asia\/ashgabat" + ], + "title": "asia\/ashgabat" + }, + { + "type": "string", + "enum": [ + "asia\/atyrau" + ], + "title": "asia\/atyrau" + }, + { + "type": "string", + "enum": [ + "asia\/baghdad" + ], + "title": "asia\/baghdad" + }, + { + "type": "string", + "enum": [ + "asia\/bahrain" + ], + "title": "asia\/bahrain" + }, + { + "type": "string", + "enum": [ + "asia\/baku" + ], + "title": "asia\/baku" + }, + { + "type": "string", + "enum": [ + "asia\/bangkok" + ], + "title": "asia\/bangkok" + }, + { + "type": "string", + "enum": [ + "asia\/barnaul" + ], + "title": "asia\/barnaul" + }, + { + "type": "string", + "enum": [ + "asia\/beirut" + ], + "title": "asia\/beirut" + }, + { + "type": "string", + "enum": [ + "asia\/bishkek" + ], + "title": "asia\/bishkek" + }, + { + "type": "string", + "enum": [ + "asia\/brunei" + ], + "title": "asia\/brunei" + }, + { + "type": "string", + "enum": [ + "asia\/chita" + ], + "title": "asia\/chita" + }, + { + "type": "string", + "enum": [ + "asia\/colombo" + ], + "title": "asia\/colombo" + }, + { + "type": "string", + "enum": [ + "asia\/damascus" + ], + "title": "asia\/damascus" + }, + { + "type": "string", + "enum": [ + "asia\/dhaka" + ], + "title": "asia\/dhaka" + }, + { + "type": "string", + "enum": [ + "asia\/dili" + ], + "title": "asia\/dili" + }, + { + "type": "string", + "enum": [ + "asia\/dubai" + ], + "title": "asia\/dubai" + }, + { + "type": "string", + "enum": [ + "asia\/dushanbe" + ], + "title": "asia\/dushanbe" + }, + { + "type": "string", + "enum": [ + "asia\/famagusta" + ], + "title": "asia\/famagusta" + }, + { + "type": "string", + "enum": [ + "asia\/gaza" + ], + "title": "asia\/gaza" + }, + { + "type": "string", + "enum": [ + "asia\/hebron" + ], + "title": "asia\/hebron" + }, + { + "type": "string", + "enum": [ + "asia\/ho_chi_minh" + ], + "title": "asia\/ho_chi_minh" + }, + { + "type": "string", + "enum": [ + "asia\/hong_kong" + ], + "title": "asia\/hong_kong" + }, + { + "type": "string", + "enum": [ + "asia\/hovd" + ], + "title": "asia\/hovd" + }, + { + "type": "string", + "enum": [ + "asia\/irkutsk" + ], + "title": "asia\/irkutsk" + }, + { + "type": "string", + "enum": [ + "asia\/jakarta" + ], + "title": "asia\/jakarta" + }, + { + "type": "string", + "enum": [ + "asia\/jayapura" + ], + "title": "asia\/jayapura" + }, + { + "type": "string", + "enum": [ + "asia\/jerusalem" + ], + "title": "asia\/jerusalem" + }, + { + "type": "string", + "enum": [ + "asia\/kabul" + ], + "title": "asia\/kabul" + }, + { + "type": "string", + "enum": [ + "asia\/kamchatka" + ], + "title": "asia\/kamchatka" + }, + { + "type": "string", + "enum": [ + "asia\/karachi" + ], + "title": "asia\/karachi" + }, + { + "type": "string", + "enum": [ + "asia\/kathmandu" + ], + "title": "asia\/kathmandu" + }, + { + "type": "string", + "enum": [ + "asia\/khandyga" + ], + "title": "asia\/khandyga" + }, + { + "type": "string", + "enum": [ + "asia\/kolkata" + ], + "title": "asia\/kolkata" + }, + { + "type": "string", + "enum": [ + "asia\/krasnoyarsk" + ], + "title": "asia\/krasnoyarsk" + }, + { + "type": "string", + "enum": [ + "asia\/kuala_lumpur" + ], + "title": "asia\/kuala_lumpur" + }, + { + "type": "string", + "enum": [ + "asia\/kuching" + ], + "title": "asia\/kuching" + }, + { + "type": "string", + "enum": [ + "asia\/kuwait" + ], + "title": "asia\/kuwait" + }, + { + "type": "string", + "enum": [ + "asia\/macau" + ], + "title": "asia\/macau" + }, + { + "type": "string", + "enum": [ + "asia\/magadan" + ], + "title": "asia\/magadan" + }, + { + "type": "string", + "enum": [ + "asia\/makassar" + ], + "title": "asia\/makassar" + }, + { + "type": "string", + "enum": [ + "asia\/manila" + ], + "title": "asia\/manila" + }, + { + "type": "string", + "enum": [ + "asia\/muscat" + ], + "title": "asia\/muscat" + }, + { + "type": "string", + "enum": [ + "asia\/nicosia" + ], + "title": "asia\/nicosia" + }, + { + "type": "string", + "enum": [ + "asia\/novokuznetsk" + ], + "title": "asia\/novokuznetsk" + }, + { + "type": "string", + "enum": [ + "asia\/novosibirsk" + ], + "title": "asia\/novosibirsk" + }, + { + "type": "string", + "enum": [ + "asia\/omsk" + ], + "title": "asia\/omsk" + }, + { + "type": "string", + "enum": [ + "asia\/oral" + ], + "title": "asia\/oral" + }, + { + "type": "string", + "enum": [ + "asia\/phnom_penh" + ], + "title": "asia\/phnom_penh" + }, + { + "type": "string", + "enum": [ + "asia\/pontianak" + ], + "title": "asia\/pontianak" + }, + { + "type": "string", + "enum": [ + "asia\/pyongyang" + ], + "title": "asia\/pyongyang" + }, + { + "type": "string", + "enum": [ + "asia\/qatar" + ], + "title": "asia\/qatar" + }, + { + "type": "string", + "enum": [ + "asia\/qostanay" + ], + "title": "asia\/qostanay" + }, + { + "type": "string", + "enum": [ + "asia\/qyzylorda" + ], + "title": "asia\/qyzylorda" + }, + { + "type": "string", + "enum": [ + "asia\/riyadh" + ], + "title": "asia\/riyadh" + }, + { + "type": "string", + "enum": [ + "asia\/sakhalin" + ], + "title": "asia\/sakhalin" + }, + { + "type": "string", + "enum": [ + "asia\/samarkand" + ], + "title": "asia\/samarkand" + }, + { + "type": "string", + "enum": [ + "asia\/seoul" + ], + "title": "asia\/seoul" + }, + { + "type": "string", + "enum": [ + "asia\/shanghai" + ], + "title": "asia\/shanghai" + }, + { + "type": "string", + "enum": [ + "asia\/singapore" + ], + "title": "asia\/singapore" + }, + { + "type": "string", + "enum": [ + "asia\/srednekolymsk" + ], + "title": "asia\/srednekolymsk" + }, + { + "type": "string", + "enum": [ + "asia\/taipei" + ], + "title": "asia\/taipei" + }, + { + "type": "string", + "enum": [ + "asia\/tashkent" + ], + "title": "asia\/tashkent" + }, + { + "type": "string", + "enum": [ + "asia\/tbilisi" + ], + "title": "asia\/tbilisi" + }, + { + "type": "string", + "enum": [ + "asia\/tehran" + ], + "title": "asia\/tehran" + }, + { + "type": "string", + "enum": [ + "asia\/thimphu" + ], + "title": "asia\/thimphu" + }, + { + "type": "string", + "enum": [ + "asia\/tokyo" + ], + "title": "asia\/tokyo" + }, + { + "type": "string", + "enum": [ + "asia\/tomsk" + ], + "title": "asia\/tomsk" + }, + { + "type": "string", + "enum": [ + "asia\/ulaanbaatar" + ], + "title": "asia\/ulaanbaatar" + }, + { + "type": "string", + "enum": [ + "asia\/urumqi" + ], + "title": "asia\/urumqi" + }, + { + "type": "string", + "enum": [ + "asia\/ust-nera" + ], + "title": "asia\/ust-nera" + }, + { + "type": "string", + "enum": [ + "asia\/vientiane" + ], + "title": "asia\/vientiane" + }, + { + "type": "string", + "enum": [ + "asia\/vladivostok" + ], + "title": "asia\/vladivostok" + }, + { + "type": "string", + "enum": [ + "asia\/yakutsk" + ], + "title": "asia\/yakutsk" + }, + { + "type": "string", + "enum": [ + "asia\/yangon" + ], + "title": "asia\/yangon" + }, + { + "type": "string", + "enum": [ + "asia\/yekaterinburg" + ], + "title": "asia\/yekaterinburg" + }, + { + "type": "string", + "enum": [ + "asia\/yerevan" + ], + "title": "asia\/yerevan" + }, + { + "type": "string", + "enum": [ + "atlantic\/azores" + ], + "title": "atlantic\/azores" + }, + { + "type": "string", + "enum": [ + "atlantic\/bermuda" + ], + "title": "atlantic\/bermuda" + }, + { + "type": "string", + "enum": [ + "atlantic\/canary" + ], + "title": "atlantic\/canary" + }, + { + "type": "string", + "enum": [ + "atlantic\/cape_verde" + ], + "title": "atlantic\/cape_verde" + }, + { + "type": "string", + "enum": [ + "atlantic\/faroe" + ], + "title": "atlantic\/faroe" + }, + { + "type": "string", + "enum": [ + "atlantic\/madeira" + ], + "title": "atlantic\/madeira" + }, + { + "type": "string", + "enum": [ + "atlantic\/reykjavik" + ], + "title": "atlantic\/reykjavik" + }, + { + "type": "string", + "enum": [ + "atlantic\/south_georgia" + ], + "title": "atlantic\/south_georgia" + }, + { + "type": "string", + "enum": [ + "atlantic\/st_helena" + ], + "title": "atlantic\/st_helena" + }, + { + "type": "string", + "enum": [ + "atlantic\/stanley" + ], + "title": "atlantic\/stanley" + }, + { + "type": "string", + "enum": [ + "australia\/adelaide" + ], + "title": "australia\/adelaide" + }, + { + "type": "string", + "enum": [ + "australia\/brisbane" + ], + "title": "australia\/brisbane" + }, + { + "type": "string", + "enum": [ + "australia\/broken_hill" + ], + "title": "australia\/broken_hill" + }, + { + "type": "string", + "enum": [ + "australia\/darwin" + ], + "title": "australia\/darwin" + }, + { + "type": "string", + "enum": [ + "australia\/eucla" + ], + "title": "australia\/eucla" + }, + { + "type": "string", + "enum": [ + "australia\/hobart" + ], + "title": "australia\/hobart" + }, + { + "type": "string", + "enum": [ + "australia\/lindeman" + ], + "title": "australia\/lindeman" + }, + { + "type": "string", + "enum": [ + "australia\/lord_howe" + ], + "title": "australia\/lord_howe" + }, + { + "type": "string", + "enum": [ + "australia\/melbourne" + ], + "title": "australia\/melbourne" + }, + { + "type": "string", + "enum": [ + "australia\/perth" + ], + "title": "australia\/perth" + }, + { + "type": "string", + "enum": [ + "australia\/sydney" + ], + "title": "australia\/sydney" + }, + { + "type": "string", + "enum": [ + "europe\/amsterdam" + ], + "title": "europe\/amsterdam" + }, + { + "type": "string", + "enum": [ + "europe\/andorra" + ], + "title": "europe\/andorra" + }, + { + "type": "string", + "enum": [ + "europe\/astrakhan" + ], + "title": "europe\/astrakhan" + }, + { + "type": "string", + "enum": [ + "europe\/athens" + ], + "title": "europe\/athens" + }, + { + "type": "string", + "enum": [ + "europe\/belgrade" + ], + "title": "europe\/belgrade" + }, + { + "type": "string", + "enum": [ + "europe\/berlin" + ], + "title": "europe\/berlin" + }, + { + "type": "string", + "enum": [ + "europe\/bratislava" + ], + "title": "europe\/bratislava" + }, + { + "type": "string", + "enum": [ + "europe\/brussels" + ], + "title": "europe\/brussels" + }, + { + "type": "string", + "enum": [ + "europe\/bucharest" + ], + "title": "europe\/bucharest" + }, + { + "type": "string", + "enum": [ + "europe\/budapest" + ], + "title": "europe\/budapest" + }, + { + "type": "string", + "enum": [ + "europe\/busingen" + ], + "title": "europe\/busingen" + }, + { + "type": "string", + "enum": [ + "europe\/chisinau" + ], + "title": "europe\/chisinau" + }, + { + "type": "string", + "enum": [ + "europe\/copenhagen" + ], + "title": "europe\/copenhagen" + }, + { + "type": "string", + "enum": [ + "europe\/dublin" + ], + "title": "europe\/dublin" + }, + { + "type": "string", + "enum": [ + "europe\/gibraltar" + ], + "title": "europe\/gibraltar" + }, + { + "type": "string", + "enum": [ + "europe\/guernsey" + ], + "title": "europe\/guernsey" + }, + { + "type": "string", + "enum": [ + "europe\/helsinki" + ], + "title": "europe\/helsinki" + }, + { + "type": "string", + "enum": [ + "europe\/isle_of_man" + ], + "title": "europe\/isle_of_man" + }, + { + "type": "string", + "enum": [ + "europe\/istanbul" + ], + "title": "europe\/istanbul" + }, + { + "type": "string", + "enum": [ + "europe\/jersey" + ], + "title": "europe\/jersey" + }, + { + "type": "string", + "enum": [ + "europe\/kaliningrad" + ], + "title": "europe\/kaliningrad" + }, + { + "type": "string", + "enum": [ + "europe\/kirov" + ], + "title": "europe\/kirov" + }, + { + "type": "string", + "enum": [ + "europe\/kyiv" + ], + "title": "europe\/kyiv" + }, + { + "type": "string", + "enum": [ + "europe\/lisbon" + ], + "title": "europe\/lisbon" + }, + { + "type": "string", + "enum": [ + "europe\/ljubljana" + ], + "title": "europe\/ljubljana" + }, + { + "type": "string", + "enum": [ + "europe\/london" + ], + "title": "europe\/london" + }, + { + "type": "string", + "enum": [ + "europe\/luxembourg" + ], + "title": "europe\/luxembourg" + }, + { + "type": "string", + "enum": [ + "europe\/madrid" + ], + "title": "europe\/madrid" + }, + { + "type": "string", + "enum": [ + "europe\/malta" + ], + "title": "europe\/malta" + }, + { + "type": "string", + "enum": [ + "europe\/mariehamn" + ], + "title": "europe\/mariehamn" + }, + { + "type": "string", + "enum": [ + "europe\/minsk" + ], + "title": "europe\/minsk" + }, + { + "type": "string", + "enum": [ + "europe\/monaco" + ], + "title": "europe\/monaco" + }, + { + "type": "string", + "enum": [ + "europe\/moscow" + ], + "title": "europe\/moscow" + }, + { + "type": "string", + "enum": [ + "europe\/oslo" + ], + "title": "europe\/oslo" + }, + { + "type": "string", + "enum": [ + "europe\/paris" + ], + "title": "europe\/paris" + }, + { + "type": "string", + "enum": [ + "europe\/podgorica" + ], + "title": "europe\/podgorica" + }, + { + "type": "string", + "enum": [ + "europe\/prague" + ], + "title": "europe\/prague" + }, + { + "type": "string", + "enum": [ + "europe\/riga" + ], + "title": "europe\/riga" + }, + { + "type": "string", + "enum": [ + "europe\/rome" + ], + "title": "europe\/rome" + }, + { + "type": "string", + "enum": [ + "europe\/samara" + ], + "title": "europe\/samara" + }, + { + "type": "string", + "enum": [ + "europe\/san_marino" + ], + "title": "europe\/san_marino" + }, + { + "type": "string", + "enum": [ + "europe\/sarajevo" + ], + "title": "europe\/sarajevo" + }, + { + "type": "string", + "enum": [ + "europe\/saratov" + ], + "title": "europe\/saratov" + }, + { + "type": "string", + "enum": [ + "europe\/simferopol" + ], + "title": "europe\/simferopol" + }, + { + "type": "string", + "enum": [ + "europe\/skopje" + ], + "title": "europe\/skopje" + }, + { + "type": "string", + "enum": [ + "europe\/sofia" + ], + "title": "europe\/sofia" + }, + { + "type": "string", + "enum": [ + "europe\/stockholm" + ], + "title": "europe\/stockholm" + }, + { + "type": "string", + "enum": [ + "europe\/tallinn" + ], + "title": "europe\/tallinn" + }, + { + "type": "string", + "enum": [ + "europe\/tirane" + ], + "title": "europe\/tirane" + }, + { + "type": "string", + "enum": [ + "europe\/ulyanovsk" + ], + "title": "europe\/ulyanovsk" + }, + { + "type": "string", + "enum": [ + "europe\/vaduz" + ], + "title": "europe\/vaduz" + }, + { + "type": "string", + "enum": [ + "europe\/vatican" + ], + "title": "europe\/vatican" + }, + { + "type": "string", + "enum": [ + "europe\/vienna" + ], + "title": "europe\/vienna" + }, + { + "type": "string", + "enum": [ + "europe\/vilnius" + ], + "title": "europe\/vilnius" + }, + { + "type": "string", + "enum": [ + "europe\/volgograd" + ], + "title": "europe\/volgograd" + }, + { + "type": "string", + "enum": [ + "europe\/warsaw" + ], + "title": "europe\/warsaw" + }, + { + "type": "string", + "enum": [ + "europe\/zagreb" + ], + "title": "europe\/zagreb" + }, + { + "type": "string", + "enum": [ + "europe\/zurich" + ], + "title": "europe\/zurich" + }, + { + "type": "string", + "enum": [ + "indian\/antananarivo" + ], + "title": "indian\/antananarivo" + }, + { + "type": "string", + "enum": [ + "indian\/chagos" + ], + "title": "indian\/chagos" + }, + { + "type": "string", + "enum": [ + "indian\/christmas" + ], + "title": "indian\/christmas" + }, + { + "type": "string", + "enum": [ + "indian\/cocos" + ], + "title": "indian\/cocos" + }, + { + "type": "string", + "enum": [ + "indian\/comoro" + ], + "title": "indian\/comoro" + }, + { + "type": "string", + "enum": [ + "indian\/kerguelen" + ], + "title": "indian\/kerguelen" + }, + { + "type": "string", + "enum": [ + "indian\/mahe" + ], + "title": "indian\/mahe" + }, + { + "type": "string", + "enum": [ + "indian\/maldives" + ], + "title": "indian\/maldives" + }, + { + "type": "string", + "enum": [ + "indian\/mauritius" + ], + "title": "indian\/mauritius" + }, + { + "type": "string", + "enum": [ + "indian\/mayotte" + ], + "title": "indian\/mayotte" + }, + { + "type": "string", + "enum": [ + "indian\/reunion" + ], + "title": "indian\/reunion" + }, + { + "type": "string", + "enum": [ + "pacific\/apia" + ], + "title": "pacific\/apia" + }, + { + "type": "string", + "enum": [ + "pacific\/auckland" + ], + "title": "pacific\/auckland" + }, + { + "type": "string", + "enum": [ + "pacific\/bougainville" + ], + "title": "pacific\/bougainville" + }, + { + "type": "string", + "enum": [ + "pacific\/chatham" + ], + "title": "pacific\/chatham" + }, + { + "type": "string", + "enum": [ + "pacific\/chuuk" + ], + "title": "pacific\/chuuk" + }, + { + "type": "string", + "enum": [ + "pacific\/easter" + ], + "title": "pacific\/easter" + }, + { + "type": "string", + "enum": [ + "pacific\/efate" + ], + "title": "pacific\/efate" + }, + { + "type": "string", + "enum": [ + "pacific\/fakaofo" + ], + "title": "pacific\/fakaofo" + }, + { + "type": "string", + "enum": [ + "pacific\/fiji" + ], + "title": "pacific\/fiji" + }, + { + "type": "string", + "enum": [ + "pacific\/funafuti" + ], + "title": "pacific\/funafuti" + }, + { + "type": "string", + "enum": [ + "pacific\/galapagos" + ], + "title": "pacific\/galapagos" + }, + { + "type": "string", + "enum": [ + "pacific\/gambier" + ], + "title": "pacific\/gambier" + }, + { + "type": "string", + "enum": [ + "pacific\/guadalcanal" + ], + "title": "pacific\/guadalcanal" + }, + { + "type": "string", + "enum": [ + "pacific\/guam" + ], + "title": "pacific\/guam" + }, + { + "type": "string", + "enum": [ + "pacific\/honolulu" + ], + "title": "pacific\/honolulu" + }, + { + "type": "string", + "enum": [ + "pacific\/kanton" + ], + "title": "pacific\/kanton" + }, + { + "type": "string", + "enum": [ + "pacific\/kiritimati" + ], + "title": "pacific\/kiritimati" + }, + { + "type": "string", + "enum": [ + "pacific\/kosrae" + ], + "title": "pacific\/kosrae" + }, + { + "type": "string", + "enum": [ + "pacific\/kwajalein" + ], + "title": "pacific\/kwajalein" + }, + { + "type": "string", + "enum": [ + "pacific\/majuro" + ], + "title": "pacific\/majuro" + }, + { + "type": "string", + "enum": [ + "pacific\/marquesas" + ], + "title": "pacific\/marquesas" + }, + { + "type": "string", + "enum": [ + "pacific\/midway" + ], + "title": "pacific\/midway" + }, + { + "type": "string", + "enum": [ + "pacific\/nauru" + ], + "title": "pacific\/nauru" + }, + { + "type": "string", + "enum": [ + "pacific\/niue" + ], + "title": "pacific\/niue" + }, + { + "type": "string", + "enum": [ + "pacific\/norfolk" + ], + "title": "pacific\/norfolk" + }, + { + "type": "string", + "enum": [ + "pacific\/noumea" + ], + "title": "pacific\/noumea" + }, + { + "type": "string", + "enum": [ + "pacific\/pago_pago" + ], + "title": "pacific\/pago_pago" + }, + { + "type": "string", + "enum": [ + "pacific\/palau" + ], + "title": "pacific\/palau" + }, + { + "type": "string", + "enum": [ + "pacific\/pitcairn" + ], + "title": "pacific\/pitcairn" + }, + { + "type": "string", + "enum": [ + "pacific\/pohnpei" + ], + "title": "pacific\/pohnpei" + }, + { + "type": "string", + "enum": [ + "pacific\/port_moresby" + ], + "title": "pacific\/port_moresby" + }, + { + "type": "string", + "enum": [ + "pacific\/rarotonga" + ], + "title": "pacific\/rarotonga" + }, + { + "type": "string", + "enum": [ + "pacific\/saipan" + ], + "title": "pacific\/saipan" + }, + { + "type": "string", + "enum": [ + "pacific\/tahiti" + ], + "title": "pacific\/tahiti" + }, + { + "type": "string", + "enum": [ + "pacific\/tarawa" + ], + "title": "pacific\/tarawa" + }, + { + "type": "string", + "enum": [ + "pacific\/tongatapu" + ], + "title": "pacific\/tongatapu" + }, + { + "type": "string", + "enum": [ + "pacific\/wake" + ], + "title": "pacific\/wake" + }, + { + "type": "string", + "enum": [ + "pacific\/wallis" + ], + "title": "pacific\/wallis" + }, + { + "type": "string", + "enum": [ + "utc" + ], + "title": "utc" + } + ] + }, + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "example": 37.7749, + "default": 0 + }, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "example": -122.4194, + "default": 0 + }, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "example": 100, + "default": 0 + }, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "example": true, + "default": false + }, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "schema": { + "type": "array", + "items": { + "title": "BrowserPermission", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "geolocation" + ], + "title": "geolocation" + }, + { + "type": "string", + "enum": [ + "camera" + ], + "title": "camera" + }, + { + "type": "string", + "enum": [ + "microphone" + ], + "title": "microphone" + }, + { + "type": "string", + "enum": [ + "notifications" + ], + "title": "notifications" + }, + { + "type": "string", + "enum": [ + "midi" + ], + "title": "midi" + }, + { + "type": "string", + "enum": [ + "push" + ], + "title": "push" + }, + { + "type": "string", + "enum": [ + "clipboard-read" + ], + "title": "clipboard-read" + }, + { + "type": "string", + "enum": [ + "clipboard-write" + ], + "title": "clipboard-write" + }, + { + "type": "string", + "enum": [ + "payment-handler" + ], + "title": "payment-handler" + }, + { + "type": "string", + "enum": [ + "usb" + ], + "title": "usb" + }, + { + "type": "string", + "enum": [ + "bluetooth" + ], + "title": "bluetooth" + }, + { + "type": "string", + "enum": [ + "accelerometer" + ], + "title": "accelerometer" + }, + { + "type": "string", + "enum": [ + "gyroscope" + ], + "title": "gyroscope" + }, + { + "type": "string", + "enum": [ + "magnetometer" + ], + "title": "magnetometer" + }, + { + "type": "string", + "enum": [ + "ambient-light-sensor" + ], + "title": "ambient-light-sensor" + }, + { + "type": "string", + "enum": [ + "background-sync" + ], + "title": "background-sync" + }, + { + "type": "string", + "enum": [ + "persistent-storage" + ], + "title": "persistent-storage" + }, + { + "type": "string", + "enum": [ + "screen-wake-lock" + ], + "title": "screen-wake-lock" + }, + { + "type": "string", + "enum": [ + "web-share" + ], + "title": "web-share" + }, + { + "type": "string", + "enum": [ + "xr-spatial-tracking" + ], + "title": "xr-spatial-tracking" + } + ] + }, + "example": [ + "geolocation", + "notifications" + ], + "default": [] + }, + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 3, + "default": 0 + }, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 800, + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 600, + "default": 0 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 85, + "default": -1 + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "example": "jpeg", + "title": "ImageFormat", + "oneOf": [ + { + "type": "string", + "enum": [ + "jpg" + ], + "title": "jpg" + }, + { + "type": "string", + "enum": [ + "jpeg" + ], + "title": "jpeg" + }, + { + "type": "string", + "enum": [ + "png" + ], + "title": "png" + }, + { + "type": "string", + "enum": [ + "webp" + ], + "title": "webp" + }, + { + "type": "string", + "enum": [ + "heic" + ], + "title": "heic" + }, + { + "type": "string", + "enum": [ + "avif" + ], + "title": "avif" + }, + { + "type": "string", + "enum": [ + "gif" + ], + "title": "gif" + } + ] + }, + "in": "query" + } + ] + } + }, + "\/backups\/archives": { + "get": { + "summary": "List archives", + "operationId": "backupsListArchives", + "tags": [ + "backups" + ], + "description": "List all archives for a project.", + "responses": { + "200": { + "description": "Backup archive list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupArchiveList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/list-archives.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "archives.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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create archive", + "operationId": "backupsCreateArchive", + "tags": [ + "backups" + ], + "description": "Create a new archive asynchronously for a project.", + "responses": { + "201": { + "description": "Archive", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupArchive" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/create-archive.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "archives.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": { + "services": { + "description": "Array of services to backup", + "type": "array", + "items": { + "title": "BackupServices", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "tablesdb" + ], + "title": "tablesdb" + }, + { + "type": "string", + "enum": [ + "documentsdb" + ], + "title": "documentsdb" + }, + { + "type": "string", + "enum": [ + "vectorsdb" + ], + "title": "vectorsdb" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases" + ], + "title": "dedicatedDatabases" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "storage" + ], + "title": "storage" + } + ] + } + }, + "resourceId": { + "description": "Resource ID. When set, only this single resource will be backed up.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + } + }, + "required": [ + "services" + ] + } + } + } + } + } + }, + "\/backups\/archives\/{archiveId}": { + "get": { + "summary": "Get backup archive", + "operationId": "backupsGetArchive", + "tags": [ + "backups" + ], + "description": "Get a backup archive using it's ID.", + "responses": { + "200": { + "description": "Archive", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupArchive" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/get-archive.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "archives.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "archiveId", + "description": "Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "example": "<ARCHIVE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete archive", + "operationId": "backupsDeleteArchive", + "tags": [ + "backups" + ], + "description": "Delete an existing archive for a project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/delete-archive.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "archives.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "archiveId", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "example": "<ARCHIVE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/backups\/policies": { + "get": { + "summary": "List backup policies", + "operationId": "backupsListPolicies", + "tags": [ + "backups" + ], + "description": "List all policies for a project.", + "responses": { + "200": { + "description": "Backup policy list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/list-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.read", + "backups.policies.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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup policy", + "operationId": "backupsCreatePolicy", + "tags": [ + "backups" + ], + "description": "Create a new backup policy.", + "responses": { + "201": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/create-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "backups.policies.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": { + "policyId": { + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<POLICY_ID>" + }, + "name": { + "description": "Policy name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "services": { + "description": "Array of services to backup", + "type": "array", + "items": { + "title": "BackupServices", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "tablesdb" + ], + "title": "tablesdb" + }, + { + "type": "string", + "enum": [ + "documentsdb" + ], + "title": "documentsdb" + }, + { + "type": "string", + "enum": [ + "vectorsdb" + ], + "title": "vectorsdb" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases" + ], + "title": "dedicatedDatabases" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "storage" + ], + "title": "storage" + } + ] + } + }, + "resourceId": { + "description": "Resource ID. When set, only this single resource will be backed up.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "enabled": { + "description": "Is policy enabled? When set to 'disabled', no backups will be taken", + "type": "boolean", + "default": true, + "example": false + }, + "retention": { + "description": "Days to keep backups before deletion", + "type": "integer", + "example": 1, + "format": "int32" + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string" + } + }, + "required": [ + "policyId", + "services", + "retention", + "schedule" + ] + } + } + } + } + } + }, + "\/backups\/policies\/{policyId}": { + "get": { + "summary": "Get backup policy", + "operationId": "backupsGetPolicy", + "tags": [ + "backups" + ], + "description": "Get a backup policy using it's ID.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/get-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.read", + "backups.policies.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update backup policy", + "operationId": "backupsUpdatePolicy", + "tags": [ + "backups" + ], + "description": "Update an existing policy using it's ID.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/update-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "backups.policies.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Policy name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "retention": { + "description": "Days to keep backups before deletion", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "schedule": { + "description": "Cron expression", + "type": "string" + }, + "enabled": { + "description": "Is Backup enabled? When set to 'disabled', No backup will be taken", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "backupsDeletePolicy", + "tags": [ + "backups" + ], + "description": "Delete a policy using it's ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/delete-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "backups.policies.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/backups\/restoration": { + "post": { + "summary": "Create restoration", + "operationId": "backupsCreateRestoration", + "tags": [ + "backups" + ], + "description": "Create and trigger a new restoration for a backup on a project.\n\nFor a backup of one database, the restoration resolves its destination before it is queued. When `newResourceId` is omitted, the archived database is restored in place and its own ID is returned in `options`. Pass a different `newResourceId` to restore alongside it as a new database instead.\n\nThe restoration migration records the archived database in `resourceId` and `resourceType`, and the resolved database in `destinationResourceId` and `destinationResourceType`. Database types are stored canonically as `database`, `documentsdb`, or `vectorsdb`. Project-wide restorations leave these fields empty because they do not have a single source or destination database.\n\nTo list every migration related to one database, use its canonical type in a nested `OR(AND(...), AND(...), AND(...))` across the root, parent, and destination relation pairs: `(resourceType, resourceId)`, `(parentResourceType, parentResourceId)`, and `(destinationResourceType, destinationResourceId)`. Legacy and TablesDB databases use `database`; the operational `resourceType` of a table migration is not rewritten to `tablesdb`.\n\nWhen restoring a DocumentsDB or VectorsDB database from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification and lands the data there. An in-place restore swaps the database onto that backing only once the restore has succeeded, and retires the backing it displaced only once that swap is confirmed, so the source keeps serving its own data until the restored data is in place and any failure leaves it untouched. A serverless source has no dedicated backing to clone and restores onto the archived database instead.\n", + "responses": { + "201": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/create-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "restorations.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": { + "archiveId": { + "description": "Backup archive ID to restore", + "type": "string", + "example": "<ARCHIVE_ID>" + }, + "services": { + "description": "Array of services to restore", + "type": "array", + "items": { + "title": "BackupServices", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "tablesdb" + ], + "title": "tablesdb" + }, + { + "type": "string", + "enum": [ + "documentsdb" + ], + "title": "documentsdb" + }, + { + "type": "string", + "enum": [ + "vectorsdb" + ], + "title": "vectorsdb" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases" + ], + "title": "dedicatedDatabases" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "storage" + ], + "title": "storage" + } + ] + } + }, + "newResourceId": { + "description": "Destination resource ID. Omit to restore the archived resource in place, or pass a different ID to restore alongside it as a new resource. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "default": "", + "example": "<NEW_RESOURCE_ID>" + }, + "newResourceName": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NEW_RESOURCE_NAME>" + } + }, + "required": [ + "archiveId", + "services" + ] + } + } + } + } + } + }, + "\/backups\/restorations": { + "get": { + "summary": "List restorations", + "operationId": "backupsListRestorations", + "tags": [ + "backups" + ], + "description": "List all backup restorations for a project.", + "responses": { + "200": { + "description": "Backup restoration list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupRestorationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/list-restorations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "restorations.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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/backups\/restorations\/{restorationId}": { + "get": { + "summary": "Get backup restoration", + "operationId": "backupsGetRestoration", + "tags": [ + "backups" + ], + "description": "Get the current status of a backup restoration.", + "responses": { + "200": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "backups\/get-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "restorations.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "restorationId", + "description": "Restoration ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "example": "<RESTORATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/console\/assistant": { + "post": { + "summary": "Create assistant query", + "operationId": "assistantChat", + "tags": [ + "assistant" + ], + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", + "responses": { + "200": { + "description": "Text", + "content": { + "text\/plain": { + "schema": { + "type": "string" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "console", + "demo": "assistant\/chat.md", + "rate-limit": 15, + "rate-time": 3600, + "rate-key": "userId:{userId}", + "scope": "assistant.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prompt": { + "description": "Prompt. A string containing questions asked to the AI assistant.", + "type": "string", + "example": "<PROMPT>" + } + }, + "required": [ + "prompt" + ] + } + } + } + } + } + }, + "\/console\/campaigns\/{campaignId}": { + "get": { + "summary": "Get campaign details", + "operationId": "consoleGetCampaign", + "tags": [ + "console" + ], + "description": "Receive the details of a campaign using its ID.", + "responses": { + "201": { + "description": "Campaign", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/campaign" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/get-campaign.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "campaignId", + "description": "ID of the campaign", + "required": true, + "schema": { + "type": "string", + "example": "<CAMPAIGN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/console\/coupons\/{couponId}": { + "get": { + "summary": "Get coupon details", + "operationId": "consoleGetCoupon", + "tags": [ + "console" + ], + "description": "Get the details of a coupon using it's coupon ID.", + "responses": { + "201": { + "description": "Coupon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/coupon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/get-coupon.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "couponId", + "description": "ID of the coupon", + "required": true, + "schema": { + "type": "string", + "example": "<COUPON_ID>" + }, + "in": "path" + } + ] + } + }, + "\/console\/databases": { + "get": { + "summary": "List databases", + "operationId": "consoleListDatabases", + "tags": [ + "console" + ], + "description": "Get a list of all the project's databases. You can use the query params to filter your results. This returns every database across all types and product APIs in a single call.\n", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/list-databases.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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" + } + ] + } + }, + "\/console\/oauth2-providers": { + "get": { + "summary": "List OAuth2 providers", + "operationId": "consoleListOAuth2Providers", + "tags": [ + "console" + ], + "description": "List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.", + "responses": { + "200": { + "description": "Console OAuth2 Providers List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleOAuth2ProviderList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "console", + "demo": "console\/list-o-auth-2-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/plans": { + "get": { + "summary": "Get plans", + "operationId": "consoleGetPlans", + "tags": [ + "console" + ], + "description": "Return a list of all available plans.", + "responses": { + "200": { + "description": "Billing plan list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingPlanList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/get-plans.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "platform", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "example": "appwrite", + "title": "Platform", + "oneOf": [ + { + "type": "string", + "enum": [ + "appwrite" + ], + "title": "appwrite" + }, + { + "type": "string", + "enum": [ + "imagine" + ], + "title": "imagine" + } + ], + "default": "appwrite" + }, + "in": "query" + } + ] + } + }, + "\/console\/plans\/{planId}": { + "get": { + "summary": "Get plan", + "operationId": "consoleGetPlan", + "tags": [ + "console" + ], + "description": "Get the details of a plan using its plan ID.", + "responses": { + "200": { + "description": "billingPlan", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingPlan" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/get-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "planId", + "description": "Plan id", + "required": true, + "schema": { + "type": "string", + "example": "<PLAN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/console\/postgres-extensions": { + "get": { + "summary": "List Postgres extensions", + "operationId": "consoleListPostgresExtensions", + "tags": [ + "console" + ], + "description": "Get the catalog of Postgres extensions that can be installed on a dedicated Postgres database.\n", + "responses": { + "200": { + "description": "Postgres extensions list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/postgresExtensionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/list-postgres-extensions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/programs\/{programId}": { + "get": { + "summary": "Get program details", + "operationId": "consoleGetProgram", + "tags": [ + "console" + ], + "description": "Receive the details of a program using its ID.", + "responses": { + "201": { + "description": "Program", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/program" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/get-program.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "programId", + "description": "ID of the program", + "required": true, + "schema": { + "type": "string", + "example": "<PROGRAM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/console\/programs\/{programId}\/memberships": { + "post": { + "summary": "Create program membership", + "operationId": "consoleCreateProgramMembership", + "tags": [ + "console" + ], + "description": "Create a new membership for an account to a program.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/create-program-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "programId", + "description": "ID of the program", + "required": true, + "schema": { + "type": "string", + "example": "<PROGRAM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/console\/regions": { + "get": { + "summary": "List Regions", + "operationId": "consoleListRegions", + "tags": [ + "console" + ], + "description": "Get all available regions for the console.", + "responses": { + "200": { + "description": "Regions list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleRegionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/list-regions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/resources": { + "get": { + "summary": "Check resource ID availability", + "operationId": "consoleGetResource", + "tags": [ + "console" + ], + "description": "Check if a resource ID is available.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/get-resource.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "value", + "description": "Resource value.", + "required": true, + "schema": { + "type": "string", + "example": "<VALUE>" + }, + "in": "query" + }, + { + "name": "type", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "example": "rules", + "title": "ConsoleResourceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "rules" + ], + "title": "rules" + } + ] + }, + "in": "query" + } + ] + } + }, + "\/console\/scopes\/organization": { + "get": { + "summary": "List organization scopes", + "operationId": "consoleListOrganizationScopes", + "tags": [ + "console" + ], + "description": "List all scopes available for organization API keys, along with a description for each scope.", + "responses": { + "200": { + "description": "Console Key Scopes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleKeyScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "console", + "demo": "console\/list-organization-scopes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/scopes\/project": { + "get": { + "summary": "List project scopes", + "operationId": "consoleListProjectScopes", + "tags": [ + "console" + ], + "description": "List all scopes available for project API keys, along with a description for each scope.", + "responses": { + "200": { + "description": "Console Key Scopes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleKeyScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "console", + "demo": "console\/list-project-scopes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/console\/sources": { + "post": { + "summary": "Create source", + "operationId": "consoleCreateSource", + "tags": [ + "console" + ], + "description": "Create a new source.", + "responses": { + "201": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/create-source.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ref": { + "description": "Ref param", + "type": "string", + "example": "<REF>", + "nullable": true + }, + "referrer": { + "description": "Referrer", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "utmSource": { + "description": "Utm source", + "type": "string", + "example": "<UTM_SOURCE>", + "nullable": true + }, + "utmCampaign": { + "description": "Utm campaign", + "type": "string", + "example": "<UTM_CAMPAIGN>", + "nullable": true + }, + "utmMedium": { + "description": "Utm medium", + "type": "string", + "example": "<UTM_MEDIUM>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/console\/suggestions\/columns": { + "get": { + "summary": "Get column suggestions with size limits for a table, using database context and an optional user provided context", + "operationId": "consoleSuggestColumns", + "tags": [ + "console" + ], + "description": "Suggests column names and their size limits based on the provided table name. The API will also analyze other tables in the same database to provide context-aware suggestions, ensuring consistency across schema design. Users may optionally provide custom context to further refine the suggestions.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/suggest-columns.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "query" + }, + { + "name": "context", + "description": "Optional user provided context to refine suggestions.", + "required": false, + "schema": { + "type": "string", + "example": "<CONTEXT>" + }, + "in": "query" + }, + { + "name": "min", + "description": "Minimum number of suggestions to generate.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 3 + }, + "in": "query" + }, + { + "name": "max", + "description": "Maximum number of suggestions to generate.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 7 + }, + "in": "query" + } + ] + } + }, + "\/console\/suggestions\/indexes": { + "get": { + "summary": "Get index suggestions for table columns, using database context", + "operationId": "consoleSuggestIndexes", + "tags": [ + "console" + ], + "description": "Suggests database indexes for table columns based on the provided table structure and existing columns. The API will also analyze the table's column types, names, and patterns to recommend optimal indexes that improve query performance for common database operations like filtering, sorting, and searching.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/suggest-indexes.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "query" + }, + { + "name": "min", + "description": "Minimum number of suggestions to generate.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 1 + }, + "in": "query" + }, + { + "name": "max", + "description": "Maximum number of suggestions to generate.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 4 + }, + "in": "query" + } + ] + } + }, + "\/console\/suggestions\/queries": { + "get": { + "summary": "Get query suggestions for a list resource from free-text intent", + "operationId": "consoleSuggestQueries", + "tags": [ + "console" + ], + "description": "Suggest valid Appwrite query JSON objects for a supported list resource from free-text user intent. The endpoint picks a validator based on `resource` \u2014 for system resources it uses the static validator and its allowed attributes, and for user-owned table rows it loads the table schema and validates against those attributes at request time. The returned queries are guaranteed to parse and pass the relevant queries validator.\n", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/suggest-queries.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resource", + "description": "Resource to generate queries for.", + "required": true, + "schema": { + "type": "string", + "example": "activities", + "title": "QuerySuggestionResource", + "oneOf": [ + { + "type": "string", + "enum": [ + "activities" + ], + "title": "activities" + }, + { + "type": "string", + "enum": [ + "activityevents" + ], + "title": "activity_events" + }, + { + "type": "string", + "enum": [ + "archives" + ], + "title": "archives" + }, + { + "type": "string", + "enum": [ + "credits" + ], + "title": "credits" + }, + { + "type": "string", + "enum": [ + "dnsrecords" + ], + "title": "dns_records" + }, + { + "type": "string", + "enum": [ + "domains" + ], + "title": "domains" + }, + { + "type": "string", + "enum": [ + "invoices" + ], + "title": "invoices" + }, + { + "type": "string", + "enum": [ + "paymentmethods" + ], + "title": "payment_methods" + }, + { + "type": "string", + "enum": [ + "policies" + ], + "title": "policies" + }, + { + "type": "string", + "enum": [ + "projects" + ], + "title": "projects" + }, + { + "type": "string", + "enum": [ + "restorations" + ], + "title": "restorations" + }, + { + "type": "string", + "enum": [ + "teamaggregations" + ], + "title": "team_aggregations" + }, + { + "type": "string", + "enum": [ + "teams" + ], + "title": "teams" + }, + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "tables" + ], + "title": "tables" + }, + { + "type": "string", + "enum": [ + "rows" + ], + "title": "rows" + }, + { + "type": "string", + "enum": [ + "schedules" + ], + "title": "schedules" + }, + { + "type": "string", + "enum": [ + "platforms" + ], + "title": "platforms" + }, + { + "type": "string", + "enum": [ + "keys" + ], + "title": "keys" + }, + { + "type": "string", + "enum": [ + "webhooks" + ], + "title": "webhooks" + }, + { + "type": "string", + "enum": [ + "notifications" + ], + "title": "notifications" + }, + { + "type": "string", + "enum": [ + "certificates" + ], + "title": "certificates" + }, + { + "type": "string", + "enum": [ + "realtime" + ], + "title": "realtime" + }, + { + "type": "string", + "enum": [ + "rules" + ], + "title": "rules" + }, + { + "type": "string", + "enum": [ + "installations" + ], + "title": "installations" + }, + { + "type": "string", + "enum": [ + "repositories" + ], + "title": "repositories" + }, + { + "type": "string", + "enum": [ + "vcscomments" + ], + "title": "vcs_comments" + }, + { + "type": "string", + "enum": [ + "vcscommentlocks" + ], + "title": "vcs_comment_locks" + }, + { + "type": "string", + "enum": [ + "reports" + ], + "title": "reports" + }, + { + "type": "string", + "enum": [ + "insights" + ], + "title": "insights" + }, + { + "type": "string", + "enum": [ + "users" + ], + "title": "users" + }, + { + "type": "string", + "enum": [ + "cache" + ], + "title": "cache" + }, + { + "type": "string", + "enum": [ + "tokens" + ], + "title": "tokens" + }, + { + "type": "string", + "enum": [ + "authenticators" + ], + "title": "authenticators" + }, + { + "type": "string", + "enum": [ + "challenges" + ], + "title": "challenges" + }, + { + "type": "string", + "enum": [ + "sessions" + ], + "title": "sessions" + }, + { + "type": "string", + "enum": [ + "identities" + ], + "title": "identities" + }, + { + "type": "string", + "enum": [ + "memberships" + ], + "title": "memberships" + }, + { + "type": "string", + "enum": [ + "buckets" + ], + "title": "buckets" + }, + { + "type": "string", + "enum": [ + "providers" + ], + "title": "providers" + }, + { + "type": "string", + "enum": [ + "messages" + ], + "title": "messages" + }, + { + "type": "string", + "enum": [ + "pushledger" + ], + "title": "push_ledger" + }, + { + "type": "string", + "enum": [ + "topics" + ], + "title": "topics" + }, + { + "type": "string", + "enum": [ + "subscribers" + ], + "title": "subscribers" + }, + { + "type": "string", + "enum": [ + "targets" + ], + "title": "targets" + }, + { + "type": "string", + "enum": [ + "presencelogs" + ], + "title": "presence_logs" + }, + { + "type": "string", + "enum": [ + "companies" + ], + "title": "companies" + }, + { + "type": "string", + "enum": [ + "billingaddresses" + ], + "title": "billing_addresses" + }, + { + "type": "string", + "enum": [ + "billingaggregations" + ], + "title": "billing_aggregations" + }, + { + "type": "string", + "enum": [ + "billingaggregationresources" + ], + "title": "billing_aggregation_resources" + }, + { + "type": "string", + "enum": [ + "billingteamprojectaggregations" + ], + "title": "billing_team_project_aggregations" + }, + { + "type": "string", + "enum": [ + "billingteamaggregations_v2" + ], + "title": "billing_team_aggregations_v2" + }, + { + "type": "string", + "enum": [ + "billingteamaggregationresources" + ], + "title": "billing_team_aggregation_resources" + }, + { + "type": "string", + "enum": [ + "billinginvoices_v2" + ], + "title": "billing_invoices_v2" + }, + { + "type": "string", + "enum": [ + "billingaddons" + ], + "title": "billing_addons" + }, + { + "type": "string", + "enum": [ + "alerts" + ], + "title": "alerts" + }, + { + "type": "string", + "enum": [ + "payments" + ], + "title": "payments" + }, + { + "type": "string", + "enum": [ + "billingdiscounts" + ], + "title": "billing_discounts" + }, + { + "type": "string", + "enum": [ + "resourcesdeleted" + ], + "title": "resources_deleted" + }, + { + "type": "string", + "enum": [ + "sources" + ], + "title": "sources" + }, + { + "type": "string", + "enum": [ + "deals" + ], + "title": "deals" + }, + { + "type": "string", + "enum": [ + "blocks" + ], + "title": "blocks" + }, + { + "type": "string", + "enum": [ + "threats" + ], + "title": "threats" + }, + { + "type": "string", + "enum": [ + "feedbacks" + ], + "title": "feedbacks" + }, + { + "type": "string", + "enum": [ + "disputes" + ], + "title": "disputes" + }, + { + "type": "string", + "enum": [ + "wafrules" + ], + "title": "waf_rules" + }, + { + "type": "string", + "enum": [ + "sh_installations" + ], + "title": "sh_installations" + }, + { + "type": "string", + "enum": [ + "migrationdatabases" + ], + "title": "migration_databases" + }, + { + "type": "string", + "enum": [ + "migrationprojects" + ], + "title": "migration_projects" + }, + { + "type": "string", + "enum": [ + "affiliatelinks" + ], + "title": "affiliate_links" + }, + { + "type": "string", + "enum": [ + "affiliatereferrals" + ], + "title": "affiliate_referrals" + }, + { + "type": "string", + "enum": [ + "affiliaterewards" + ], + "title": "affiliate_rewards" + }, + { + "type": "string", + "enum": [ + "apps" + ], + "title": "apps" + }, + { + "type": "string", + "enum": [ + "appsecrets" + ], + "title": "app_secrets" + }, + { + "type": "string", + "enum": [ + "appinstallations" + ], + "title": "app_installations" + }, + { + "type": "string", + "enum": [ + "appkeys" + ], + "title": "app_keys" + }, + { + "type": "string", + "enum": [ + "oauth2grants" + ], + "title": "oauth2_grants" + }, + { + "type": "string", + "enum": [ + "oauth2consents" + ], + "title": "oauth2_consents" + }, + { + "type": "string", + "enum": [ + "oauth2tokens" + ], + "title": "oauth2_tokens" + }, + { + "type": "string", + "enum": [ + "attributes" + ], + "title": "attributes" + }, + { + "type": "string", + "enum": [ + "indexes" + ], + "title": "indexes" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "sites" + ], + "title": "sites" + }, + { + "type": "string", + "enum": [ + "deployments" + ], + "title": "deployments" + }, + { + "type": "string", + "enum": [ + "variables" + ], + "title": "variables" + }, + { + "type": "string", + "enum": [ + "migrations" + ], + "title": "migrations" + }, + { + "type": "string", + "enum": [ + "resourcetokens" + ], + "title": "resource_tokens" + }, + { + "type": "string", + "enum": [ + "transactions" + ], + "title": "transactions" + }, + { + "type": "string", + "enum": [ + "transactionlogs" + ], + "title": "transaction_logs" + }, + { + "type": "string", + "enum": [ + "dedicateddatabases" + ], + "title": "dedicated_databases" + }, + { + "type": "string", + "enum": [ + "dedicateddatabaseconfigs" + ], + "title": "dedicated_database_configs" + }, + { + "type": "string", + "enum": [ + "dedicateddatabaseruntimes" + ], + "title": "dedicated_database_runtimes" + }, + { + "type": "string", + "enum": [ + "dedicateddatabaseoperations" + ], + "title": "dedicated_database_operations" + }, + { + "type": "string", + "enum": [ + "dedicateddatabasebackups" + ], + "title": "dedicated_database_backups" + }, + { + "type": "string", + "enum": [ + "dedicateddatabaserestorations" + ], + "title": "dedicated_database_restorations" + }, + { + "type": "string", + "enum": [ + "dedicateddatabasebranches" + ], + "title": "dedicated_database_branches" + } + ] + }, + "in": "query" + }, + { + "name": "input", + "description": "Natural language query intent used to generate filters\/sorting\/pagination.", + "required": true, + "schema": { + "type": "string", + "example": "<INPUT>" + }, + "in": "query" + }, + { + "name": "databaseId", + "description": "Database ID. Required when resource is `tables` or `rows`.", + "required": false, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID. Required when resource is `rows`.", + "required": false, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "query" + } + ] + } + }, + "\/console\/templates\/email\/{templateId}": { + "get": { + "summary": "Get email template", + "operationId": "consoleGetEmailTemplate", + "tags": [ + "console" + ], + "description": "Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.", + "responses": { + "200": { + "description": "EmailTemplate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "console\/get-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery", + "required": true, + "schema": { + "type": "string", + "example": "verification", + "title": "ProjectEmailTemplateId", + "oneOf": [ + { + "type": "string", + "enum": [ + "verification" + ], + "title": "verification" + }, + { + "type": "string", + "enum": [ + "magicSession" + ], + "title": "magicSession" + }, + { + "type": "string", + "enum": [ + "recovery" + ], + "title": "recovery" + }, + { + "type": "string", + "enum": [ + "invitation" + ], + "title": "invitation" + }, + { + "type": "string", + "enum": [ + "mfaChallenge" + ], + "title": "mfaChallenge" + }, + { + "type": "string", + "enum": [ + "sessionAlert" + ], + "title": "sessionAlert" + }, + { + "type": "string", + "enum": [ + "otpSession" + ], + "title": "otpSession" + }, + { + "type": "string", + "enum": [ + "otpVerification" + ], + "title": "otpVerification" + }, + { + "type": "string", + "enum": [ + "otpRecovery" + ], + "title": "otpRecovery" + } + ] + }, + "in": "path" + }, + { + "name": "locale", + "description": "Template locale. If left empty, the fallback locale (en) will be used.", + "required": false, + "schema": { + "type": "string", + "example": "af", + "title": "ProjectEmailTemplateLocale", + "oneOf": [ + { + "type": "string", + "enum": [ + "af" + ], + "title": "af" + }, + { + "type": "string", + "enum": [ + "ar-ae" + ], + "title": "ar-ae" + }, + { + "type": "string", + "enum": [ + "ar-bh" + ], + "title": "ar-bh" + }, + { + "type": "string", + "enum": [ + "ar-dz" + ], + "title": "ar-dz" + }, + { + "type": "string", + "enum": [ + "ar-eg" + ], + "title": "ar-eg" + }, + { + "type": "string", + "enum": [ + "ar-iq" + ], + "title": "ar-iq" + }, + { + "type": "string", + "enum": [ + "ar-jo" + ], + "title": "ar-jo" + }, + { + "type": "string", + "enum": [ + "ar-kw" + ], + "title": "ar-kw" + }, + { + "type": "string", + "enum": [ + "ar-lb" + ], + "title": "ar-lb" + }, + { + "type": "string", + "enum": [ + "ar-ly" + ], + "title": "ar-ly" + }, + { + "type": "string", + "enum": [ + "ar-ma" + ], + "title": "ar-ma" + }, + { + "type": "string", + "enum": [ + "ar-om" + ], + "title": "ar-om" + }, + { + "type": "string", + "enum": [ + "ar-qa" + ], + "title": "ar-qa" + }, + { + "type": "string", + "enum": [ + "ar-sa" + ], + "title": "ar-sa" + }, + { + "type": "string", + "enum": [ + "ar-sy" + ], + "title": "ar-sy" + }, + { + "type": "string", + "enum": [ + "ar-tn" + ], + "title": "ar-tn" + }, + { + "type": "string", + "enum": [ + "ar-ye" + ], + "title": "ar-ye" + }, + { + "type": "string", + "enum": [ + "as" + ], + "title": "as" + }, + { + "type": "string", + "enum": [ + "az" + ], + "title": "az" + }, + { + "type": "string", + "enum": [ + "be" + ], + "title": "be" + }, + { + "type": "string", + "enum": [ + "bg" + ], + "title": "bg" + }, + { + "type": "string", + "enum": [ + "bh" + ], + "title": "bh" + }, + { + "type": "string", + "enum": [ + "bn" + ], + "title": "bn" + }, + { + "type": "string", + "enum": [ + "bs" + ], + "title": "bs" + }, + { + "type": "string", + "enum": [ + "ca" + ], + "title": "ca" + }, + { + "type": "string", + "enum": [ + "cs" + ], + "title": "cs" + }, + { + "type": "string", + "enum": [ + "cy" + ], + "title": "cy" + }, + { + "type": "string", + "enum": [ + "da" + ], + "title": "da" + }, + { + "type": "string", + "enum": [ + "de" + ], + "title": "de" + }, + { + "type": "string", + "enum": [ + "de-at" + ], + "title": "de-at" + }, + { + "type": "string", + "enum": [ + "de-ch" + ], + "title": "de-ch" + }, + { + "type": "string", + "enum": [ + "de-li" + ], + "title": "de-li" + }, + { + "type": "string", + "enum": [ + "de-lu" + ], + "title": "de-lu" + }, + { + "type": "string", + "enum": [ + "el" + ], + "title": "el" + }, + { + "type": "string", + "enum": [ + "en" + ], + "title": "en" + }, + { + "type": "string", + "enum": [ + "en-au" + ], + "title": "en-au" + }, + { + "type": "string", + "enum": [ + "en-bz" + ], + "title": "en-bz" + }, + { + "type": "string", + "enum": [ + "en-ca" + ], + "title": "en-ca" + }, + { + "type": "string", + "enum": [ + "en-gb" + ], + "title": "en-gb" + }, + { + "type": "string", + "enum": [ + "en-ie" + ], + "title": "en-ie" + }, + { + "type": "string", + "enum": [ + "en-jm" + ], + "title": "en-jm" + }, + { + "type": "string", + "enum": [ + "en-nz" + ], + "title": "en-nz" + }, + { + "type": "string", + "enum": [ + "en-tt" + ], + "title": "en-tt" + }, + { + "type": "string", + "enum": [ + "en-us" + ], + "title": "en-us" + }, + { + "type": "string", + "enum": [ + "en-za" + ], + "title": "en-za" + }, + { + "type": "string", + "enum": [ + "eo" + ], + "title": "eo" + }, + { + "type": "string", + "enum": [ + "es" + ], + "title": "es" + }, + { + "type": "string", + "enum": [ + "es-ar" + ], + "title": "es-ar" + }, + { + "type": "string", + "enum": [ + "es-bo" + ], + "title": "es-bo" + }, + { + "type": "string", + "enum": [ + "es-cl" + ], + "title": "es-cl" + }, + { + "type": "string", + "enum": [ + "es-co" + ], + "title": "es-co" + }, + { + "type": "string", + "enum": [ + "es-cr" + ], + "title": "es-cr" + }, + { + "type": "string", + "enum": [ + "es-do" + ], + "title": "es-do" + }, + { + "type": "string", + "enum": [ + "es-ec" + ], + "title": "es-ec" + }, + { + "type": "string", + "enum": [ + "es-gt" + ], + "title": "es-gt" + }, + { + "type": "string", + "enum": [ + "es-hn" + ], + "title": "es-hn" + }, + { + "type": "string", + "enum": [ + "es-mx" + ], + "title": "es-mx" + }, + { + "type": "string", + "enum": [ + "es-ni" + ], + "title": "es-ni" + }, + { + "type": "string", + "enum": [ + "es-pa" + ], + "title": "es-pa" + }, + { + "type": "string", + "enum": [ + "es-pe" + ], + "title": "es-pe" + }, + { + "type": "string", + "enum": [ + "es-pr" + ], + "title": "es-pr" + }, + { + "type": "string", + "enum": [ + "es-py" + ], + "title": "es-py" + }, + { + "type": "string", + "enum": [ + "es-sv" + ], + "title": "es-sv" + }, + { + "type": "string", + "enum": [ + "es-uy" + ], + "title": "es-uy" + }, + { + "type": "string", + "enum": [ + "es-ve" + ], + "title": "es-ve" + }, + { + "type": "string", + "enum": [ + "et" + ], + "title": "et" + }, + { + "type": "string", + "enum": [ + "eu" + ], + "title": "eu" + }, + { + "type": "string", + "enum": [ + "fa" + ], + "title": "fa" + }, + { + "type": "string", + "enum": [ + "fi" + ], + "title": "fi" + }, + { + "type": "string", + "enum": [ + "fo" + ], + "title": "fo" + }, + { + "type": "string", + "enum": [ + "fr" + ], + "title": "fr" + }, + { + "type": "string", + "enum": [ + "fr-be" + ], + "title": "fr-be" + }, + { + "type": "string", + "enum": [ + "fr-ca" + ], + "title": "fr-ca" + }, + { + "type": "string", + "enum": [ + "fr-ch" + ], + "title": "fr-ch" + }, + { + "type": "string", + "enum": [ + "fr-lu" + ], + "title": "fr-lu" + }, + { + "type": "string", + "enum": [ + "ga" + ], + "title": "ga" + }, + { + "type": "string", + "enum": [ + "gd" + ], + "title": "gd" + }, + { + "type": "string", + "enum": [ + "he" + ], + "title": "he" + }, + { + "type": "string", + "enum": [ + "hi" + ], + "title": "hi" + }, + { + "type": "string", + "enum": [ + "hr" + ], + "title": "hr" + }, + { + "type": "string", + "enum": [ + "hu" + ], + "title": "hu" + }, + { + "type": "string", + "enum": [ + "id" + ], + "title": "id" + }, + { + "type": "string", + "enum": [ + "is" + ], + "title": "is" + }, + { + "type": "string", + "enum": [ + "it" + ], + "title": "it" + }, + { + "type": "string", + "enum": [ + "it-ch" + ], + "title": "it-ch" + }, + { + "type": "string", + "enum": [ + "ja" + ], + "title": "ja" + }, + { + "type": "string", + "enum": [ + "ji" + ], + "title": "ji" + }, + { + "type": "string", + "enum": [ + "ko" + ], + "title": "ko" + }, + { + "type": "string", + "enum": [ + "ku" + ], + "title": "ku" + }, + { + "type": "string", + "enum": [ + "lt" + ], + "title": "lt" + }, + { + "type": "string", + "enum": [ + "lv" + ], + "title": "lv" + }, + { + "type": "string", + "enum": [ + "mk" + ], + "title": "mk" + }, + { + "type": "string", + "enum": [ + "ml" + ], + "title": "ml" + }, + { + "type": "string", + "enum": [ + "ms" + ], + "title": "ms" + }, + { + "type": "string", + "enum": [ + "mt" + ], + "title": "mt" + }, + { + "type": "string", + "enum": [ + "nb" + ], + "title": "nb" + }, + { + "type": "string", + "enum": [ + "ne" + ], + "title": "ne" + }, + { + "type": "string", + "enum": [ + "nl" + ], + "title": "nl" + }, + { + "type": "string", + "enum": [ + "nl-be" + ], + "title": "nl-be" + }, + { + "type": "string", + "enum": [ + "nn" + ], + "title": "nn" + }, + { + "type": "string", + "enum": [ + "no" + ], + "title": "no" + }, + { + "type": "string", + "enum": [ + "pa" + ], + "title": "pa" + }, + { + "type": "string", + "enum": [ + "pl" + ], + "title": "pl" + }, + { + "type": "string", + "enum": [ + "pt" + ], + "title": "pt" + }, + { + "type": "string", + "enum": [ + "pt-br" + ], + "title": "pt-br" + }, + { + "type": "string", + "enum": [ + "rm" + ], + "title": "rm" + }, + { + "type": "string", + "enum": [ + "ro" + ], + "title": "ro" + }, + { + "type": "string", + "enum": [ + "ro-md" + ], + "title": "ro-md" + }, + { + "type": "string", + "enum": [ + "ru" + ], + "title": "ru" + }, + { + "type": "string", + "enum": [ + "ru-md" + ], + "title": "ru-md" + }, + { + "type": "string", + "enum": [ + "sb" + ], + "title": "sb" + }, + { + "type": "string", + "enum": [ + "sk" + ], + "title": "sk" + }, + { + "type": "string", + "enum": [ + "sl" + ], + "title": "sl" + }, + { + "type": "string", + "enum": [ + "sq" + ], + "title": "sq" + }, + { + "type": "string", + "enum": [ + "sr" + ], + "title": "sr" + }, + { + "type": "string", + "enum": [ + "sv" + ], + "title": "sv" + }, + { + "type": "string", + "enum": [ + "sv-fi" + ], + "title": "sv-fi" + }, + { + "type": "string", + "enum": [ + "th" + ], + "title": "th" + }, + { + "type": "string", + "enum": [ + "tn" + ], + "title": "tn" + }, + { + "type": "string", + "enum": [ + "tr" + ], + "title": "tr" + }, + { + "type": "string", + "enum": [ + "ts" + ], + "title": "ts" + }, + { + "type": "string", + "enum": [ + "ua" + ], + "title": "ua" + }, + { + "type": "string", + "enum": [ + "ur" + ], + "title": "ur" + }, + { + "type": "string", + "enum": [ + "ve" + ], + "title": "ve" + }, + { + "type": "string", + "enum": [ + "vi" + ], + "title": "vi" + }, + { + "type": "string", + "enum": [ + "xh" + ], + "title": "xh" + }, + { + "type": "string", + "enum": [ + "zh-cn" + ], + "title": "zh-cn" + }, + { + "type": "string", + "enum": [ + "zh-hk" + ], + "title": "zh-hk" + }, + { + "type": "string", + "enum": [ + "zh-sg" + ], + "title": "zh-sg" + }, + { + "type": "string", + "enum": [ + "zh-tw" + ], + "title": "zh-tw" + }, + { + "type": "string", + "enum": [ + "zu" + ], + "title": "zu" + } + ] + }, + "in": "query" + } + ] + } + }, + "\/console\/variables": { + "get": { + "summary": "Get variables", + "operationId": "consoleVariables", + "tags": [ + "console" + ], + "description": "Get all Environment Variables that are relevant for the console.", + "responses": { + "200": { + "description": "Console Variables", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleVariables" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "console", + "demo": "console\/variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ] + } + }, + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", + "tags": [ + "databases" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "databases", + "demo": "databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "queries", + "search", + "total" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + } + } + ], + "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", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 database", + "operationId": "databasesCreate", + "tags": [ + "databases" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "databases", + "demo": "databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "demo": "databases\/create.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "name": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "transactions", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTransactions" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "transactions", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTransaction" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "description": "Seconds before the transaction expires.", + "type": "integer", + "default": 300, + "example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "transactions", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTransaction" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "transactions", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTransaction" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "description": "Commit transaction?", + "type": "boolean", + "default": false, + "example": false + }, + "rollback": { + "description": "Rollback transaction?", + "type": "boolean", + "default": false, + "example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "group": "transactions", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTransaction" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "transactions", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createOperations" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "description": "Array of staged operations.", + "type": "array", + "default": [], + "example": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ], + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "databasesGet", + "tags": [ + "databases" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "databases", + "demo": "databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "databases", + "demo": "databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "databasesDelete", + "tags": [ + "databases" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "group": "databases", + "demo": "databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collectionList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "collections", + "demo": "databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTables" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 collections", + "operationId": "databasesCreateCollection", + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "collections", + "demo": "databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTable" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<COLLECTION_ID>" + }, + "name": { + "description": "Collection name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "documentSecurity": { + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "attributes": { + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "type": "array", + "default": [], + "items": { + "type": "object" + } + }, + "indexes": { + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "type": "array", + "default": [], + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "databasesGetCollection", + "tags": [ + "databases" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "collections", + "demo": "databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTable" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "tags": [ + "databases" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "collections", + "demo": "databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTable" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Collection name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "documentSecurity": { + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "purge": { + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "type": "boolean", + "default": false, + "example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "databasesDeleteCollection", + "tags": [ + "databases" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "group": "collections", + "demo": "databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTable" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listColumns" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint": { + "post": { + "summary": "Create bigint attribute", + "operationId": "databasesCreateBigIntAttribute", + "tags": [ + "databases" + ], + "description": "Create a bigint attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeBigInt", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBigint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-big-int-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBigIntColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "integer", + "example": 1000000, + "format": "int64", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when attribute is required.", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint\/{key}": { + "patch": { + "summary": "Update bigint attribute", + "operationId": "databasesUpdateBigIntAttribute", + "tags": [ + "databases" + ], + "description": "Update a bigint attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeBigInt", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBigint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-big-int-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBigIntColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "integer", + "example": 1000000, + "format": "int64", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when attribute is required.", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "post": { + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", + "tags": [ + "databases" + ], + "description": "Create a boolean attribute.\n", + "responses": { + "202": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBooleanColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "boolean", + "example": false, + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "patch": { + "summary": "Update boolean attribute", + "operationId": "databasesUpdateBooleanAttribute", + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBooleanColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "boolean", + "example": false, + "nullable": true + }, + "newKey": { + "description": "New attribute key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createDatetimeColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update datetime attribute", + "operationId": "databasesUpdateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateDatetimeColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + }, + "newKey": { + "description": "New attribute key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", + "tags": [ + "databases" + ], + "description": "Create an email attribute.\n", + "responses": { + "202": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEmailColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEmailColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEnumColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "elements": { + "description": "Array of enum values.", + "type": "array", + "example": [ + "active", + "inactive" + ], + "items": { + "type": "string" + } + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "active", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEnumColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "description": "Updated list of enum values.", + "type": "array", + "example": [ + "active", + "inactive" + ], + "items": { + "type": "string" + } + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "active", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", + "tags": [ + "databases" + ], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createFloatColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value.", + "type": "number", + "example": 0, + "format": "float", + "nullable": true + }, + "max": { + "description": "Maximum value.", + "type": "number", + "example": 100, + "format": "float", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when required.", + "type": "number", + "example": 10.5, + "format": "float", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateFloatColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value.", + "type": "number", + "example": 0, + "format": "float", + "nullable": true + }, + "max": { + "description": "Maximum value.", + "type": "number", + "example": 100, + "format": "float", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when required.", + "type": "number", + "example": 10.5, + "format": "float", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "post": { + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", + "tags": [ + "databases" + ], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIntegerColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "integer", + "example": 100, + "format": "int64", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when attribute is required.", + "type": "integer", + "example": 10, + "format": "int64", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIntegerColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "integer", + "example": 100, + "format": "int64", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when attribute is required.", + "type": "integer", + "example": 10, + "format": "int64", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", + "tags": [ + "databases" + ], + "description": "Create IP address attribute.\n", + "responses": { + "202": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIpColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value. Cannot be set when attribute is required.", + "type": "string", + "example": "192.0.2.0", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip\/{key}": { + "patch": { + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIpColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value. Cannot be set when attribute is required.", + "type": "string", + "example": "192.0.2.0", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { + "post": { + "summary": "Create line attribute", + "operationId": "databasesCreateLineAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric line attribute.", + "responses": { + "202": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createLineColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "type": "array", + "example": [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ], + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { + "patch": { + "summary": "Update line attribute", + "operationId": "databasesUpdateLineAttribute", + "tags": [ + "databases" + ], + "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateLineColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "type": "array", + "example": [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ], + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "nullable": true + }, + "newKey": { + "description": "New attribute key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { + "post": { + "summary": "Create longtext attribute", + "operationId": "databasesCreateLongtextAttribute", + "tags": [ + "databases" + ], + "description": "Create a longtext attribute.\n", + "responses": { + "202": { + "description": "AttributeLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLongtext" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createLongtextColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { + "patch": { + "summary": "Update longtext attribute", + "operationId": "databasesUpdateLongtextAttribute", + "tags": [ + "databases" + ], + "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLongtext" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateLongtextColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { + "post": { + "summary": "Create mediumtext attribute", + "operationId": "databasesCreateMediumtextAttribute", + "tags": [ + "databases" + ], + "description": "Create a mediumtext attribute.\n", + "responses": { + "202": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createMediumtextColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext attribute", + "operationId": "databasesUpdateMediumtextAttribute", + "tags": [ + "databases" + ], + "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateMediumtextColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + "post": { + "summary": "Create point attribute", + "operationId": "databasesCreatePointAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric point attribute.", + "responses": { + "202": { + "description": "AttributePoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePoint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPointColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "type": "array", + "example": [ + 1, + 2 + ], + "items": { + "type": "number", + "format": "double" + }, + "nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { + "patch": { + "summary": "Update point attribute", + "operationId": "databasesUpdatePointAttribute", + "tags": [ + "databases" + ], + "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePoint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePointColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "type": "array", + "example": [ + 1, + 2 + ], + "items": { + "type": "number", + "format": "double" + }, + "nullable": true + }, + "newKey": { + "description": "New attribute key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { + "post": { + "summary": "Create polygon attribute", + "operationId": "databasesCreatePolygonAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric polygon attribute.", + "responses": { + "202": { + "description": "AttributePolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePolygon" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPolygonColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "type": "array", + "example": [ + [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ], + [ + 1, + 2 + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { + "patch": { + "summary": "Update polygon attribute", + "operationId": "databasesUpdatePolygonAttribute", + "tags": [ + "databases" + ], + "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePolygon" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePolygonColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "type": "array", + "example": [ + [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ], + [ + 1, + 2 + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "nullable": true + }, + "newKey": { + "description": "New attribute key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRelationshipColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "description": "Related Collection ID.", + "type": "string", + "example": "<RELATED_COLLECTION_ID>" + }, + "type": { + "description": "Relationship type. Possible values are: oneToOne, oneToMany, manyToOne, manyToMany.", + "type": "string", + "example": "oneToOne", + "title": "RelationshipType", + "oneOf": [ + { + "type": "string", + "enum": [ + "oneToOne" + ], + "title": "oneToOne" + }, + { + "type": "string", + "enum": [ + "manyToOne" + ], + "title": "manyToOne" + }, + { + "type": "string", + "enum": [ + "manyToMany" + ], + "title": "manyToMany" + }, + { + "type": "string", + "enum": [ + "oneToMany" + ], + "title": "oneToMany" + } + ] + }, + "twoWay": { + "description": "Is Two Way?", + "type": "boolean", + "default": false, + "example": false + }, + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>", + "nullable": true + }, + "twoWayKey": { + "description": "Two Way Attribute Key.", + "type": "string", + "example": "<TWO_WAY_KEY>", + "nullable": true + }, + "onDelete": { + "description": "Delete constraint. Possible values are: cascade, restrict, setNull.", + "type": "string", + "default": "restrict", + "example": "cascade", + "title": "RelationMutate", + "oneOf": [ + { + "type": "string", + "enum": [ + "cascade" + ], + "title": "cascade" + }, + { + "type": "string", + "enum": [ + "restrict" + ], + "title": "restrict" + }, + { + "type": "string", + "enum": [ + "setNull" + ], + "title": "setNull" + } + ] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRelationshipColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "description": "Delete constraint. Possible values are: cascade, restrict, setNull.", + "type": "string", + "example": "cascade", + "title": "RelationMutate", + "oneOf": [ + { + "type": "string", + "enum": [ + "cascade" + ], + "title": "cascade" + }, + { + "type": "string", + "enum": [ + "restrict" + ], + "title": "restrict" + }, + { + "type": "string", + "enum": [ + "setNull" + ], + "title": "setNull" + } + ] + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { + "post": { + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", + "tags": [ + "databases" + ], + "description": "Create a string attribute.\n", + "responses": { + "202": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createStringColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "size": { + "description": "Attribute size for text attributes, in number of characters.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { + "patch": { + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateStringColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "size": { + "description": "Maximum size of the string attribute.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { + "post": { + "summary": "Create text attribute", + "operationId": "databasesCreateTextAttribute", + "tags": [ + "databases" + ], + "description": "Create a text attribute.\n", + "responses": { + "202": { + "description": "AttributeText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeText" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTextColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { + "patch": { + "summary": "Update text attribute", + "operationId": "databasesUpdateTextAttribute", + "tags": [ + "databases" + ], + "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeText" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTextColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { + "post": { + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", + "tags": [ + "databases" + ], + "description": "Create a URL attribute.\n", + "responses": { + "202": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createUrlColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { + "patch": { + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateUrlColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { + "post": { + "summary": "Create varchar attribute", + "operationId": "databasesCreateVarcharAttribute", + "tags": [ + "databases" + ], + "description": "Create a varchar attribute.\n", + "responses": { + "202": { + "description": "AttributeVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeVarchar" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/create-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createVarcharColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Attribute Key.", + "type": "string", + "example": "<KEY>" + }, + "size": { + "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is attribute an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { + "patch": { + "summary": "Update varchar attribute", + "operationId": "databasesUpdateVarcharAttribute", + "tags": [ + "databases" + ], + "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeVarchar" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/update-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateVarcharColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is attribute required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "size": { + "description": "Maximum size of the varchar attribute.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "newKey": { + "description": "New Attribute Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", + "content": { + "application\/json": { + "schema": { + "anyOf": [ + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "boolean" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "integer" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "double" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "email" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "enum" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "url" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "ip" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "datetime" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "relationship" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeString" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + } + } + } + ] + } + ] + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "group": "attributes", + "demo": "databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "tags": [ + "databases" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "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" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "Create document", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + }, + { + "name": "createDocuments", + "namespace": "databases", + "platforms": [ + "console", + "server" + ], + "summary": "Create documents", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRows" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "data": { + "description": "Document data as JSON object.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + }, + "permissions": { + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "documents": { + "description": "Array of documents data as JSON objects.", + "type": "array", + "default": [], + "items": { + "type": "object" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + }, + "required": [ + "documentId", + "data" + ] + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "databasesUpsertDocuments", + "tags": [ + "databases" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + }, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "databases", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "description": "Array of document data as JSON objects. May contain partial documents.", + "type": "array", + "items": { + "type": "object" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRows" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + } + }, + "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.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRows" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", + "tags": [ + "databases" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + }, + "permissions": { + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "tags": [ + "databases" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + } + }, + "permissions": { + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, + "auth": { + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string", + "example": "<ATTRIBUTE>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "description": "Value to increment the attribute by. The value must be a number.", + "type": "number", + "default": 1, + "example": 1, + "format": "float" + }, + "min": { + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "type": "number", + "example": 0, + "format": "float", + "nullable": true + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Increment a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "documents", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, + "auth": { + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string", + "example": "<ATTRIBUTE>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "description": "Value to increment the attribute by. The value must be a number.", + "type": "number", + "default": 1, + "example": 1, + "format": "float" + }, + "max": { + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "type": "number", + "example": 100, + "format": "float", + "nullable": true + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "indexes", + "demo": "databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listIndexes" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "indexes", + "demo": "databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIndex" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Index Key.", + "type": "string", + "example": "<KEY>" + }, + "type": { + "description": "Index type.", + "type": "string", + "example": "key", + "title": "DatabasesIndexType", + "oneOf": [ + { + "type": "string", + "enum": [ + "key" + ], + "title": "key" + }, + { + "type": "string", + "enum": [ + "fulltext" + ], + "title": "fulltext" + }, + { + "type": "string", + "enum": [ + "unique" + ], + "title": "unique" + }, + { + "type": "string", + "enum": [ + "spatial" + ], + "title": "spatial" + } + ] + }, + "attributes": { + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "type": "array", + "items": { + "type": "string" + } + }, + "orders": { + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "type": "array", + "default": [], + "items": { + "title": "OrderBy", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "asc" + ], + "title": "asc" + }, + { + "type": "string", + "enum": [ + "desc" + ], + "title": "desc" + } + ] + } + }, + "lengths": { + "description": "Length of index. Maximum of 100", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "tags": [ + "databases" + ], + "description": "Get an index by its unique ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "indexes", + "demo": "databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getIndex" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "group": "indexes", + "demo": "databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteIndex" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb": { + "get": { + "summary": "List databases", + "operationId": "documentsDBList", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documentsdb", + "demo": "documentsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.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 columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "documentsDBCreate", + "tags": [ + "documentsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documentsdb", + "demo": "documentsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.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": { + "databaseId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "name": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "specification": { + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "type": "string", + "default": "serverless", + "example": "serverless" + }, + "replicas": { + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "syncMode": { + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/documentsdb\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "documentsDBListSpecifications", + "tags": [ + "documentsDB" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, its own prices and overage rates, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documentsdb", + "demo": "documentsdb\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "documentsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "description": "Seconds before the transaction expires.", + "type": "integer", + "default": 300, + "example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "tags": [ + "documentsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "description": "Commit transaction?", + "type": "boolean", + "default": false, + "example": false + }, + "rollback": { + "description": "Rollback transaction?", + "type": "boolean", + "default": false, + "example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", + "tags": [ + "documentsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "documentsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.documents.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "description": "Array of staged operations.", + "type": "array", + "default": [], + "example": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ], + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "documentsDBGet", + "tags": [ + "documentsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documentsdb", + "demo": "documentsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "documentsDBUpdate", + "tags": [ + "documentsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documentsdb", + "demo": "documentsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "specification": { + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "type": "string", + "example": "serverless", + "nullable": true + }, + "replicas": { + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "syncMode": { + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "documentsDBDelete", + "tags": [ + "documentsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documentsdb", + "demo": "documentsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "documentsDBListCollections", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collectionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "documentsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 collection", + "operationId": "documentsDBCreateCollection", + "tags": [ + "documentsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "documentsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<COLLECTION_ID>" + }, + "name": { + "description": "Collection name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "documentSecurity": { + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "attributes": { + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "type": "array", + "default": [], + "items": { + "type": "object" + } + }, + "indexes": { + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "type": "array", + "default": [], + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "documentsDBGetCollection", + "tags": [ + "documentsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "documentsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "documentsDBUpdateCollection", + "tags": [ + "documentsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "documentsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Collection name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "documentSecurity": { + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "purge": { + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "documentsDBDeleteCollection", + "tags": [ + "documentsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "documentsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", + "tags": [ + "documentsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "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" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", + "tags": [ + "documentsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "Create document", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "Create documents", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "data": { + "description": "Document data as JSON object.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + }, + "permissions": { + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "documents": { + "description": "Array of documents data as JSON objects.", + "type": "array", + "default": [], + "items": { + "type": "object" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documentId", + "data" + ] + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "documentsDBUpsertDocuments", + "tags": [ + "documentsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "documentsDB", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "documentsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "description": "Array of document data as JSON objects. May contain partial documents.", + "type": "array", + "items": { + "type": "object" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "documentsDBUpdateDocuments", + "tags": [ + "documentsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "type": "object", + "default": {}, + "example": {} + }, + "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.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "documentsDBDeleteDocuments", + "tags": [ + "documentsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "tags": [ + "documentsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", + "tags": [ + "documentsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "type": "object", + "default": {}, + "example": {} + }, + "permissions": { + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", + "tags": [ + "documentsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "type": "object", + "default": {}, + "example": {} + }, + "permissions": { + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "tags": [ + "documentsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string", + "example": "<ATTRIBUTE>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "description": "Value to decrement the attribute by. The value must be a number.", + "type": "number", + "default": 1, + "example": 1, + "format": "float" + }, + "min": { + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "type": "number", + "example": 0, + "format": "float" + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documentsdb.documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string", + "example": "<ATTRIBUTE>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "description": "Value to increment the attribute by. The value must be a number.", + "type": "number", + "default": 1, + "example": 1, + "format": "float" + }, + "max": { + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "type": "number", + "example": 100, + "format": "float" + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "documentsDBListIndexes", + "tags": [ + "documentsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "documentsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.indexes.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "documentsDBCreateIndex", + "tags": [ + "documentsDB" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "documentsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.indexes.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Index Key.", + "type": "string", + "example": "<KEY>" + }, + "type": { + "description": "Index type.", + "type": "string", + "example": "key", + "title": "DocumentsDBIndexType", + "oneOf": [ + { + "type": "string", + "enum": [ + "key" + ], + "title": "key" + }, + { + "type": "string", + "enum": [ + "fulltext" + ], + "title": "fulltext" + }, + { + "type": "string", + "enum": [ + "unique" + ], + "title": "unique" + } + ] + }, + "attributes": { + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "type": "array", + "items": { + "type": "string" + } + }, + "orders": { + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "type": "array", + "default": [], + "items": { + "title": "OrderBy", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "asc" + ], + "title": "asc" + }, + { + "type": "string", + "enum": [ + "desc" + ], + "title": "desc" + } + ] + } + }, + "lengths": { + "description": "Length of index. Maximum of 100", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "documentsDBGetIndex", + "tags": [ + "documentsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "documentsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.indexes.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "documentsDBDeleteIndex", + "tags": [ + "documentsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "documentsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documentsdb.indexes.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "documentsDBCreateFailover", + "tags": [ + "documentsDB" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "failovers", + "demo": "documentsdb\/create-failover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "type": "string", + "example": "<TARGET_REPLICA_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "documentsDBListOperations", + "tags": [ + "documentsDB" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "operations", + "demo": "documentsdb\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "example": "queued" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "documentsDBGetReplicas", + "tags": [ + "documentsDB" + ], + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", + "responses": { + "200": { + "description": "Replicas", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "replicas", + "demo": "documentsdb\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "documentsDBGetStatus", + "tags": [ + "documentsDB" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documentsdb", + "demo": "documentsdb\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains": { + "get": { + "summary": "List domains", + "operationId": "domainsList", + "tags": [ + "domains" + ], + "description": "List all domains registered for this project. This endpoint supports pagination.", + "responses": { + "200": { + "description": "Domains list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as domain name, teamInternalId, expiration, etc.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<SEARCH>", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create a new domain.", + "operationId": "domainsCreate", + "tags": [ + "domains" + ], + "description": "Create a new domain. Before creating a domain, you need to ensure that your DNS provider is properly configured. After creating the domain, you can use the verification endpoint to check if the domain is ready to be used.", + "responses": { + "201": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "description": "Team unique ID.", + "type": "string", + "example": "<TEAM_ID>" + }, + "domain": { + "description": "Domain name (e.g. \"example.com\").", + "type": "string", + "example": "example.com" + } + }, + "required": [ + "teamId", + "domain" + ] + } + } + } + } + } + }, + "\/domains\/price": { + "get": { + "summary": "Get domain price", + "operationId": "domainsGetPrice", + "tags": [ + "domains" + ], + "description": "Get the registration price for a domain name.", + "responses": { + "200": { + "description": "DomainPrice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainPrice" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": null, + "demo": "domains\/get-price.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "2.0.0", + "replaceWith": "domains.listPrices" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domain", + "description": "Domain name to get price for.", + "required": true, + "schema": { + "type": "string", + "example": "example.com" + }, + "in": "query" + }, + { + "name": "periodYears", + "description": "Number of years to calculate the domain price for. Must be at least 1.", + "required": false, + "schema": { + "type": "integer", + "format": "uint32", + "default": 1 + }, + "in": "query" + }, + { + "name": "registrationType", + "description": "Type of registration pricing to fetch. Allowed values: new, transfer, renewal, trade.", + "required": false, + "schema": { + "type": "string", + "example": "new", + "title": "DomainRegistrationType", + "oneOf": [ + { + "type": "string", + "enum": [ + "new" + ], + "title": "new" + }, + { + "type": "string", + "enum": [ + "transfer" + ], + "title": "transfer" + }, + { + "type": "string", + "enum": [ + "renewal" + ], + "title": "renewal" + }, + { + "type": "string", + "enum": [ + "trade" + ], + "title": "trade" + } + ], + "default": "new" + }, + "in": "query" + } + ] + } + }, + "\/domains\/prices": { + "get": { + "summary": "List domain prices", + "operationId": "domainsListPrices", + "tags": [ + "domains" + ], + "description": "Check availability and get the requested registration price for one or more domain names. Availability is resolved for all domains in a single registrar lookup. Unavailable domains have a null price for new registrations, but can still be priced for renewal, transfer, or trade. Every priced domain also carries its renewal price for the same period, so a separate renewal lookup is not needed. A domain whose price could not be resolved, for example because its TLD is not supported, is returned with a null price.", + "responses": { + "200": { + "description": "Domain prices list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainPricesList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/list-prices.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domains", + "description": "Domain names to check availability and price for. Maximum of 50 domains per request.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "in": "query" + }, + { + "name": "periodYears", + "description": "Number of years to calculate the domain price for. Must be at least 1.", + "required": false, + "schema": { + "type": "integer", + "format": "uint32", + "default": 1 + }, + "in": "query" + }, + { + "name": "registrationType", + "description": "Type of registration pricing to fetch. Allowed values: new, transfer, renewal, trade.", + "required": false, + "schema": { + "type": "string", + "example": "new", + "title": "DomainRegistrationType", + "oneOf": [ + { + "type": "string", + "enum": [ + "new" + ], + "title": "new" + }, + { + "type": "string", + "enum": [ + "transfer" + ], + "title": "transfer" + }, + { + "type": "string", + "enum": [ + "renewal" + ], + "title": "renewal" + }, + { + "type": "string", + "enum": [ + "trade" + ], + "title": "trade" + } + ], + "default": "new" + }, + "in": "query" + } + ] + } + }, + "\/domains\/purchases": { + "post": { + "summary": "Create a domain purchase", + "operationId": "domainsCreatePurchase", + "tags": [ + "domains" + ], + "description": "Initiate a domain purchase by providing registrant details and a payment method. Authorizes the payment and returns a `clientSecret`. If 3D Secure is required, use the `clientSecret` on the client to complete the authentication challenge. Once authentication is complete (or if none is needed), call the Update Purchase endpoint to capture the payment and finalize the purchase.", + "responses": { + "201": { + "description": "DomainPurchase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainPurchase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-purchase.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "description": "Fully qualified domain name to purchase (for example, example.com).", + "type": "string", + "example": "example.com" + }, + "organizationId": { + "description": "Team ID that will own the domain.", + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "firstName": { + "description": "Registrant first name used for domain registration.", + "type": "string", + "example": "<FIRST_NAME>" + }, + "lastName": { + "description": "Registrant last name used for domain registration.", + "type": "string", + "example": "<LAST_NAME>" + }, + "email": { + "description": "Registrant email address for registration and notices.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "phone": { + "description": "Registrant phone number in E.164 format (for example, +15555551234).", + "type": "string", + "example": "+12065550100", + "format": "phone" + }, + "billingAddressId": { + "description": "Billing address ID used for registration contact details.", + "type": "string", + "example": "<BILLING_ADDRESS_ID>" + }, + "addressLine3": { + "description": "Additional address line for the registrant (line 3).", + "type": "string", + "default": "", + "example": "<ADDRESS_LINE3>" + }, + "companyName": { + "description": "Company or organization name for the registrant.", + "type": "string", + "default": "", + "example": "<COMPANY_NAME>" + }, + "periodYears": { + "description": "Registration term in years (1-10).", + "type": "integer", + "default": 1, + "example": 1, + "format": "int32" + }, + "autoRenewal": { + "description": "Whether the domain should renew automatically after purchase.", + "type": "boolean", + "default": true, + "example": false + }, + "paymentMethodId": { + "description": "Payment method ID to authorize and capture the purchase.", + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + } + }, + "required": [ + "domain", + "organizationId", + "firstName", + "lastName", + "email", + "phone", + "billingAddressId", + "paymentMethodId" + ] + } + } + } + } + } + }, + "\/domains\/purchases\/{invoiceId}": { + "patch": { + "summary": "Confirm a domain purchase", + "operationId": "domainsUpdatePurchase", + "tags": [ + "domains" + ], + "description": "Finalize a domain purchase initiated with Create Purchase. Verifies that any required 3D Secure authentication is complete, registers the domain, captures the payment, and provisions default DNS records. Returns a 402 error if authentication is still pending.", + "responses": { + "200": { + "description": "DomainPurchase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainPurchase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-purchase.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "invoiceId", + "description": "Invoice ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INVOICE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "organizationId": { + "description": "Team ID that owns the domain.", + "type": "string", + "example": "<ORGANIZATION_ID>" + } + }, + "required": [ + "organizationId" + ] + } + } + } + } + } + }, + "\/domains\/suggestions": { + "get": { + "summary": "List domain suggestions", + "operationId": "domainsListSuggestions", + "tags": [ + "domains" + ], + "description": "List domain suggestions.", + "responses": { + "200": { + "description": "Domain suggestions list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainSuggestionsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/list-suggestions.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "query", + "description": "Query to find available domains and suggestions. Max length: 256 chars.", + "required": true, + "schema": { + "type": "string", + "example": "<QUERY>" + }, + "in": "query" + }, + { + "name": "tlds", + "description": "TLDs to suggest.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of suggestions to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "in": "query" + }, + { + "name": "filterType", + "description": "Filter type: premium, suggestion.", + "required": false, + "schema": { + "type": "string", + "example": "premium", + "title": "DomainSuggestionType", + "oneOf": [ + { + "type": "string", + "enum": [ + "premium" + ], + "title": "premium" + }, + { + "type": "string", + "enum": [ + "suggestion" + ], + "title": "suggestion" + } + ] + }, + "in": "query" + }, + { + "name": "priceMax", + "description": "Filter premium domains by maximum price. Only premium domains at or below this price will be returned. Does not affect regular domain suggestions.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "in": "query" + }, + { + "name": "priceMin", + "description": "Filter premium domains by minimum price. Only premium domains at or above this price will be returned. Does not affect regular domain suggestions.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "in": "query" + } + ] + } + }, + "\/domains\/transfers\/in": { + "post": { + "summary": "Create a domain transfer in.", + "operationId": "domainsCreateTransferIn", + "tags": [ + "domains" + ], + "description": "Initiate a domain transfer-in by providing an authorization code, registrant details, and a payment method. Authorizes the payment and returns a `clientSecret`. If 3D Secure is required, use the `clientSecret` on the client to complete the authentication challenge. Once authentication is complete (or if none is needed), call the Update Transfer In endpoint to capture the payment and submit the transfer.", + "responses": { + "201": { + "description": "DomainPurchase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainPurchase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-transfer-in.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "description": "Domain name to transfer in.", + "type": "string", + "example": "example.com" + }, + "organizationId": { + "description": "Organization ID that this domain will belong to.", + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "authCode": { + "description": "Authorization code for the domain transfer.", + "type": "string", + "example": "<AUTH_CODE>" + }, + "autoRenewal": { + "description": "Whether the domain should renew automatically after transfer.", + "type": "boolean", + "default": true, + "example": false + }, + "paymentMethodId": { + "description": "Payment method ID to authorize and capture the transfer.", + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + } + }, + "required": [ + "domain", + "organizationId", + "authCode", + "paymentMethodId" + ] + } + } + } + } + } + }, + "\/domains\/transfers\/in\/{invoiceId}": { + "patch": { + "summary": "Confirm a domain transfer in", + "operationId": "domainsUpdateTransferIn", + "tags": [ + "domains" + ], + "description": "Finalize a domain transfer-in initiated with Create Transfer In. Verifies that any required 3D Secure authentication is complete, submits the transfer with the authorization code, captures the payment, and sends a confirmation email. Returns a 402 error if authentication is still pending.", + "responses": { + "200": { + "description": "DomainPurchase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainPurchase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-transfer-in.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "invoiceId", + "description": "Invoice ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INVOICE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "organizationId": { + "description": "Team ID that owns the domain.", + "type": "string", + "example": "<ORGANIZATION_ID>" + } + }, + "required": [ + "organizationId" + ] + } + } + } + } + } + }, + "\/domains\/transfers\/out": { + "post": { + "summary": "Create a domain transfer out.", + "operationId": "domainsCreateTransferOut", + "tags": [ + "domains" + ], + "description": "Initiate a domain transfer-out by generating an authorization code for the specified domain. The returned `authCode` should be provided to the gaining provider to complete the transfer. If the domain has auto-renewal enabled, it will be automatically disabled as part of this operation.", + "responses": { + "202": { + "description": "domainTransferOut", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainTransferOut" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-transfer-out.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domainId": { + "description": "Domain unique ID.", + "type": "string", + "example": "<DOMAIN_ID>" + }, + "organizationId": { + "description": "Organization ID that this domain belongs to.", + "type": "string", + "example": "<ORGANIZATION_ID>" + } + }, + "required": [ + "domainId", + "organizationId" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}": { + "get": { + "summary": "Get a single domain by its unique ID.", + "operationId": "domainsGet", + "tags": [ + "domains" + ], + "description": "Get a domain by its unique ID.", + "responses": { + "200": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete a domain by its unique ID.", + "operationId": "domainsDelete", + "tags": [ + "domains" + ], + "description": "Delete a domain by its unique ID. This endpoint can be used to delete a domain from your project.\nOnce deleted, the domain will no longer be available for use and all associated resources will be removed.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/auto-renewal": { + "patch": { + "summary": "Update domain auto-renewal setting.", + "operationId": "domainsUpdateAutoRenewal", + "tags": [ + "domains" + ], + "description": "Enable or disable auto-renewal for a domain.", + "responses": { + "200": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-auto-renewal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "autoRenewal": { + "description": "Whether the domain should renew automatically.", + "type": "boolean", + "example": false + } + }, + "required": [ + "autoRenewal" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/nameservers": { + "patch": { + "summary": "Update the registrar nameservers for the given domain.", + "operationId": "domainsUpdateNameservers", + "tags": [ + "domains" + ], + "description": "Update the registrar nameservers for the given domain. When nameservers are not provided,\nthe domain will be updated to use Appwrite nameservers.", + "responses": { + "200": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-nameservers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "nameservers": { + "description": "Nameservers to set for the domain. Defaults to Appwrite nameservers when omitted.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/domains\/{domainId}\/nameservers\/verification": { + "patch": { + "summary": "Verify which NS records are used and update the domain accordingly.", + "operationId": "domainsVerifyNameservers", + "tags": [ + "domains" + ], + "description": "Verify which NS records are used and update the domain accordingly. This will check the domain's\nnameservers and update the domain's status based on whether the nameservers match the expected\nAppwrite nameservers.", + "responses": { + "200": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/verify-nameservers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/presets\/google-workspace": { + "get": { + "summary": "Get Google Workspace preset (Records)", + "operationId": "domainsGetPresetGoogleWorkspace", + "tags": [ + "domains" + ], + "description": "List Google Workspace DNS records.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-preset-google-workspace.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create Google Workspace preset (Records)", + "operationId": "domainsCreatePresetGoogleWorkspace", + "tags": [ + "domains" + ], + "description": "Add Google Workspace DNS records to the domain. This will create the required MX records \nfor Google Workspace email hosting.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-preset-google-workspace.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/presets\/icloud": { + "get": { + "summary": "Get iCloud preset (Records)", + "operationId": "domainsGetPresetICloud", + "tags": [ + "domains" + ], + "description": "List iCloud DNS records.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-preset-i-cloud.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create iCloud preset (Records)", + "operationId": "domainsCreatePresetICloud", + "tags": [ + "domains" + ], + "description": "Add iCloud DNS records to the domain. This will create the required MX and SPF records\nfor using iCloud email services with your domain.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-preset-i-cloud.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/presets\/mailgun": { + "get": { + "summary": "Get Mailgun preset (Records)", + "operationId": "domainsGetPresetMailgun", + "tags": [ + "domains" + ], + "description": "List Mailgun DNS records.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-preset-mailgun.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create Mailgun preset (Records)", + "operationId": "domainsCreatePresetMailgun", + "tags": [ + "domains" + ], + "description": "Add Mailgun DNS records to the domain. This endpoint will create the required DNS records \nfor Mailgun in the specified domain.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-preset-mailgun.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/presets\/outlook": { + "get": { + "summary": "Get Outlook preset (Records)", + "operationId": "domainsGetPresetOutlook", + "tags": [ + "domains" + ], + "description": "List Outlook DNS records.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-preset-outlook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create Outlook preset (Records)", + "operationId": "domainsCreatePresetOutlook", + "tags": [ + "domains" + ], + "description": "Add Outlook DNS records to the domain. This will create the required MX records\nfor setting up Outlook email hosting for your domain.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-preset-outlook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/presets\/proton-mail": { + "get": { + "summary": "Get ProtonMail preset (Records)", + "operationId": "domainsGetPresetProtonMail", + "tags": [ + "domains" + ], + "description": "List ProtonMail DNS records.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-preset-proton-mail.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create ProtonMail preset (Records)", + "operationId": "domainsCreatePresetProtonMail", + "tags": [ + "domains" + ], + "description": "Add ProtonMail DNS records to the domain. This will create the required MX records\nfor using ProtonMail with your custom domain.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-preset-proton-mail.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/presets\/zoho": { + "get": { + "summary": "Get Zoho preset (Records)", + "operationId": "domainsGetPresetZoho", + "tags": [ + "domains" + ], + "description": "List Zoho DNS records.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-preset-zoho.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create Zoho Mail preset (Records)", + "operationId": "domainsCreatePresetZoho", + "tags": [ + "domains" + ], + "description": "Add Zoho Mail DNS records to the domain. This will create the required MX records\nfor setting up Zoho Mail on your domain.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-preset-zoho.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/records": { + "get": { + "summary": "List DNS records for a given domain.", + "operationId": "domainsListRecords", + "tags": [ + "domains" + ], + "description": "List DNS records for a given domain. You can use this endpoint to list all the DNS records\nassociated with your domain.", + "responses": { + "200": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/list-records.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/records\/a": { + "post": { + "summary": "Create a new A record for the given domain.", + "operationId": "domainsCreateRecordA", + "tags": [ + "domains" + ], + "description": "Create a new A record for the given domain. A records are used to point a domain name \nto an IPv4 address. The record value should be a valid IPv4 address.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-a.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "IPv4 address for this A record.", + "type": "string" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment explaining what this record is for.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/a\/{recordId}": { + "put": { + "summary": "Update an existing A record for the given domain.", + "operationId": "domainsUpdateRecordA", + "tags": [ + "domains" + ], + "description": "Update an existing A record for the given domain. This endpoint allows you to modify \nthe properties of an A record including its name (subdomain), IPv4 address, TTL, \nand optional comment.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-a.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "IPv4 address for this A record.", + "type": "string" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment explaining what this record is for.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/aaaa": { + "post": { + "summary": "Create a new AAAA record for the given domain.", + "operationId": "domainsCreateRecordAAAA", + "tags": [ + "domains" + ], + "description": "Create a new AAAA record for the given domain. This endpoint allows you to add a new IPv6 DNS record \nto your domain. The record will be used to point a hostname to an IPv6 address.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-aaaa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "IPv6 address for this AAAA record.", + "type": "string" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment explaining what this record is for.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/aaaa\/{recordId}": { + "put": { + "summary": "Update an existing AAAA record for the given domain.", + "operationId": "domainsUpdateRecordAAAA", + "tags": [ + "domains" + ], + "description": "Update an existing AAAA record for the given domain. This endpoint allows you to modify\nthe properties of an existing AAAA record, including its name (subdomain), IPv6 address,\nTTL, and optional comment.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-aaaa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "IPv6 address for this AAAA record.", + "type": "string" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/alias": { + "post": { + "summary": "Create a new ALIAS record for the given domain.", + "operationId": "domainsCreateRecordAlias", + "tags": [ + "domains" + ], + "description": "Create a new ALIAS record for the given domain. This record type can be used to point your domain \nto another domain name that will serve as an alias. This is particularly useful when you want to \nmap your domain to a target domain that may change its IP address.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-alias.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name.", + "type": "string" + }, + "value": { + "description": "Target domain for this ALIAS record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/alias\/{recordId}": { + "put": { + "summary": "Update an existing ALIAS record for the given domain.", + "operationId": "domainsUpdateRecordAlias", + "tags": [ + "domains" + ], + "description": "Update an existing ALIAS record for the specified domain. This endpoint allows you to modify\nthe properties of an existing ALIAS record including its name, target domain, TTL, and comment.\n \nThe ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).\nIt provides a way to map one domain name to another.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-alias.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name.", + "type": "string" + }, + "value": { + "description": "Target domain for this ALIAS record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/caa": { + "post": { + "summary": "Create a new CAA record for the given domain.", + "operationId": "domainsCreateRecordCAA", + "tags": [ + "domains" + ], + "description": "Create a new CAA record for the given domain. CAA records are used to specify which \nCertificate Authorities (CAs) are allowed to issue SSL\/TLS certificates for your domain.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-caa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name.", + "type": "string" + }, + "value": { + "description": "CAA value (e.g. issuer domain).", + "type": "string" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/caa\/{recordId}": { + "put": { + "summary": "Update an existing CAA record for the given domain.", + "operationId": "domainsUpdateRecordCAA", + "tags": [ + "domains" + ], + "description": "Update an existing CAA record for the given domain. A CAA (Certification Authority Authorization) \nrecord is used to specify which certificate authorities (CAs) are authorized to issue certificates \nfor a domain.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-caa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name.", + "type": "string" + }, + "value": { + "description": "CAA value (e.g. issuer domain).", + "type": "string" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/cname": { + "post": { + "summary": "Create a new CNAME record for the given domain.", + "operationId": "domainsCreateRecordCNAME", + "tags": [ + "domains" + ], + "description": "Create a new CNAME record for the given domain.\n \nA CNAME record maps a subdomain to another domain name, allowing you to create aliases \nfor your domain. For example, you can create a CNAME record to point 'blog.example.com' \nto 'example.wordpress.com'.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-cname.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "Canonical target for this CNAME record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/cname\/{recordId}": { + "put": { + "summary": "Update an existing CNAME record for the given domain.", + "operationId": "domainsUpdateRecordCNAME", + "tags": [ + "domains" + ], + "description": "Update an existing CNAME record for the given domain.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-cname.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "Canonical target for this CNAME record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/https": { + "post": { + "summary": "Create a new HTTPS record for the given domain.", + "operationId": "domainsCreateRecordHTTPS", + "tags": [ + "domains" + ], + "description": "Create a new HTTPS record for the given domain. This record is used to configure HTTPS \nsettings for your domain, enabling secure communication over SSL\/TLS.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-https.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "Target for the HTTPS record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/https\/{recordId}": { + "put": { + "summary": "Update an existing HTTPS record for the given domain.", + "operationId": "domainsUpdateRecordHTTPS", + "tags": [ + "domains" + ], + "description": "Update an existing HTTPS record for the given domain. This endpoint allows you to modify \nthe properties of an HTTPS record associated with your domain, including the name (subdomain), \ntarget value, TTL, and optional comment.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-https.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "Target for the HTTPS record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/mx": { + "post": { + "summary": "Create a new MX record for the given domain.", + "operationId": "domainsCreateRecordMX", + "tags": [ + "domains" + ], + "description": "Create a new MX record for the given domain. MX records are used to define the mail servers responsible \nfor accepting email messages for the domain. Multiple MX records can be created with different priorities.\nThe priority parameter determines the order in which mail servers are used, with lower values indicating \nhigher priority.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-mx.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "Mail server domain for this MX record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "priority": { + "description": "MX priority. Lower values are tried first.", + "type": "integer", + "example": 0, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl", + "priority" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/mx\/{recordId}": { + "put": { + "summary": "Update an existing MX record for the given domain.", + "operationId": "domainsUpdateRecordMX", + "tags": [ + "domains" + ], + "description": "Update an existing MX record for the given domain.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-mx.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "Mail server domain for this MX record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "priority": { + "description": "MX priority. Lower values are tried first.", + "type": "integer", + "example": 0, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl", + "priority" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/ns": { + "post": { + "summary": "Create a new NS record for the given domain.", + "operationId": "domainsCreateRecordNS", + "tags": [ + "domains" + ], + "description": "Create a new NS record for the given domain. NS records specify the nameservers that are used \nto resolve the domain name to IP addresses. Each domain can have multiple NS records.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-ns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "Nameserver target for this NS record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/ns\/{recordId}": { + "put": { + "summary": "Update an existing NS record for the given domain.", + "operationId": "domainsUpdateRecordNS", + "tags": [ + "domains" + ], + "description": "Update an existing NS record for the given domain. This endpoint allows you to modify \nthe properties of an NS (nameserver) record associated with your domain. You can update \nthe record name (subdomain), target nameserver value, TTL, and add or modify comments \nfor better record management.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-ns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain).", + "type": "string" + }, + "value": { + "description": "Nameserver target for this NS record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/srv": { + "post": { + "summary": "Create a new SRV record for the given domain.", + "operationId": "domainsCreateRecordSRV", + "tags": [ + "domains" + ], + "description": "Create a new SRV record for the given domain. SRV records are used to define the location \nof servers for specific services. For example, they can be used to specify which server \nhandles a specific service like SIP or XMPP for the domain.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-srv.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (service name).", + "type": "string" + }, + "value": { + "description": "Target hostname for this SRV record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "priority": { + "description": "Record priority. Lower values are tried first.", + "type": "integer", + "example": 0, + "format": "int32" + }, + "weight": { + "description": "Record weight, used to share load between targets of equal priority.", + "type": "integer", + "example": 0, + "format": "int32" + }, + "port": { + "description": "Port number for the service.", + "type": "integer", + "example": 0, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl", + "priority", + "weight", + "port" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/srv\/{recordId}": { + "put": { + "summary": "Update an existing SRV record for the given domain.", + "operationId": "domainsUpdateRecordSRV", + "tags": [ + "domains" + ], + "description": "Update an existing SRV record for the given domain.\n \nRequired parameters:\n- domainId: Domain unique ID\n- recordId: DNS record unique ID\n- name: Record name (service name)\n- value: Target hostname for this SRV record\n- ttl: Time to live, in seconds\n- priority: Record priority\n- weight: Record weight\n- port: Port number for the service\n \nOptional parameters:\n- comment: A comment for this record", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-srv.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (service name).", + "type": "string" + }, + "value": { + "description": "Target hostname for this SRV record.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "priority": { + "description": "Record priority. Lower values are tried first.", + "type": "integer", + "example": 0, + "format": "int32" + }, + "weight": { + "description": "Record weight, used to share load between targets of equal priority.", + "type": "integer", + "example": 0, + "format": "int32" + }, + "port": { + "description": "Port number for the service.", + "type": "integer", + "example": 0, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl", + "priority", + "weight", + "port" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/txt": { + "post": { + "summary": "Create a new TXT record for the given domain.", + "operationId": "domainsCreateRecordTXT", + "tags": [ + "domains" + ], + "description": "Create a new TXT record for the given domain. TXT records can be used \nto provide additional information about your domain, such as domain \nverification records, SPF records, or DKIM records.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/create-record-txt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain) for the TXT record.", + "type": "string" + }, + "value": { + "description": "TXT record value.", + "type": "string", + "default": "", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/txt\/{recordId}": { + "put": { + "summary": "Update an existing TXT record for the given domain.", + "operationId": "domainsUpdateRecordTXT", + "tags": [ + "domains" + ], + "description": "Update an existing TXT record for the given domain.\n \nUpdate the TXT record details for a specific domain by providing the domain ID,\nrecord ID, and the new record configuration including name, value, TTL, and an optional comment.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-record-txt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Record name (subdomain) for the TXT record.", + "type": "string" + }, + "value": { + "description": "TXT record value.", + "type": "string", + "example": "<VALUE>" + }, + "ttl": { + "description": "Time to live, in seconds. Must be between 1 and 2147483647.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "comment": { + "description": "A comment for this record.", + "type": "string", + "default": "", + "example": "<COMMENT>" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/{recordId}": { + "get": { + "summary": "Get a single DNS record for a given domain by record ID.", + "operationId": "domainsGetRecord", + "tags": [ + "domains" + ], + "description": "Get a single DNS record for a given domain by record ID.\n \nThis endpoint allows you to retrieve a specific DNS record associated with a domain\nusing its unique identifier. The record contains information about the DNS configuration\nsuch as type, value, and TTL settings.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-record.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete a DNS record for the given domain.", + "operationId": "domainsDeleteRecord", + "tags": [ + "domains" + ], + "description": "Delete a DNS record for the given domain. This endpoint allows you to delete an existing DNS record \nfrom a specific domain.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/delete-record.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RECORD_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/team": { + "patch": { + "summary": "Update domain team.", + "operationId": "domainsUpdateTeam", + "tags": [ + "domains" + ], + "description": "Update the team ID for a specific domain. The caller must administer the current\nteam and be an owner of the destination team.\n\nUpdating the team ID will transfer ownership and access control of the domain\nand all its DNS records to the new team.", + "responses": { + "200": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "description": "New team unique ID.", + "type": "string", + "example": "<TEAM_ID>" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/transfers\/status": { + "get": { + "summary": "Get domain transfer status.", + "operationId": "domainsGetTransferStatus", + "tags": [ + "domains" + ], + "description": "Retrieve the current transfer status for a domain. Returns the status, an optional reason, and a timestamp of the last status change.", + "responses": { + "200": { + "description": "domainTransferStatus", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainTransferStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-transfer-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/zone": { + "get": { + "summary": "Retrieve the DNS zone file for the given domain.", + "operationId": "domainsGetZone", + "tags": [ + "domains" + ], + "description": "Retrieve the DNS zone file for the given domain. This endpoint will return the DNS\nzone file in a standardized format that can be used to configure DNS servers.", + "responses": { + "200": { + "description": "Text", + "content": { + "text\/plain": { + "schema": { + "type": "string" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/get-zone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update the DNS zone for the given domain using the provided zone file content. All parsed records are imported and then the main domain document is returned.", + "operationId": "domainsUpdateZone", + "tags": [ + "domains" + ], + "description": "Update the DNS zone for the given domain using the provided zone file content.\nAll parsed records are imported and then the main domain document is returned.", + "responses": { + "201": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "domains\/update-zone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOMAIN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "description": "DNS zone file content as a string.", + "type": "string", + "example": "<CONTENT>" + } + }, + "required": [ + "content" + ] + } + } + } + } + } + }, + "\/embeddings\/text": { + "post": { + "summary": "Create text embeddings", + "operationId": "embeddingsCreateTextEmbeddings", + "tags": [ + "embeddings" + ], + "description": "Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.\n", + "responses": { + "200": { + "description": "Embedding list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/embeddingList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "embeddings", + "demo": "embeddings\/create-text-embeddings.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "embeddings.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "createTextEmbeddings", + "namespace": "embeddings", + "platforms": [ + "console", + "server" + ], + "summary": "Create Text Embedding", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "texts", + "model" + ], + "required": [ + "texts" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/embeddingList" + } + ], + "description": "Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.\n", + "demo": "embeddings\/create-text-embeddings.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "texts": { + "description": "Array of text to generate embeddings.", + "type": "array", + "items": { + "type": "string" + } + }, + "model": { + "description": "The embedding model to use for generating vector embeddings.", + "type": "string", + "default": "nomic-embed-text", + "example": "nomic-embed-text", + "title": "EmbeddingModel", + "oneOf": [ + { + "type": "string", + "enum": [ + "nomic-embed-text" + ], + "title": "nomic-embed-text" + }, + { + "type": "string", + "enum": [ + "all-minilm" + ], + "title": "all-minilm" + } + ] + } + }, + "required": [ + "texts" + ] + } + } + } + } + } + }, + "\/functions": { + "get": { + "summary": "List functions", + "operationId": "functionsList", + "tags": [ + "functions" + ], + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Functions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/functionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "functions", + "demo": "functions\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.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, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 function", + "operationId": "functionsCreate", + "tags": [ + "functions" + ], + "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", + "responses": { + "201": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "functions", + "demo": "functions\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.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": { + "functionId": { + "description": "Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<FUNCTION_ID>" + }, + "name": { + "description": "Function name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "runtime": { + "description": "Execution runtime.", + "type": "string", + "example": "node-14.5", + "title": "Runtime", + "oneOf": [ + { + "type": "string", + "enum": [ + "node-14.5" + ], + "title": "node-14.5" + }, + { + "type": "string", + "enum": [ + "node-16.0" + ], + "title": "node-16.0" + }, + { + "type": "string", + "enum": [ + "node-18.0" + ], + "title": "node-18.0" + }, + { + "type": "string", + "enum": [ + "node-19.0" + ], + "title": "node-19.0" + }, + { + "type": "string", + "enum": [ + "node-20.0" + ], + "title": "node-20.0" + }, + { + "type": "string", + "enum": [ + "node-21.0" + ], + "title": "node-21.0" + }, + { + "type": "string", + "enum": [ + "node-22" + ], + "title": "node-22" + }, + { + "type": "string", + "enum": [ + "node-23" + ], + "title": "node-23" + }, + { + "type": "string", + "enum": [ + "node-24" + ], + "title": "node-24" + }, + { + "type": "string", + "enum": [ + "node-25" + ], + "title": "node-25" + }, + { + "type": "string", + "enum": [ + "node-26" + ], + "title": "node-26" + }, + { + "type": "string", + "enum": [ + "php-8.0" + ], + "title": "php-8.0" + }, + { + "type": "string", + "enum": [ + "php-8.1" + ], + "title": "php-8.1" + }, + { + "type": "string", + "enum": [ + "php-8.2" + ], + "title": "php-8.2" + }, + { + "type": "string", + "enum": [ + "php-8.3" + ], + "title": "php-8.3" + }, + { + "type": "string", + "enum": [ + "php-8.4" + ], + "title": "php-8.4" + }, + { + "type": "string", + "enum": [ + "ruby-3.0" + ], + "title": "ruby-3.0" + }, + { + "type": "string", + "enum": [ + "ruby-3.1" + ], + "title": "ruby-3.1" + }, + { + "type": "string", + "enum": [ + "ruby-3.2" + ], + "title": "ruby-3.2" + }, + { + "type": "string", + "enum": [ + "ruby-3.3" + ], + "title": "ruby-3.3" + }, + { + "type": "string", + "enum": [ + "ruby-3.4" + ], + "title": "ruby-3.4" + }, + { + "type": "string", + "enum": [ + "ruby-4.0" + ], + "title": "ruby-4.0" + }, + { + "type": "string", + "enum": [ + "python-3.8" + ], + "title": "python-3.8" + }, + { + "type": "string", + "enum": [ + "python-3.9" + ], + "title": "python-3.9" + }, + { + "type": "string", + "enum": [ + "python-3.10" + ], + "title": "python-3.10" + }, + { + "type": "string", + "enum": [ + "python-3.11" + ], + "title": "python-3.11" + }, + { + "type": "string", + "enum": [ + "python-3.12" + ], + "title": "python-3.12" + }, + { + "type": "string", + "enum": [ + "python-3.13" + ], + "title": "python-3.13" + }, + { + "type": "string", + "enum": [ + "python-3.14" + ], + "title": "python-3.14" + }, + { + "type": "string", + "enum": [ + "python-ml-3.11" + ], + "title": "python-ml-3.11" + }, + { + "type": "string", + "enum": [ + "python-ml-3.12" + ], + "title": "python-ml-3.12" + }, + { + "type": "string", + "enum": [ + "python-ml-3.13" + ], + "title": "python-ml-3.13" + }, + { + "type": "string", + "enum": [ + "deno-1.21" + ], + "title": "deno-1.21" + }, + { + "type": "string", + "enum": [ + "deno-1.24" + ], + "title": "deno-1.24" + }, + { + "type": "string", + "enum": [ + "deno-1.35" + ], + "title": "deno-1.35" + }, + { + "type": "string", + "enum": [ + "deno-1.40" + ], + "title": "deno-1.40" + }, + { + "type": "string", + "enum": [ + "deno-1.46" + ], + "title": "deno-1.46" + }, + { + "type": "string", + "enum": [ + "deno-2.0" + ], + "title": "deno-2.0" + }, + { + "type": "string", + "enum": [ + "deno-2.5" + ], + "title": "deno-2.5" + }, + { + "type": "string", + "enum": [ + "deno-2.6" + ], + "title": "deno-2.6" + }, + { + "type": "string", + "enum": [ + "dart-2.15" + ], + "title": "dart-2.15" + }, + { + "type": "string", + "enum": [ + "dart-2.16" + ], + "title": "dart-2.16" + }, + { + "type": "string", + "enum": [ + "dart-2.17" + ], + "title": "dart-2.17" + }, + { + "type": "string", + "enum": [ + "dart-2.18" + ], + "title": "dart-2.18" + }, + { + "type": "string", + "enum": [ + "dart-2.19" + ], + "title": "dart-2.19" + }, + { + "type": "string", + "enum": [ + "dart-3.0" + ], + "title": "dart-3.0" + }, + { + "type": "string", + "enum": [ + "dart-3.1" + ], + "title": "dart-3.1" + }, + { + "type": "string", + "enum": [ + "dart-3.3" + ], + "title": "dart-3.3" + }, + { + "type": "string", + "enum": [ + "dart-3.5" + ], + "title": "dart-3.5" + }, + { + "type": "string", + "enum": [ + "dart-3.8" + ], + "title": "dart-3.8" + }, + { + "type": "string", + "enum": [ + "dart-3.9" + ], + "title": "dart-3.9" + }, + { + "type": "string", + "enum": [ + "dart-3.10" + ], + "title": "dart-3.10" + }, + { + "type": "string", + "enum": [ + "dart-3.11" + ], + "title": "dart-3.11" + }, + { + "type": "string", + "enum": [ + "dart-3.12" + ], + "title": "dart-3.12" + }, + { + "type": "string", + "enum": [ + "dart-3.13" + ], + "title": "dart-3.13" + }, + { + "type": "string", + "enum": [ + "dotnet-6.0" + ], + "title": "dotnet-6.0" + }, + { + "type": "string", + "enum": [ + "dotnet-7.0" + ], + "title": "dotnet-7.0" + }, + { + "type": "string", + "enum": [ + "dotnet-8.0" + ], + "title": "dotnet-8.0" + }, + { + "type": "string", + "enum": [ + "dotnet-10" + ], + "title": "dotnet-10" + }, + { + "type": "string", + "enum": [ + "java-8.0" + ], + "title": "java-8.0" + }, + { + "type": "string", + "enum": [ + "java-11.0" + ], + "title": "java-11.0" + }, + { + "type": "string", + "enum": [ + "java-17.0" + ], + "title": "java-17.0" + }, + { + "type": "string", + "enum": [ + "java-18.0" + ], + "title": "java-18.0" + }, + { + "type": "string", + "enum": [ + "java-21.0" + ], + "title": "java-21.0" + }, + { + "type": "string", + "enum": [ + "java-22" + ], + "title": "java-22" + }, + { + "type": "string", + "enum": [ + "java-25" + ], + "title": "java-25" + }, + { + "type": "string", + "enum": [ + "swift-5.5" + ], + "title": "swift-5.5" + }, + { + "type": "string", + "enum": [ + "swift-5.8" + ], + "title": "swift-5.8" + }, + { + "type": "string", + "enum": [ + "swift-5.9" + ], + "title": "swift-5.9" + }, + { + "type": "string", + "enum": [ + "swift-5.10" + ], + "title": "swift-5.10" + }, + { + "type": "string", + "enum": [ + "swift-6.2" + ], + "title": "swift-6.2" + }, + { + "type": "string", + "enum": [ + "kotlin-1.6" + ], + "title": "kotlin-1.6" + }, + { + "type": "string", + "enum": [ + "kotlin-1.8" + ], + "title": "kotlin-1.8" + }, + { + "type": "string", + "enum": [ + "kotlin-1.9" + ], + "title": "kotlin-1.9" + }, + { + "type": "string", + "enum": [ + "kotlin-2.0" + ], + "title": "kotlin-2.0" + }, + { + "type": "string", + "enum": [ + "kotlin-2.3" + ], + "title": "kotlin-2.3" + }, + { + "type": "string", + "enum": [ + "cpp-17" + ], + "title": "cpp-17" + }, + { + "type": "string", + "enum": [ + "cpp-20" + ], + "title": "cpp-20" + }, + { + "type": "string", + "enum": [ + "bun-1.0" + ], + "title": "bun-1.0" + }, + { + "type": "string", + "enum": [ + "bun-1.1" + ], + "title": "bun-1.1" + }, + { + "type": "string", + "enum": [ + "bun-1.2" + ], + "title": "bun-1.2" + }, + { + "type": "string", + "enum": [ + "bun-1.3" + ], + "title": "bun-1.3" + }, + { + "type": "string", + "enum": [ + "bun-1.4" + ], + "title": "bun-1.4" + }, + { + "type": "string", + "enum": [ + "go-1.23" + ], + "title": "go-1.23" + }, + { + "type": "string", + "enum": [ + "go-1.24" + ], + "title": "go-1.24" + }, + { + "type": "string", + "enum": [ + "go-1.25" + ], + "title": "go-1.25" + }, + { + "type": "string", + "enum": [ + "go-1.26" + ], + "title": "go-1.26" + }, + { + "type": "string", + "enum": [ + "rust-1.83" + ], + "title": "rust-1.83" + }, + { + "type": "string", + "enum": [ + "static-1" + ], + "title": "static-1" + }, + { + "type": "string", + "enum": [ + "flutter-3.24" + ], + "title": "flutter-3.24" + }, + { + "type": "string", + "enum": [ + "flutter-3.27" + ], + "title": "flutter-3.27" + }, + { + "type": "string", + "enum": [ + "flutter-3.29" + ], + "title": "flutter-3.29" + }, + { + "type": "string", + "enum": [ + "flutter-3.32" + ], + "title": "flutter-3.32" + }, + { + "type": "string", + "enum": [ + "flutter-3.35" + ], + "title": "flutter-3.35" + }, + { + "type": "string", + "enum": [ + "flutter-3.38" + ], + "title": "flutter-3.38" + }, + { + "type": "string", + "enum": [ + "flutter-3.41" + ], + "title": "flutter-3.41" + }, + { + "type": "string", + "enum": [ + "flutter-3.44" + ], + "title": "flutter-3.44" + }, + { + "type": "string", + "enum": [ + "flutter-3.47" + ], + "title": "flutter-3.47" + } + ] + }, + "execute": { + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "type": "array", + "default": [], + "example": [ + "any" + ], + "items": { + "type": "string" + } + }, + "events": { + "description": "Events list. Maximum of 100 events are allowed.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string", + "default": "", + "example": "0 0 * * *" + }, + "timeout": { + "description": "Function maximum execution time in seconds.", + "type": "integer", + "default": 15, + "example": 1, + "format": "int32" + }, + "enabled": { + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "logging": { + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "type": "boolean", + "default": true, + "example": false + }, + "entrypoint": { + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "type": "string", + "default": "", + "example": "<ENTRYPOINT>" + }, + "commands": { + "description": "Build Commands.", + "type": "string", + "default": "", + "example": "<COMMANDS>" + }, + "scopes": { + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 200 scopes are allowed.", + "type": "array", + "default": [], + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + }, + "installationId": { + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "type": "string", + "default": "", + "example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "description": "Repository ID of the repo linked to the function.", + "type": "string", + "default": "", + "example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "description": "Production branch for the repo linked to the function.", + "type": "string", + "default": "", + "example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "type": "boolean", + "default": false, + "example": false + }, + "providerRootDirectory": { + "description": "Path to function code in the linked repo.", + "type": "string", + "default": "", + "example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "providerBranches": { + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "providerPaths": { + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "buildSpecification": { + "description": "Build specification for the function deployments.", + "type": "string", + "default": {}, + "example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "description": "Runtime specification for the function executions.", + "type": "string", + "default": {}, + "example": "s-1vcpu-512mb" + }, + "deploymentRetention": { + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + } + }, + "required": [ + "functionId", + "name", + "runtime" + ] + } + } + } + } + } + }, + "\/functions\/runtimes": { + "get": { + "summary": "List runtimes", + "operationId": "functionsListRuntimes", + "tags": [ + "functions" + ], + "description": "Get a list of all runtimes that are currently active on your instance.", + "responses": { + "200": { + "description": "Runtimes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/runtimeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "runtimes", + "demo": "functions\/list-runtimes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "functionsListSpecifications", + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/specificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "runtimes", + "demo": "functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "Key": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Specification type to list. Can be one of: runtimes, builds. Defaults to runtimes.", + "required": false, + "schema": { + "type": "string", + "example": "runtimes", + "default": "runtimes" + }, + "in": "query" + } + ] + } + }, + "\/functions\/templates": { + "get": { + "summary": "List templates", + "operationId": "functionsListTemplates", + "tags": [ + "functions" + ], + "description": "List available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Function Templates List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateFunctionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "templates", + "demo": "functions\/list-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "runtimes", + "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "title": "Runtime", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "node-14.5" + ], + "title": "node-14.5" + }, + { + "type": "string", + "enum": [ + "node-16.0" + ], + "title": "node-16.0" + }, + { + "type": "string", + "enum": [ + "node-18.0" + ], + "title": "node-18.0" + }, + { + "type": "string", + "enum": [ + "node-19.0" + ], + "title": "node-19.0" + }, + { + "type": "string", + "enum": [ + "node-20.0" + ], + "title": "node-20.0" + }, + { + "type": "string", + "enum": [ + "node-21.0" + ], + "title": "node-21.0" + }, + { + "type": "string", + "enum": [ + "node-22" + ], + "title": "node-22" + }, + { + "type": "string", + "enum": [ + "node-23" + ], + "title": "node-23" + }, + { + "type": "string", + "enum": [ + "node-24" + ], + "title": "node-24" + }, + { + "type": "string", + "enum": [ + "node-25" + ], + "title": "node-25" + }, + { + "type": "string", + "enum": [ + "node-26" + ], + "title": "node-26" + }, + { + "type": "string", + "enum": [ + "php-8.0" + ], + "title": "php-8.0" + }, + { + "type": "string", + "enum": [ + "php-8.1" + ], + "title": "php-8.1" + }, + { + "type": "string", + "enum": [ + "php-8.2" + ], + "title": "php-8.2" + }, + { + "type": "string", + "enum": [ + "php-8.3" + ], + "title": "php-8.3" + }, + { + "type": "string", + "enum": [ + "php-8.4" + ], + "title": "php-8.4" + }, + { + "type": "string", + "enum": [ + "ruby-3.0" + ], + "title": "ruby-3.0" + }, + { + "type": "string", + "enum": [ + "ruby-3.1" + ], + "title": "ruby-3.1" + }, + { + "type": "string", + "enum": [ + "ruby-3.2" + ], + "title": "ruby-3.2" + }, + { + "type": "string", + "enum": [ + "ruby-3.3" + ], + "title": "ruby-3.3" + }, + { + "type": "string", + "enum": [ + "ruby-3.4" + ], + "title": "ruby-3.4" + }, + { + "type": "string", + "enum": [ + "ruby-4.0" + ], + "title": "ruby-4.0" + }, + { + "type": "string", + "enum": [ + "python-3.8" + ], + "title": "python-3.8" + }, + { + "type": "string", + "enum": [ + "python-3.9" + ], + "title": "python-3.9" + }, + { + "type": "string", + "enum": [ + "python-3.10" + ], + "title": "python-3.10" + }, + { + "type": "string", + "enum": [ + "python-3.11" + ], + "title": "python-3.11" + }, + { + "type": "string", + "enum": [ + "python-3.12" + ], + "title": "python-3.12" + }, + { + "type": "string", + "enum": [ + "python-3.13" + ], + "title": "python-3.13" + }, + { + "type": "string", + "enum": [ + "python-3.14" + ], + "title": "python-3.14" + }, + { + "type": "string", + "enum": [ + "python-ml-3.11" + ], + "title": "python-ml-3.11" + }, + { + "type": "string", + "enum": [ + "python-ml-3.12" + ], + "title": "python-ml-3.12" + }, + { + "type": "string", + "enum": [ + "python-ml-3.13" + ], + "title": "python-ml-3.13" + }, + { + "type": "string", + "enum": [ + "deno-1.21" + ], + "title": "deno-1.21" + }, + { + "type": "string", + "enum": [ + "deno-1.24" + ], + "title": "deno-1.24" + }, + { + "type": "string", + "enum": [ + "deno-1.35" + ], + "title": "deno-1.35" + }, + { + "type": "string", + "enum": [ + "deno-1.40" + ], + "title": "deno-1.40" + }, + { + "type": "string", + "enum": [ + "deno-1.46" + ], + "title": "deno-1.46" + }, + { + "type": "string", + "enum": [ + "deno-2.0" + ], + "title": "deno-2.0" + }, + { + "type": "string", + "enum": [ + "deno-2.5" + ], + "title": "deno-2.5" + }, + { + "type": "string", + "enum": [ + "deno-2.6" + ], + "title": "deno-2.6" + }, + { + "type": "string", + "enum": [ + "dart-2.15" + ], + "title": "dart-2.15" + }, + { + "type": "string", + "enum": [ + "dart-2.16" + ], + "title": "dart-2.16" + }, + { + "type": "string", + "enum": [ + "dart-2.17" + ], + "title": "dart-2.17" + }, + { + "type": "string", + "enum": [ + "dart-2.18" + ], + "title": "dart-2.18" + }, + { + "type": "string", + "enum": [ + "dart-2.19" + ], + "title": "dart-2.19" + }, + { + "type": "string", + "enum": [ + "dart-3.0" + ], + "title": "dart-3.0" + }, + { + "type": "string", + "enum": [ + "dart-3.1" + ], + "title": "dart-3.1" + }, + { + "type": "string", + "enum": [ + "dart-3.3" + ], + "title": "dart-3.3" + }, + { + "type": "string", + "enum": [ + "dart-3.5" + ], + "title": "dart-3.5" + }, + { + "type": "string", + "enum": [ + "dart-3.8" + ], + "title": "dart-3.8" + }, + { + "type": "string", + "enum": [ + "dart-3.9" + ], + "title": "dart-3.9" + }, + { + "type": "string", + "enum": [ + "dart-3.10" + ], + "title": "dart-3.10" + }, + { + "type": "string", + "enum": [ + "dart-3.11" + ], + "title": "dart-3.11" + }, + { + "type": "string", + "enum": [ + "dart-3.12" + ], + "title": "dart-3.12" + }, + { + "type": "string", + "enum": [ + "dart-3.13" + ], + "title": "dart-3.13" + }, + { + "type": "string", + "enum": [ + "dotnet-6.0" + ], + "title": "dotnet-6.0" + }, + { + "type": "string", + "enum": [ + "dotnet-7.0" + ], + "title": "dotnet-7.0" + }, + { + "type": "string", + "enum": [ + "dotnet-8.0" + ], + "title": "dotnet-8.0" + }, + { + "type": "string", + "enum": [ + "dotnet-10" + ], + "title": "dotnet-10" + }, + { + "type": "string", + "enum": [ + "java-8.0" + ], + "title": "java-8.0" + }, + { + "type": "string", + "enum": [ + "java-11.0" + ], + "title": "java-11.0" + }, + { + "type": "string", + "enum": [ + "java-17.0" + ], + "title": "java-17.0" + }, + { + "type": "string", + "enum": [ + "java-18.0" + ], + "title": "java-18.0" + }, + { + "type": "string", + "enum": [ + "java-21.0" + ], + "title": "java-21.0" + }, + { + "type": "string", + "enum": [ + "java-22" + ], + "title": "java-22" + }, + { + "type": "string", + "enum": [ + "java-25" + ], + "title": "java-25" + }, + { + "type": "string", + "enum": [ + "swift-5.5" + ], + "title": "swift-5.5" + }, + { + "type": "string", + "enum": [ + "swift-5.8" + ], + "title": "swift-5.8" + }, + { + "type": "string", + "enum": [ + "swift-5.9" + ], + "title": "swift-5.9" + }, + { + "type": "string", + "enum": [ + "swift-5.10" + ], + "title": "swift-5.10" + }, + { + "type": "string", + "enum": [ + "swift-6.2" + ], + "title": "swift-6.2" + }, + { + "type": "string", + "enum": [ + "kotlin-1.6" + ], + "title": "kotlin-1.6" + }, + { + "type": "string", + "enum": [ + "kotlin-1.8" + ], + "title": "kotlin-1.8" + }, + { + "type": "string", + "enum": [ + "kotlin-1.9" + ], + "title": "kotlin-1.9" + }, + { + "type": "string", + "enum": [ + "kotlin-2.0" + ], + "title": "kotlin-2.0" + }, + { + "type": "string", + "enum": [ + "kotlin-2.3" + ], + "title": "kotlin-2.3" + }, + { + "type": "string", + "enum": [ + "cpp-17" + ], + "title": "cpp-17" + }, + { + "type": "string", + "enum": [ + "cpp-20" + ], + "title": "cpp-20" + }, + { + "type": "string", + "enum": [ + "bun-1.0" + ], + "title": "bun-1.0" + }, + { + "type": "string", + "enum": [ + "bun-1.1" + ], + "title": "bun-1.1" + }, + { + "type": "string", + "enum": [ + "bun-1.2" + ], + "title": "bun-1.2" + }, + { + "type": "string", + "enum": [ + "bun-1.3" + ], + "title": "bun-1.3" + }, + { + "type": "string", + "enum": [ + "bun-1.4" + ], + "title": "bun-1.4" + }, + { + "type": "string", + "enum": [ + "go-1.23" + ], + "title": "go-1.23" + }, + { + "type": "string", + "enum": [ + "go-1.24" + ], + "title": "go-1.24" + }, + { + "type": "string", + "enum": [ + "go-1.25" + ], + "title": "go-1.25" + }, + { + "type": "string", + "enum": [ + "go-1.26" + ], + "title": "go-1.26" + }, + { + "type": "string", + "enum": [ + "rust-1.83" + ], + "title": "rust-1.83" + }, + { + "type": "string", + "enum": [ + "static-1" + ], + "title": "static-1" + }, + { + "type": "string", + "enum": [ + "flutter-3.24" + ], + "title": "flutter-3.24" + }, + { + "type": "string", + "enum": [ + "flutter-3.27" + ], + "title": "flutter-3.27" + }, + { + "type": "string", + "enum": [ + "flutter-3.29" + ], + "title": "flutter-3.29" + }, + { + "type": "string", + "enum": [ + "flutter-3.32" + ], + "title": "flutter-3.32" + }, + { + "type": "string", + "enum": [ + "flutter-3.35" + ], + "title": "flutter-3.35" + }, + { + "type": "string", + "enum": [ + "flutter-3.38" + ], + "title": "flutter-3.38" + }, + { + "type": "string", + "enum": [ + "flutter-3.41" + ], + "title": "flutter-3.41" + }, + { + "type": "string", + "enum": [ + "flutter-3.44" + ], + "title": "flutter-3.44" + }, + { + "type": "string", + "enum": [ + "flutter-3.47" + ], + "title": "flutter-3.47" + } + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "useCases", + "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "title": "FunctionTemplateUseCase", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "starter" + ], + "title": "starter" + }, + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "ai" + ], + "title": "ai" + }, + { + "type": "string", + "enum": [ + "messaging" + ], + "title": "messaging" + }, + { + "type": "string", + "enum": [ + "utilities" + ], + "title": "utilities" + }, + { + "type": "string", + "enum": [ + "dev-tools" + ], + "title": "dev-tools" + }, + { + "type": "string", + "enum": [ + "auth" + ], + "title": "auth" + } + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "limit", + "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Offset the list of returned templates. Maximum offset is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "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" + } + ] + } + }, + "\/functions\/templates\/{templateId}": { + "get": { + "summary": "Get function template", + "operationId": "functionsGetTemplate", + "tags": [ + "functions" + ], + "description": "Get a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Template Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateFunction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "templates", + "demo": "functions\/get-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Template ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEMPLATE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}": { + "get": { + "summary": "Get function", + "operationId": "functionsGet", + "tags": [ + "functions" + ], + "description": "Get a function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "functions", + "demo": "functions\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update function", + "operationId": "functionsUpdate", + "tags": [ + "functions" + ], + "description": "Update function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "functions", + "demo": "functions\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Function name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "runtime": { + "description": "Execution runtime.", + "type": "string", + "example": "node-14.5", + "title": "Runtime", + "oneOf": [ + { + "type": "string", + "enum": [ + "node-14.5" + ], + "title": "node-14.5" + }, + { + "type": "string", + "enum": [ + "node-16.0" + ], + "title": "node-16.0" + }, + { + "type": "string", + "enum": [ + "node-18.0" + ], + "title": "node-18.0" + }, + { + "type": "string", + "enum": [ + "node-19.0" + ], + "title": "node-19.0" + }, + { + "type": "string", + "enum": [ + "node-20.0" + ], + "title": "node-20.0" + }, + { + "type": "string", + "enum": [ + "node-21.0" + ], + "title": "node-21.0" + }, + { + "type": "string", + "enum": [ + "node-22" + ], + "title": "node-22" + }, + { + "type": "string", + "enum": [ + "node-23" + ], + "title": "node-23" + }, + { + "type": "string", + "enum": [ + "node-24" + ], + "title": "node-24" + }, + { + "type": "string", + "enum": [ + "node-25" + ], + "title": "node-25" + }, + { + "type": "string", + "enum": [ + "node-26" + ], + "title": "node-26" + }, + { + "type": "string", + "enum": [ + "php-8.0" + ], + "title": "php-8.0" + }, + { + "type": "string", + "enum": [ + "php-8.1" + ], + "title": "php-8.1" + }, + { + "type": "string", + "enum": [ + "php-8.2" + ], + "title": "php-8.2" + }, + { + "type": "string", + "enum": [ + "php-8.3" + ], + "title": "php-8.3" + }, + { + "type": "string", + "enum": [ + "php-8.4" + ], + "title": "php-8.4" + }, + { + "type": "string", + "enum": [ + "ruby-3.0" + ], + "title": "ruby-3.0" + }, + { + "type": "string", + "enum": [ + "ruby-3.1" + ], + "title": "ruby-3.1" + }, + { + "type": "string", + "enum": [ + "ruby-3.2" + ], + "title": "ruby-3.2" + }, + { + "type": "string", + "enum": [ + "ruby-3.3" + ], + "title": "ruby-3.3" + }, + { + "type": "string", + "enum": [ + "ruby-3.4" + ], + "title": "ruby-3.4" + }, + { + "type": "string", + "enum": [ + "ruby-4.0" + ], + "title": "ruby-4.0" + }, + { + "type": "string", + "enum": [ + "python-3.8" + ], + "title": "python-3.8" + }, + { + "type": "string", + "enum": [ + "python-3.9" + ], + "title": "python-3.9" + }, + { + "type": "string", + "enum": [ + "python-3.10" + ], + "title": "python-3.10" + }, + { + "type": "string", + "enum": [ + "python-3.11" + ], + "title": "python-3.11" + }, + { + "type": "string", + "enum": [ + "python-3.12" + ], + "title": "python-3.12" + }, + { + "type": "string", + "enum": [ + "python-3.13" + ], + "title": "python-3.13" + }, + { + "type": "string", + "enum": [ + "python-3.14" + ], + "title": "python-3.14" + }, + { + "type": "string", + "enum": [ + "python-ml-3.11" + ], + "title": "python-ml-3.11" + }, + { + "type": "string", + "enum": [ + "python-ml-3.12" + ], + "title": "python-ml-3.12" + }, + { + "type": "string", + "enum": [ + "python-ml-3.13" + ], + "title": "python-ml-3.13" + }, + { + "type": "string", + "enum": [ + "deno-1.21" + ], + "title": "deno-1.21" + }, + { + "type": "string", + "enum": [ + "deno-1.24" + ], + "title": "deno-1.24" + }, + { + "type": "string", + "enum": [ + "deno-1.35" + ], + "title": "deno-1.35" + }, + { + "type": "string", + "enum": [ + "deno-1.40" + ], + "title": "deno-1.40" + }, + { + "type": "string", + "enum": [ + "deno-1.46" + ], + "title": "deno-1.46" + }, + { + "type": "string", + "enum": [ + "deno-2.0" + ], + "title": "deno-2.0" + }, + { + "type": "string", + "enum": [ + "deno-2.5" + ], + "title": "deno-2.5" + }, + { + "type": "string", + "enum": [ + "deno-2.6" + ], + "title": "deno-2.6" + }, + { + "type": "string", + "enum": [ + "dart-2.15" + ], + "title": "dart-2.15" + }, + { + "type": "string", + "enum": [ + "dart-2.16" + ], + "title": "dart-2.16" + }, + { + "type": "string", + "enum": [ + "dart-2.17" + ], + "title": "dart-2.17" + }, + { + "type": "string", + "enum": [ + "dart-2.18" + ], + "title": "dart-2.18" + }, + { + "type": "string", + "enum": [ + "dart-2.19" + ], + "title": "dart-2.19" + }, + { + "type": "string", + "enum": [ + "dart-3.0" + ], + "title": "dart-3.0" + }, + { + "type": "string", + "enum": [ + "dart-3.1" + ], + "title": "dart-3.1" + }, + { + "type": "string", + "enum": [ + "dart-3.3" + ], + "title": "dart-3.3" + }, + { + "type": "string", + "enum": [ + "dart-3.5" + ], + "title": "dart-3.5" + }, + { + "type": "string", + "enum": [ + "dart-3.8" + ], + "title": "dart-3.8" + }, + { + "type": "string", + "enum": [ + "dart-3.9" + ], + "title": "dart-3.9" + }, + { + "type": "string", + "enum": [ + "dart-3.10" + ], + "title": "dart-3.10" + }, + { + "type": "string", + "enum": [ + "dart-3.11" + ], + "title": "dart-3.11" + }, + { + "type": "string", + "enum": [ + "dart-3.12" + ], + "title": "dart-3.12" + }, + { + "type": "string", + "enum": [ + "dart-3.13" + ], + "title": "dart-3.13" + }, + { + "type": "string", + "enum": [ + "dotnet-6.0" + ], + "title": "dotnet-6.0" + }, + { + "type": "string", + "enum": [ + "dotnet-7.0" + ], + "title": "dotnet-7.0" + }, + { + "type": "string", + "enum": [ + "dotnet-8.0" + ], + "title": "dotnet-8.0" + }, + { + "type": "string", + "enum": [ + "dotnet-10" + ], + "title": "dotnet-10" + }, + { + "type": "string", + "enum": [ + "java-8.0" + ], + "title": "java-8.0" + }, + { + "type": "string", + "enum": [ + "java-11.0" + ], + "title": "java-11.0" + }, + { + "type": "string", + "enum": [ + "java-17.0" + ], + "title": "java-17.0" + }, + { + "type": "string", + "enum": [ + "java-18.0" + ], + "title": "java-18.0" + }, + { + "type": "string", + "enum": [ + "java-21.0" + ], + "title": "java-21.0" + }, + { + "type": "string", + "enum": [ + "java-22" + ], + "title": "java-22" + }, + { + "type": "string", + "enum": [ + "java-25" + ], + "title": "java-25" + }, + { + "type": "string", + "enum": [ + "swift-5.5" + ], + "title": "swift-5.5" + }, + { + "type": "string", + "enum": [ + "swift-5.8" + ], + "title": "swift-5.8" + }, + { + "type": "string", + "enum": [ + "swift-5.9" + ], + "title": "swift-5.9" + }, + { + "type": "string", + "enum": [ + "swift-5.10" + ], + "title": "swift-5.10" + }, + { + "type": "string", + "enum": [ + "swift-6.2" + ], + "title": "swift-6.2" + }, + { + "type": "string", + "enum": [ + "kotlin-1.6" + ], + "title": "kotlin-1.6" + }, + { + "type": "string", + "enum": [ + "kotlin-1.8" + ], + "title": "kotlin-1.8" + }, + { + "type": "string", + "enum": [ + "kotlin-1.9" + ], + "title": "kotlin-1.9" + }, + { + "type": "string", + "enum": [ + "kotlin-2.0" + ], + "title": "kotlin-2.0" + }, + { + "type": "string", + "enum": [ + "kotlin-2.3" + ], + "title": "kotlin-2.3" + }, + { + "type": "string", + "enum": [ + "cpp-17" + ], + "title": "cpp-17" + }, + { + "type": "string", + "enum": [ + "cpp-20" + ], + "title": "cpp-20" + }, + { + "type": "string", + "enum": [ + "bun-1.0" + ], + "title": "bun-1.0" + }, + { + "type": "string", + "enum": [ + "bun-1.1" + ], + "title": "bun-1.1" + }, + { + "type": "string", + "enum": [ + "bun-1.2" + ], + "title": "bun-1.2" + }, + { + "type": "string", + "enum": [ + "bun-1.3" + ], + "title": "bun-1.3" + }, + { + "type": "string", + "enum": [ + "bun-1.4" + ], + "title": "bun-1.4" + }, + { + "type": "string", + "enum": [ + "go-1.23" + ], + "title": "go-1.23" + }, + { + "type": "string", + "enum": [ + "go-1.24" + ], + "title": "go-1.24" + }, + { + "type": "string", + "enum": [ + "go-1.25" + ], + "title": "go-1.25" + }, + { + "type": "string", + "enum": [ + "go-1.26" + ], + "title": "go-1.26" + }, + { + "type": "string", + "enum": [ + "rust-1.83" + ], + "title": "rust-1.83" + }, + { + "type": "string", + "enum": [ + "static-1" + ], + "title": "static-1" + }, + { + "type": "string", + "enum": [ + "flutter-3.24" + ], + "title": "flutter-3.24" + }, + { + "type": "string", + "enum": [ + "flutter-3.27" + ], + "title": "flutter-3.27" + }, + { + "type": "string", + "enum": [ + "flutter-3.29" + ], + "title": "flutter-3.29" + }, + { + "type": "string", + "enum": [ + "flutter-3.32" + ], + "title": "flutter-3.32" + }, + { + "type": "string", + "enum": [ + "flutter-3.35" + ], + "title": "flutter-3.35" + }, + { + "type": "string", + "enum": [ + "flutter-3.38" + ], + "title": "flutter-3.38" + }, + { + "type": "string", + "enum": [ + "flutter-3.41" + ], + "title": "flutter-3.41" + }, + { + "type": "string", + "enum": [ + "flutter-3.44" + ], + "title": "flutter-3.44" + }, + { + "type": "string", + "enum": [ + "flutter-3.47" + ], + "title": "flutter-3.47" + } + ] + }, + "execute": { + "description": "An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "type": "array", + "default": [], + "example": [ + "any" + ], + "items": { + "type": "string" + } + }, + "events": { + "description": "Events list. Maximum of 100 events are allowed.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string", + "default": "", + "example": "0 0 * * *" + }, + "timeout": { + "description": "Maximum execution time in seconds.", + "type": "integer", + "default": 15, + "example": 1, + "format": "int32" + }, + "enabled": { + "description": "Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "logging": { + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "type": "boolean", + "default": true, + "example": false + }, + "entrypoint": { + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "type": "string", + "default": "", + "example": "<ENTRYPOINT>" + }, + "commands": { + "description": "Build Commands.", + "type": "string", + "default": "", + "example": "<COMMANDS>" + }, + "scopes": { + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 200 scopes are allowed.", + "type": "array", + "default": [], + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + }, + "installationId": { + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "type": "string", + "default": "", + "example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "description": "Repository ID of the repo linked to the function", + "type": "string", + "example": "<PROVIDER_REPOSITORY_ID>", + "nullable": true + }, + "providerBranch": { + "description": "Production branch for the repo linked to the function", + "type": "string", + "default": "", + "example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "type": "boolean", + "default": false, + "example": false + }, + "providerRootDirectory": { + "description": "Path to function code in the linked repo.", + "type": "string", + "default": "", + "example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "providerBranches": { + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "providerPaths": { + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "buildSpecification": { + "description": "Build specification for the function deployments.", + "type": "string", + "example": "s-1vcpu-512mb", + "nullable": true + }, + "runtimeSpecification": { + "description": "Runtime specification for the function executions.", + "type": "string", + "example": "s-1vcpu-512mb", + "nullable": true + }, + "deploymentRetention": { + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete function", + "operationId": "functionsDelete", + "tags": [ + "functions" + ], + "description": "Delete a function by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "functions", + "demo": "functions\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployment": { + "patch": { + "summary": "Update function's deployment", + "operationId": "functionsUpdateFunctionDeployment", + "tags": [ + "functions" + ], + "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "functions", + "demo": "functions\/update-function-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "description": "Deployment ID.", + "type": "string", + "example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "functionsListDeployments", + "tags": [ + "functions" + ], + "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deploymentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 deployment", + "operationId": "functionsCreateDeployment", + "tags": [ + "functions" + ], + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "entrypoint": { + "description": "Entrypoint File.", + "type": "string", + "example": "<ENTRYPOINT>", + "nullable": true + }, + "commands": { + "description": "Build Commands.", + "type": "string", + "example": "<COMMANDS>", + "nullable": true + }, + "code": { + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "type": "string", + "format": "binary" + }, + "activate": { + "description": "Automatically activate the deployment when it is finished building.", + "type": "boolean", + "example": false + } + }, + "required": [ + "code", + "activate" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "functionsCreateDuplicateDeployment", + "tags": [ + "functions" + ], + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "description": "Deployment ID.", + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "buildId": { + "description": "Build unique ID.", + "type": "string", + "default": "", + "example": "<BUILD_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "functionsCreateTemplateDeployment", + "tags": [ + "functions" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "repository": { + "description": "Repository name of the template.", + "type": "string", + "example": "<REPOSITORY>" + }, + "owner": { + "description": "The name of the owner of the template.", + "type": "string", + "example": "<OWNER>" + }, + "rootDirectory": { + "description": "Path to function code in the template repo.", + "type": "string", + "example": "<ROOT_DIRECTORY>" + }, + "type": { + "description": "Type for the reference provided. Can be commit, branch, or tag", + "type": "string", + "example": "commit", + "title": "TemplateReferenceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "commit" + ], + "title": "commit" + }, + { + "type": "string", + "enum": [ + "branch" + ], + "title": "branch" + }, + { + "type": "string", + "enum": [ + "tag" + ], + "title": "tag" + } + ] + }, + "reference": { + "description": "Reference value, can be a commit hash, branch name, or release tag", + "type": "string", + "example": "<REFERENCE>" + }, + "activate": { + "description": "Automatically activate the deployment when it is finished building.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "functionsCreateVcsDeployment", + "tags": [ + "functions" + ], + "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Type of reference passed. Allowed values are: branch, commit", + "type": "string", + "example": "branch", + "title": "VCSReferenceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "branch" + ], + "title": "branch" + }, + { + "type": "string", + "enum": [ + "commit" + ], + "title": "commit" + } + ] + }, + "reference": { + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "type": "string", + "example": "<REFERENCE>" + }, + "activate": { + "description": "Automatically activate the deployment when it is finished building.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "functionsGetDeployment", + "tags": [ + "functions" + ], + "description": "Get a function deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "functionsDeleteDeployment", + "tags": [ + "functions" + ], + "description": "Delete a code deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "functionsGetDeploymentDownload", + "tags": [ + "functions" + ], + "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "content": { + "*\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "public", + "functions.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Key": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "schema": { + "type": "string", + "example": "source", + "title": "DeploymentDownloadType", + "oneOf": [ + { + "type": "string", + "enum": [ + "source" + ], + "title": "source" + }, + { + "type": "string", + "enum": [ + "output" + ], + "title": "output" + } + ], + "default": "source" + }, + "in": "query" + }, + { + "name": "token", + "description": "Presigned source-download token for accessing this deployment without a session (jobs-service).", + "required": false, + "schema": { + "type": "string", + "example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "functionsUpdateDeploymentStatus", + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "functions\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", + "tags": [ + "functions" + ], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "executions", + "demo": "functions\/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", + "tags": [ + "functions" + ], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "executions", + "demo": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "description": "HTTP body of execution. Default value is empty string.", + "type": "string", + "default": "", + "example": "<BODY>" + }, + "async": { + "description": "Execute code in the background. Default value is false.", + "type": "boolean", + "default": false, + "example": false + }, + "path": { + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "type": "string", + "default": "\/", + "example": "<PATH>" + }, + "method": { + "description": "HTTP method of execution. Default value is POST.", + "type": "string", + "default": "POST", + "example": "GET", + "title": "ExecutionMethod", + "oneOf": [ + { + "type": "string", + "enum": [ + "GET" + ], + "title": "GET" + }, + { + "type": "string", + "enum": [ + "POST" + ], + "title": "POST" + }, + { + "type": "string", + "enum": [ + "PUT" + ], + "title": "PUT" + }, + { + "type": "string", + "enum": [ + "PATCH" + ], + "title": "PATCH" + }, + { + "type": "string", + "enum": [ + "DELETE" + ], + "title": "DELETE" + }, + { + "type": "string", + "enum": [ + "OPTIONS" + ], + "title": "OPTIONS" + }, + { + "type": "string", + "enum": [ + "HEAD" + ], + "title": "HEAD" + } + ] + }, + "headers": { + "description": "HTTP headers of execution. Defaults to empty.", + "type": "object", + "default": {}, + "example": {} + }, + "scheduledAt": { + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "type": "string", + "example": "<SCHEDULED_AT>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", + "tags": [ + "functions" + ], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "executions", + "demo": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "example": "<EXECUTION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", + "tags": [ + "functions" + ], + "description": "Delete a function execution by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "executions", + "demo": "functions\/delete-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "example": "<EXECUTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", + "tags": [ + "functions" + ], + "description": "Get a list of all variables of a specific function.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "functions\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", + "tags": [ + "functions" + ], + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "functions\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "variableId": { + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<VARIABLE_ID>" + }, + "key": { + "description": "Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.", + "type": "string", + "example": "<KEY>" + }, + "value": { + "description": "Variable value. Max length: 8192 chars.", + "type": "string", + "example": "<VALUE>" + }, + "secret": { + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "variableId", + "key", + "value" + ] + } + } + } + } + } + }, + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", + "tags": [ + "functions" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "functions\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "functions\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.", + "type": "string", + "example": "<KEY>", + "nullable": true + }, + "value": { + "description": "Variable value. Max length: 8192 chars.", + "type": "string", + "example": "<VALUE>", + "nullable": true + }, + "secret": { + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", + "tags": [ + "functions" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "functions\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FUNCTION_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "The query or queries to execute.", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "query" + ] + } + } + } + } + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", + "tags": [ + "graphql" + ], + "description": "Execute a GraphQL mutation.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "description": "The query or queries to execute.", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "query" + ] + } + } + } + } + } + }, + "\/growth\/installations": { + "post": { + "summary": "Record a self-hosted installation", + "operationId": "growthCreateInstallation", + "tags": [ + "growth" + ], + "description": "Record a self-hosted installation. Every report is stored as its own row; the admin email is optional because headless CLI installs create no account.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "growth\/create-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true, + "auth": { + "manager": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "Admin email from the installation, when an account was created.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "name": { + "description": "Admin name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "version": { + "description": "Appwrite version.", + "type": "string", + "default": "", + "example": "<VERSION>" + }, + "domain": { + "description": "Installation domain.", + "type": "string", + "default": "", + "example": "<DOMAIN>" + }, + "database": { + "description": "Database adapter.", + "type": "string", + "default": "", + "example": "<DATABASE>" + }, + "hostIp": { + "description": "Resolved installation host IP address.", + "type": "string", + "default": "", + "example": "<HOST_IP>" + }, + "userAgent": { + "description": "Installation user agent.", + "type": "string", + "default": "", + "example": "<USER_AGENT>" + }, + "os": { + "description": "Installation operating system.", + "type": "string", + "default": "", + "example": "<OS>" + }, + "arch": { + "description": "Installation CPU architecture.", + "type": "string", + "default": "", + "example": "<ARCH>" + }, + "cpus": { + "description": "Installation CPU count.", + "type": "integer", + "format": "int32" + }, + "ram": { + "description": "Installation RAM in MB.", + "type": "integer", + "format": "int32" + } + } + } + } + } + } + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", + "tags": [ + "locale" + ], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/locale" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "locale\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "tags": [ + "locale" + ], + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "responses": { + "200": { + "description": "Locale codes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/localeCodeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "tags": [ + "locale" + ], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/continentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "locale\/list-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "tags": [ + "locale" + ], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/countryList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "locale\/list-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "tags": [ + "locale" + ], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/countryList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "locale\/list-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "tags": [ + "locale" + ], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/phoneList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", + "tags": [ + "locale" + ], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/currencyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "locale\/list-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", + "tags": [ + "locale" + ], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/languageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "locale\/list-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/manager\/blocks": { + "post": { + "summary": "Create a new resource block for a project", + "operationId": "managerCreateBlock", + "tags": [ + "manager" + ], + "description": "Creates a new resource block.", + "responses": { + "201": { + "description": "ManagerBlock", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerBlock" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/create-block.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": { + "projectId": { + "description": "Project ID", + "type": "string", + "example": "<PROJECT_ID>" + }, + "resourceType": { + "description": "Resource type to block (e.g., projects, functions, databases, storage, etc.)", + "type": "string", + "example": "projects", + "title": "BlockResourceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "projects" + ], + "title": "projects" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "sites" + ], + "title": "sites" + }, + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "buckets" + ], + "title": "buckets" + }, + { + "type": "string", + "enum": [ + "providers" + ], + "title": "providers" + }, + { + "type": "string", + "enum": [ + "topics" + ], + "title": "topics" + }, + { + "type": "string", + "enum": [ + "subscribers" + ], + "title": "subscribers" + }, + { + "type": "string", + "enum": [ + "messages" + ], + "title": "messages" + } + ] + }, + "resourceId": { + "description": "Optional resource ID (if omitted, all resources of this type will be blocked)", + "type": "string", + "default": "", + "example": "<RESOURCE_ID>" + }, + "mode": { + "description": "Block mode. Use full to block reads and writes, or readOnly to block database writes only.", + "type": "string", + "default": "full", + "example": "full", + "title": "BlockMode", + "oneOf": [ + { + "type": "string", + "enum": [ + "full" + ], + "title": "full" + }, + { + "type": "string", + "enum": [ + "readonly" + ], + "title": "readonly" + } + ] + }, + "reason": { + "description": "Optional reason why the resource is blocked", + "type": "string", + "default": "", + "example": "<REASON>" + }, + "expiredAt": { + "description": "Optional expiration date for the block", + "type": "string", + "default": "", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + } + }, + "required": [ + "projectId", + "resourceType" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete resource blocks for a project", + "operationId": "managerDeleteBlock", + "tags": [ + "manager" + ], + "description": "Deletes resource blocks for a project.", + "responses": { + "200": { + "description": "ManagerBlockDelete", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerBlockDelete" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/delete-block.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager", + "console" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "query" + }, + { + "name": "resourceType", + "description": "Resource type to unblock", + "required": true, + "schema": { + "type": "string", + "example": "projects", + "title": "BlockResourceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "projects" + ], + "title": "projects" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "sites" + ], + "title": "sites" + }, + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "buckets" + ], + "title": "buckets" + }, + { + "type": "string", + "enum": [ + "providers" + ], + "title": "providers" + }, + { + "type": "string", + "enum": [ + "topics" + ], + "title": "topics" + }, + { + "type": "string", + "enum": [ + "subscribers" + ], + "title": "subscribers" + }, + { + "type": "string", + "enum": [ + "messages" + ], + "title": "messages" + } + ] + }, + "in": "query" + }, + { + "name": "resourceId", + "description": "Optional resource ID (if omitted, all blocks of this type will be removed)", + "required": false, + "schema": { + "type": "string", + "example": "<RESOURCE_ID>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/manager\/blocks\/{projectId}": { + "get": { + "summary": "List all resource blocks for a project", + "operationId": "managerListBlocks", + "tags": [ + "manager" + ], + "description": "Lists all resource blocks for a project.", + "responses": { + "200": { + "description": "Manager blocks list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerBlockList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/list-blocks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager", + "console" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/manager\/cache": { + "delete": { + "summary": "Clear internal cache", + "operationId": "managerDeleteCache", + "tags": [ + "manager" + ], + "description": "Clears internal cache.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "cache", + "demo": "manager\/delete-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager", + "console" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "region", + "description": "Target region.", + "required": false, + "schema": { + "type": "string", + "example": "fra", + "title": "Region", + "oneOf": [ + { + "type": "string", + "enum": [ + "fra" + ], + "title": "fra" + }, + { + "type": "string", + "enum": [ + "nyc" + ], + "title": "nyc" + }, + { + "type": "string", + "enum": [ + "syd" + ], + "title": "syd" + }, + { + "type": "string", + "enum": [ + "sfo" + ], + "title": "sfo" + }, + { + "type": "string", + "enum": [ + "sgp" + ], + "title": "sgp" + }, + { + "type": "string", + "enum": [ + "tor" + ], + "title": "tor" + } + ] + }, + "in": "query" + }, + { + "name": "cache", + "description": "Cache target.", + "required": false, + "schema": { + "type": "string", + "example": "cache", + "title": "CacheTarget", + "oneOf": [ + { + "type": "string", + "enum": [ + "cache" + ], + "title": "cache" + }, + { + "type": "string", + "enum": [ + "timelimit" + ], + "title": "timelimit" + }, + { + "type": "string", + "enum": [ + "locks" + ], + "title": "locks" + }, + { + "type": "string", + "enum": [ + "pubsub" + ], + "title": "pubsub" + }, + { + "type": "string", + "enum": [ + "queue" + ], + "title": "queue" + }, + { + "type": "string", + "enum": [ + "all" + ], + "title": "all" + } + ], + "default": "cache" + }, + "in": "query" + }, + { + "name": "all", + "description": "Clear the entire selected cache target.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": false + }, + "in": "query" + }, + { + "name": "database", + "description": "Database cache scope.", + "required": false, + "schema": { + "type": "string", + "example": "console", + "title": "CacheDatabase", + "oneOf": [ + { + "type": "string", + "enum": [ + "console" + ], + "title": "console" + }, + { + "type": "string", + "enum": [ + "project" + ], + "title": "project" + } + ], + "default": "console" + }, + "in": "query" + }, + { + "name": "projectId", + "description": "Project ID for project database cache.", + "required": false, + "schema": { + "type": "string", + "example": "<PROJECT_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": false, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": false, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/manager\/database\/{databaseId}": { + "patch": { + "summary": "Update database status (used by Edge)", + "operationId": "managerUpdateDatabase", + "tags": [ + "manager" + ], + "description": "Update database container status after Edge spindown.\nCalled by Edge scheduler to notify Cloud of status changes.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "databases", + "demo": "manager\/update-database.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "databaseId", + "description": "Database ID", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "containerStatus": { + "description": "Container status", + "type": "string", + "example": "active" + }, + "projectId": { + "description": "Project ID scoping this tenant-owned database", + "type": "string", + "default": "", + "example": "<PROJECT_ID>" + } + }, + "required": [ + "containerStatus" + ] + } + } + } + } + } + }, + "\/manager\/databases\/activity": { + "post": { + "summary": "Sync database last-active timestamps in bulk", + "operationId": "managerCreateDatabaseActivity", + "tags": [ + "manager" + ], + "description": "Sync last-active timestamps for shared and dedicated databases in bulk.\nCalled periodically by Edge from its in-memory activity cache. Each entry\ncarries a databaseId, the most recent Unix timestamp at which the database\nserved traffic, and optionally a tenantId scoping the update to one project.\nCloud advances the runtime document's lastAccessedAt monotonically \u2014 an older\ntimestamp never regresses a newer one \u2014 and unknown databases are skipped.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "databases", + "demo": "manager\/create-database-activity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databases": { + "description": "Activity entries, each `{databaseId, lastActive, tenantId?}`.", + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "databases" + ] + } + } + } + } + } + }, + "\/manager\/databases\/metrics": { + "post": { + "summary": "Submit database metrics in bulk", + "operationId": "managerCreateDatabaseMetrics", + "tags": [ + "manager" + ], + "description": "Submit resource metrics for dedicated databases in bulk. Called periodically\nby Edge after aggregating pushes from in-pod metrics agents. Accepts both\ngauge values (cpu%, memory%, storage, connections, qps, iops) and counter\ndeltas (inbound\/outbound bytes, cpu milliseconds) which edge has already computed\nagainst previous-value caches in Redis.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "databases", + "demo": "manager\/create-database-metrics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "projectIds": { + "description": "Project IDs (parallel array).", + "type": "array", + "items": { + "type": "string" + } + }, + "databaseIds": { + "description": "Database IDs (parallel array).", + "type": "array", + "items": { + "type": "string" + } + }, + "ordinals": { + "description": "StatefulSet pod ordinals (parallel array). A stable per-node identity, not a role: ordinal 0 is the first member created, and a failover can leave the primary on any ordinal. Carried on each gauge and on the resource sample as its ordinal dimension so per-node series stay distinct. Empty defaults every sample to ordinal 0.", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + }, + "cpuPercents": { + "description": "CPU usage percentages.", + "type": "array", + "default": [], + "items": { + "type": "number", + "format": "double" + } + }, + "memoryPercents": { + "description": "Memory usage percentages.", + "type": "array", + "default": [], + "items": { + "type": "number", + "format": "double" + } + }, + "storageUsedBytes": { + "description": "Storage used in bytes.", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + }, + "connectionsActive": { + "description": "Active connection counts.", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + }, + "qps": { + "description": "Queries per second.", + "type": "array", + "default": [], + "items": { + "type": "number", + "format": "double" + } + }, + "iopsRead": { + "description": "Read IOPS.", + "type": "array", + "default": [], + "items": { + "type": "number", + "format": "double" + } + }, + "iopsWrite": { + "description": "Write IOPS.", + "type": "array", + "default": [], + "items": { + "type": "number", + "format": "double" + } + }, + "inboundBytesDeltas": { + "description": "Inbound network bytes since previous sample.", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + }, + "outboundBytesDeltas": { + "description": "Outbound network bytes since previous sample.", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + }, + "cpuMillisecondsDeltas": { + "description": "CPU time in milliseconds since previous sample.", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + } + }, + "required": [ + "projectIds", + "databaseIds" + ] + } + } + } + } + } + }, + "\/manager\/databases\/{databaseId}\/event": { + "post": { + "summary": "Create a database lifecycle event", + "operationId": "managerCreateDatabaseEvent", + "tags": [ + "manager" + ], + "description": "Creates a database lifecycle event for webhook, function, and realtime delivery, or\nexecutes command events such as start and spin-down.\nCalled by Edge to notify Cloud of database lifecycle changes such as provisioning,\nfailover, backup completion, etc.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "databases", + "demo": "manager\/create-database-event.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "databaseId", + "description": "Database ID", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "event": { + "description": "Event name (e.g. start, spin-down, provision.completed, failover.completed). Customer delivery is the matching resource create\/update\/delete, not this opcode.", + "type": "string", + "example": "<EVENT>" + }, + "data": { + "description": "Additional event data. Start events may include projectId to scope tenant-reused database IDs.", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "event" + ] + } + } + } + } + } + }, + "\/manager\/domain": { + "get": { + "summary": "Find the DNS details for given domain.", + "operationId": "managerGetDomain", + "tags": [ + "manager" + ], + "description": "Retrieves DNS details for a given domain.", + "responses": { + "200": { + "description": "ManagerDomain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerDomain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/get-domain.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "domain", + "description": "Domain name", + "required": true, + "schema": { + "type": "string", + "example": "example.com" + }, + "in": "query" + } + ] + } + }, + "\/manager\/domains\/records": { + "get": { + "summary": "Find the DNS details for given domain.", + "operationId": "managerGetDNSRecords", + "tags": [ + "manager" + ], + "description": "Retrieves DNS records for a given domain.", + "responses": { + "200": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/get-dns-records.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "domain", + "description": "Domain name", + "required": true, + "schema": { + "type": "string", + "example": "example.com" + }, + "in": "query" + } + ] + } + }, + "\/manager\/domains\/{domain}\/zone": { + "get": { + "summary": "Retrieve the DNS zone file for the given domain.", + "operationId": "managerGetDomainZone", + "tags": [ + "manager" + ], + "description": "Retrieves the DNS zone file for a given domain.", + "responses": { + "200": { + "description": "Text", + "content": { + "text\/plain": { + "schema": { + "type": "string" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/get-domain-zone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "domain", + "description": "Domain to retrieve the DNS zone file for.", + "required": true, + "schema": { + "type": "string", + "example": "example.com" + }, + "in": "path" + } + ] + } + }, + "\/manager\/events": { + "post": { + "summary": "Create a new event for the manager using CloudEvents specification", + "operationId": "managerCreateEvent", + "tags": [ + "manager" + ], + "description": "Creates a new event using CloudEvents specification for manager operations.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/create-event.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "specversion": { + "description": "CloudEvents spec version", + "type": "string", + "default": "1.0", + "example": "<SPECVERSION>" + }, + "type": { + "description": "Event type that maps to worker. e.g. v1-stats-usage", + "type": "string", + "example": "<TYPE>" + }, + "source": { + "description": "Event source. e.g. imagine", + "type": "string", + "default": "", + "example": "<SOURCE>" + }, + "subject": { + "description": "Subject of the event, i.e. projectId", + "type": "string", + "example": "<SUBJECT>" + }, + "id": { + "description": "Unique event ID", + "type": "string", + "default": "", + "example": "<ID>" + }, + "time": { + "description": "Event timestamp in RFC3339 format", + "type": "string", + "default": "", + "example": "<TIME>" + }, + "datacontenttype": { + "description": "Content type of data", + "type": "string", + "default": "application\/json", + "example": "<DATACONTENTTYPE>" + }, + "data": { + "description": "Event data containing metrics. e.g. {\"metrics\": [...]}", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "type", + "subject", + "data" + ] + } + } + } + } + } + }, + "\/manager\/projects\/{projectId}\/databases\/{databaseId}": { + "get": { + "summary": "Get database routing info", + "operationId": "managerGetDatabase", + "tags": [ + "manager" + ], + "description": "Retrieves database routing information for Edge TCP proxy.\nReturns hostname, port, engine, status, and backend type.", + "responses": { + "200": { + "description": "ManagerDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "databases", + "demo": "manager\/get-database.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "projectId", + "description": "Project ID that owns the database", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "databaseId", + "description": "Database ID", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/manager\/projects\/{projectId}\/keys": { + "post": { + "summary": "Get project key authorization data", + "operationId": "managerGetProjectKey", + "tags": [ + "manager" + ], + "description": "Validates a project API key secret and returns the project ID and scopes for Edge.", + "responses": { + "200": { + "description": "ManagerProjectKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerProjectKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "projects", + "demo": "manager\/get-project-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "projectId", + "description": "Project ID that owns the API key.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "apiKey": { + "description": "Project API key secret.", + "type": "string", + "example": "<API_KEY>" + } + }, + "required": [ + "apiKey" + ] + } + } + } + } + } + }, + "\/manager\/projects\/{projectId}\/user": { + "post": { + "summary": "Resolve a user JWT to a project user", + "operationId": "managerGetProjectUser", + "tags": [ + "manager" + ], + "description": "Decodes a user JWT and confirms the resulting user belongs to the\nproject, returning their ID. Used by the edge router to key WAF rate\nlimits on the authenticated user without holding the signing key: the\nJWT is verified here, on cloud, where _APP_OPENSSL_KEY_V1 lives.", + "responses": { + "200": { + "description": "ManagerProjectUser", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerProjectUser" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "projects", + "demo": "manager\/get-project-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "jwt": { + "description": "User JWT issued by the Appwrite API.", + "type": "string", + "example": "<JWT>" + } + }, + "required": [ + "jwt" + ] + } + } + } + } + } + }, + "\/manager\/projects\/{projectId}\/waf-rules": { + "get": { + "summary": "List enabled WAF rules for a project.", + "operationId": "managerListProjectWafRules", + "tags": [ + "manager" + ], + "description": "Lists enabled WAF rules for a project.", + "responses": { + "200": { + "description": "Manager WAF rule list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerWafRuleList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/list-project-waf-rules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/manager\/rule": { + "get": { + "summary": "Find the deployment rule for a given domain.", + "operationId": "managerGetRule", + "tags": [ + "manager" + ], + "description": "Retrieves the deployment rule for a given domain.", + "responses": { + "200": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/get-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "domain", + "description": "Domain name", + "required": true, + "schema": { + "type": "string", + "example": "example.com" + }, + "in": "query" + } + ] + } + }, + "\/manager\/users\/status": { + "patch": { + "summary": "Update a user status by ID or email", + "operationId": "managerUpdateUserStatus", + "tags": [ + "manager" + ], + "description": "Updates a console user status using a user ID or email address.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "manager\/update-user-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": { + "userId": { + "description": "User ID.", + "type": "string", + "default": "", + "example": "<USER_ID>" + }, + "email": { + "description": "User email address.", + "type": "string", + "default": "", + "example": "<EMAIL>" + }, + "status": { + "description": "User status. Set to `false` to block and `true` to unblock.", + "type": "boolean", + "example": false + }, + "reason": { + "description": "Optional reason when blocking a user. Accepted for parity with the CLI task but not persisted.", + "type": "string", + "default": "", + "example": "<REASON>" + } + }, + "required": [ + "status" + ] + } + } + } + } + } + }, + "\/manager\/verify-s3-signature": { + "post": { + "summary": "Verify an AWS SigV4 signature against a project's API keys.", + "operationId": "managerVerifyS3Signature", + "tags": [ + "manager" + ], + "description": "Verifies an AWS SigV4 signature where the access key is the project ID\nand the secret is one of the project's API keys. Returns the matching\nkey document on success, or an opaque 401 on any failure.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "manager\/verify-s-3-signature.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "accessKey": { + "description": "Access key from the SigV4 credential scope. Must be the project ID.", + "type": "string", + "example": "<ACCESS_KEY>" + }, + "dateStamp": { + "description": "Date from the SigV4 credential scope (YYYYMMDD).", + "type": "string", + "example": "<DATE_STAMP>" + }, + "region": { + "description": "Region from the SigV4 credential scope.", + "type": "string", + "example": "<REGION>" + }, + "service": { + "description": "Service from the SigV4 credential scope.", + "type": "string", + "example": "<SERVICE>" + }, + "canonicalRequestHash": { + "description": "Hex SHA-256 hash of the SigV4 canonical request.", + "type": "string", + "example": "<CANONICAL_REQUEST_HASH>" + }, + "signature": { + "description": "Hex signature from the SigV4 Authorization header.", + "type": "string", + "example": "<SIGNATURE>" + }, + "amzDate": { + "description": "Value of x-amz-date (YYYYMMDDTHHMMSSZ).", + "type": "string", + "example": "<AMZ_DATE>" + } + }, + "required": [ + "accessKey", + "dateStamp", + "region", + "service", + "canonicalRequestHash", + "signature", + "amzDate" + ] + } + } + } + } + } + }, + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", + "tags": [ + "messaging" + ], + "description": "Get a list of all messages from the current Appwrite project.", + "responses": { + "200": { + "description": "Message list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/messageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/list-messages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.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: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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" + } + ] + } + }, + "\/messaging\/messages\/email": { + "post": { + "summary": "Create email", + "operationId": "messagingCreateEmail", + "tags": [ + "messaging" + ], + "description": "Create a new email message.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/create-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.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": { + "messageId": { + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<MESSAGE_ID>" + }, + "subject": { + "description": "Email Subject.", + "type": "string", + "example": "<SUBJECT>" + }, + "content": { + "description": "Email Content.", + "type": "string", + "example": "<CONTENT>" + }, + "topics": { + "description": "List of Topic IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "users": { + "description": "List of User IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "targets": { + "description": "List of Targets IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "cc": { + "description": "Array of target IDs to be added as CC.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "bcc": { + "description": "Array of target IDs to be added as BCC.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "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", + "default": [], + "items": { + "type": "string" + } + }, + "replyToEmail": { + "description": "Email address to reply to. If not set, defaults to the sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name of the reply to recipient. If not set, defaults to the sender name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "draft": { + "description": "Is message a draft", + "type": "boolean", + "default": false, + "example": false + }, + "html": { + "description": "Is content of type HTML", + "type": "boolean", + "default": false, + "example": false + }, + "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 + } + }, + "required": [ + "messageId", + "subject", + "content" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", + "tags": [ + "messaging" + ], + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "description": "List of Topic IDs.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "users": { + "description": "List of User IDs.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "targets": { + "description": "List of Targets IDs.", + "type": "array", + "items": { + "type": "string" + }, + "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", + "items": { + "type": "string" + }, + "nullable": true + }, + "bcc": { + "description": "Array of target IDs to be added as BCC.", + "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", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "replyToName": { + "description": "Name of the reply to recipient. Pass an empty string to restore the provider or sender default.", + "type": "string", + "example": "<REPLY_TO_NAME>", + "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 + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", + "tags": [ + "messaging" + ], + "description": "Create a new push notification.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/create-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.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": { + "messageId": { + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<MESSAGE_ID>" + }, + "title": { + "description": "Title for push notification.", + "type": "string", + "default": "", + "example": "<TITLE>" + }, + "body": { + "description": "Body for push notification.", + "type": "string", + "default": "", + "example": "<BODY>" + }, + "topics": { + "description": "List of Topic IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "users": { + "description": "List of User IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "targets": { + "description": "List of Targets IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "data": { + "description": "Additional key-value pair data for push notification.", + "type": "object", + "default": {}, + "example": {}, + "nullable": true + }, + "action": { + "description": "Action for push notification.", + "type": "string", + "default": "", + "example": "<ACTION>" + }, + "image": { + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "type": "string", + "default": "", + "example": "<ID1:ID2>" + }, + "icon": { + "description": "Icon for push notification. Available only for Android and Web Platform.", + "type": "string", + "default": "", + "example": "<ICON>" + }, + "sound": { + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "type": "string", + "default": "", + "example": "<SOUND>" + }, + "color": { + "description": "Color for push notification. Available only for Android Platform.", + "type": "string", + "default": "", + "example": "<COLOR>" + }, + "tag": { + "description": "Tag for push notification. Available only for Android Platform.", + "type": "string", + "default": "", + "example": "<TAG>" + }, + "badge": { + "description": "Badge for push notification. Available only for iOS Platform.", + "type": "integer", + "default": -1, + "example": 1, + "format": "int32" + }, + "draft": { + "description": "Is message a draft", + "type": "boolean", + "default": false, + "example": false + }, + "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 + }, + "contentAvailable": { + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "type": "boolean", + "default": false, + "example": false + }, + "critical": { + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "type": "boolean", + "default": false, + "example": false + }, + "priority": { + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "type": "string", + "default": "high", + "example": "normal", + "title": "MessagePriority", + "oneOf": [ + { + "type": "string", + "enum": [ + "normal" + ], + "title": "normal" + }, + { + "type": "string", + "enum": [ + "high" + ], + "title": "high" + } + ] + } + }, + "required": [ + "messageId" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", + "tags": [ + "messaging" + ], + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/update-push.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "description": "List of Topic IDs.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "users": { + "description": "List of User IDs.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "targets": { + "description": "List of Targets IDs.", + "type": "array", + "items": { + "type": "string" + }, + "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", + "default": {}, + "example": {}, + "nullable": true + }, + "action": { + "description": "Action for push notification.", + "type": "string", + "example": "<ACTION>", + "nullable": true + }, + "image": { + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "type": "string", + "example": "<ID1:ID2>", + "nullable": true + }, + "icon": { + "description": "Icon for push notification. Available only for Android and Web platforms.", + "type": "string", + "example": "<ICON>", + "nullable": true + }, + "sound": { + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "type": "string", + "example": "<SOUND>", + "nullable": true + }, + "color": { + "description": "Color for push notification. Available only for Android platforms.", + "type": "string", + "example": "<COLOR>", + "nullable": true + }, + "tag": { + "description": "Tag for push notification. Available only for Android platforms.", + "type": "string", + "example": "<TAG>", + "nullable": true + }, + "badge": { + "description": "Badge for push notification. Available only for iOS platforms.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "draft": { + "description": "Is message a draft", + "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 + }, + "contentAvailable": { + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "type": "boolean", + "example": false, + "nullable": true + }, + "critical": { + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "type": "boolean", + "example": false, + "nullable": true + }, + "priority": { + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "type": "string", + "example": "normal", + "title": "MessagePriority", + "oneOf": [ + { + "type": "string", + "enum": [ + "normal" + ], + "title": "normal" + }, + { + "type": "string", + "enum": [ + "high" + ], + "title": "high" + } + ], + "nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/sms": { + "post": { + "summary": "Create SMS", + "operationId": "messagingCreateSms", + "tags": [ + "messaging" + ], + "description": "Create a new SMS message.", + "responses": { + "201": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<MESSAGE_ID>" + }, + "content": { + "description": "SMS Content.", + "type": "string", + "example": "<CONTENT>" + }, + "topics": { + "description": "List of Topic IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "users": { + "description": "List of User IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "targets": { + "description": "List of Targets IDs.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "draft": { + "description": "Is message a draft", + "type": "boolean", + "default": false, + "example": false + }, + "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 + } + }, + "required": [ + "messageId", + "content" + ] + } + } + } + } + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", + "tags": [ + "messaging" + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MESSAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "description": "List of Topic IDs.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "users": { + "description": "List of User IDs.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "targets": { + "description": "List of Targets IDs.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "content": { + "description": "Email Content.", + "type": "string", + "example": "<CONTENT>", + "nullable": true + }, + "draft": { + "description": "Is message a draft", + "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 + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", + "tags": [ + "messaging" + ], + "description": "Get a message by its unique ID.\n", + "responses": { + "200": { + "description": "Message", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/message" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MESSAGE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", + "tags": [ + "messaging" + ], + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MESSAGE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", + "tags": [ + "messaging" + ], + "description": "Get a list of the targets associated with a message.", + "responses": { + "200": { + "description": "Target list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/targetList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "messages", + "demo": "messaging\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "messageId", + "description": "Message ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MESSAGE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", + "tags": [ + "messaging" + ], + "description": "Get a list of all providers from the current Appwrite project.", + "responses": { + "200": { + "description": "Provider list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/providerList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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, provider, type, enabled", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "authKey": { + "description": "APNS authentication key.", + "type": "string", + "default": "", + "example": "<AUTH_KEY>" + }, + "authKeyId": { + "description": "APNS authentication key ID.", + "type": "string", + "default": "", + "example": "<AUTH_KEY_ID>" + }, + "teamId": { + "description": "APNS team ID.", + "type": "string", + "default": "", + "example": "<TEAM_ID>" + }, + "bundleId": { + "description": "APNS bundle ID.", + "type": "string", + "default": "", + "example": "<BUNDLE_ID>" + }, + "sandbox": { + "description": "Use APNS sandbox environment.", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "authKey": { + "description": "APNS authentication key.", + "type": "string", + "default": "", + "example": "<AUTH_KEY>" + }, + "authKeyId": { + "description": "APNS authentication key ID.", + "type": "string", + "default": "", + "example": "<AUTH_KEY_ID>" + }, + "teamId": { + "description": "APNS team ID.", + "type": "string", + "default": "", + "example": "<TEAM_ID>" + }, + "bundleId": { + "description": "APNS bundle ID.", + "type": "string", + "default": "", + "example": "<BUNDLE_ID>" + }, + "sandbox": { + "description": "Use APNS sandbox environment.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/appwrite": { + "post": { + "summary": "Create Appwrite provider", + "operationId": "messagingCreateAppwriteProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Appwrite push provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-appwrite-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "qos": { + "description": "Default QoS for topics on this provider (0 or 1). Null lets the subscriber choose.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "expiry": { + "description": "Default message retention in seconds for offline delivery. Max 7 days (604800).", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/appwrite\/{providerId}": { + "patch": { + "summary": "Update Appwrite provider", + "operationId": "messagingUpdateAppwriteProvider", + "tags": [ + "messaging" + ], + "description": "Update an Appwrite push provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-appwrite-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "qos": { + "description": "Default QoS for topics on this provider (0 or 1). Null lets the subscriber choose.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "expiry": { + "description": "Default message retention in seconds for offline delivery. Max 7 days (604800).", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "serviceAccountJSON": { + "description": "FCM service account JSON.", + "type": "object", + "default": {}, + "example": {}, + "nullable": true + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", + "tags": [ + "messaging" + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "serviceAccountJSON": { + "description": "FCM service account JSON.", + "type": "object", + "default": {}, + "example": {}, + "nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Mailgun provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "apiKey": { + "description": "Mailgun API Key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "domain": { + "description": "Mailgun Domain.", + "type": "string", + "default": "", + "example": "example.com" + }, + "isEuRegion": { + "description": "Set as EU region.", + "type": "boolean", + "example": false, + "nullable": true + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", + "tags": [ + "messaging" + ], + "description": "Update a Mailgun provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-mailgun-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "apiKey": { + "description": "Mailgun API Key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "domain": { + "description": "Mailgun Domain.", + "type": "string", + "default": "", + "example": "example.com" + }, + "isEuRegion": { + "description": "Set as EU region.", + "type": "boolean", + "example": false, + "nullable": true + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "type": "string", + "default": "", + "example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "templateId": { + "description": "Msg91 template ID", + "type": "string", + "default": "", + "example": "<TEMPLATE_ID>" + }, + "senderId": { + "description": "Msg91 sender ID.", + "type": "string", + "default": "", + "example": "<SENDER_ID>" + }, + "authKey": { + "description": "Msg91 auth key.", + "type": "string", + "default": "", + "example": "<AUTH_KEY>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-msg-91-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "templateId": { + "description": "Msg91 template ID.", + "type": "string", + "default": "", + "example": "<TEMPLATE_ID>" + }, + "senderId": { + "description": "Msg91 sender ID.", + "type": "string", + "default": "", + "example": "<SENDER_ID>" + }, + "authKey": { + "description": "Msg91 auth key.", + "type": "string", + "default": "", + "example": "<AUTH_KEY>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/resend": { + "post": { + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Resend provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "apiKey": { + "description": "Resend API key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/resend\/{providerId}": { + "patch": { + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", + "tags": [ + "messaging" + ], + "description": "Update a Resend provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-resend-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "apiKey": { + "description": "Resend API key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "type": "string", + "default": "", + "example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Sendgrid provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "apiKey": { + "description": "Sendgrid API key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", + "tags": [ + "messaging" + ], + "description": "Update a Sendgrid provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-sendgrid-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "apiKey": { + "description": "Sendgrid API key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "type": "string", + "default": "", + "example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/ses": { + "post": { + "summary": "Create Amazon SES provider", + "operationId": "messagingCreateSesProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Amazon SES provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-ses-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "accessKey": { + "description": "AWS access key ID.", + "type": "string", + "default": "", + "example": "<ACCESS_KEY>" + }, + "secretKey": { + "description": "AWS secret access key.", + "type": "string", + "default": "", + "example": "<SECRET_KEY>" + }, + "region": { + "description": "AWS region, for example us-east-1.", + "type": "string", + "default": "", + "example": "<REGION>" + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/ses\/{providerId}": { + "patch": { + "summary": "Update Amazon SES provider", + "operationId": "messagingUpdateSesProvider", + "tags": [ + "messaging" + ], + "description": "Update an Amazon SES provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-ses-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "accessKey": { + "description": "AWS access key ID.", + "type": "string", + "default": "", + "example": "<ACCESS_KEY>" + }, + "secretKey": { + "description": "AWS secret access key.", + "type": "string", + "default": "", + "example": "<SECRET_KEY>" + }, + "region": { + "description": "AWS region, for example us-east-1.", + "type": "string", + "default": "", + "example": "<REGION>" + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "type": "string", + "default": "", + "example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "host": { + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "type": "string", + "example": "<HOST>" + }, + "port": { + "description": "The default SMTP server port.", + "type": "integer", + "default": 587, + "example": 587, + "format": "int32" + }, + "username": { + "description": "Authentication username.", + "type": "string", + "default": "", + "example": "<USERNAME>" + }, + "password": { + "description": "Authentication password.", + "type": "string", + "default": "", + "example": "password", + "format": "password" + }, + "encryption": { + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "type": "string", + "example": "none", + "title": "SmtpEncryption", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "ssl" + ], + "title": "ssl" + }, + { + "type": "string", + "enum": [ + "tls" + ], + "title": "tls" + } + ] + }, + "autoTLS": { + "description": "Enable SMTP AutoTLS feature.", + "type": "boolean", + "default": true, + "example": false + }, + "mailer": { + "description": "The value to use for the X-Mailer header.", + "type": "string", + "default": "", + "example": "<MAILER>" + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Update a SMTP provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "host": { + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "type": "string", + "default": "", + "example": "<HOST>" + }, + "port": { + "description": "SMTP port.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "username": { + "description": "Authentication username.", + "type": "string", + "default": "", + "example": "<USERNAME>" + }, + "password": { + "description": "Authentication password.", + "type": "string", + "default": "", + "example": "password", + "format": "password" + }, + "encryption": { + "description": "Encryption type. Can be 'ssl' or 'tls'", + "type": "string", + "example": "none", + "title": "SmtpEncryption", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "ssl" + ], + "title": "ssl" + }, + { + "type": "string", + "enum": [ + "tls" + ], + "title": "tls" + } + ] + }, + "autoTLS": { + "description": "Enable SMTP AutoTLS feature.", + "type": "boolean", + "example": false, + "nullable": true + }, + "mailer": { + "description": "The value to use for the X-Mailer header.", + "type": "string", + "default": "", + "example": "<MAILER>" + }, + "fromName": { + "description": "Sender Name.", + "type": "string", + "default": "", + "example": "<FROM_NAME>" + }, + "fromEmail": { + "description": "Sender email address.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "replyToName": { + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "type": "string", + "default": "", + "example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "type": "string", + "default": "", + "example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "from": { + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "default": "", + "example": "+12065550100", + "format": "phone" + }, + "customerId": { + "description": "Telesign customer ID.", + "type": "string", + "default": "", + "example": "<CUSTOMER_ID>" + }, + "apiKey": { + "description": "Telesign API key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "customerId": { + "description": "Telesign customer ID.", + "type": "string", + "default": "", + "example": "<CUSTOMER_ID>" + }, + "apiKey": { + "description": "Telesign API key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "from": { + "description": "Sender number.", + "type": "string", + "default": "", + "example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Textmagic provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "from": { + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "default": "", + "example": "+12065550100", + "format": "phone" + }, + "username": { + "description": "Textmagic username.", + "type": "string", + "default": "", + "example": "<USERNAME>" + }, + "apiKey": { + "description": "Textmagic apiKey.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", + "tags": [ + "messaging" + ], + "description": "Update a Textmagic provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-textmagic-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "username": { + "description": "Textmagic username.", + "type": "string", + "default": "", + "example": "<USERNAME>" + }, + "apiKey": { + "description": "Textmagic apiKey.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "from": { + "description": "Sender number.", + "type": "string", + "default": "", + "example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Twilio provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "from": { + "description": "Sender phone number or alphanumeric sender ID. Format phone numbers with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "default": "", + "example": "<FROM>" + }, + "accountSid": { + "description": "Twilio account secret ID.", + "type": "string", + "default": "", + "example": "<ACCOUNT_SID>" + }, + "authToken": { + "description": "Twilio authentication token.", + "type": "string", + "default": "", + "example": "<AUTH_TOKEN>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "accountSid": { + "description": "Twilio account secret ID.", + "type": "string", + "default": "", + "example": "<ACCOUNT_SID>" + }, + "authToken": { + "description": "Twilio authentication token.", + "type": "string", + "default": "", + "example": "<AUTH_TOKEN>" + }, + "from": { + "description": "Sender phone number or alphanumeric sender ID. Format phone numbers with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "default": "", + "example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.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": { + "providerId": { + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Provider name.", + "type": "string", + "example": "<NAME>" + }, + "from": { + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "default": "", + "example": "+12065550100", + "format": "phone" + }, + "apiKey": { + "description": "Vonage API key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "apiSecret": { + "description": "Vonage API secret.", + "type": "string", + "default": "", + "example": "<API_SECRET>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Provider name.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "enabled": { + "description": "Set as enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "apiKey": { + "description": "Vonage API key.", + "type": "string", + "default": "", + "example": "<API_KEY>" + }, + "apiSecret": { + "description": "Vonage API secret.", + "type": "string", + "default": "", + "example": "<API_SECRET>" + }, + "from": { + "description": "Sender number.", + "type": "string", + "default": "", + "example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", + "tags": [ + "messaging" + ], + "description": "Delete a provider by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "providers", + "demo": "messaging\/delete-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", + "tags": [ + "messaging" + ], + "description": "Get a list of all topics from the current Appwrite project.", + "responses": { + "200": { + "description": "Topic list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topicList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "topics", + "demo": "messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.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, description, emailTotal, smsTotal, pushTotal", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 topic", + "operationId": "messagingCreateTopic", + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "topics", + "demo": "messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.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": { + "topicId": { + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "type": "string", + "example": "<TOPIC_ID>" + }, + "name": { + "description": "Topic Name.", + "type": "string", + "example": "<NAME>" + }, + "subscribe": { + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "type": "array", + "default": [ + "users" + ], + "example": [ + "any" + ], + "items": { + "type": "string" + } + }, + "qos": { + "description": "MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "expiry": { + "description": "Message retention in seconds for offline delivery. Max 7 days (604800).", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + }, + "required": [ + "topicId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", + "tags": [ + "messaging" + ], + "description": "Get a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "topics", + "demo": "messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TOPIC_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", + "tags": [ + "messaging" + ], + "description": "Update a topic by its unique ID.\n", + "responses": { + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "topics", + "demo": "messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TOPIC_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Topic Name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "subscribe": { + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "type": "array", + "example": [ + "any" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "qos": { + "description": "MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "expiry": { + "description": "Message retention in seconds for offline delivery. Max 7 days (604800).", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "topics", + "demo": "messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TOPIC_ID>" + }, + "in": "path" + } + ] + } + }, + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriberList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "subscribers", + "demo": "messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 subscriber", + "operationId": "messagingCreateSubscriber", + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "subscribers", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "JWT": [] + }, + "client": { + "Project": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "schema": { + "type": "string", + "example": "<TOPIC_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "type": "string", + "example": "<SUBSCRIBER_ID>" + }, + "targetId": { + "description": "Target ID. The target ID to link to the specified Topic ID.", + "type": "string", + "example": "<TARGET_ID>" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "subscribers", + "demo": "messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SUBSCRIBER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "subscribers", + "demo": "messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "JWT": [] + }, + "client": { + "Project": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "example": "<TOPIC_ID>" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SUBSCRIBER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/migrations": { + "get": { + "summary": "List migrations", + "operationId": "migrationsList", + "tags": [ + "migrations" + ], + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", + "responses": { + "200": { + "description": "Migrations List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceInternalId, resourceType, parentResourceId, parentResourceInternalId, parentResourceType, destinationResourceId, destinationResourceInternalId, destinationResourceType, statusCounters, resourceData, errors", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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" + } + ] + } + }, + "\/migrations\/appwrite": { + "post": { + "summary": "Create Appwrite migration", + "operationId": "migrationsCreateAppwriteMigration", + "tags": [ + "migrations" + ], + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/create-appwrite-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "description": "List of resources to migrate", + "type": "array", + "items": { + "title": "AppwriteMigrationResource", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "user" + ], + "title": "user" + }, + { + "type": "string", + "enum": [ + "team" + ], + "title": "team" + }, + { + "type": "string", + "enum": [ + "membership" + ], + "title": "membership" + }, + { + "type": "string", + "enum": [ + "auth-methods" + ], + "title": "auth-methods" + }, + { + "type": "string", + "enum": [ + "policies" + ], + "title": "policies" + }, + { + "type": "string", + "enum": [ + "oauth2-provider" + ], + "title": "oauth2-provider" + }, + { + "type": "string", + "enum": [ + "database" + ], + "title": "database" + }, + { + "type": "string", + "enum": [ + "table" + ], + "title": "table" + }, + { + "type": "string", + "enum": [ + "column" + ], + "title": "column" + }, + { + "type": "string", + "enum": [ + "index" + ], + "title": "index" + }, + { + "type": "string", + "enum": [ + "row" + ], + "title": "row" + }, + { + "type": "string", + "enum": [ + "document" + ], + "title": "document" + }, + { + "type": "string", + "enum": [ + "attribute" + ], + "title": "attribute" + }, + { + "type": "string", + "enum": [ + "collection" + ], + "title": "collection" + }, + { + "type": "string", + "enum": [ + "documentsdb" + ], + "title": "documentsdb" + }, + { + "type": "string", + "enum": [ + "vectorsdb" + ], + "title": "vectorsdb" + }, + { + "type": "string", + "enum": [ + "bucket" + ], + "title": "bucket" + }, + { + "type": "string", + "enum": [ + "file" + ], + "title": "file" + }, + { + "type": "string", + "enum": [ + "function" + ], + "title": "function" + }, + { + "type": "string", + "enum": [ + "deployment" + ], + "title": "deployment" + }, + { + "type": "string", + "enum": [ + "environment-variable" + ], + "title": "environment-variable" + }, + { + "type": "string", + "enum": [ + "provider" + ], + "title": "provider" + }, + { + "type": "string", + "enum": [ + "topic" + ], + "title": "topic" + }, + { + "type": "string", + "enum": [ + "subscriber" + ], + "title": "subscriber" + }, + { + "type": "string", + "enum": [ + "message" + ], + "title": "message" + }, + { + "type": "string", + "enum": [ + "site" + ], + "title": "site" + }, + { + "type": "string", + "enum": [ + "site-deployment" + ], + "title": "site-deployment" + }, + { + "type": "string", + "enum": [ + "site-variable" + ], + "title": "site-variable" + }, + { + "type": "string", + "enum": [ + "platform" + ], + "title": "platform" + }, + { + "type": "string", + "enum": [ + "api-key" + ], + "title": "api-key" + }, + { + "type": "string", + "enum": [ + "webhook" + ], + "title": "webhook" + }, + { + "type": "string", + "enum": [ + "smtp" + ], + "title": "smtp" + }, + { + "type": "string", + "enum": [ + "backup-policy" + ], + "title": "backup-policy" + }, + { + "type": "string", + "enum": [ + "project-variable" + ], + "title": "project-variable" + }, + { + "type": "string", + "enum": [ + "project-protocols" + ], + "title": "project-protocols" + }, + { + "type": "string", + "enum": [ + "project-labels" + ], + "title": "project-labels" + }, + { + "type": "string", + "enum": [ + "project-services" + ], + "title": "project-services" + }, + { + "type": "string", + "enum": [ + "project-email-template" + ], + "title": "project-email-template" + }, + { + "type": "string", + "enum": [ + "rule" + ], + "title": "rule" + } + ] + } + }, + "endpoint": { + "description": "Source Appwrite endpoint", + "type": "string", + "example": "https:\/\/example.com", + "format": "url" + }, + "projectId": { + "description": "Source Project ID", + "type": "string", + "example": "<PROJECT_ID>" + }, + "apiKey": { + "description": "Source API Key", + "type": "string", + "example": "<API_KEY>" + }, + "onDuplicate": { + "description": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", + "type": "string", + "default": "fail", + "example": "fail", + "title": "OnDuplicate", + "oneOf": [ + { + "type": "string", + "enum": [ + "fail" + ], + "title": "fail" + }, + { + "type": "string", + "enum": [ + "skip" + ], + "title": "skip" + }, + { + "type": "string", + "enum": [ + "overwrite" + ], + "title": "overwrite" + } + ] + } + }, + "required": [ + "resources", + "endpoint", + "projectId", + "apiKey" + ] + } + } + } + } + } + }, + "\/migrations\/appwrite\/report": { + "get": { + "summary": "Get Appwrite migration report", + "operationId": "migrationsGetAppwriteReport", + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "responses": { + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/get-appwrite-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "schema": { + "type": "array", + "items": { + "title": "AppwriteMigrationResource", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "user" + ], + "title": "user" + }, + { + "type": "string", + "enum": [ + "team" + ], + "title": "team" + }, + { + "type": "string", + "enum": [ + "membership" + ], + "title": "membership" + }, + { + "type": "string", + "enum": [ + "auth-methods" + ], + "title": "auth-methods" + }, + { + "type": "string", + "enum": [ + "policies" + ], + "title": "policies" + }, + { + "type": "string", + "enum": [ + "oauth2-provider" + ], + "title": "oauth2-provider" + }, + { + "type": "string", + "enum": [ + "database" + ], + "title": "database" + }, + { + "type": "string", + "enum": [ + "table" + ], + "title": "table" + }, + { + "type": "string", + "enum": [ + "column" + ], + "title": "column" + }, + { + "type": "string", + "enum": [ + "index" + ], + "title": "index" + }, + { + "type": "string", + "enum": [ + "row" + ], + "title": "row" + }, + { + "type": "string", + "enum": [ + "document" + ], + "title": "document" + }, + { + "type": "string", + "enum": [ + "attribute" + ], + "title": "attribute" + }, + { + "type": "string", + "enum": [ + "collection" + ], + "title": "collection" + }, + { + "type": "string", + "enum": [ + "documentsdb" + ], + "title": "documentsdb" + }, + { + "type": "string", + "enum": [ + "vectorsdb" + ], + "title": "vectorsdb" + }, + { + "type": "string", + "enum": [ + "bucket" + ], + "title": "bucket" + }, + { + "type": "string", + "enum": [ + "file" + ], + "title": "file" + }, + { + "type": "string", + "enum": [ + "function" + ], + "title": "function" + }, + { + "type": "string", + "enum": [ + "deployment" + ], + "title": "deployment" + }, + { + "type": "string", + "enum": [ + "environment-variable" + ], + "title": "environment-variable" + }, + { + "type": "string", + "enum": [ + "provider" + ], + "title": "provider" + }, + { + "type": "string", + "enum": [ + "topic" + ], + "title": "topic" + }, + { + "type": "string", + "enum": [ + "subscriber" + ], + "title": "subscriber" + }, + { + "type": "string", + "enum": [ + "message" + ], + "title": "message" + }, + { + "type": "string", + "enum": [ + "site" + ], + "title": "site" + }, + { + "type": "string", + "enum": [ + "site-deployment" + ], + "title": "site-deployment" + }, + { + "type": "string", + "enum": [ + "site-variable" + ], + "title": "site-variable" + }, + { + "type": "string", + "enum": [ + "platform" + ], + "title": "platform" + }, + { + "type": "string", + "enum": [ + "api-key" + ], + "title": "api-key" + }, + { + "type": "string", + "enum": [ + "webhook" + ], + "title": "webhook" + }, + { + "type": "string", + "enum": [ + "smtp" + ], + "title": "smtp" + }, + { + "type": "string", + "enum": [ + "backup-policy" + ], + "title": "backup-policy" + }, + { + "type": "string", + "enum": [ + "project-variable" + ], + "title": "project-variable" + }, + { + "type": "string", + "enum": [ + "project-protocols" + ], + "title": "project-protocols" + }, + { + "type": "string", + "enum": [ + "project-labels" + ], + "title": "project-labels" + }, + { + "type": "string", + "enum": [ + "project-services" + ], + "title": "project-services" + }, + { + "type": "string", + "enum": [ + "project-email-template" + ], + "title": "project-email-template" + }, + { + "type": "string", + "enum": [ + "rule" + ], + "title": "rule" + } + ] + } + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Appwrite Endpoint", + "required": true, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "projectID", + "description": "Source's Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "query" + }, + { + "name": "key", + "description": "Source's API Key", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "query" + } + ] + } + }, + "\/migrations\/csv\/exports": { + "post": { + "summary": "Export documents to CSV", + "operationId": "migrationsCreateCSVExport", + "tags": [ + "migrations" + ], + "description": "Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/create-csv-export.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "description": "Database ID containing the source collection.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "collectionId": { + "description": "Collection ID to export documents from.", + "type": "string", + "example": "<COLLECTION_ID>" + }, + "filename": { + "description": "The name of the file to be created for the export, excluding the .csv extension.", + "type": "string", + "example": "<FILENAME>" + }, + "columns": { + "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "queries": { + "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "delimiter": { + "description": "The character that separates each column value. Default is comma.", + "type": "string", + "default": ",", + "example": "<DELIMITER>" + }, + "enclosure": { + "description": "The character that encloses each column value. Default is double quotes.", + "type": "string", + "default": "\"", + "example": "<ENCLOSURE>" + }, + "escape": { + "description": "The escape character for the enclosure character. Default is double quotes.", + "type": "string", + "default": "\"", + "example": "<ESCAPE>" + }, + "header": { + "description": "Whether to include the header row with column names. Default is true.", + "type": "boolean", + "default": true, + "example": false + }, + "notify": { + "description": "Set to true to receive an email when the export is complete. Default is true.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "databaseId", + "collectionId", + "filename" + ] + } + } + } + } + } + }, + "\/migrations\/csv\/imports": { + "post": { + "summary": "Import documents from a CSV", + "operationId": "migrationsCreateCSVImport", + "tags": [ + "migrations" + ], + "description": "Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/create-csv-import.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "bucketId": { + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "type": "string", + "example": "<BUCKET_ID>" + }, + "fileId": { + "description": "File ID.", + "type": "string", + "example": "<FILE_ID>" + }, + "databaseId": { + "description": "Database ID containing the target collection.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "collectionId": { + "description": "Collection ID to import documents into.", + "type": "string", + "example": "<COLLECTION_ID>" + }, + "internalFile": { + "description": "Is the file stored in an internal bucket?", + "type": "boolean", + "default": false, + "example": false + }, + "onDuplicate": { + "description": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", + "type": "string", + "default": "fail", + "example": "fail", + "title": "OnDuplicate", + "oneOf": [ + { + "type": "string", + "enum": [ + "fail" + ], + "title": "fail" + }, + { + "type": "string", + "enum": [ + "skip" + ], + "title": "skip" + }, + { + "type": "string", + "enum": [ + "overwrite" + ], + "title": "overwrite" + } + ] + } + }, + "required": [ + "bucketId", + "fileId", + "databaseId", + "collectionId" + ] + } + } + } + } + } + }, + "\/migrations\/firebase": { + "post": { + "summary": "Create Firebase migration", + "operationId": "migrationsCreateFirebaseMigration", + "tags": [ + "migrations" + ], + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/create-firebase-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "description": "List of resources to migrate", + "type": "array", + "items": { + "title": "FirebaseMigrationResource", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "user" + ], + "title": "user" + }, + { + "type": "string", + "enum": [ + "database" + ], + "title": "database" + }, + { + "type": "string", + "enum": [ + "table" + ], + "title": "table" + }, + { + "type": "string", + "enum": [ + "column" + ], + "title": "column" + }, + { + "type": "string", + "enum": [ + "row" + ], + "title": "row" + }, + { + "type": "string", + "enum": [ + "document" + ], + "title": "document" + }, + { + "type": "string", + "enum": [ + "attribute" + ], + "title": "attribute" + }, + { + "type": "string", + "enum": [ + "collection" + ], + "title": "collection" + }, + { + "type": "string", + "enum": [ + "bucket" + ], + "title": "bucket" + }, + { + "type": "string", + "enum": [ + "file" + ], + "title": "file" + } + ] + } + }, + "serviceAccount": { + "description": "JSON of the Firebase service account credentials", + "type": "string", + "example": "<SERVICE_ACCOUNT>" + } + }, + "required": [ + "resources", + "serviceAccount" + ] + } + } + } + } + } + }, + "\/migrations\/firebase\/report": { + "get": { + "summary": "Get Firebase migration report", + "operationId": "migrationsGetFirebaseReport", + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "responses": { + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/get-firebase-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "schema": { + "type": "array", + "items": { + "title": "FirebaseMigrationResource", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "user" + ], + "title": "user" + }, + { + "type": "string", + "enum": [ + "database" + ], + "title": "database" + }, + { + "type": "string", + "enum": [ + "table" + ], + "title": "table" + }, + { + "type": "string", + "enum": [ + "column" + ], + "title": "column" + }, + { + "type": "string", + "enum": [ + "row" + ], + "title": "row" + }, + { + "type": "string", + "enum": [ + "document" + ], + "title": "document" + }, + { + "type": "string", + "enum": [ + "attribute" + ], + "title": "attribute" + }, + { + "type": "string", + "enum": [ + "collection" + ], + "title": "collection" + }, + { + "type": "string", + "enum": [ + "bucket" + ], + "title": "bucket" + }, + { + "type": "string", + "enum": [ + "file" + ], + "title": "file" + } + ] + } + }, + "in": "query" + }, + { + "name": "serviceAccount", + "description": "JSON of the Firebase service account credentials", + "required": true, + "schema": { + "type": "string", + "example": "<SERVICE_ACCOUNT>" + }, + "in": "query" + } + ] + } + }, + "\/migrations\/json\/exports": { + "post": { + "summary": "Export documents to JSON", + "operationId": "migrationsCreateJSONExport", + "tags": [ + "migrations" + ], + "description": "Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.\n", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/create-json-export.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "description": "Database ID containing the source collection.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "collectionId": { + "description": "Collection ID to export documents from.", + "type": "string", + "example": "<COLLECTION_ID>" + }, + "filename": { + "description": "The name of the file to be created for the export, excluding the .json extension.", + "type": "string", + "example": "<FILENAME>" + }, + "columns": { + "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "queries": { + "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "notify": { + "description": "Set to true to receive an email when the export is complete. Default is true.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "databaseId", + "collectionId", + "filename" + ] + } + } + } + } + } + }, + "\/migrations\/json\/imports": { + "post": { + "summary": "Import documents from a JSON", + "operationId": "migrationsCreateJSONImport", + "tags": [ + "migrations" + ], + "description": "Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.\n", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/create-json-import.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "bucketId": { + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "type": "string", + "example": "<BUCKET_ID>" + }, + "fileId": { + "description": "File ID.", + "type": "string", + "example": "<FILE_ID>" + }, + "databaseId": { + "description": "Database ID containing the target collection.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "collectionId": { + "description": "Collection ID to import documents into.", + "type": "string", + "example": "<COLLECTION_ID>" + }, + "internalFile": { + "description": "Is the file stored in an internal bucket?", + "type": "boolean", + "default": false, + "example": false + }, + "onDuplicate": { + "description": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", + "type": "string", + "default": "fail", + "example": "fail", + "title": "OnDuplicate", + "oneOf": [ + { + "type": "string", + "enum": [ + "fail" + ], + "title": "fail" + }, + { + "type": "string", + "enum": [ + "skip" + ], + "title": "skip" + }, + { + "type": "string", + "enum": [ + "overwrite" + ], + "title": "overwrite" + } + ] + } + }, + "required": [ + "bucketId", + "fileId", + "databaseId", + "collectionId" + ] + } + } + } + } + } + }, + "\/migrations\/nhost": { + "post": { + "summary": "Create NHost migration", + "operationId": "migrationsCreateNHostMigration", + "tags": [ + "migrations" + ], + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/create-n-host-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "description": "List of resources to migrate", + "type": "array", + "items": { + "title": "NHostMigrationResource", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "user" + ], + "title": "user" + }, + { + "type": "string", + "enum": [ + "database" + ], + "title": "database" + }, + { + "type": "string", + "enum": [ + "table" + ], + "title": "table" + }, + { + "type": "string", + "enum": [ + "column" + ], + "title": "column" + }, + { + "type": "string", + "enum": [ + "index" + ], + "title": "index" + }, + { + "type": "string", + "enum": [ + "row" + ], + "title": "row" + }, + { + "type": "string", + "enum": [ + "document" + ], + "title": "document" + }, + { + "type": "string", + "enum": [ + "attribute" + ], + "title": "attribute" + }, + { + "type": "string", + "enum": [ + "collection" + ], + "title": "collection" + }, + { + "type": "string", + "enum": [ + "bucket" + ], + "title": "bucket" + }, + { + "type": "string", + "enum": [ + "file" + ], + "title": "file" + } + ] + } + }, + "subdomain": { + "description": "Source's Subdomain", + "type": "string", + "example": "<SUBDOMAIN>" + }, + "region": { + "description": "Source's Region", + "type": "string", + "example": "<REGION>" + }, + "adminSecret": { + "description": "Source's Admin Secret", + "type": "string", + "example": "<ADMIN_SECRET>" + }, + "database": { + "description": "Source's Database Name", + "type": "string", + "example": "<DATABASE>" + }, + "username": { + "description": "Source's Database Username", + "type": "string", + "example": "<USERNAME>" + }, + "password": { + "description": "Source's Database Password", + "type": "string", + "example": "password", + "format": "password" + }, + "port": { + "description": "Source's Database Port", + "type": "integer", + "default": 5432, + "example": 5432, + "format": "int32" + } + }, + "required": [ + "resources", + "subdomain", + "region", + "adminSecret", + "database", + "username", + "password" + ] + } + } + } + } + } + }, + "\/migrations\/nhost\/report": { + "get": { + "summary": "Get NHost migration report", + "operationId": "migrationsGetNHostReport", + "tags": [ + "migrations" + ], + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "responses": { + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/get-n-host-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate.", + "required": true, + "schema": { + "type": "array", + "items": { + "title": "NHostMigrationResource", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "user" + ], + "title": "user" + }, + { + "type": "string", + "enum": [ + "database" + ], + "title": "database" + }, + { + "type": "string", + "enum": [ + "table" + ], + "title": "table" + }, + { + "type": "string", + "enum": [ + "column" + ], + "title": "column" + }, + { + "type": "string", + "enum": [ + "index" + ], + "title": "index" + }, + { + "type": "string", + "enum": [ + "row" + ], + "title": "row" + }, + { + "type": "string", + "enum": [ + "document" + ], + "title": "document" + }, + { + "type": "string", + "enum": [ + "attribute" + ], + "title": "attribute" + }, + { + "type": "string", + "enum": [ + "collection" + ], + "title": "collection" + }, + { + "type": "string", + "enum": [ + "bucket" + ], + "title": "bucket" + }, + { + "type": "string", + "enum": [ + "file" + ], + "title": "file" + } + ] + } + }, + "in": "query" + }, + { + "name": "subdomain", + "description": "Source's Subdomain.", + "required": true, + "schema": { + "type": "string", + "example": "<SUBDOMAIN>" + }, + "in": "query" + }, + { + "name": "region", + "description": "Source's Region.", + "required": true, + "schema": { + "type": "string", + "example": "<REGION>" + }, + "in": "query" + }, + { + "name": "adminSecret", + "description": "Source's Admin Secret.", + "required": true, + "schema": { + "type": "string", + "example": "<ADMIN_SECRET>" + }, + "in": "query" + }, + { + "name": "database", + "description": "Source's Database Name.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE>" + }, + "in": "query" + }, + { + "name": "username", + "description": "Source's Database Username.", + "required": true, + "schema": { + "type": "string", + "example": "<USERNAME>" + }, + "in": "query" + }, + { + "name": "password", + "description": "Source's Database Password.", + "required": true, + "schema": { + "type": "string", + "format": "password", + "example": "password" + }, + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 5432, + "default": 5432 + }, + "in": "query" + } + ] + } + }, + "\/migrations\/supabase": { + "post": { + "summary": "Create Supabase migration", + "operationId": "migrationsCreateSupabaseMigration", + "tags": [ + "migrations" + ], + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/create-supabase-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "description": "List of resources to migrate", + "type": "array", + "items": { + "title": "SupabaseMigrationResource", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "user" + ], + "title": "user" + }, + { + "type": "string", + "enum": [ + "database" + ], + "title": "database" + }, + { + "type": "string", + "enum": [ + "table" + ], + "title": "table" + }, + { + "type": "string", + "enum": [ + "column" + ], + "title": "column" + }, + { + "type": "string", + "enum": [ + "index" + ], + "title": "index" + }, + { + "type": "string", + "enum": [ + "row" + ], + "title": "row" + }, + { + "type": "string", + "enum": [ + "document" + ], + "title": "document" + }, + { + "type": "string", + "enum": [ + "attribute" + ], + "title": "attribute" + }, + { + "type": "string", + "enum": [ + "collection" + ], + "title": "collection" + }, + { + "type": "string", + "enum": [ + "bucket" + ], + "title": "bucket" + }, + { + "type": "string", + "enum": [ + "file" + ], + "title": "file" + } + ] + } + }, + "endpoint": { + "description": "Source's Supabase Endpoint", + "type": "string", + "example": "https:\/\/example.com", + "format": "url" + }, + "apiKey": { + "description": "Source's API Key", + "type": "string", + "example": "<API_KEY>" + }, + "databaseHost": { + "description": "Source's Database Host", + "type": "string", + "example": "<DATABASE_HOST>" + }, + "username": { + "description": "Source's Database Username", + "type": "string", + "example": "<USERNAME>" + }, + "password": { + "description": "Source's Database Password", + "type": "string", + "example": "password", + "format": "password" + }, + "port": { + "description": "Source's Database Port", + "type": "integer", + "default": 5432, + "example": 5432, + "format": "int32" + } + }, + "required": [ + "resources", + "endpoint", + "apiKey", + "databaseHost", + "username", + "password" + ] + } + } + } + } + } + }, + "\/migrations\/supabase\/report": { + "get": { + "summary": "Get Supabase migration report", + "operationId": "migrationsGetSupabaseReport", + "tags": [ + "migrations" + ], + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "responses": { + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/get-supabase-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "schema": { + "type": "array", + "items": { + "title": "SupabaseMigrationResource", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "user" + ], + "title": "user" + }, + { + "type": "string", + "enum": [ + "database" + ], + "title": "database" + }, + { + "type": "string", + "enum": [ + "table" + ], + "title": "table" + }, + { + "type": "string", + "enum": [ + "column" + ], + "title": "column" + }, + { + "type": "string", + "enum": [ + "index" + ], + "title": "index" + }, + { + "type": "string", + "enum": [ + "row" + ], + "title": "row" + }, + { + "type": "string", + "enum": [ + "document" + ], + "title": "document" + }, + { + "type": "string", + "enum": [ + "attribute" + ], + "title": "attribute" + }, + { + "type": "string", + "enum": [ + "collection" + ], + "title": "collection" + }, + { + "type": "string", + "enum": [ + "bucket" + ], + "title": "bucket" + }, + { + "type": "string", + "enum": [ + "file" + ], + "title": "file" + } + ] + } + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Supabase Endpoint.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "apiKey", + "description": "Source's API Key.", + "required": true, + "schema": { + "type": "string", + "example": "<API_KEY>" + }, + "in": "query" + }, + { + "name": "databaseHost", + "description": "Source's Database Host.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_HOST>" + }, + "in": "query" + }, + { + "name": "username", + "description": "Source's Database Username.", + "required": true, + "schema": { + "type": "string", + "example": "<USERNAME>" + }, + "in": "query" + }, + { + "name": "password", + "description": "Source's Database Password.", + "required": true, + "schema": { + "type": "string", + "format": "password", + "example": "password" + }, + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 5432, + "default": 5432 + }, + "in": "query" + } + ] + } + }, + "\/migrations\/{migrationId}": { + "get": { + "summary": "Get migration", + "operationId": "migrationsGet", + "tags": [ + "migrations" + ], + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", + "responses": { + "200": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update retry migration", + "operationId": "migrationsRetry", + "tags": [ + "migrations" + ], + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/retry.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete migration", + "operationId": "migrationsDelete", + "tags": [ + "migrations" + ], + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "migrations\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo": { + "get": { + "summary": "List databases", + "operationId": "mongoList", + "tags": [ + "mongo" + ], + "description": "List all dedicated databases. Results support pagination.", + "responses": { + "200": { + "description": "Dedicated databases list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "mongoCreate", + "tags": [ + "mongo" + ], + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", + "responses": { + "201": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "databaseId": { + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "name": { + "description": "Database display name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "version": { + "description": "Database engine version. Defaults to latest for selected engine.", + "type": "string", + "example": "17", + "nullable": true + }, + "specification": { + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "type": "string", + "default": "s-1vcpu-1gb", + "example": "<SPECIFICATION>" + }, + "replicas": { + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "syncMode": { + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + }, + "networkIdleTimeoutSeconds": { + "description": "Connection idle timeout in seconds.", + "type": "integer", + "default": 900, + "example": 60, + "format": "int32" + }, + "networkIPAllowlist": { + "description": "IP addresses\/CIDR ranges allowed to connect.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "idleTimeoutMinutes": { + "description": "Minutes of inactivity before container scales to zero.", + "type": "integer", + "default": 15, + "example": 5, + "format": "int32" + }, + "pitr": { + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", + "type": "boolean", + "default": true, + "example": false + }, + "pitrRetentionDays": { + "description": "Number of days to retain PITR data.", + "type": "integer", + "default": 7, + "example": 1, + "format": "int32" + }, + "storageAutoscaling": { + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "type": "boolean", + "default": true, + "example": false + }, + "storageAutoscalingThresholdPercent": { + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "type": "integer", + "default": 85, + "example": 50, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "description": "Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/mongo\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "mongoListSpecifications", + "tags": [ + "mongo" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, its own prices and overage rates, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/mongo\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "mongoGet", + "tags": [ + "mongo" + ], + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update database", + "operationId": "mongoUpdate", + "tags": [ + "mongo" + ], + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Database display name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "status": { + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "type": "string", + "example": "ready", + "nullable": true + }, + "specification": { + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "type": "string", + "example": "<SPECIFICATION>", + "nullable": true + }, + "replicas": { + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "syncMode": { + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + }, + "networkIdleTimeoutSeconds": { + "description": "Connection idle timeout in seconds (60-86400).", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "networkIPAllowlist": { + "description": "IP addresses\/CIDR ranges allowed to connect.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "idleTimeoutMinutes": { + "description": "Minutes before container scales to zero.", + "type": "integer", + "example": 5, + "format": "int32", + "nullable": true + }, + "pitr": { + "description": "Enable or disable point-in-time recovery (PITR).", + "type": "boolean", + "example": false, + "nullable": true + }, + "pitrRetentionDays": { + "description": "Days to retain PITR data.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "storageAutoscaling": { + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "type": "boolean", + "example": false, + "nullable": true + }, + "storageAutoscalingThresholdPercent": { + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "type": "integer", + "example": 50, + "format": "int32", + "nullable": true + }, + "storageAutoscalingMaxGb": { + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "metricsTraceSampleRate": { + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "type": "number", + "format": "float", + "nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "sqlApiEnabled": { + "description": "Enable the SQL API sidecar for this database.", + "type": "boolean", + "example": false, + "nullable": true + }, + "sqlApiAllowedStatements": { + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "sqlApiMaxRows": { + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "sqlApiMaxBytes": { + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "type": "integer", + "example": 1024, + "format": "int32", + "nullable": true + }, + "sqlApiTimeoutSeconds": { + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "mongoDelete", + "tags": [ + "mongo" + ], + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/backups": { + "get": { + "summary": "List backups", + "operationId": "mongoListBackups", + "tags": [ + "mongo" + ], + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "BackupList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mongo\/list-backups.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup", + "operationId": "mongoCreateBackup", + "tags": [ + "mongo" + ], + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", + "responses": { + "202": { + "description": "Backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mongo\/create-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Backup type: full or incremental.", + "type": "string", + "default": "full", + "example": "full" + } + } + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List backup policies", + "operationId": "mongoListBackupPolicies", + "tags": [ + "mongo" + ], + "description": "List scheduled backup policies for a dedicated database.", + "responses": { + "200": { + "description": "Backup policy list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mongo\/list-backup-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup policy", + "operationId": "mongoCreateBackupPolicy", + "tags": [ + "mongo" + ], + "description": "Create a scheduled backup policy for a dedicated database.", + "responses": { + "201": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mongo\/create-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "policyId": { + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<POLICY_ID>" + }, + "name": { + "description": "Policy name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string" + }, + "retention": { + "description": "Days to keep backups before deletion.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "type": { + "description": "Backup type: full or incremental.", + "type": "string", + "default": "full", + "example": "full" + }, + "enabled": { + "description": "Is policy enabled? When disabled, no backups will be taken.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "policyId", + "name", + "schedule", + "retention" + ] + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/backups\/policies\/{policyId}": { + "get": { + "summary": "Get backup policy", + "operationId": "mongoGetBackupPolicy", + "tags": [ + "mongo" + ], + "description": "Get a scheduled backup policy for a dedicated database.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mongo\/get-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update backup policy", + "operationId": "mongoUpdateBackupPolicy", + "tags": [ + "mongo" + ], + "description": "Update a scheduled backup policy for a dedicated database.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mongo\/update-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Policy name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string" + }, + "retention": { + "description": "Days to keep backups before deletion.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "enabled": { + "description": "Is policy enabled? When disabled, no backups will be taken.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "mongoDeleteBackupPolicy", + "tags": [ + "mongo" + ], + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mongo\/delete-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "mongoUpdateBackupStorage", + "tags": [ + "mongo" + ], + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", + "responses": { + "200": { + "description": "BackupStorageConfig", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mongo\/update-backup-storage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "type": "string", + "example": "s3" + }, + "bucket": { + "description": "Storage bucket or container name.", + "type": "string", + "example": "<BUCKET>" + }, + "region": { + "description": "Storage region.", + "type": "string", + "default": "", + "example": "<REGION>" + }, + "prefix": { + "description": "Object key prefix for backups.", + "type": "string", + "default": "backups\/", + "example": "<PREFIX>" + }, + "endpoint": { + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "type": "string", + "default": "", + "example": "<ENDPOINT>" + }, + "accessKey": { + "description": "Access key or client ID for authentication.", + "type": "string", + "example": "<ACCESS_KEY>" + }, + "secretKey": { + "description": "Secret key or service account JSON for authentication.", + "type": "string", + "example": "<SECRET_KEY>" + } + }, + "required": [ + "provider", + "bucket", + "accessKey", + "secretKey" + ] + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/backups\/{backupId}": { + "get": { + "summary": "Get backup", + "operationId": "mongoGetBackup", + "tags": [ + "mongo" + ], + "description": "Get details of a specific database backup including its status, size, and timestamps.", + "responses": { + "200": { + "description": "Backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mongo\/get-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BACKUP_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete backup", + "operationId": "mongoDeleteBackup", + "tags": [ + "mongo" + ], + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mongo\/delete-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BACKUP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/branches": { + "get": { + "summary": "List branches", + "operationId": "mongoListBranches", + "tags": [ + "mongo" + ], + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", + "responses": { + "200": { + "description": "BranchList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "mongo\/list-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create branch", + "operationId": "mongoCreateBranch", + "tags": [ + "mongo" + ], + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "mongo\/create-branch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "branchId": { + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "default": "", + "example": "<BRANCH_ID>" + }, + "ttl": { + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "type": "integer", + "default": 86400, + "example": 300, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/branches\/{branchId}": { + "delete": { + "summary": "Delete branch", + "operationId": "mongoDeleteBranch", + "tags": [ + "mongo" + ], + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "mongo\/delete-branch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "branchId", + "description": "Branch ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BRANCH_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/credentials": { + "patch": { + "summary": "Update credentials", + "operationId": "mongoUpdateCredentials", + "tags": [ + "mongo" + ], + "description": "Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.", + "responses": { + "202": { + "description": "Operation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/update-credentials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "mongoCreateFailover", + "tags": [ + "mongo" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "failovers", + "demo": "mongo\/create-failover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "type": "string", + "example": "<TARGET_REPLICA_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update maintenance", + "operationId": "mongoUpdateMaintenance", + "tags": [ + "mongo" + ], + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/update-maintenance.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "day": { + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "type": "string", + "example": "sun" + }, + "hourUtc": { + "description": "Hour in UTC (0-23) for maintenance window start.", + "type": "integer", + "example": 0, + "format": "int32" + } + }, + "required": [ + "day", + "hourUtc" + ] + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/migrations": { + "post": { + "summary": "Create migration", + "operationId": "mongoCreateMigration", + "tags": [ + "mongo" + ], + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "migrations", + "demo": "mongo\/create-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetType": { + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "type": "string", + "example": "shared" + }, + "specification": { + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "type": "string", + "example": "<SPECIFICATION>", + "nullable": true + } + }, + "required": [ + "targetType" + ] + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "mongoListOperations", + "tags": [ + "mongo" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "operations", + "demo": "mongo\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "example": "queued" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/mongo\/{databaseId}\/pitr": { + "get": { + "summary": "Get PITR", + "operationId": "mongoGetPitr", + "tags": [ + "mongo" + ], + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", + "responses": { + "200": { + "description": "PITRWindows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pitr", + "demo": "mongo\/get-pitr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "mongoGetReplicas", + "tags": [ + "mongo" + ], + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", + "responses": { + "200": { + "description": "Replicas", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "replicas", + "demo": "mongo\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/restorations": { + "get": { + "summary": "List restorations", + "operationId": "mongoListRestorations", + "tags": [ + "mongo" + ], + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "Dedicated database restorations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "mongo\/list-restorations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by restoration status.", + "required": false, + "schema": { + "type": "string", + "example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create restoration", + "operationId": "mongoCreateRestoration", + "tags": [ + "mongo" + ], + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", + "responses": { + "202": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "mongo\/create-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "type": "string", + "default": "backup", + "example": "backup" + }, + "backupId": { + "description": "Backup ID to restore from (required for backup type).", + "type": "string", + "example": "<BACKUP_ID>", + "nullable": true + }, + "targetDatabaseId": { + "description": "Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.", + "type": "string", + "example": "<TARGET_DATABASE_ID>", + "nullable": true + }, + "targetTime": { + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + } + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/restorations\/{restorationId}": { + "get": { + "summary": "Get restoration", + "operationId": "mongoGetRestoration", + "tags": [ + "mongo" + ], + "description": "Get details of a specific database restoration including its status, type, and timestamps.", + "responses": { + "200": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "mongo\/get-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "restorationId", + "description": "Restoration ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RESTORATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "mongoGetStatus", + "tags": [ + "mongo" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/upgrades": { + "post": { + "summary": "Create upgrade", + "operationId": "mongoCreateUpgrade", + "tags": [ + "mongo" + ], + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mongo", + "demo": "mongo\/create-upgrade.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetVersion": { + "description": "Target engine version to upgrade to.", + "type": "string", + "example": "<TARGET_VERSION>" + } + }, + "required": [ + "targetVersion" + ] + } + } + } + } + } + }, + "\/mysql": { + "get": { + "summary": "List databases", + "operationId": "mysqlList", + "tags": [ + "mysql" + ], + "description": "List all dedicated databases. Results support pagination.", + "responses": { + "200": { + "description": "Dedicated databases list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "mysqlCreate", + "tags": [ + "mysql" + ], + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", + "responses": { + "201": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "databaseId": { + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "name": { + "description": "Database display name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "version": { + "description": "Database engine version. Defaults to latest for selected engine.", + "type": "string", + "example": "17", + "nullable": true + }, + "specification": { + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "type": "string", + "default": "s-1vcpu-1gb", + "example": "<SPECIFICATION>" + }, + "replicas": { + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "syncMode": { + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + }, + "networkIdleTimeoutSeconds": { + "description": "Connection idle timeout in seconds.", + "type": "integer", + "default": 900, + "example": 60, + "format": "int32" + }, + "networkIPAllowlist": { + "description": "IP addresses\/CIDR ranges allowed to connect.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "idleTimeoutMinutes": { + "description": "Minutes of inactivity before container scales to zero.", + "type": "integer", + "default": 15, + "example": 5, + "format": "int32" + }, + "pitr": { + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", + "type": "boolean", + "default": true, + "example": false + }, + "pitrRetentionDays": { + "description": "Number of days to retain PITR data.", + "type": "integer", + "default": 7, + "example": 1, + "format": "int32" + }, + "storageAutoscaling": { + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "type": "boolean", + "default": true, + "example": false + }, + "storageAutoscalingThresholdPercent": { + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "type": "integer", + "default": 85, + "example": 50, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "description": "Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/mysql\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "mysqlListSpecifications", + "tags": [ + "mysql" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, its own prices and overage rates, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/mysql\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "mysqlGet", + "tags": [ + "mysql" + ], + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update database", + "operationId": "mysqlUpdate", + "tags": [ + "mysql" + ], + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Database display name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "status": { + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "type": "string", + "example": "ready", + "nullable": true + }, + "specification": { + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "type": "string", + "example": "<SPECIFICATION>", + "nullable": true + }, + "replicas": { + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "syncMode": { + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + }, + "networkIdleTimeoutSeconds": { + "description": "Connection idle timeout in seconds (60-86400).", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "networkIPAllowlist": { + "description": "IP addresses\/CIDR ranges allowed to connect.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "idleTimeoutMinutes": { + "description": "Minutes before container scales to zero.", + "type": "integer", + "example": 5, + "format": "int32", + "nullable": true + }, + "pitr": { + "description": "Enable or disable point-in-time recovery (PITR).", + "type": "boolean", + "example": false, + "nullable": true + }, + "pitrRetentionDays": { + "description": "Days to retain PITR data.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "storageAutoscaling": { + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "type": "boolean", + "example": false, + "nullable": true + }, + "storageAutoscalingThresholdPercent": { + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "type": "integer", + "example": 50, + "format": "int32", + "nullable": true + }, + "storageAutoscalingMaxGb": { + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "metricsTraceSampleRate": { + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "type": "number", + "format": "float", + "nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "sqlApiEnabled": { + "description": "Enable the SQL API sidecar for this database.", + "type": "boolean", + "example": false, + "nullable": true + }, + "sqlApiAllowedStatements": { + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "sqlApiMaxRows": { + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "sqlApiMaxBytes": { + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "type": "integer", + "example": 1024, + "format": "int32", + "nullable": true + }, + "sqlApiTimeoutSeconds": { + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "mysqlDelete", + "tags": [ + "mysql" + ], + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/backups": { + "get": { + "summary": "List backups", + "operationId": "mysqlListBackups", + "tags": [ + "mysql" + ], + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "BackupList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mysql\/list-backups.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup", + "operationId": "mysqlCreateBackup", + "tags": [ + "mysql" + ], + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", + "responses": { + "202": { + "description": "Backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mysql\/create-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Backup type: full or incremental.", + "type": "string", + "default": "full", + "example": "full" + } + } + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List backup policies", + "operationId": "mysqlListBackupPolicies", + "tags": [ + "mysql" + ], + "description": "List scheduled backup policies for a dedicated database.", + "responses": { + "200": { + "description": "Backup policy list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mysql\/list-backup-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup policy", + "operationId": "mysqlCreateBackupPolicy", + "tags": [ + "mysql" + ], + "description": "Create a scheduled backup policy for a dedicated database.", + "responses": { + "201": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mysql\/create-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "policyId": { + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<POLICY_ID>" + }, + "name": { + "description": "Policy name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string" + }, + "retention": { + "description": "Days to keep backups before deletion.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "type": { + "description": "Backup type: full or incremental.", + "type": "string", + "default": "full", + "example": "full" + }, + "enabled": { + "description": "Is policy enabled? When disabled, no backups will be taken.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "policyId", + "name", + "schedule", + "retention" + ] + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/backups\/policies\/{policyId}": { + "get": { + "summary": "Get backup policy", + "operationId": "mysqlGetBackupPolicy", + "tags": [ + "mysql" + ], + "description": "Get a scheduled backup policy for a dedicated database.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mysql\/get-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update backup policy", + "operationId": "mysqlUpdateBackupPolicy", + "tags": [ + "mysql" + ], + "description": "Update a scheduled backup policy for a dedicated database.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mysql\/update-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Policy name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string" + }, + "retention": { + "description": "Days to keep backups before deletion.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "enabled": { + "description": "Is policy enabled? When disabled, no backups will be taken.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "mysqlDeleteBackupPolicy", + "tags": [ + "mysql" + ], + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "mysql\/delete-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "mysqlUpdateBackupStorage", + "tags": [ + "mysql" + ], + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", + "responses": { + "200": { + "description": "BackupStorageConfig", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mysql\/update-backup-storage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "type": "string", + "example": "s3" + }, + "bucket": { + "description": "Storage bucket or container name.", + "type": "string", + "example": "<BUCKET>" + }, + "region": { + "description": "Storage region.", + "type": "string", + "default": "", + "example": "<REGION>" + }, + "prefix": { + "description": "Object key prefix for backups.", + "type": "string", + "default": "backups\/", + "example": "<PREFIX>" + }, + "endpoint": { + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "type": "string", + "default": "", + "example": "<ENDPOINT>" + }, + "accessKey": { + "description": "Access key or client ID for authentication.", + "type": "string", + "example": "<ACCESS_KEY>" + }, + "secretKey": { + "description": "Secret key or service account JSON for authentication.", + "type": "string", + "example": "<SECRET_KEY>" + } + }, + "required": [ + "provider", + "bucket", + "accessKey", + "secretKey" + ] + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/backups\/{backupId}": { + "get": { + "summary": "Get backup", + "operationId": "mysqlGetBackup", + "tags": [ + "mysql" + ], + "description": "Get details of a specific database backup including its status, size, and timestamps.", + "responses": { + "200": { + "description": "Backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mysql\/get-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BACKUP_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete backup", + "operationId": "mysqlDeleteBackup", + "tags": [ + "mysql" + ], + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "mysql\/delete-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BACKUP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/branches": { + "get": { + "summary": "List branches", + "operationId": "mysqlListBranches", + "tags": [ + "mysql" + ], + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", + "responses": { + "200": { + "description": "BranchList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "mysql\/list-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create branch", + "operationId": "mysqlCreateBranch", + "tags": [ + "mysql" + ], + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "mysql\/create-branch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "branchId": { + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "default": "", + "example": "<BRANCH_ID>" + }, + "ttl": { + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "type": "integer", + "default": 86400, + "example": 300, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/branches\/{branchId}": { + "delete": { + "summary": "Delete branch", + "operationId": "mysqlDeleteBranch", + "tags": [ + "mysql" + ], + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "mysql\/delete-branch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "branchId", + "description": "Branch ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BRANCH_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/credentials": { + "patch": { + "summary": "Update credentials", + "operationId": "mysqlUpdateCredentials", + "tags": [ + "mysql" + ], + "description": "Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.", + "responses": { + "202": { + "description": "Operation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/update-credentials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/executions": { + "post": { + "summary": "Create execution", + "operationId": "mysqlCreateExecution", + "tags": [ + "mysql" + ], + "description": "Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https:\/\/db-{project}-{db}.{region}.appwrite.center\/v1\/sql\/executions` with an `X-Appwrite-Key` header \u2014 that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values \u2014 the API does not interpolate raw strings.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "executions", + "demo": "mysql\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "description": "SQL statement to execute. Exactly one statement per request.", + "type": "string", + "example": "<SQL>" + }, + "bindings": { + "description": "Optional bound parameters. Pass either a positional list or a name => value map matching the placeholder style used in the SQL.", + "type": "object", + "default": {}, + "example": {}, + "nullable": true + }, + "timeoutSeconds": { + "description": "Per-call execution timeout override. Must be less than or equal to the database's configured sqlApiTimeoutSeconds.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + } + }, + "required": [ + "sql" + ] + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "mysqlCreateFailover", + "tags": [ + "mysql" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "failovers", + "demo": "mysql\/create-failover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "type": "string", + "example": "<TARGET_REPLICA_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update maintenance", + "operationId": "mysqlUpdateMaintenance", + "tags": [ + "mysql" + ], + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/update-maintenance.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "day": { + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "type": "string", + "example": "sun" + }, + "hourUtc": { + "description": "Hour in UTC (0-23) for maintenance window start.", + "type": "integer", + "example": 0, + "format": "int32" + } + }, + "required": [ + "day", + "hourUtc" + ] + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/migrations": { + "post": { + "summary": "Create migration", + "operationId": "mysqlCreateMigration", + "tags": [ + "mysql" + ], + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "migrations", + "demo": "mysql\/create-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetType": { + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "type": "string", + "example": "shared" + }, + "specification": { + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "type": "string", + "example": "<SPECIFICATION>", + "nullable": true + } + }, + "required": [ + "targetType" + ] + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "mysqlListOperations", + "tags": [ + "mysql" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "operations", + "demo": "mysql\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "example": "queued" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/mysql\/{databaseId}\/pitr": { + "get": { + "summary": "Get PITR", + "operationId": "mysqlGetPitr", + "tags": [ + "mysql" + ], + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", + "responses": { + "200": { + "description": "PITRWindows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pitr", + "demo": "mysql\/get-pitr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/pooler": { + "get": { + "summary": "Get pooler", + "operationId": "mysqlGetPooler", + "tags": [ + "mysql" + ], + "description": "Get the connection pooler configuration for a dedicated database. Returns pooler mode, max connections, and pool size settings.", + "responses": { + "200": { + "description": "PoolerConfig", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pooler", + "demo": "mysql\/get-pooler.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update pooler", + "operationId": "mysqlUpdatePooler", + "tags": [ + "mysql" + ], + "description": "Update the connection pooler configuration for a dedicated database. Configure pool mode, max connections, and pool sizes.", + "responses": { + "200": { + "description": "PoolerConfig", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pooler", + "demo": "mysql\/update-pooler.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mode": { + "description": "Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.", + "type": "string", + "example": "transaction", + "nullable": true + }, + "maxConnections": { + "description": "Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.", + "type": "integer", + "example": 10, + "format": "int32", + "nullable": true + }, + "defaultPoolSize": { + "description": "Default pool size per user.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "readWriteSplitting": { + "description": "Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "poolerCpuRequest": { + "description": "Pooler sidecar CPU request override (Kubernetes quantity, e.g. \"250m\" or \"1\"). Leave null for the proportional default (5% of DB CPU, floor 100m).", + "type": "string", + "example": "<POOLER_CPU_REQUEST>", + "nullable": true + }, + "poolerCpuLimit": { + "description": "Pooler sidecar CPU limit override (Kubernetes quantity, e.g. \"500m\" or \"1\"). Leave null for the proportional default (10% of DB CPU, floor 200m). Changing this field rolls the database pod.", + "type": "string", + "example": "<POOLER_CPU_LIMIT>", + "nullable": true + }, + "poolerMemoryRequest": { + "description": "Pooler sidecar memory request override (Kubernetes quantity, e.g. \"128Mi\" or \"1Gi\"). Leave null for the proportional default (7.5% of DB memory, floor 64Mi).", + "type": "string", + "example": "<POOLER_MEMORY_REQUEST>", + "nullable": true + }, + "poolerMemoryLimit": { + "description": "Pooler sidecar memory limit override (Kubernetes quantity, e.g. \"256Mi\" or \"1Gi\"). Leave null for the proportional default (15% of DB memory, floor 128Mi). Changing this field rolls the database pod.", + "type": "string", + "example": "<POOLER_MEMORY_LIMIT>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "mysqlGetReplicas", + "tags": [ + "mysql" + ], + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", + "responses": { + "200": { + "description": "Replicas", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "replicas", + "demo": "mysql\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/restorations": { + "get": { + "summary": "List restorations", + "operationId": "mysqlListRestorations", + "tags": [ + "mysql" + ], + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "Dedicated database restorations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "mysql\/list-restorations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by restoration status.", + "required": false, + "schema": { + "type": "string", + "example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create restoration", + "operationId": "mysqlCreateRestoration", + "tags": [ + "mysql" + ], + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", + "responses": { + "202": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "mysql\/create-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "type": "string", + "default": "backup", + "example": "backup" + }, + "backupId": { + "description": "Backup ID to restore from (required for backup type).", + "type": "string", + "example": "<BACKUP_ID>", + "nullable": true + }, + "targetDatabaseId": { + "description": "Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.", + "type": "string", + "example": "<TARGET_DATABASE_ID>", + "nullable": true + }, + "targetTime": { + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + } + } + } + } + } + } + }, + "\/mysql\/{databaseId}\/restorations\/{restorationId}": { + "get": { + "summary": "Get restoration", + "operationId": "mysqlGetRestoration", + "tags": [ + "mysql" + ], + "description": "Get details of a specific database restoration including its status, type, and timestamps.", + "responses": { + "200": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "mysql\/get-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "restorationId", + "description": "Restoration ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RESTORATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "mysqlGetStatus", + "tags": [ + "mysql" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mysql\/{databaseId}\/upgrades": { + "post": { + "summary": "Create upgrade", + "operationId": "mysqlCreateUpgrade", + "tags": [ + "mysql" + ], + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mysql", + "demo": "mysql\/create-upgrade.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetVersion": { + "description": "Target engine version to upgrade to.", + "type": "string", + "example": "<TARGET_VERSION>" + } + }, + "required": [ + "targetVersion" + ] + } + } + } + } + } + }, + "\/notifications": { + "get": { + "summary": "List notifications", + "operationId": "notificationsList", + "tags": [ + "notifications" + ], + "description": "Get the list of notifications for the currently logged in console user. Use queries to filter the results by attributes such as read status, view timestamps, or creation date.\n", + "responses": { + "200": { + "description": "Notifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/notificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "notifications\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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: read, type, channel, messageId, projectId, resourceType, resourceId, parentResourceType, parentResourceId, firstSeen, lastSeen", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/notifications\/{notificationId}": { + "patch": { + "summary": "Update notification", + "operationId": "notificationsUpdate", + "tags": [ + "notifications" + ], + "description": "Update a notification by its unique ID. Use the `read` parameter to mark the notification as read or unread.\n", + "responses": { + "200": { + "description": "Notification", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/notification" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "notifications\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "notificationId", + "description": "Notification ID.", + "required": true, + "schema": { + "type": "string", + "example": "<NOTIFICATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "read": { + "description": "Notification read status.", + "type": "boolean", + "example": false + } + }, + "required": [ + "read" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", + "tags": [ + "oauth2" + ], + "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Approve", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Approve" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "authorization", + "demo": "oauth2\/approve.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [] + } + ], + "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": { + "grant_id": { + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "type": "string", + "example": "<GRANT_ID>" + }, + "authorization_details": { + "description": "Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.", + "type": "string", + "default": "", + "example": "<AUTHORIZATION_DETAILS>" + }, + "scope": { + "description": "Space-separated scopes the user consented to. Must be a subset of the scopes originally requested; identity scopes such as `openid` are always retained. Optional; omit to keep the originally requested scopes.", + "type": "string", + "default": "", + "example": "<SCOPE>" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/authorize": { + "get": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2Authorize", + "tags": [ + "oauth2" + ], + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Authorize", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Authorize" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "authorization", + "demo": "oauth2\/authorize.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "client_id", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "required": false, + "schema": { + "type": "string", + "example": "<CLIENT_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "redirect_uri", + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "response_type", + "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", + "required": false, + "schema": { + "type": "string", + "example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "scope", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "required": false, + "schema": { + "type": "string", + "example": "<SCOPE>", + "default": "" + }, + "in": "query" + }, + { + "name": "state", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "required": false, + "schema": { + "type": "string", + "example": "<STATE>", + "default": "" + }, + "in": "query" + }, + { + "name": "nonce", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "required": false, + "schema": { + "type": "string", + "example": "<NONCE>", + "default": "" + }, + "in": "query" + }, + { + "name": "code_challenge", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "required": false, + "schema": { + "type": "string", + "example": "<CODE_CHALLENGE>", + "default": "" + }, + "in": "query" + }, + { + "name": "code_challenge_method", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "required": false, + "schema": { + "type": "string", + "example": "s256", + "default": "" + }, + "in": "query" + }, + { + "name": "prompt", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "required": false, + "schema": { + "type": "string", + "example": "<PROMPT>", + "default": "" + }, + "in": "query" + }, + { + "name": "max_age", + "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0 + }, + "in": "query" + }, + { + "name": "authorization_details", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "required": false, + "schema": { + "type": "string", + "example": "<AUTHORIZATION_DETAILS>", + "default": "" + }, + "in": "query" + }, + { + "name": "resource", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "required": false, + "schema": { + "type": "string", + "default": [] + }, + "in": "query" + }, + { + "name": "audience", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "required": false, + "schema": { + "type": "string", + "example": "<AUDIENCE>", + "default": "" + }, + "in": "query" + }, + { + "name": "request_uri", + "description": "OAuth2 authorization request handle returned by the pushed authorization request endpoint.", + "required": false, + "schema": { + "type": "string", + "example": "<REQUEST_URI>", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2AuthorizePost", + "tags": [ + "oauth2" + ], + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Authorize", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Authorize" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "authorization", + "demo": "oauth2\/authorize.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [] + } + ], + "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": { + "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>" + }, + "redirect_uri": { + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "response_type": { + "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", + "type": "string", + "default": "", + "example": "" + }, + "scope": { + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "type": "string", + "default": "", + "example": "<SCOPE>" + }, + "state": { + "description": "OAuth2 state. You receive this back in the redirect URI.", + "type": "string", + "default": "", + "example": "<STATE>" + }, + "nonce": { + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "type": "string", + "default": "", + "example": "<NONCE>" + }, + "code_challenge": { + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "type": "string", + "default": "", + "example": "<CODE_CHALLENGE>" + }, + "code_challenge_method": { + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "type": "string", + "default": "", + "example": "s256" + }, + "prompt": { + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "type": "string", + "default": "", + "example": "<PROMPT>" + }, + "max_age": { + "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "authorization_details": { + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "type": "string", + "default": "", + "example": "<AUTHORIZATION_DETAILS>" + }, + "resource": { + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "type": "string", + "default": [] + }, + "audience": { + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "type": "string", + "default": "", + "example": "<AUDIENCE>" + }, + "request_uri": { + "description": "OAuth2 authorization request handle returned by the pushed authorization request endpoint.", + "type": "string", + "default": "", + "example": "<REQUEST_URI>" + } + } + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/device_authorization": { + "post": { + "summary": "OAuth2 Device Authorization", + "operationId": "oauth2CreateDeviceAuthorization", + "tags": [ + "oauth2" + ], + "description": "Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.", + "responses": { + "200": { + "description": "OAuth2 Device Authorization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2DeviceAuthorization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "authorization", + "demo": "oauth2\/create-device-authorization.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [], + "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": { + "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>" + }, + "scope": { + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", + "type": "string", + "default": "", + "example": "<SCOPE>" + }, + "authorization_details": { + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "type": "string", + "default": "", + "example": "<AUTHORIZATION_DETAILS>" + }, + "resource": { + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "type": "string", + "default": [] + }, + "audience": { + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "type": "string", + "default": "", + "example": "<AUDIENCE>" + } + } + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/grants": { + "post": { + "summary": "Create OAuth2 Grant", + "operationId": "oauth2CreateGrant", + "tags": [ + "oauth2" + ], + "description": "Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.", + "responses": { + "201": { + "description": "OAuth2 Grant", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Grant" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "grants", + "demo": "oauth2\/create-grant.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [] + } + ], + "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": { + "user_code": { + "description": "User code displayed on the device.", + "type": "string", + "example": "<USER_CODE>" + } + }, + "required": [ + "user_code" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/grants\/{grant_id}": { + "get": { + "summary": "Get OAuth2 Grant", + "operationId": "oauth2GetGrant", + "tags": [ + "oauth2" + ], + "description": "Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.", + "responses": { + "200": { + "description": "OAuth2 Grant", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Grant" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "grants", + "demo": "oauth2\/get-grant.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "grant_id", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "required": true, + "schema": { + "type": "string", + "example": "<GRANT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/oauth2\/{project_id}\/logout": { + "get": { + "summary": "OAuth2 Logout", + "operationId": "oauth2Logout", + "tags": [ + "oauth2" + ], + "description": "OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "oauth2\/logout.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Session": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "id_token_hint", + "description": "ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.", + "required": false, + "schema": { + "type": "string", + "example": "<ID_TOKEN_HINT>", + "default": "" + }, + "in": "query" + }, + { + "name": "logout_hint", + "description": "Hint about the user that is logging out. Accepted for OIDC compatibility.", + "required": false, + "schema": { + "type": "string", + "example": "<LOGOUT_HINT>", + "default": "" + }, + "in": "query" + }, + { + "name": "client_id", + "description": "OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.", + "required": false, + "schema": { + "type": "string", + "example": "<CLIENT_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "post_logout_redirect_uri", + "description": "URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "state", + "description": "Opaque value passed back unchanged in the `state` query param of the post-logout redirect.", + "required": false, + "schema": { + "type": "string", + "example": "<STATE>", + "default": "" + }, + "in": "query" + }, + { + "name": "ui_locales", + "description": "Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.", + "required": false, + "schema": { + "type": "string", + "example": "<UI_LOCALES>", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "OAuth2 Logout", + "operationId": "oauth2LogoutPost", + "tags": [ + "oauth2" + ], + "description": "OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "oauth2\/logout.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Session": [] + } + ], + "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": { + "id_token_hint": { + "description": "ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.", + "type": "string", + "default": "", + "example": "<ID_TOKEN_HINT>" + }, + "logout_hint": { + "description": "Hint about the user that is logging out. Accepted for OIDC compatibility.", + "type": "string", + "default": "", + "example": "<LOGOUT_HINT>" + }, + "client_id": { + "description": "OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.", + "type": "string", + "default": "", + "example": "<CLIENT_ID>" + }, + "post_logout_redirect_uri": { + "description": "URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "state": { + "description": "Opaque value passed back unchanged in the `state` query param of the post-logout redirect.", + "type": "string", + "default": "", + "example": "<STATE>" + }, + "ui_locales": { + "description": "Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.", + "type": "string", + "default": "", + "example": "<UI_LOCALES>" + } + } + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/organizations": { + "get": { + "summary": "OAuth2 List Accessible Organizations", + "operationId": "oauth2ListOrganizations", + "tags": [ + "oauth2" + ], + "description": "List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see.", + "responses": { + "200": { + "description": "OAuth2 accessible organizations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2OrganizationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platform", + "demo": "oauth2\/list-organizations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.organizations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID of the console project the OAuth2 access token was issued for.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of organizations to return. Between 1 and 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of organizations to skip before returning results. Used for pagination.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<SEARCH>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/oauth2\/{project_id}\/par": { + "post": { + "summary": "OAuth2 PAR", + "operationId": "oauth2CreatePAR", + "tags": [ + "oauth2" + ], + "description": "Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.", + "responses": { + "201": { + "description": "OAuth2 PAR", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2PAR" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "authorization", + "demo": "oauth2\/create-par.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [], + "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": { + "client_id": { + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "type": "string", + "example": "<CLIENT_ID>" + }, + "redirect_uri": { + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url" + }, + "response_type": { + "description": "OAuth2 \/ OIDC response type.", + "type": "string", + "example": "code" + }, + "scope": { + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "type": "string", + "default": "", + "example": "<SCOPE>" + }, + "state": { + "description": "OAuth2 state. You receive this back in the redirect URI.", + "type": "string", + "default": "", + "example": "<STATE>" + }, + "nonce": { + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "type": "string", + "default": "", + "example": "<NONCE>" + }, + "code_challenge": { + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "type": "string", + "default": "", + "example": "<CODE_CHALLENGE>" + }, + "code_challenge_method": { + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "type": "string", + "default": "", + "example": "s256" + }, + "prompt": { + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "type": "string", + "default": "", + "example": "<PROMPT>" + }, + "max_age": { + "description": "OIDC max_age parameter for customization of consent screen.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "authorization_details": { + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "type": "string", + "default": "", + "example": "<AUTHORIZATION_DETAILS>" + }, + "resource": { + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "type": "string", + "default": [] + }, + "audience": { + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "type": "string", + "default": "", + "example": "<AUDIENCE>" + } + }, + "required": [ + "client_id", + "redirect_uri", + "response_type" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/projects": { + "get": { + "summary": "OAuth2 List Accessible Projects", + "operationId": "oauth2ListProjects", + "tags": [ + "oauth2" + ], + "description": "List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see.", + "responses": { + "200": { + "description": "OAuth2 accessible projects list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ProjectList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platform", + "demo": "oauth2\/list-projects.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.projects.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID of the console project the OAuth2 access token was issued for.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of projects to return. Between 1 and 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of projects to skip before returning results. Used for pagination.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<SEARCH>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/oauth2\/{project_id}\/reject": { + "post": { + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", + "tags": [ + "oauth2" + ], + "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Reject", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Reject" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "authorization", + "demo": "oauth2\/reject.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [] + } + ], + "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": { + "grant_id": { + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "type": "string", + "example": "<GRANT_ID>" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/revoke": { + "post": { + "summary": "OAuth2 Revoke", + "operationId": "oauth2Revoke", + "tags": [ + "oauth2" + ], + "description": "Revoke an OAuth2 access token or refresh token.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "oauth2\/revoke.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [], + "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 or refresh token to revoke.", + "type": "string", + "example": "<TOKEN>" + }, + "token_type_hint": { + "description": "Type of token to revoke (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. Required for confidential apps; omitted for public apps.", + "type": "string", + "default": "", + "example": "<CLIENT_SECRET>" + } + }, + "required": [ + "token" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/token": { + "post": { + "summary": "OAuth2 Token", + "operationId": "oauth2CreateToken", + "tags": [ + "oauth2" + ], + "description": "Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.", + "responses": { + "200": { + "description": "OAuth2 Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "oauth2\/create-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Session": [], + "JWT": [], + "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": { + "grant_type": { + "description": "OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.", + "type": "string", + "example": "<GRANT_TYPE>" + }, + "code": { + "description": "Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.", + "type": "string", + "default": "", + "example": "<CODE>" + }, + "refresh_token": { + "description": "Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.", + "type": "string", + "default": "", + "example": "<REFRESH_TOKEN>" + }, + "device_code": { + "description": "Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.", + "type": "string", + "default": "", + "example": "<DEVICE_CODE>" + }, + "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. Required for confidential apps.", + "type": "string", + "default": "", + "example": "<CLIENT_SECRET>" + }, + "code_verifier": { + "description": "PKCE code verifier. Required for public apps.", + "type": "string", + "default": "", + "example": "<CODE_VERIFIER>" + }, + "redirect_uri": { + "description": "Redirect URI. Required for `authorization_code` grant type.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "resource": { + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "type": "string", + "default": [] + }, + "audience": { + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "type": "string", + "default": "", + "example": "<AUDIENCE>" + } + }, + "required": [ + "grant_type" + ] + } + } + } + } + } + }, + "\/organization": { + "get": { + "summary": "Get organization", + "operationId": "organizationGet", + "tags": [ + "organization" + ], + "description": "Get the current organization.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organization\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ] + }, + "put": { + "summary": "Update organization", + "operationId": "organizationUpdate", + "tags": [ + "organization" + ], + "description": "Update the current organization's name.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organization\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "New organization name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete organization", + "operationId": "organizationDelete", + "tags": [ + "organization" + ], + "description": "Delete the current organization. All projects that belong to the organization are deleted as well.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organization\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ] + } + }, + "\/organization\/installations": { + "get": { + "summary": "List Installations", + "operationId": "organizationListInstallations", + "tags": [ + "organization" + ], + "description": "List app installations on the organization. Any organization member can read installations.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "organization\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "organizationCreateInstallation", + "tags": [ + "organization" + ], + "description": "Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "organization\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "description": "Application unique ID.", + "type": "string", + "example": "<APP_ID>" + }, + "authorizationDetails": { + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "type": "string", + "default": "", + "example": "<AUTHORIZATION_DETAILS>" + } + }, + "required": [ + "appId" + ] + } + } + } + } + } + }, + "\/organization\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "organizationGetInstallation", + "tags": [ + "organization" + ], + "description": "Get an app installation on the organization by its unique ID. Any organization member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "organization\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "organizationUpdateInstallation", + "tags": [ + "organization" + ], + "description": "Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "organization\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "type": "string", + "example": "<AUTHORIZATION_DETAILS>", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "organizationDeleteInstallation", + "tags": [ + "organization" + ], + "description": "Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "organization\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organization\/keys": { + "get": { + "summary": "List organization keys", + "operationId": "organizationListKeys", + "tags": [ + "organization" + ], + "description": "Get a list of all API keys from the current organization.", + "responses": { + "200": { + "description": "API Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/keyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/list-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.keys.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Organization": [] + } + ], + "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: expire, accessedAt, name, scopes", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create organization key", + "operationId": "organizationCreateKey", + "tags": [ + "organization" + ], + "description": "Create a new organization API key.", + "responses": { + "201": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/create-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.keys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Organization": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyId": { + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<KEY_ID>" + }, + "name": { + "description": "Key name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "OrganizationKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "projects.read" + ], + "title": "projects.read" + }, + { + "type": "string", + "enum": [ + "projects.write" + ], + "title": "projects.write" + }, + { + "type": "string", + "enum": [ + "organization.projects.keys.read" + ], + "title": "organization.projects.keys.read" + }, + { + "type": "string", + "enum": [ + "organization.projects.keys.write" + ], + "title": "organization.projects.keys.write" + }, + { + "type": "string", + "enum": [ + "organization.installations.read" + ], + "title": "organization.installations.read" + }, + { + "type": "string", + "enum": [ + "organization.installations.write" + ], + "title": "organization.installations.write" + }, + { + "type": "string", + "enum": [ + "organization.memberships.read" + ], + "title": "organization.memberships.read" + }, + { + "type": "string", + "enum": [ + "organization.memberships.write" + ], + "title": "organization.memberships.write" + }, + { + "type": "string", + "enum": [ + "organization.read" + ], + "title": "organization.read" + }, + { + "type": "string", + "enum": [ + "organization.write" + ], + "title": "organization.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + } + ] + } + }, + "expire": { + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } + } + } + } + }, + "\/organization\/keys\/{keyId}": { + "get": { + "summary": "Get organization key", + "operationId": "organizationGetKey", + "tags": [ + "organization" + ], + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/get-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.keys.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update organization key", + "operationId": "organizationUpdateKey", + "tags": [ + "organization" + ], + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/update-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.keys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Key name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "OrganizationKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "projects.read" + ], + "title": "projects.read" + }, + { + "type": "string", + "enum": [ + "projects.write" + ], + "title": "projects.write" + }, + { + "type": "string", + "enum": [ + "organization.projects.keys.read" + ], + "title": "organization.projects.keys.read" + }, + { + "type": "string", + "enum": [ + "organization.projects.keys.write" + ], + "title": "organization.projects.keys.write" + }, + { + "type": "string", + "enum": [ + "organization.installations.read" + ], + "title": "organization.installations.read" + }, + { + "type": "string", + "enum": [ + "organization.installations.write" + ], + "title": "organization.installations.write" + }, + { + "type": "string", + "enum": [ + "organization.memberships.read" + ], + "title": "organization.memberships.read" + }, + { + "type": "string", + "enum": [ + "organization.memberships.write" + ], + "title": "organization.memberships.write" + }, + { + "type": "string", + "enum": [ + "organization.read" + ], + "title": "organization.read" + }, + { + "type": "string", + "enum": [ + "organization.write" + ], + "title": "organization.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + } + ] + } + }, + "expire": { + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete organization key", + "operationId": "organizationDeleteKey", + "tags": [ + "organization" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.keys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organization\/memberships": { + "get": { + "summary": "List organization memberships", + "operationId": "organizationListMemberships", + "tags": [ + "organization" + ], + "description": "Get a list of all memberships from the current organization.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "organization\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.memberships.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "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: userId, teamId, invited, joined, confirm, roles", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 organization membership", + "operationId": "organizationCreateMembership", + "tags": [ + "organization" + ], + "description": "Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created.", + "responses": { + "201": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "organization\/create-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.memberships.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "Email of the new organization member.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "userId": { + "description": "ID of the user to be added to the organization.", + "type": "string", + "default": "", + "example": "<USER_ID>" + }, + "phone": { + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "default": "", + "example": "+12065550100", + "format": "phone" + }, + "roles": { + "description": "Array of strings. Use this param to set the user roles in the organization. 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", + "items": { + "type": "string" + } + }, + "url": { + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "description": "Name of the new organization member. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + } + } + } + }, + "\/organization\/memberships\/{membershipId}": { + "get": { + "summary": "Get organization membership", + "operationId": "organizationGetMembership", + "tags": [ + "organization" + ], + "description": "Get a membership from the current organization by its unique ID.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "organization\/get-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.memberships.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update organization membership", + "operationId": "organizationUpdateMembership", + "tags": [ + "organization" + ], + "description": "Modify the roles of a member in the current organization.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "organization\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.memberships.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "roles": { + "description": "An array of strings. Use this param to set the user's roles in the organization. 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", + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete organization membership", + "operationId": "organizationDeleteMembership", + "tags": [ + "organization" + ], + "description": "Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "organization\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.memberships.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organization\/projects": { + "get": { + "summary": "List organization projects", + "operationId": "organizationListProjects", + "tags": [ + "organization" + ], + "description": "Get a list of all projects. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Projects List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/projectList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "projects", + "demo": "organization\/list-projects.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "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, teamId, labels, search, accessedAt", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 organization project", + "operationId": "organizationCreateProject", + "tags": [ + "organization" + ], + "description": "Create a new project.", + "responses": { + "201": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "projects", + "demo": "organization\/create-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "projectId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PROJECT_ID>" + }, + "name": { + "description": "Project name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "region": { + "description": "Project Region.", + "type": "string", + "example": "fra", + "title": "Region", + "oneOf": [ + { + "type": "string", + "enum": [ + "fra" + ], + "title": "fra" + }, + { + "type": "string", + "enum": [ + "nyc" + ], + "title": "nyc" + }, + { + "type": "string", + "enum": [ + "syd" + ], + "title": "syd" + }, + { + "type": "string", + "enum": [ + "sfo" + ], + "title": "sfo" + }, + { + "type": "string", + "enum": [ + "sgp" + ], + "title": "sgp" + }, + { + "type": "string", + "enum": [ + "tor" + ], + "title": "tor" + } + ] + } + }, + "required": [ + "projectId", + "name" + ] + } + } + } + } + } + }, + "\/organization\/projects\/{projectId}": { + "get": { + "summary": "Get organization project", + "operationId": "organizationGetProject", + "tags": [ + "organization" + ], + "description": "Get a project.", + "responses": { + "200": { + "description": "Project", + "content": { + "": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "projects", + "demo": "organization\/get-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update organization project", + "operationId": "organizationUpdateProject", + "tags": [ + "organization" + ], + "description": "Update a project by its unique ID.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "projects", + "demo": "organization\/update-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Project name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete organization project", + "operationId": "organizationDeleteProject", + "tags": [ + "organization" + ], + "description": "Delete a project by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "projects", + "demo": "organization\/delete-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organization\/projects\/{projectId}\/keys": { + "get": { + "summary": "List project keys", + "operationId": "organizationListProjectKeys", + "tags": [ + "organization" + ], + "description": "Get a list of all API keys of a project in your organization.", + "responses": { + "200": { + "description": "API Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/keyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/list-project-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "organization.projects.keys.read", + "keys.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project key", + "operationId": "organizationCreateProjectKey", + "tags": [ + "organization" + ], + "description": "Create a new API key for a project in your organization. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", + "responses": { + "201": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/create-project-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "organization.projects.keys.write", + "keys.write" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyId": { + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<KEY_ID>" + }, + "name": { + "description": "Key name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + }, + "expire": { + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } + } + } + } + }, + "\/organization\/projects\/{projectId}\/keys\/ephemeral": { + "post": { + "summary": "Create ephemeral project key", + "operationId": "organizationCreateEphemeralProjectKey", + "tags": [ + "organization" + ], + "description": "Create a new ephemeral API key for a project in your organization. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", + "responses": { + "201": { + "description": "Ephemeral Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ephemeralKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/create-ephemeral-project-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "organization.projects.keys.write", + "keys.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + }, + "duration": { + "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", + "type": "integer", + "example": 600, + "format": "int32" + } + }, + "required": [ + "scopes", + "duration" + ] + } + } + } + } + } + }, + "\/organization\/projects\/{projectId}\/keys\/{keyId}": { + "get": { + "summary": "Get project key", + "operationId": "organizationGetProjectKey", + "tags": [ + "organization" + ], + "description": "Get a project key by its unique ID.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/get-project-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "organization.projects.keys.read", + "keys.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project key", + "operationId": "organizationUpdateProjectKey", + "tags": [ + "organization" + ], + "description": "Update a project key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/update-project-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "organization.projects.keys.write", + "keys.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Key name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + }, + "expire": { + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete project key", + "operationId": "organizationDeleteProjectKey", + "tags": [ + "organization" + ], + "description": "Delete a project key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "organization\/delete-project-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "organization.projects.keys.write", + "keys.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations": { + "get": { + "summary": "List Orgnizations", + "operationId": "organizationsList", + "tags": [ + "organizations" + ], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "responses": { + "200": { + "description": "Organizations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organizationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<SEARCH>", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Organization", + "operationId": "organizationsCreate", + "tags": [ + "organizations" + ], + "description": "Create a new organization.\n", + "responses": { + "201": { + "description": "Organization, or PaymentAuthentication", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/organization" + }, + { + "$ref": "#\/components\/schemas\/paymentAuthentication" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "organizationId": { + "description": "Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "name": { + "description": "Organization name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "billingPlan": { + "description": "Organization billing plan chosen", + "type": "string", + "example": "tier-0" + }, + "paymentMethodId": { + "description": "Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.", + "type": "string", + "example": "<PAYMENT_METHOD_ID>", + "nullable": true + }, + "billingAddressId": { + "description": "Unique ID of billing address", + "type": "string", + "default": "", + "example": "<BILLING_ADDRESS_ID>", + "nullable": true + }, + "invites": { + "description": "Additional member invites", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "couponId": { + "description": "Coupon id", + "type": "string", + "example": "<COUPON_ID>", + "nullable": true + }, + "taxId": { + "description": "Tax Id associated to billing.", + "type": "string", + "example": "<TAX_ID>", + "nullable": true + }, + "budget": { + "description": "Budget limit for additional usage set for the organization", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "platform": { + "description": "Platform type", + "type": "string", + "default": "appwrite", + "example": "appwrite", + "title": "Platform", + "oneOf": [ + { + "type": "string", + "enum": [ + "appwrite" + ], + "title": "appwrite" + }, + { + "type": "string", + "enum": [ + "imagine" + ], + "title": "imagine" + } + ] + } + }, + "required": [ + "organizationId", + "name", + "billingPlan" + ] + } + } + } + } + } + }, + "\/organizations\/estimations\/create-organization": { + "patch": { + "summary": "Estimate create Organization", + "operationId": "organizationsEstimationCreateOrganization", + "tags": [ + "organizations" + ], + "description": "Get estimation for creating an organization.", + "responses": { + "200": { + "description": "Estimation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/estimation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/estimation-create-organization.md", + "rate-limit": 120, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "billingPlan": { + "description": "Organization billing plan chosen", + "type": "string", + "example": "tier-0" + }, + "paymentMethodId": { + "description": "Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.", + "type": "string", + "example": "<PAYMENT_METHOD_ID>", + "nullable": true + }, + "invites": { + "description": "Additional member invites", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "couponId": { + "description": "Coupon id", + "type": "string", + "example": "<COUPON_ID>", + "nullable": true + }, + "platform": { + "description": "Platform type", + "type": "string", + "default": "appwrite", + "example": "appwrite", + "title": "Platform", + "oneOf": [ + { + "type": "string", + "enum": [ + "appwrite" + ], + "title": "appwrite" + }, + { + "type": "string", + "enum": [ + "imagine" + ], + "title": "imagine" + } + ] + } + }, + "required": [ + "billingPlan" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}": { + "delete": { + "summary": "Delete team", + "operationId": "organizationsDelete", + "tags": [ + "organizations" + ], + "description": "Delete an organization.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organizations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/addons": { + "get": { + "summary": "List addons", + "operationId": "organizationsListAddons", + "tags": [ + "organizations" + ], + "description": "List all billing addons for an organization.\n", + "responses": { + "200": { + "description": "Addons list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addonList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/list-addons.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/addons\/baa": { + "post": { + "summary": "Create BAA addon", + "operationId": "organizationsCreateBaaAddon", + "tags": [ + "organizations" + ], + "description": "Create the BAA billing addon for an organization.\n", + "responses": { + "201": { + "description": "Addon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/create-baa-addon.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/addons\/premium-geo-db": { + "post": { + "summary": "Create Premium Geo DB addon", + "operationId": "organizationsCreatePremiumGeoDBAddon", + "tags": [ + "organizations" + ], + "description": "Create a Premium Geo DB addon for an organization.\n", + "responses": { + "201": { + "description": "Addon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/create-premium-geo-db-addon.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/addons\/{addonId}": { + "get": { + "summary": "Get addon", + "operationId": "organizationsGetAddon", + "tags": [ + "organizations" + ], + "description": "Get the details of a billing addon for an organization.\n", + "responses": { + "200": { + "description": "Addon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-addon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "example": "<ADDON_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete addon", + "operationId": "organizationsDeleteAddon", + "tags": [ + "organizations" + ], + "description": "Delete a billing addon for an organization.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/delete-addon.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "example": "<ADDON_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/addons\/{addonId}\/confirmations": { + "post": { + "summary": "Confirm addon payment after 3DS authentication", + "operationId": "organizationsConfirmAddonPayment", + "tags": [ + "organizations" + ], + "description": "Confirm payment for a billing addon for an organization.\n", + "responses": { + "200": { + "description": "Addon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/confirm-addon-payment.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "example": "<ADDON_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/addons\/{addon}\/price": { + "get": { + "summary": "Get addon price", + "operationId": "organizationsGetAddonPrice", + "tags": [ + "organizations" + ], + "description": "Get the price details for a billing addon for an organization.\n", + "responses": { + "200": { + "description": "AddonPrice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addonPrice" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-addon-price.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "addon", + "description": "Addon key identifier (e.g. baa).", + "required": true, + "schema": { + "type": "string", + "example": "baa", + "title": "AddonKey", + "oneOf": [ + { + "type": "string", + "enum": [ + "baa" + ], + "title": "baa" + }, + { + "type": "string", + "enum": [ + "premiumgeodb" + ], + "title": "premiumgeodb" + }, + { + "type": "string", + "enum": [ + "premiumgeodborg" + ], + "title": "premiumgeodborg" + }, + { + "type": "string", + "enum": [ + "backup_recovery" + ], + "title": "backup_recovery" + } + ] + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/aggregations": { + "get": { + "summary": "List aggregations", + "operationId": "organizationsListAggregations", + "tags": [ + "organizations" + ], + "description": "Get a list of all aggregations for an organization.", + "responses": { + "200": { + "description": "Aggregation team list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/aggregationTeamList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/list-aggregations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/organizations\/{organizationId}\/aggregations\/{aggregationId}": { + "get": { + "summary": "Get aggregation", + "operationId": "organizationsGetAggregation", + "tags": [ + "organizations" + ], + "description": "Get a specific aggregation using it's aggregation ID.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/aggregationTeam" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-aggregation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "aggregationId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<AGGREGATION_ID>" + }, + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 5 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/organizations\/{organizationId}\/billing-address": { + "patch": { + "summary": "Set team's billing address", + "operationId": "organizationsSetBillingAddress", + "tags": [ + "organizations" + ], + "description": "Set a billing address for an organization.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/set-billing-address.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "billingAddressId": { + "description": "Unique ID of billing address", + "type": "string", + "example": "<BILLING_ADDRESS_ID>" + } + }, + "required": [ + "billingAddressId" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team's billing address", + "operationId": "organizationsDeleteBillingAddress", + "tags": [ + "organizations" + ], + "description": "Delete a team's billing address.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/delete-billing-address.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/billing-addresses\/{billingAddressId}": { + "get": { + "summary": "Get billing address", + "operationId": "organizationsGetBillingAddress", + "tags": [ + "organizations" + ], + "description": "Get a billing address using it's ID.", + "responses": { + "200": { + "description": "Address", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingAddress" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-billing-address.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "billingAddressId", + "description": "Unique ID of billing address", + "required": true, + "schema": { + "type": "string", + "example": "<BILLING_ADDRESS_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/billing-email": { + "patch": { + "summary": "Set team's billing email", + "operationId": "organizationsSetBillingEmail", + "tags": [ + "organizations" + ], + "description": "Set the current billing email for the organization.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/set-billing-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "billingEmail": { + "description": "Billing email for the organization.", + "type": "string", + "example": "email@example.com", + "format": "email" + } + }, + "required": [ + "billingEmail" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/budget": { + "patch": { + "summary": "Update organization budget", + "operationId": "organizationsUpdateBudget", + "tags": [ + "organizations" + ], + "description": "Update the budget limit for an organization.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/update-budget.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization Unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "budget": { + "description": "Budget limit for additional usage set for the organization", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "alerts": { + "description": "Budget alert limit percentage", + "type": "array", + "default": [ + 75 + ], + "items": { + "type": "integer" + } + } + }, + "required": [ + "budget" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/credits": { + "get": { + "summary": "List credits", + "operationId": "organizationsListCredits", + "tags": [ + "organizations" + ], + "description": "List all credits for an organization.\n", + "responses": { + "200": { + "description": "CreditList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/creditList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/list-credits.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Add credits from coupon", + "operationId": "organizationsAddCredit", + "tags": [ + "organizations" + ], + "description": "Add credit to an organization using a coupon.", + "responses": { + "201": { + "description": "Credit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/credit" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/add-credit.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "couponId": { + "description": "ID of the coupon", + "type": "string", + "example": "<COUPON_ID>" + } + }, + "required": [ + "couponId" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/credits\/available": { + "get": { + "summary": "Get available credits", + "operationId": "organizationsGetAvailableCredits", + "tags": [ + "organizations" + ], + "description": "Get total available valid credits for an organization.", + "responses": { + "200": { + "description": "CreditAvailable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/creditAvailable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-available-credits.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/credits\/{creditId}": { + "get": { + "summary": "Get credit details", + "operationId": "organizationsGetCredit", + "tags": [ + "organizations" + ], + "description": "Get credit details.", + "responses": { + "200": { + "description": "Credit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/credit" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-credit.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "creditId", + "description": "Credit Unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<CREDIT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/estimations\/delete-organization": { + "patch": { + "summary": "Estimate delete team", + "operationId": "organizationsEstimationDeleteOrganization", + "tags": [ + "organizations" + ], + "description": "Get estimation for deleting an organization.", + "responses": { + "200": { + "description": "DeleteOrganization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/estimationDeleteOrganization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/estimation-delete-organization.md", + "rate-limit": 120, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organizations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/estimations\/update-plan": { + "patch": { + "summary": "Estimate for update plan", + "operationId": "organizationsEstimationUpdatePlan", + "tags": [ + "organizations" + ], + "description": "Get estimation for updating the organization plan.", + "responses": { + "200": { + "description": "UpdatePlan", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/estimationUpdatePlan" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/estimation-update-plan.md", + "rate-limit": 120, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "billingPlan": { + "description": "Organization billing plan chosen", + "type": "string", + "example": "tier-0" + }, + "invites": { + "description": "Additional member invites", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "couponId": { + "description": "Coupon id", + "type": "string", + "example": "<COUPON_ID>", + "nullable": true + } + }, + "required": [ + "billingPlan" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/feedbacks\/downgrade": { + "post": { + "summary": "Create downgrade feedback", + "operationId": "organizationsCreateDowngradeFeedback", + "tags": [ + "organizations" + ], + "description": "Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.\n", + "responses": { + "201": { + "description": "Downgrade Feedback", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/downgradeFeedback" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/create-downgrade-feedback.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization Unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "reason": { + "description": "Feedback reason", + "type": "string", + "example": "<REASON>" + }, + "message": { + "description": "Feedback message", + "type": "string", + "example": "<MESSAGE>" + }, + "fromPlanId": { + "description": "Plan downgrading from", + "type": "string", + "example": "<FROM_PLAN_ID>" + }, + "toPlanId": { + "description": "Plan downgrading to", + "type": "string", + "example": "<TO_PLAN_ID>" + } + }, + "required": [ + "reason", + "message", + "fromPlanId", + "toPlanId" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/invoices": { + "get": { + "summary": "List invoices", + "operationId": "organizationsListInvoices", + "tags": [ + "organizations" + ], + "description": "List all invoices for an organization.", + "responses": { + "200": { + "description": "Billing invoices list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/invoiceList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/list-invoices.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/organizations\/{organizationId}\/invoices\/{invoiceId}": { + "get": { + "summary": "Get invoice", + "operationId": "organizationsGetInvoice", + "tags": [ + "organizations" + ], + "description": "Get an invoice by its unique ID.", + "responses": { + "200": { + "description": "Invoice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/invoice" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-invoice.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<INVOICE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/download": { + "get": { + "summary": "Download invoice in PDF", + "operationId": "organizationsGetInvoiceDownload", + "tags": [ + "organizations" + ], + "description": "Download invoice in PDF", + "responses": { + "200": { + "description": "File", + "content": { + "*\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-invoice-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [] + }, + { + "Project": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<INVOICE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/payments": { + "post": { + "summary": "Initiate payment for failed invoice to pay live from console", + "operationId": "organizationsCreateInvoicePayment", + "tags": [ + "organizations" + ], + "description": "Initiate payment for failed invoice to pay live from console", + "responses": { + "200": { + "description": "Invoice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/invoice" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/create-invoice-payment.md", + "rate-limit": 10, + "rate-time": 86400, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<INVOICE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "paymentMethodId": { + "description": "Payment method ID", + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + } + }, + "required": [ + "paymentMethodId" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/status": { + "patch": { + "summary": "Validate the payment for an invoice and update status", + "operationId": "organizationsValidateInvoice", + "tags": [ + "organizations" + ], + "description": "Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.", + "responses": { + "200": { + "description": "Invoice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/invoice" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/validate-invoice.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<INVOICE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/view": { + "get": { + "summary": "View invoice in PDF", + "operationId": "organizationsGetInvoiceView", + "tags": [ + "organizations" + ], + "description": "View invoice in PDF", + "responses": { + "200": { + "description": "File", + "content": { + "*\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-invoice-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [] + }, + { + "Project": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<INVOICE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/payment-method": { + "patch": { + "summary": "Set team's payment method", + "operationId": "organizationsSetDefaultPaymentMethod", + "tags": [ + "organizations" + ], + "description": "Set a organization's default payment method.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/set-default-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "paymentMethodId": { + "description": "Unique ID of payment method", + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + } + }, + "required": [ + "paymentMethodId" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team's default payment method", + "operationId": "organizationsDeleteDefaultPaymentMethod", + "tags": [ + "organizations" + ], + "description": "Delete the default payment method for an organization.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/delete-default-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/payment-method\/backup": { + "patch": { + "summary": "Set team's backup payment method", + "operationId": "organizationsSetBackupPaymentMethod", + "tags": [ + "organizations" + ], + "description": "Set an organization's backup payment method.\n", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/set-backup-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "paymentMethodId": { + "description": "Unique ID of payment method", + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + } + }, + "required": [ + "paymentMethodId" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team's backup payment method", + "operationId": "organizationsDeleteBackupPaymentMethod", + "tags": [ + "organizations" + ], + "description": "Delete a backup payment method for an organization.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/delete-backup-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/payment-methods\/{paymentMethodId}": { + "get": { + "summary": "Get payment method", + "operationId": "organizationsGetPaymentMethod", + "tags": [ + "organizations" + ], + "description": "Get an organization's payment method using it's payment method ID.", + "responses": { + "200": { + "description": "paymentMethod", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/paymentMethod" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "paymentMethodId", + "description": "Unique ID of payment method", + "required": true, + "schema": { + "type": "string", + "example": "<PAYMENT_METHOD_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/plan": { + "get": { + "summary": "Get organization billing plan details", + "operationId": "organizationsGetPlan", + "tags": [ + "organizations" + ], + "description": "Get the details of the current billing plan for an organization.", + "responses": { + "200": { + "description": "billingPlan", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingPlan" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization Unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update organization billing plan", + "operationId": "organizationsUpdatePlan", + "tags": [ + "organizations" + ], + "description": "Update the billing plan for an organization.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/update-plan.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization Unique ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "billingPlan": { + "description": "Organization billing plan chosen", + "type": "string", + "example": "tier-0" + }, + "paymentMethodId": { + "description": "Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.", + "type": "string", + "example": "<PAYMENT_METHOD_ID>", + "nullable": true + }, + "billingAddressId": { + "description": "Unique ID of billing address", + "type": "string", + "default": "", + "example": "<BILLING_ADDRESS_ID>" + }, + "invites": { + "description": "Additional member invites", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "couponId": { + "description": "Coupon id", + "type": "string", + "example": "<COUPON_ID>", + "nullable": true + }, + "taxId": { + "description": "Tax Id associated to billing.", + "type": "string", + "example": "<TAX_ID>", + "nullable": true + }, + "budget": { + "description": "Budget limit for additional usage set for the organization", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + }, + "required": [ + "billingPlan" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/plan\/estimations": { + "post": { + "summary": "Create billing plan estimation (upgrade or downgrade)", + "operationId": "organizationsCreatePlanEstimation", + "tags": [ + "organizations" + ], + "description": "Create a billing plan estimation for upgrading or downgrading an organization plan.\n", + "responses": { + "200": { + "description": "EstimationPlanChange", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/estimationPlanChange" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/create-plan-estimation.md", + "rate-limit": 120, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "billingPlan": { + "description": "Target billing plan", + "type": "string", + "example": "tier-0" + }, + "invites": { + "description": "Additional member invites", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "couponId": { + "description": "Coupon id", + "type": "string", + "example": "<COUPON_ID>", + "nullable": true + } + }, + "required": [ + "billingPlan" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/regions": { + "get": { + "summary": "List Regions", + "operationId": "organizationsListRegions", + "tags": [ + "organizations" + ], + "description": "Get all available regions for an organization.", + "responses": { + "200": { + "description": "Regions list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleRegionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/list-regions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/roles": { + "get": { + "summary": "Get Scopes", + "operationId": "organizationsGetScopes", + "tags": [ + "organizations" + ], + "description": "Get Scopes", + "responses": { + "200": { + "description": "Roles", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/roles" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-scopes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization id", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "projectId", + "description": "Project id", + "required": false, + "schema": { + "type": "string", + "example": "<PROJECT_ID>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/organizations\/{organizationId}\/taxId": { + "patch": { + "summary": "Set team's tax Id", + "operationId": "organizationsSetBillingTaxId", + "tags": [ + "organizations" + ], + "description": "Set an organization's billing tax ID.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/set-billing-tax-id.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "taxId": { + "description": "Tax Id associated to billing.", + "type": "string", + "example": "<TAX_ID>", + "nullable": true + } + }, + "required": [ + "taxId" + ] + } + } + } + } + } + }, + "\/organizations\/{organizationId}\/usage": { + "get": { + "summary": "Get team's usage data", + "operationId": "organizationsGetUsage", + "tags": [ + "organizations" + ], + "description": "Get the usage data for an organization.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageOrganization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "startDate", + "description": "Starting date for the usage", + "required": false, + "schema": { + "type": "string", + "format": "datetime", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "in": "query" + }, + { + "name": "endDate", + "description": "End date for the usage", + "required": false, + "schema": { + "type": "string", + "format": "datetime", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "in": "query" + } + ] + } + }, + "\/organizations\/{organizationId}\/validate": { + "patch": { + "summary": "Validate payment for the organization after creation or upgrade", + "operationId": "organizationsValidatePayment", + "tags": [ + "organizations" + ], + "description": "Validate payment for team after creation or upgrade.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "organizations\/validate-payment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "invites": { + "description": "Additional member invites", + "type": "array", + "default": [], + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/ping": { + "get": { + "summary": "Test the connection between the Appwrite and the SDK.", + "operationId": "pingGet", + "tags": [ + "ping" + ], + "description": "Send a ping to project as part of onboarding.", + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "ping\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "global", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [], + "Session": [] + } + ] + } + }, + "\/postgresql": { + "get": { + "summary": "List databases", + "operationId": "postgresqlList", + "tags": [ + "postgresql" + ], + "description": "List all dedicated databases. Results support pagination.", + "responses": { + "200": { + "description": "Dedicated databases list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "postgresqlCreate", + "tags": [ + "postgresql" + ], + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", + "responses": { + "201": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "databaseId": { + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "name": { + "description": "Database display name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "version": { + "description": "Database engine version. Defaults to latest for selected engine.", + "type": "string", + "example": "17", + "nullable": true + }, + "specification": { + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "type": "string", + "default": "s-1vcpu-1gb", + "example": "<SPECIFICATION>" + }, + "replicas": { + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "syncMode": { + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + }, + "networkIdleTimeoutSeconds": { + "description": "Connection idle timeout in seconds.", + "type": "integer", + "default": 900, + "example": 60, + "format": "int32" + }, + "networkIPAllowlist": { + "description": "IP addresses\/CIDR ranges allowed to connect.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "idleTimeoutMinutes": { + "description": "Minutes of inactivity before container scales to zero.", + "type": "integer", + "default": 15, + "example": 5, + "format": "int32" + }, + "pitr": { + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", + "type": "boolean", + "default": true, + "example": false + }, + "pitrRetentionDays": { + "description": "Number of days to retain PITR data.", + "type": "integer", + "default": 7, + "example": 1, + "format": "int32" + }, + "storageAutoscaling": { + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "type": "boolean", + "default": true, + "example": false + }, + "storageAutoscalingThresholdPercent": { + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "type": "integer", + "default": 85, + "example": 50, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "description": "Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/postgresql\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "postgresqlListSpecifications", + "tags": [ + "postgresql" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, its own prices and overage rates, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/postgresql\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "postgresqlGet", + "tags": [ + "postgresql" + ], + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update database", + "operationId": "postgresqlUpdate", + "tags": [ + "postgresql" + ], + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Database display name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "status": { + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "type": "string", + "example": "ready", + "nullable": true + }, + "specification": { + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "type": "string", + "example": "<SPECIFICATION>", + "nullable": true + }, + "replicas": { + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "syncMode": { + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + }, + "networkIdleTimeoutSeconds": { + "description": "Connection idle timeout in seconds (60-86400).", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "networkIPAllowlist": { + "description": "IP addresses\/CIDR ranges allowed to connect.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "idleTimeoutMinutes": { + "description": "Minutes before container scales to zero.", + "type": "integer", + "example": 5, + "format": "int32", + "nullable": true + }, + "pitr": { + "description": "Enable or disable point-in-time recovery (PITR).", + "type": "boolean", + "example": false, + "nullable": true + }, + "pitrRetentionDays": { + "description": "Days to retain PITR data.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "storageAutoscaling": { + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "type": "boolean", + "example": false, + "nullable": true + }, + "storageAutoscalingThresholdPercent": { + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "type": "integer", + "example": 50, + "format": "int32", + "nullable": true + }, + "storageAutoscalingMaxGb": { + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "metricsTraceSampleRate": { + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "type": "number", + "format": "float", + "nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "sqlApiEnabled": { + "description": "Enable the SQL API sidecar for this database.", + "type": "boolean", + "example": false, + "nullable": true + }, + "sqlApiAllowedStatements": { + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "sqlApiMaxRows": { + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "sqlApiMaxBytes": { + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "type": "integer", + "example": 1024, + "format": "int32", + "nullable": true + }, + "sqlApiTimeoutSeconds": { + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "postgresqlDelete", + "tags": [ + "postgresql" + ], + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/backups": { + "get": { + "summary": "List backups", + "operationId": "postgresqlListBackups", + "tags": [ + "postgresql" + ], + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "BackupList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "postgresql\/list-backups.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup", + "operationId": "postgresqlCreateBackup", + "tags": [ + "postgresql" + ], + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", + "responses": { + "202": { + "description": "Backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "postgresql\/create-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Backup type: full or incremental.", + "type": "string", + "default": "full", + "example": "full" + } + } + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List backup policies", + "operationId": "postgresqlListBackupPolicies", + "tags": [ + "postgresql" + ], + "description": "List scheduled backup policies for a dedicated database.", + "responses": { + "200": { + "description": "Backup policy list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "postgresql\/list-backup-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup policy", + "operationId": "postgresqlCreateBackupPolicy", + "tags": [ + "postgresql" + ], + "description": "Create a scheduled backup policy for a dedicated database.", + "responses": { + "201": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "postgresql\/create-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "policyId": { + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<POLICY_ID>" + }, + "name": { + "description": "Policy name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string" + }, + "retention": { + "description": "Days to keep backups before deletion.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "type": { + "description": "Backup type: full or incremental.", + "type": "string", + "default": "full", + "example": "full" + }, + "enabled": { + "description": "Is policy enabled? When disabled, no backups will be taken.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "policyId", + "name", + "schedule", + "retention" + ] + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/backups\/policies\/{policyId}": { + "get": { + "summary": "Get backup policy", + "operationId": "postgresqlGetBackupPolicy", + "tags": [ + "postgresql" + ], + "description": "Get a scheduled backup policy for a dedicated database.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "postgresql\/get-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update backup policy", + "operationId": "postgresqlUpdateBackupPolicy", + "tags": [ + "postgresql" + ], + "description": "Update a scheduled backup policy for a dedicated database.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "postgresql\/update-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Policy name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "schedule": { + "description": "Schedule CRON syntax.", + "type": "string" + }, + "retention": { + "description": "Days to keep backups before deletion.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "enabled": { + "description": "Is policy enabled? When disabled, no backups will be taken.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "postgresqlDeleteBackupPolicy", + "tags": [ + "postgresql" + ], + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "postgresql\/delete-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "example": "<POLICY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "postgresqlUpdateBackupStorage", + "tags": [ + "postgresql" + ], + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", + "responses": { + "200": { + "description": "BackupStorageConfig", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "postgresql\/update-backup-storage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "type": "string", + "example": "s3" + }, + "bucket": { + "description": "Storage bucket or container name.", + "type": "string", + "example": "<BUCKET>" + }, + "region": { + "description": "Storage region.", + "type": "string", + "default": "", + "example": "<REGION>" + }, + "prefix": { + "description": "Object key prefix for backups.", + "type": "string", + "default": "backups\/", + "example": "<PREFIX>" + }, + "endpoint": { + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "type": "string", + "default": "", + "example": "<ENDPOINT>" + }, + "accessKey": { + "description": "Access key or client ID for authentication.", + "type": "string", + "example": "<ACCESS_KEY>" + }, + "secretKey": { + "description": "Secret key or service account JSON for authentication.", + "type": "string", + "example": "<SECRET_KEY>" + } + }, + "required": [ + "provider", + "bucket", + "accessKey", + "secretKey" + ] + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/backups\/{backupId}": { + "get": { + "summary": "Get backup", + "operationId": "postgresqlGetBackup", + "tags": [ + "postgresql" + ], + "description": "Get details of a specific database backup including its status, size, and timestamps.", + "responses": { + "200": { + "description": "Backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "postgresql\/get-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BACKUP_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete backup", + "operationId": "postgresqlDeleteBackup", + "tags": [ + "postgresql" + ], + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "backups", + "demo": "postgresql\/delete-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BACKUP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/branches": { + "get": { + "summary": "List branches", + "operationId": "postgresqlListBranches", + "tags": [ + "postgresql" + ], + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", + "responses": { + "200": { + "description": "BranchList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "postgresql\/list-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create branch", + "operationId": "postgresqlCreateBranch", + "tags": [ + "postgresql" + ], + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "postgresql\/create-branch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "branchId": { + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "default": "", + "example": "<BRANCH_ID>" + }, + "ttl": { + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "type": "integer", + "default": 86400, + "example": 300, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/branches\/{branchId}": { + "delete": { + "summary": "Delete branch", + "operationId": "postgresqlDeleteBranch", + "tags": [ + "postgresql" + ], + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "branches", + "demo": "postgresql\/delete-branch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "branchId", + "description": "Branch ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BRANCH_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/credentials": { + "patch": { + "summary": "Update credentials", + "operationId": "postgresqlUpdateCredentials", + "tags": [ + "postgresql" + ], + "description": "Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.", + "responses": { + "202": { + "description": "Operation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/update-credentials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/executions": { + "post": { + "summary": "Create execution", + "operationId": "postgresqlCreateExecution", + "tags": [ + "postgresql" + ], + "description": "Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https:\/\/db-{project}-{db}.{region}.appwrite.center\/v1\/sql\/executions` with an `X-Appwrite-Key` header \u2014 that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values \u2014 the API does not interpolate raw strings.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "executions", + "demo": "postgresql\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "description": "SQL statement to execute. Exactly one statement per request.", + "type": "string", + "example": "<SQL>" + }, + "bindings": { + "description": "Optional bound parameters. Pass either a positional list or a name => value map matching the placeholder style used in the SQL.", + "type": "object", + "default": {}, + "example": {}, + "nullable": true + }, + "timeoutSeconds": { + "description": "Per-call execution timeout override. Must be less than or equal to the database's configured sqlApiTimeoutSeconds.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + } + }, + "required": [ + "sql" + ] + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/extensions": { + "get": { + "summary": "List extensions", + "operationId": "postgresqlListExtensions", + "tags": [ + "postgresql" + ], + "description": "List installed and available extensions for a PostgreSQL database.", + "responses": { + "200": { + "description": "Extensions", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseExtensions" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "extensions", + "demo": "postgresql\/list-extensions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create extension", + "operationId": "postgresqlCreateExtension", + "tags": [ + "postgresql" + ], + "description": "Install a database extension. Only available for PostgreSQL databases. The install runs asynchronously; poll the extensions list endpoint for status.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "extensions", + "demo": "postgresql\/create-extension.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Extension name (e.g., pgvector, postgis, uuid-ossp).", + "type": "string", + "example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/extensions\/{extensionName}": { + "delete": { + "summary": "Delete extension", + "operationId": "postgresqlDeleteExtension", + "tags": [ + "postgresql" + ], + "description": "Uninstall a database extension from a PostgreSQL database. The uninstall runs asynchronously; poll the extensions list endpoint for status.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "extensions", + "demo": "postgresql\/delete-extension.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "extensionName", + "description": "Extension name to uninstall.", + "required": true, + "schema": { + "type": "string", + "example": "<EXTENSION_NAME>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "postgresqlCreateFailover", + "tags": [ + "postgresql" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "failovers", + "demo": "postgresql\/create-failover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "type": "string", + "example": "<TARGET_REPLICA_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update maintenance", + "operationId": "postgresqlUpdateMaintenance", + "tags": [ + "postgresql" + ], + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/update-maintenance.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "day": { + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "type": "string", + "example": "sun" + }, + "hourUtc": { + "description": "Hour in UTC (0-23) for maintenance window start.", + "type": "integer", + "example": 0, + "format": "int32" + } + }, + "required": [ + "day", + "hourUtc" + ] + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/migrations": { + "post": { + "summary": "Create migration", + "operationId": "postgresqlCreateMigration", + "tags": [ + "postgresql" + ], + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "migrations", + "demo": "postgresql\/create-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetType": { + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "type": "string", + "example": "shared" + }, + "specification": { + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "type": "string", + "example": "<SPECIFICATION>", + "nullable": true + } + }, + "required": [ + "targetType" + ] + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "postgresqlListOperations", + "tags": [ + "postgresql" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "operations", + "demo": "postgresql\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "example": "queued" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/postgresql\/{databaseId}\/pitr": { + "get": { + "summary": "Get PITR", + "operationId": "postgresqlGetPitr", + "tags": [ + "postgresql" + ], + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", + "responses": { + "200": { + "description": "PITRWindows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pitr", + "demo": "postgresql\/get-pitr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/pooler": { + "get": { + "summary": "Get pooler", + "operationId": "postgresqlGetPooler", + "tags": [ + "postgresql" + ], + "description": "Get the connection pooler configuration for a dedicated database. Returns pooler mode, max connections, and pool size settings.", + "responses": { + "200": { + "description": "PoolerConfig", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pooler", + "demo": "postgresql\/get-pooler.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update pooler", + "operationId": "postgresqlUpdatePooler", + "tags": [ + "postgresql" + ], + "description": "Update the connection pooler configuration for a dedicated database. Configure pool mode, max connections, and pool sizes.", + "responses": { + "200": { + "description": "PoolerConfig", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "pooler", + "demo": "postgresql\/update-pooler.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mode": { + "description": "Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.", + "type": "string", + "example": "transaction", + "nullable": true + }, + "maxConnections": { + "description": "Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.", + "type": "integer", + "example": 10, + "format": "int32", + "nullable": true + }, + "defaultPoolSize": { + "description": "Default pool size per user.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "readWriteSplitting": { + "description": "Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "poolerCpuRequest": { + "description": "Pooler sidecar CPU request override (Kubernetes quantity, e.g. \"250m\" or \"1\"). Leave null for the proportional default (5% of DB CPU, floor 100m).", + "type": "string", + "example": "<POOLER_CPU_REQUEST>", + "nullable": true + }, + "poolerCpuLimit": { + "description": "Pooler sidecar CPU limit override (Kubernetes quantity, e.g. \"500m\" or \"1\"). Leave null for the proportional default (10% of DB CPU, floor 200m). Changing this field rolls the database pod.", + "type": "string", + "example": "<POOLER_CPU_LIMIT>", + "nullable": true + }, + "poolerMemoryRequest": { + "description": "Pooler sidecar memory request override (Kubernetes quantity, e.g. \"128Mi\" or \"1Gi\"). Leave null for the proportional default (7.5% of DB memory, floor 64Mi).", + "type": "string", + "example": "<POOLER_MEMORY_REQUEST>", + "nullable": true + }, + "poolerMemoryLimit": { + "description": "Pooler sidecar memory limit override (Kubernetes quantity, e.g. \"256Mi\" or \"1Gi\"). Leave null for the proportional default (15% of DB memory, floor 128Mi). Changing this field rolls the database pod.", + "type": "string", + "example": "<POOLER_MEMORY_LIMIT>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "postgresqlGetReplicas", + "tags": [ + "postgresql" + ], + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", + "responses": { + "200": { + "description": "Replicas", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "replicas", + "demo": "postgresql\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/restorations": { + "get": { + "summary": "List restorations", + "operationId": "postgresqlListRestorations", + "tags": [ + "postgresql" + ], + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "Dedicated database restorations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "postgresql\/list-restorations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by restoration status.", + "required": false, + "schema": { + "type": "string", + "example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create restoration", + "operationId": "postgresqlCreateRestoration", + "tags": [ + "postgresql" + ], + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", + "responses": { + "202": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "postgresql\/create-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "type": "string", + "default": "backup", + "example": "backup" + }, + "backupId": { + "description": "Backup ID to restore from (required for backup type).", + "type": "string", + "example": "<BACKUP_ID>", + "nullable": true + }, + "targetDatabaseId": { + "description": "Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.", + "type": "string", + "example": "<TARGET_DATABASE_ID>", + "nullable": true + }, + "targetTime": { + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + } + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/restorations\/{restorationId}": { + "get": { + "summary": "Get restoration", + "operationId": "postgresqlGetRestoration", + "tags": [ + "postgresql" + ], + "description": "Get details of a specific database restoration including its status, type, and timestamps.", + "responses": { + "200": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "restorations", + "demo": "postgresql\/get-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "restorationId", + "description": "Restoration ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RESTORATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "postgresqlGetStatus", + "tags": [ + "postgresql" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/upgrades": { + "post": { + "summary": "Create upgrade", + "operationId": "postgresqlCreateUpgrade", + "tags": [ + "postgresql" + ], + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "postgresql", + "demo": "postgresql\/create-upgrade.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetVersion": { + "description": "Target engine version to upgrade to.", + "type": "string", + "example": "<TARGET_VERSION>" + } + }, + "required": [ + "targetVersion" + ] + } + } + } + } + } + }, + "\/presences": { + "get": { + "summary": "List presences", + "operationId": "presencesList", + "tags": [ + "presences" + ], + "description": "List presence logs. Expired entries are filtered out automatically.\n", + "responses": { + "200": { + "description": "Presences List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presenceList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "presences", + "demo": "presences\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/presences\/usage": { + "get": { + "summary": "Get presence usage", + "operationId": "presencesGetUsage", + "tags": [ + "presences" + ], + "description": "Get presence usage metrics, including the current total of online users and historical online user counts for the selected time range.\n", + "responses": { + "200": { + "description": "UsagePresence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usagePresence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "presences\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "example": "24h", + "title": "UsageRange", + "oneOf": [ + { + "type": "string", + "enum": [ + "24h" + ], + "title": "Twenty Four Hours" + }, + { + "type": "string", + "enum": [ + "30d" + ], + "title": "Thirty Days" + }, + { + "type": "string", + "enum": [ + "90d" + ], + "title": "Ninety Days" + } + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/presences\/{presenceId}": { + "get": { + "summary": "Get presence", + "operationId": "presencesGet", + "tags": [ + "presences" + ], + "description": "Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found.\n", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "presences", + "demo": "presences\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PRESENCE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Upsert presence", + "operationId": "presencesUpsert", + "tags": [ + "presences" + ], + "description": "Create or update a presence log by its user ID.\n", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "presences", + "demo": "presences\/upsert.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.write", + "platforms": [ + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsert", + "namespace": "presences", + "platforms": [ + "client", + "console" + ], + "summary": "Upsert presence", + "auth": { + "client": { + "Project": [] + }, + "console": { + "Project": [] + } + }, + "parameters": [ + "presenceId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "Create or update a presence log by its user ID.\n", + "demo": "presences\/upsert.md", + "public": true + }, + { + "name": "upsert", + "namespace": "presences", + "platforms": [ + "server" + ], + "summary": "Upsert presence", + "auth": { + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "presenceId", + "userId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "userId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "Create or update a presence log by its user ID.\n", + "demo": "presences\/upsert.md", + "public": true + } + ], + "auth": { + "client": { + "Project": [] + }, + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PRESENCE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID.", + "type": "string", + "example": "<USER_ID>" + }, + "status": { + "description": "Presence status.", + "type": "string", + "example": "<STATUS>" + }, + "permissions": { + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "expiresAt": { + "description": "Presence expiry datetime.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + }, + "metadata": { + "description": "Presence metadata object.", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "status" + ] + } + } + } + } + }, + "patch": { + "summary": "Update presence", + "operationId": "presencesUpdate", + "tags": [ + "presences" + ], + "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", + "responses": { + "200": { + "description": "Presence", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/presence" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "presences", + "demo": "presences\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.write", + "platforms": [ + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "update", + "namespace": "presences", + "platforms": [ + "client", + "console" + ], + "summary": "Update presence", + "auth": { + "client": { + "Project": [] + }, + "console": { + "Project": [] + } + }, + "parameters": [ + "presenceId", + "status", + "expiresAt", + "metadata", + "permissions", + "purge" + ], + "required": [ + "presenceId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", + "demo": "presences\/update.md", + "public": true + }, + { + "name": "update", + "namespace": "presences", + "platforms": [ + "server" + ], + "summary": "Update presence", + "auth": { + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "presenceId", + "userId", + "status", + "expiresAt", + "metadata", + "permissions", + "purge" + ], + "required": [ + "presenceId", + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", + "demo": "presences\/update.md", + "public": true + } + ], + "auth": { + "client": { + "Project": [] + }, + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PRESENCE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID.", + "type": "string", + "example": "<USER_ID>" + }, + "status": { + "description": "Presence status.", + "type": "string", + "example": "<STATUS>" + }, + "expiresAt": { + "description": "Presence expiry datetime.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + }, + "metadata": { + "description": "Presence metadata object.", + "type": "object", + "default": {}, + "example": {} + }, + "permissions": { + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "purge": { + "description": "When true, purge cached responses used by list presences endpoint.", + "type": "boolean", + "default": false, + "example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete presence", + "operationId": "presencesDelete", + "tags": [ + "presences" + ], + "description": "Delete a presence log by its unique ID.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "presences", + "demo": "presences\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PRESENCE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project": { + "get": { + "summary": "Get project", + "operationId": "projectGet", + "tags": [ + "project" + ], + "description": "Get a project.", + "responses": { + "200": { + "description": "Project", + "content": { + "": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "project\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + }, + "delete": { + "summary": "Delete project", + "operationId": "projectDelete", + "tags": [ + "project" + ], + "description": "Delete a project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "project\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/project\/auth-methods\/{methodId}": { + "patch": { + "summary": "Update project auth method status", + "operationId": "projectUpdateAuthMethod", + "tags": [ + "project" + ], + "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "project\/update-auth-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "methodId", + "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", + "required": true, + "schema": { + "type": "string", + "example": "email-password", + "title": "ProjectAuthMethodId", + "oneOf": [ + { + "type": "string", + "enum": [ + "email-password" + ], + "title": "email-password" + }, + { + "type": "string", + "enum": [ + "magic-url" + ], + "title": "magic-url" + }, + { + "type": "string", + "enum": [ + "email-otp" + ], + "title": "email-otp" + }, + { + "type": "string", + "enum": [ + "anonymous" + ], + "title": "anonymous" + }, + { + "type": "string", + "enum": [ + "invites" + ], + "title": "invites" + }, + { + "type": "string", + "enum": [ + "jwt" + ], + "title": "jwt" + }, + { + "type": "string", + "enum": [ + "phone" + ], + "title": "phone" + } + ] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "description": "Auth method status.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/keys": { + "get": { + "summary": "List project keys", + "operationId": "projectListKeys", + "tags": [ + "project" + ], + "description": "Get a list of all API keys from the current project.", + "responses": { + "200": { + "description": "API Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/keyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "project\/list-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.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: expire, accessedAt, name, scopes", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project key", + "operationId": "projectCreateKey", + "tags": [ + "project" + ], + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", + "responses": { + "201": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "project\/create-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyId": { + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<KEY_ID>" + }, + "name": { + "description": "Key name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + }, + "expire": { + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } + } + } + } + }, + "\/project\/keys\/ephemeral": { + "post": { + "summary": "Create ephemeral project key", + "operationId": "projectCreateEphemeralKey", + "tags": [ + "project" + ], + "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", + "responses": { + "201": { + "description": "Ephemeral Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ephemeralKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "project\/create-ephemeral-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.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": { + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + }, + "duration": { + "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", + "type": "integer", + "example": 600, + "format": "int32" + } + }, + "required": [ + "scopes", + "duration" + ] + } + } + } + } + } + }, + "\/project\/keys\/{keyId}": { + "get": { + "summary": "Get project key", + "operationId": "projectGetKey", + "tags": [ + "project" + ], + "description": "Get a key by its unique ID. ", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "project\/get-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project key", + "operationId": "projectUpdateKey", + "tags": [ + "project" + ], + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "responses": { + "200": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "project\/update-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Key name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "scopes": { + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + }, + "expire": { + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + }, + "required": [ + "name", + "scopes" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete project key", + "operationId": "projectDeleteKey", + "tags": [ + "project" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "keys", + "demo": "project\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key ID.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project\/labels": { + "put": { + "summary": "Update project labels", + "operationId": "projectUpdateLabels", + "tags": [ + "project" + ], + "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "project\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.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": { + "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", + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/project\/mock-phones": { + "get": { + "summary": "List project mock phones", + "operationId": "projectListMockPhones", + "tags": [ + "project" + ], + "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", + "responses": { + "200": { + "description": "Mock Numbers List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumberList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mocks", + "demo": "project\/list-mock-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.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). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project mock phone", + "operationId": "projectCreateMockPhone", + "tags": [ + "project" + ], + "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", + "responses": { + "201": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mocks", + "demo": "project\/create-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.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": { + "number": { + "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", + "type": "string", + "example": "+12065550100", + "format": "phone" + }, + "otp": { + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "type": "string", + "example": "<OTP>" + } + }, + "required": [ + "number", + "otp" + ] + } + } + } + } + } + }, + "\/project\/mock-phones\/{number}": { + "get": { + "summary": "Get project mock phone", + "operationId": "projectGetMockPhone", + "tags": [ + "project" + ], + "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mocks", + "demo": "project\/get-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "example": "+12065550100" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project mock phone", + "operationId": "projectUpdateMockPhone", + "tags": [ + "project" + ], + "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mocks", + "demo": "project\/update-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "example": "+12065550100" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "type": "string", + "example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete project mock phone", + "operationId": "projectDeleteMockPhone", + "tags": [ + "project" + ], + "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mocks", + "demo": "project\/delete-mock-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "mocks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "example": "+12065550100" + }, + "in": "path" + } + ] + } + }, + "\/project\/oauth2": { + "get": { + "summary": "List project OAuth2 providers", + "operationId": "projectListOAuth2Providers", + "tags": [ + "project" + ], + "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", + "responses": { + "200": { + "description": "OAuth2 Providers List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2ProviderList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/list-o-auth-2-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.oauth2.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). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/project\/oauth2-server": { + "put": { + "summary": "Update OAuth2 server", + "operationId": "projectUpdateOAuth2Server", + "tags": [ + "project" + ], + "description": "Update the OAuth2 server (OIDC provider) configuration.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "project\/update-o-auth-2-server.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.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": { + "enabled": { + "description": "Enable or disable the OAuth2 server.", + "type": "boolean", + "example": false + }, + "authorizationUrl": { + "description": "URL to your application with consent screen.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url" + }, + "scopes": { + "description": "List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "authorizationDetailsTypes": { + "description": "List of accepted `authorization_details` types. Maximum of 100 types are allowed, each up to 128 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "accessTokenDuration": { + "description": "Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours.", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "refreshTokenDuration": { + "description": "Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year.", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "publicAccessTokenDuration": { + "description": "Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour.", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "publicRefreshTokenDuration": { + "description": "Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days.", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "installationAccessTokenDuration": { + "description": "Access token duration in seconds for app installation access tokens. Leave empty to use default 1 hour.", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "confidentialPkce": { + "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", + "type": "boolean", + "example": false, + "nullable": true + }, + "verificationUrl": { + "description": "URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "userCodeLength": { + "description": "Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8.", + "type": "integer", + "example": 6, + "format": "int32", + "nullable": true + }, + "userCodeFormat": { + "description": "Character set for device flow user codes: `numeric` (digits only \u2014 best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits \u2014 highest entropy per character). Defaults to `alphanumeric`.", + "type": "string", + "default": "alphanumeric", + "example": "numeric" + }, + "deviceCodeDuration": { + "description": "Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600.", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true + }, + "defaultScopes": { + "description": "List of OAuth2 scopes used when an authorization request omits the scope parameter. Every default scope must also be allowed by the OAuth2 server. Maximum of 100 scopes are allowed, each up to 128 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "installationScopes": { + "description": "List of scopes an application may request when installed on a team. Omitting the parameter clears the list, so no installation scopes can be granted. Maximum of 100 scopes are allowed, each up to 128 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "authorizationUrl" + ] + } + } + } + } + } + }, + "\/project\/oauth2\/amazon": { + "patch": { + "summary": "Update project OAuth2 Amazon", + "operationId": "projectUpdateOAuth2Amazon", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Amazon configuration.", + "responses": { + "200": { + "description": "OAuth2Amazon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-amazon.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 Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", + "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\/apple": { + "patch": { + "summary": "Update project OAuth2 Apple", + "operationId": "projectUpdateOAuth2Apple", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Apple configuration.", + "responses": { + "200": { + "description": "OAuth2Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Apple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-apple.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": { + "serviceId": { + "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", + "type": "string", + "example": "<SERVICE_ID>", + "nullable": true + }, + "keyId": { + "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", + "type": "string", + "example": "<KEY_ID>", + "nullable": true + }, + "teamId": { + "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", + "type": "string", + "example": "<TEAM_ID>", + "nullable": true + }, + "p8File": { + "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", + "type": "string", + "example": "<P8_FILE>", + "nullable": true + }, + "nativeClientIds": { + "description": "App bundle IDs accepted as ID token audiences for native Sign in with Apple. For example: com.example.app. Together with the Services ID, these are the only client IDs whose tokens are trusted. Pass an empty array to clear the list.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enabled": { + "description": "Browser-based OAuth2 sign-in status. Set to true to enable new session creation through the redirect flow. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. Has no effect on native sign-in, which is controlled by nativeEnabled only.", + "type": "boolean", + "example": false, + "nullable": true + }, + "nativeEnabled": { + "description": "Native Sign in with Apple status. This is the only switch for creating sessions from ID tokens obtained on device and is independent of enabled. Needs a Services ID or at least one native client ID to match tokens against, but no key or team ID: this method verifies a signature rather than redeeming an authorization code.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/appwrite": { + "patch": { + "summary": "Update project OAuth2 Appwrite", + "operationId": "projectUpdateOAuth2Appwrite", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Appwrite configuration.", + "responses": { + "200": { + "description": "OAuth2Appwrite", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Appwrite" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-appwrite.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 Appwrite OAuth2 app. For example: 6a42000000000000b5a0", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Appwrite OAuth2 app. For example: b86afd000000000000000000000000000000000000000000000000000ced5f93", + "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\/auth0": { + "patch": { + "summary": "Update project OAuth2 Auth0", + "operationId": "projectUpdateOAuth2Auth0", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Auth0 configuration.", + "responses": { + "200": { + "description": "OAuth2Auth0", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-auth-0.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 Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "type": "string", + "example": "<CLIENT_SECRET>", + "nullable": true + }, + "endpoint": { + "description": "Domain of Auth0 instance. For example: example.us.auth0.com", + "type": "string", + "example": "<ENDPOINT>", + "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\/authentik": { + "patch": { + "summary": "Update project OAuth2 Authentik", + "operationId": "projectUpdateOAuth2Authentik", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Authentik configuration.", + "responses": { + "200": { + "description": "OAuth2Authentik", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-authentik.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 Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "type": "string", + "example": "<CLIENT_SECRET>", + "nullable": true + }, + "endpoint": { + "description": "Domain of Authentik instance. For example: example.authentik.com", + "type": "string", + "example": "<ENDPOINT>", + "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\/autodesk": { + "patch": { + "summary": "Update project OAuth2 Autodesk", + "operationId": "projectUpdateOAuth2Autodesk", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Autodesk configuration.", + "responses": { + "200": { + "description": "OAuth2Autodesk", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-autodesk.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 Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", + "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\/bitbucket": { + "patch": { + "summary": "Update project OAuth2 Bitbucket", + "operationId": "projectUpdateOAuth2Bitbucket", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitbucket configuration.", + "responses": { + "200": { + "description": "OAuth2Bitbucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-bitbucket.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": { + "key": { + "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", + "type": "string", + "example": "<KEY>", + "nullable": true + }, + "secret": { + "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", + "type": "string", + "example": "<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\/bitly": { + "patch": { + "summary": "Update project OAuth2 Bitly", + "operationId": "projectUpdateOAuth2Bitly", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Bitly configuration.", + "responses": { + "200": { + "description": "OAuth2Bitly", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-bitly.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 Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", + "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\/box": { + "patch": { + "summary": "Update project OAuth2 Box", + "operationId": "projectUpdateOAuth2Box", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Box configuration.", + "responses": { + "200": { + "description": "OAuth2Box", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Box" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-box.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 Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", + "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\/cloudflare": { + "patch": { + "summary": "Update project OAuth2 Cloudflare", + "operationId": "projectUpdateOAuth2Cloudflare", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Cloudflare configuration.", + "responses": { + "200": { + "description": "OAuth2Cloudflare", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Cloudflare" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-cloudflare.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 Cloudflare OAuth2 app. For example: 4b866000000000000000000000c9e4e2", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Cloudflare OAuth2 app. For example: cfoc_5Q6YRl0000000000000000000000000000000000003d214f", + "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\/dailymotion": { + "patch": { + "summary": "Update project OAuth2 Dailymotion", + "operationId": "projectUpdateOAuth2Dailymotion", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dailymotion configuration.", + "responses": { + "200": { + "description": "OAuth2Dailymotion", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-dailymotion.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": { + "apiKey": { + "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", + "type": "string", + "example": "<API_KEY>", + "nullable": true + }, + "apiSecret": { + "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", + "type": "string", + "example": "<API_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\/discord": { + "patch": { + "summary": "Update project OAuth2 Discord", + "operationId": "projectUpdateOAuth2Discord", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Discord configuration.", + "responses": { + "200": { + "description": "OAuth2Discord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Discord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-discord.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 Discord OAuth2 app. For example: 950722000000343754", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", + "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\/disqus": { + "patch": { + "summary": "Update project OAuth2 Disqus", + "operationId": "projectUpdateOAuth2Disqus", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Disqus configuration.", + "responses": { + "200": { + "description": "OAuth2Disqus", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-disqus.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": { + "publicKey": { + "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "type": "string", + "example": "<PUBLIC_KEY>", + "nullable": true + }, + "secretKey": { + "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", + "type": "string", + "example": "<SECRET_KEY>", + "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\/dropbox": { + "patch": { + "summary": "Update project OAuth2 Dropbox", + "operationId": "projectUpdateOAuth2Dropbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Dropbox configuration.", + "responses": { + "200": { + "description": "OAuth2Dropbox", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-dropbox.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": { + "appKey": { + "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", + "type": "string", + "example": "<APP_KEY>", + "nullable": true + }, + "appSecret": { + "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", + "type": "string", + "example": "<APP_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\/etsy": { + "patch": { + "summary": "Update project OAuth2 Etsy", + "operationId": "projectUpdateOAuth2Etsy", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Etsy configuration.", + "responses": { + "200": { + "description": "OAuth2Etsy", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-etsy.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": { + "keyString": { + "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", + "type": "string", + "example": "<KEY_STRING>", + "nullable": true + }, + "sharedSecret": { + "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", + "type": "string", + "example": "<SHARED_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\/facebook": { + "patch": { + "summary": "Update project OAuth2 Facebook", + "operationId": "projectUpdateOAuth2Facebook", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Facebook configuration.", + "responses": { + "200": { + "description": "OAuth2Facebook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-facebook.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": { + "appId": { + "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", + "type": "string", + "example": "<APP_ID>", + "nullable": true + }, + "appSecret": { + "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", + "type": "string", + "example": "<APP_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\/figma": { + "patch": { + "summary": "Update project OAuth2 Figma", + "operationId": "projectUpdateOAuth2Figma", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Figma configuration.", + "responses": { + "200": { + "description": "OAuth2Figma", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Figma" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-figma.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 Figma OAuth2 app. For example: byay5H0000000000VtiI40", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", + "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\/fusionauth": { + "patch": { + "summary": "Update project OAuth2 FusionAuth", + "operationId": "projectUpdateOAuth2FusionAuth", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 FusionAuth configuration.", + "responses": { + "200": { + "description": "OAuth2FusionAuth", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-fusion-auth.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 FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", + "type": "string", + "example": "<CLIENT_SECRET>", + "nullable": true + }, + "endpoint": { + "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", + "type": "string", + "example": "<ENDPOINT>", + "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\/github": { + "patch": { + "summary": "Update project OAuth2 GitHub", + "operationId": "projectUpdateOAuth2GitHub", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 GitHub configuration.", + "responses": { + "200": { + "description": "OAuth2GitHub", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Github" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-git-hub.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": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", + "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\/gitlab": { + "patch": { + "summary": "Update project OAuth2 Gitlab", + "operationId": "projectUpdateOAuth2Gitlab", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Gitlab configuration.", + "responses": { + "200": { + "description": "OAuth2Gitlab", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-gitlab.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": { + "applicationId": { + "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "type": "string", + "example": "<APPLICATION_ID>", + "nullable": true + }, + "secret": { + "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "type": "string", + "example": "<SECRET>", + "nullable": true + }, + "endpoint": { + "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "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\/google": { + "patch": { + "summary": "Update project OAuth2 Google", + "operationId": "projectUpdateOAuth2Google", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Google configuration.", + "responses": { + "200": { + "description": "OAuth2Google", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Google" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-google.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 Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", + "type": "string", + "example": "<CLIENT_SECRET>", + "nullable": true + }, + "prompt": { + "description": "Array of Google OAuth2 prompt values. If \"none\" is included, it must be the only element. \"none\" means: don't display any authentication or consent screens. Must not be specified with other values. \"consent\" means: prompt the user for consent. \"select_account\" means: prompt the user to select an account.", + "type": "array", + "items": { + "title": "ProjectOAuth2GooglePrompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + }, + { + "type": "string", + "enum": [ + "select_account" + ], + "title": "select_account" + } + ] + }, + "nullable": true + }, + "nativeClientIds": { + "description": "Additional OAuth2 client IDs accepted as ID token audiences for native sign-in (Android and iOS client IDs). Together with the client ID, which is always accepted, these are the only client IDs whose tokens are trusted. Pass an empty array to clear the list.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enabled": { + "description": "Browser-based OAuth2 sign-in status. Set to true to enable new session creation through the redirect flow. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. Has no effect on native sign-in, which is controlled by nativeEnabled only.", + "type": "boolean", + "example": false, + "nullable": true + }, + "nativeEnabled": { + "description": "Native Google sign-in status. This is the only switch for creating sessions from ID tokens obtained on device and is independent of enabled. Needs a client ID or at least one native client ID to match tokens against, but no client secret: this method verifies a signature rather than redeeming an authorization code.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/huggingface": { + "patch": { + "summary": "Update project OAuth2 Hugging Face", + "operationId": "projectUpdateOAuth2HuggingFace", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Hugging Face configuration.", + "responses": { + "200": { + "description": "OAuth2HuggingFace", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2HuggingFace" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-hugging-face.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 Hugging Face OAuth2 app. For example: 2ab9cff9-d711-40ad-a91e-b08a49c42d24", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Hugging Face OAuth2 app. For example: oauth_app_secret_wcLhRtl000000000000000000000xbNdLt", + "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\/kakao": { + "patch": { + "summary": "Update project OAuth2 Kakao", + "operationId": "projectUpdateOAuth2Kakao", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Kakao configuration.", + "responses": { + "200": { + "description": "OAuth2Kakao", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Kakao" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-kakao.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": "'REST API key' of Kakao OAuth2 app. For example: 839ff5000000000000000000013206de", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Kakao OAuth2 app. For example: jLNVOK00000000000000000000yJebea. Generate it under Kakao Login > Security and set its status to enabled", + "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\/keycloak": { + "patch": { + "summary": "Update project OAuth2 Keycloak", + "operationId": "projectUpdateOAuth2Keycloak", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Keycloak configuration.", + "responses": { + "200": { + "description": "OAuth2Keycloak", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-keycloak.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 Keycloak OAuth2 app. For example: appwrite-o0000000st-app", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", + "type": "string", + "example": "<CLIENT_SECRET>", + "nullable": true + }, + "endpoint": { + "description": "Domain of Keycloak instance. For example: keycloak.example.com", + "type": "string", + "example": "<ENDPOINT>", + "nullable": true + }, + "realmName": { + "description": "Keycloak realm name. For example: appwrite-realm", + "type": "string", + "example": "<REALM_NAME>", + "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\/kick": { + "patch": { + "summary": "Update project OAuth2 Kick", + "operationId": "projectUpdateOAuth2Kick", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Kick configuration.", + "responses": { + "200": { + "description": "OAuth2Kick", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Kick" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-kick.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 Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", + "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\/linkedin": { + "patch": { + "summary": "Update project OAuth2 Linkedin", + "operationId": "projectUpdateOAuth2Linkedin", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Linkedin configuration.", + "responses": { + "200": { + "description": "OAuth2Linkedin", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-linkedin.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 Linkedin OAuth2 app. For example: 770000000000dv", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "primaryClientSecret": { + "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", + "type": "string", + "example": "<PRIMARY_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\/microsoft": { + "patch": { + "summary": "Update project OAuth2 Microsoft", + "operationId": "projectUpdateOAuth2Microsoft", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Microsoft configuration.", + "responses": { + "200": { + "description": "OAuth2Microsoft", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-microsoft.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": { + "applicationId": { + "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", + "type": "string", + "example": "<APPLICATION_ID>", + "nullable": true + }, + "applicationSecret": { + "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "type": "string", + "example": "<APPLICATION_SECRET>", + "nullable": true + }, + "tenant": { + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", + "type": "string", + "example": "<TENANT>", + "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\/notion": { + "patch": { + "summary": "Update project OAuth2 Notion", + "operationId": "projectUpdateOAuth2Notion", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Notion configuration.", + "responses": { + "200": { + "description": "OAuth2Notion", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Notion" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-notion.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": { + "oauthClientId": { + "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", + "type": "string", + "example": "<OAUTH_CLIENT_ID>", + "nullable": true + }, + "oauthClientSecret": { + "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", + "type": "string", + "example": "<OAUTH_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\/oidc": { + "patch": { + "summary": "Update project OAuth2 Oidc", + "operationId": "projectUpdateOAuth2Oidc", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Oidc configuration.", + "responses": { + "200": { + "description": "OAuth2Oidc", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-oidc.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 Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "type": "string", + "example": "<CLIENT_SECRET>", + "nullable": true + }, + "wellKnownURL": { + "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "authorizationURL": { + "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "tokenURL": { + "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "userInfoURL": { + "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "prompt": { + "description": "Array of OpenID Connect prompt values controlling the authentication and consent screens. 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. \"select_account\" means: prompt the user to select an account.", + "type": "array", + "items": { + "title": "ProjectOAuth2OidcPrompt", + "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 + }, + "maxAge": { + "description": "Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds, otherwise they are prompted to re-authenticate.", + "type": "integer", + "example": 0, + "format": "int32", + "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\/okta": { + "patch": { + "summary": "Update project OAuth2 Okta", + "operationId": "projectUpdateOAuth2Okta", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Okta configuration.", + "responses": { + "200": { + "description": "OAuth2Okta", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Okta" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-okta.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 Okta OAuth2 app. For example: 0oa00000000000000698", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "type": "string", + "example": "<CLIENT_SECRET>", + "nullable": true + }, + "domain": { + "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", + "type": "string", + "example": "example.com", + "nullable": true + }, + "authorizationServerId": { + "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", + "type": "string", + "example": "<AUTHORIZATION_SERVER_ID>", + "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\/paypal": { + "patch": { + "summary": "Update project OAuth2 Paypal", + "operationId": "projectUpdateOAuth2Paypal", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Paypal configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-paypal.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 Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "secretKey": { + "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "type": "string", + "example": "<SECRET_KEY>", + "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\/paypalSandbox": { + "patch": { + "summary": "Update project OAuth2 PaypalSandbox", + "operationId": "projectUpdateOAuth2PaypalSandbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 PaypalSandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Paypal", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-paypal-sandbox.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 PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "secretKey": { + "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "type": "string", + "example": "<SECRET_KEY>", + "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\/podio": { + "patch": { + "summary": "Update project OAuth2 Podio", + "operationId": "projectUpdateOAuth2Podio", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Podio configuration.", + "responses": { + "200": { + "description": "OAuth2Podio", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Podio" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-podio.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 Podio OAuth2 app. For example: appwrite-o0000000st-app", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", + "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\/resend": { + "patch": { + "summary": "Update project OAuth2 Resend", + "operationId": "projectUpdateOAuth2Resend", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Resend configuration.", + "responses": { + "200": { + "description": "OAuth2Resend", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Resend" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-resend.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 Resend OAuth2 app. For example: f47ac10b-58cc-4372-a567-0e02b2c3d479", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Resend OAuth2 app. For example: 9c1e4b00000000000000000000000000000000000000000000000000a72d5f4", + "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\/salesforce": { + "patch": { + "summary": "Update project OAuth2 Salesforce", + "operationId": "projectUpdateOAuth2Salesforce", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Salesforce configuration.", + "responses": { + "200": { + "description": "OAuth2Salesforce", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-salesforce.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": { + "customerKey": { + "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "type": "string", + "example": "<CUSTOMER_KEY>", + "nullable": true + }, + "customerSecret": { + "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", + "type": "string", + "example": "<CUSTOMER_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\/slack": { + "patch": { + "summary": "Update project OAuth2 Slack", + "operationId": "projectUpdateOAuth2Slack", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Slack configuration.", + "responses": { + "200": { + "description": "OAuth2Slack", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Slack" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-slack.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 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 Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", + "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\/stripe": { + "patch": { + "summary": "Update project OAuth2 Stripe", + "operationId": "projectUpdateOAuth2Stripe", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Stripe configuration.", + "responses": { + "200": { + "description": "OAuth2Stripe", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-stripe.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 Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "apiSecretKey": { + "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", + "type": "string", + "example": "<API_SECRET_KEY>", + "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\/tiktok": { + "patch": { + "summary": "Update project OAuth2 TikTok", + "operationId": "projectUpdateOAuth2TikTok", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 TikTok configuration.", + "responses": { + "200": { + "description": "OAuth2TikTok", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2TikTok" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-tik-tok.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 key' of TikTok OAuth2 app. For example: awz000000000tyw0", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client secret' of TikTok OAuth2 app. For example: 6wXewM00000000000000000000yXnite", + "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\/tradeshift": { + "patch": { + "summary": "Update project OAuth2 Tradeshift", + "operationId": "projectUpdateOAuth2Tradeshift", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-tradeshift.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": { + "oauth2ClientId": { + "description": "'OAuth2 Client ID' of Tradeshift 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", + "type": "string", + "example": "<OAUTH2_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\/tradeshiftBox": { + "patch": { + "summary": "Update project OAuth2 Tradeshift Sandbox", + "operationId": "projectUpdateOAuth2TradeshiftSandbox", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", + "responses": { + "200": { + "description": "OAuth2Tradeshift", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-tradeshift-sandbox.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": { + "oauth2ClientId": { + "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 Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "type": "string", + "example": "<OAUTH2_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\/twitch": { + "patch": { + "summary": "Update project OAuth2 Twitch", + "operationId": "projectUpdateOAuth2Twitch", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Twitch configuration.", + "responses": { + "200": { + "description": "OAuth2Twitch", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-twitch.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 Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", + "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\/wordpress": { + "patch": { + "summary": "Update project OAuth2 WordPress", + "operationId": "projectUpdateOAuth2WordPress", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 WordPress configuration.", + "responses": { + "200": { + "description": "OAuth2WordPress", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-word-press.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 WordPress OAuth2 app. For example: 130005", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", + "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\/x": { + "patch": { + "summary": "Update project OAuth2 X", + "operationId": "projectUpdateOAuth2X", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 X configuration.", + "responses": { + "200": { + "description": "OAuth2X", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2X" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2x.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": { + "customerKey": { + "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", + "type": "string", + "example": "<CUSTOMER_KEY>", + "nullable": true + }, + "secretKey": { + "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", + "type": "string", + "example": "<SECRET_KEY>", + "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\/yahoo": { + "patch": { + "summary": "Update project OAuth2 Yahoo", + "operationId": "projectUpdateOAuth2Yahoo", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yahoo configuration.", + "responses": { + "200": { + "description": "OAuth2Yahoo", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-yahoo.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, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", + "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\/yandex": { + "patch": { + "summary": "Update project OAuth2 Yandex", + "operationId": "projectUpdateOAuth2Yandex", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Yandex configuration.", + "responses": { + "200": { + "description": "OAuth2Yandex", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-yandex.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 Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", + "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\/zoho": { + "patch": { + "summary": "Update project OAuth2 Zoho", + "operationId": "projectUpdateOAuth2Zoho", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoho configuration.", + "responses": { + "200": { + "description": "OAuth2Zoho", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-zoho.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 Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", + "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\/zoom": { + "patch": { + "summary": "Update project OAuth2 Zoom", + "operationId": "projectUpdateOAuth2Zoom", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Zoom configuration.", + "responses": { + "200": { + "description": "OAuth2Zoom", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-zoom.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 Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", + "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\/{providerId}": { + "get": { + "summary": "Get project OAuth2 provider", + "operationId": "projectGetOAuth2Provider", + "tags": [ + "project" + ], + "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", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/oAuth2Github" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Discord" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Figma" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Box" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Google" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + }, + { + "$ref": "#\/components\/schemas\/oAuth2X" + }, + { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Slack" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Podio" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Notion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + }, + { + "$ref": "#\/components\/schemas\/oAuth2HuggingFace" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Resend" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Cloudflare" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + }, + { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Apple" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Okta" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kick" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + }, + { + "$ref": "#\/components\/schemas\/oAuth2TikTok" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kakao" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/components\/schemas\/oAuth2Github", + "discord": "#\/components\/schemas\/oAuth2Discord", + "figma": "#\/components\/schemas\/oAuth2Figma", + "dropbox": "#\/components\/schemas\/oAuth2Dropbox", + "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", + "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", + "bitly": "#\/components\/schemas\/oAuth2Bitly", + "box": "#\/components\/schemas\/oAuth2Box", + "autodesk": "#\/components\/schemas\/oAuth2Autodesk", + "google": "#\/components\/schemas\/oAuth2Google", + "zoom": "#\/components\/schemas\/oAuth2Zoom", + "zoho": "#\/components\/schemas\/oAuth2Zoho", + "yandex": "#\/components\/schemas\/oAuth2Yandex", + "x": "#\/components\/schemas\/oAuth2X", + "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "twitch": "#\/components\/schemas\/oAuth2Twitch", + "stripe": "#\/components\/schemas\/oAuth2Stripe", + "spotify": "#\/components\/schemas\/oAuth2Spotify", + "slack": "#\/components\/schemas\/oAuth2Slack", + "podio": "#\/components\/schemas\/oAuth2Podio", + "notion": "#\/components\/schemas\/oAuth2Notion", + "salesforce": "#\/components\/schemas\/oAuth2Salesforce", + "yahoo": "#\/components\/schemas\/oAuth2Yahoo", + "huggingface": "#\/components\/schemas\/oAuth2HuggingFace", + "resend": "#\/components\/schemas\/oAuth2Resend", + "cloudflare": "#\/components\/schemas\/oAuth2Cloudflare", + "linkedin": "#\/components\/schemas\/oAuth2Linkedin", + "disqus": "#\/components\/schemas\/oAuth2Disqus", + "amazon": "#\/components\/schemas\/oAuth2Amazon", + "etsy": "#\/components\/schemas\/oAuth2Etsy", + "facebook": "#\/components\/schemas\/oAuth2Facebook", + "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", + "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", + "paypal": "#\/components\/schemas\/oAuth2Paypal", + "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", + "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "authentik": "#\/components\/schemas\/oAuth2Authentik", + "auth0": "#\/components\/schemas\/oAuth2Auth0", + "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", + "keycloak": "#\/components\/schemas\/oAuth2Keycloak", + "oidc": "#\/components\/schemas\/oAuth2Oidc", + "apple": "#\/components\/schemas\/oAuth2Apple", + "okta": "#\/components\/schemas\/oAuth2Okta", + "kick": "#\/components\/schemas\/oAuth2Kick", + "microsoft": "#\/components\/schemas\/oAuth2Microsoft", + "tiktok": "#\/components\/schemas\/oAuth2TikTok", + "kakao": "#\/components\/schemas\/oAuth2Kakao" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/get-o-auth-2-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.oauth2.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "OAuth2 provider key. For example: github, google, apple.", + "required": true, + "schema": { + "type": "string", + "example": "amazon", + "title": "ProjectOAuthProviderId", + "oneOf": [ + { + "type": "string", + "enum": [ + "amazon" + ], + "title": "amazon" + }, + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "appwrite" + ], + "title": "appwrite" + }, + { + "type": "string", + "enum": [ + "auth0" + ], + "title": "auth0" + }, + { + "type": "string", + "enum": [ + "authentik" + ], + "title": "authentik" + }, + { + "type": "string", + "enum": [ + "autodesk" + ], + "title": "autodesk" + }, + { + "type": "string", + "enum": [ + "bitbucket" + ], + "title": "bitbucket" + }, + { + "type": "string", + "enum": [ + "bitly" + ], + "title": "bitly" + }, + { + "type": "string", + "enum": [ + "box" + ], + "title": "box" + }, + { + "type": "string", + "enum": [ + "cloudflare" + ], + "title": "cloudflare" + }, + { + "type": "string", + "enum": [ + "dailymotion" + ], + "title": "dailymotion" + }, + { + "type": "string", + "enum": [ + "discord" + ], + "title": "discord" + }, + { + "type": "string", + "enum": [ + "disqus" + ], + "title": "disqus" + }, + { + "type": "string", + "enum": [ + "dropbox" + ], + "title": "dropbox" + }, + { + "type": "string", + "enum": [ + "etsy" + ], + "title": "etsy" + }, + { + "type": "string", + "enum": [ + "facebook" + ], + "title": "facebook" + }, + { + "type": "string", + "enum": [ + "figma" + ], + "title": "figma" + }, + { + "type": "string", + "enum": [ + "fusionauth" + ], + "title": "fusionauth" + }, + { + "type": "string", + "enum": [ + "github" + ], + "title": "github" + }, + { + "type": "string", + "enum": [ + "gitlab" + ], + "title": "gitlab" + }, + { + "type": "string", + "enum": [ + "google" + ], + "title": "google" + }, + { + "type": "string", + "enum": [ + "huggingface" + ], + "title": "huggingface" + }, + { + "type": "string", + "enum": [ + "kakao" + ], + "title": "kakao" + }, + { + "type": "string", + "enum": [ + "keycloak" + ], + "title": "keycloak" + }, + { + "type": "string", + "enum": [ + "kick" + ], + "title": "kick" + }, + { + "type": "string", + "enum": [ + "linkedin" + ], + "title": "linkedin" + }, + { + "type": "string", + "enum": [ + "microsoft" + ], + "title": "microsoft" + }, + { + "type": "string", + "enum": [ + "notion" + ], + "title": "notion" + }, + { + "type": "string", + "enum": [ + "oidc" + ], + "title": "oidc" + }, + { + "type": "string", + "enum": [ + "okta" + ], + "title": "okta" + }, + { + "type": "string", + "enum": [ + "paypal" + ], + "title": "paypal" + }, + { + "type": "string", + "enum": [ + "paypalSandbox" + ], + "title": "paypalSandbox" + }, + { + "type": "string", + "enum": [ + "podio" + ], + "title": "podio" + }, + { + "type": "string", + "enum": [ + "resend" + ], + "title": "resend" + }, + { + "type": "string", + "enum": [ + "salesforce" + ], + "title": "salesforce" + }, + { + "type": "string", + "enum": [ + "slack" + ], + "title": "slack" + }, + { + "type": "string", + "enum": [ + "spotify" + ], + "title": "spotify" + }, + { + "type": "string", + "enum": [ + "stripe" + ], + "title": "stripe" + }, + { + "type": "string", + "enum": [ + "tiktok" + ], + "title": "tiktok" + }, + { + "type": "string", + "enum": [ + "tradeshift" + ], + "title": "tradeshift" + }, + { + "type": "string", + "enum": [ + "tradeshiftBox" + ], + "title": "tradeshiftBox" + }, + { + "type": "string", + "enum": [ + "twitch" + ], + "title": "twitch" + }, + { + "type": "string", + "enum": [ + "wordpress" + ], + "title": "wordpress" + }, + { + "type": "string", + "enum": [ + "x" + ], + "title": "x" + }, + { + "type": "string", + "enum": [ + "yahoo" + ], + "title": "yahoo" + }, + { + "type": "string", + "enum": [ + "yammer" + ], + "title": "yammer" + }, + { + "type": "string", + "enum": [ + "yandex" + ], + "title": "yandex" + }, + { + "type": "string", + "enum": [ + "zoho" + ], + "title": "zoho" + }, + { + "type": "string", + "enum": [ + "zoom" + ], + "title": "zoom" + } + ] + }, + "in": "path" + } + ] + } + }, + "\/project\/platforms": { + "get": { + "summary": "List project platforms", + "operationId": "projectListPlatforms", + "tags": [ + "project" + ], + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", + "responses": { + "200": { + "description": "Platforms List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/list-platforms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/project\/platforms\/android": { + "post": { + "summary": "Create project Android platform", + "operationId": "projectCreateAndroidPlatform", + "tags": [ + "project" + ], + "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Android", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformAndroid" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/create-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": { + "platformId": { + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PLATFORM_ID>" + }, + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "applicationId": { + "description": "Android application ID. Max length: 256 chars.", + "type": "string", + "example": "<APPLICATION_ID>" + } + }, + "required": [ + "platformId", + "name", + "applicationId" + ] + } + } + } + } + } + }, + "\/project\/platforms\/android\/{platformId}": { + "put": { + "summary": "Update project Android platform", + "operationId": "projectUpdateAndroidPlatform", + "tags": [ + "project" + ], + "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", + "responses": { + "200": { + "description": "Platform Android", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformAndroid" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/update-android-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "applicationId": { + "description": "Android application ID. Max length: 256 chars.", + "type": "string", + "example": "<APPLICATION_ID>" + } + }, + "required": [ + "name", + "applicationId" + ] + } + } + } + } + } + }, + "\/project\/platforms\/apple": { + "post": { + "summary": "Create project Apple platform", + "operationId": "projectCreateApplePlatform", + "tags": [ + "project" + ], + "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformApple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/create-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": { + "platformId": { + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PLATFORM_ID>" + }, + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "bundleIdentifier": { + "description": "Apple bundle identifier. Max length: 256 chars.", + "type": "string", + "example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "platformId", + "name", + "bundleIdentifier" + ] + } + } + } + } + } + }, + "\/project\/platforms\/apple\/{platformId}": { + "put": { + "summary": "Update project Apple platform", + "operationId": "projectUpdateApplePlatform", + "tags": [ + "project" + ], + "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", + "responses": { + "200": { + "description": "Platform Apple", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformApple" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/update-apple-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "bundleIdentifier": { + "description": "Apple bundle identifier. Max length: 256 chars.", + "type": "string", + "example": "<BUNDLE_IDENTIFIER>" + } + }, + "required": [ + "name", + "bundleIdentifier" + ] + } + } + } + } + } + }, + "\/project\/platforms\/linux": { + "post": { + "summary": "Create project Linux platform", + "operationId": "projectCreateLinuxPlatform", + "tags": [ + "project" + ], + "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Linux", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformLinux" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/create-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": { + "platformId": { + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PLATFORM_ID>" + }, + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "packageName": { + "description": "Linux package name. Max length: 256 chars.", + "type": "string", + "example": "<PACKAGE_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/linux\/{platformId}": { + "put": { + "summary": "Update project Linux platform", + "operationId": "projectUpdateLinuxPlatform", + "tags": [ + "project" + ], + "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", + "responses": { + "200": { + "description": "Platform Linux", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformLinux" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/update-linux-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "packageName": { + "description": "Linux package name. Max length: 256 chars.", + "type": "string", + "example": "<PACKAGE_NAME>" + } + }, + "required": [ + "name", + "packageName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/web": { + "post": { + "summary": "Create project web platform", + "operationId": "projectCreateWebPlatform", + "tags": [ + "project" + ], + "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Web", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWeb" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/create-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": { + "platformId": { + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PLATFORM_ID>" + }, + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "hostname": { + "description": "Platform web hostname. Max length: 256 chars.", + "type": "string", + "example": "app.example.com" + } + }, + "required": [ + "platformId", + "name", + "hostname" + ] + } + } + } + } + } + }, + "\/project\/platforms\/web\/{platformId}": { + "put": { + "summary": "Update project web platform", + "operationId": "projectUpdateWebPlatform", + "tags": [ + "project" + ], + "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", + "responses": { + "200": { + "description": "Platform Web", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWeb" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/update-web-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "hostname": { + "description": "Platform web hostname. Max length: 256 chars.", + "type": "string", + "example": "app.example.com" + } + }, + "required": [ + "name", + "hostname" + ] + } + } + } + } + } + }, + "\/project\/platforms\/windows": { + "post": { + "summary": "Create project Windows platform", + "operationId": "projectCreateWindowsPlatform", + "tags": [ + "project" + ], + "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", + "responses": { + "201": { + "description": "Platform Windows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/create-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.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": { + "platformId": { + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<PLATFORM_ID>" + }, + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "packageIdentifierName": { + "description": "Windows package identifier name. Max length: 256 chars.", + "type": "string", + "example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "platformId", + "name", + "packageIdentifierName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/windows\/{platformId}": { + "put": { + "summary": "Update project Windows platform", + "operationId": "projectUpdateWindowsPlatform", + "tags": [ + "project" + ], + "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", + "responses": { + "200": { + "description": "Platform Windows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/platformWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/update-windows-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Platform name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "packageIdentifierName": { + "description": "Windows package identifier name. Max length: 256 chars.", + "type": "string", + "example": "<PACKAGE_IDENTIFIER_NAME>" + } + }, + "required": [ + "name", + "packageIdentifierName" + ] + } + } + } + } + } + }, + "\/project\/platforms\/{platformId}": { + "get": { + "summary": "Get project platform", + "operationId": "projectGetPlatform", + "tags": [ + "project" + ], + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", + "responses": { + "200": { + "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/get-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PLATFORM_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete project platform", + "operationId": "projectDeletePlatform", + "tags": [ + "project" + ], + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "platforms", + "demo": "project\/delete-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PLATFORM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/project\/policies": { + "get": { + "summary": "List project policies", + "operationId": "projectListPolicies", + "tags": [ + "project" + ], + "description": "Get a list of all project policies and their current configuration.", + "responses": { + "200": { + "description": "Policies List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/policyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/list-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.read", + "project.policies.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). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/project\/policies\/deny-aliased-email": { + "patch": { + "summary": "Update deny aliased email policy", + "operationId": "projectUpdateDenyAliasedEmailPolicy", + "tags": [ + "project" + ], + "description": "Configures if aliased emails such as subaddresses and emails with suffixes are denied during new users sign-ups and email updates.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-deny-aliased-email-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Set whether or not to block aliased emails during signup and email updates.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/deny-corporate-email": { + "patch": { + "summary": "Update deny non-corporate email policy", + "operationId": "projectUpdateDenyCorporateEmailPolicy", + "tags": [ + "project" + ], + "description": "Configures if only corporate email addresses (non-free and non-disposable domains) are allowed during new user sign-ups and email updates.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-deny-corporate-email-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Set whether or not to restrict sign-ups and email updates to corporate email addresses only.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/deny-disposable-email": { + "patch": { + "summary": "Update deny disposable email policy", + "operationId": "projectUpdateDenyDisposableEmailPolicy", + "tags": [ + "project" + ], + "description": "Configures if disposable emails from known temporary domains are denied during new users sign-ups and email updates.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-deny-disposable-email-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Set whether or not to block disposable email addresses during signup and email updates.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/deny-free-email": { + "patch": { + "summary": "Update deny free email policy", + "operationId": "projectUpdateDenyFreeEmailPolicy", + "tags": [ + "project" + ], + "description": "Configures if emails from free providers such as Gmail or Yahoo are denied during new users sign-ups and email updates.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-deny-free-email-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Set whether or not to block free email addresses during signup and email updates.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/membership-privacy": { + "patch": { + "summary": "Update membership privacy policy", + "operationId": "projectUpdateMembershipPrivacyPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-membership-privacy-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "userId": { + "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", + "type": "boolean", + "example": false + }, + "userEmail": { + "description": "Set to true if you want make user email visible to all team members, or false to hide it.", + "type": "boolean", + "example": false + }, + "userPhone": { + "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", + "type": "boolean", + "example": false + }, + "userName": { + "description": "Set to true if you want make user name visible to all team members, or false to hide it.", + "type": "boolean", + "example": false + }, + "userMFA": { + "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", + "type": "boolean", + "example": false + }, + "userAccessedAt": { + "description": "Set to true if you want make user last access time visible to all team members, or false to hide it.", + "type": "boolean", + "example": false + } + } + } + } + } + } + } + }, + "\/project\/policies\/mfa-factors": { + "patch": { + "summary": "Update MFA factors policy", + "operationId": "projectUpdateMFAFactorsPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control which factors users can use to complete an MFA challenge. Disabled factors cannot be used to create a challenge and are reported as unavailable when listing factors. The custom factor is disabled by default; enable it to deliver challenge codes through your own channel. Recovery codes always remain available as a fallback.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-mfa-factors-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "totp": { + "description": "Set to true to allow TOTP to complete an MFA challenge, or false to disable it.", + "type": "boolean", + "example": false + }, + "email": { + "description": "Set to true to allow email to complete an MFA challenge, or false to disable it.", + "type": "boolean", + "example": false + }, + "phone": { + "description": "Set to true to allow phone (SMS) to complete an MFA challenge, or false to disable it.", + "type": "boolean", + "example": false + }, + "custom": { + "description": "Set to true to allow the custom factor to complete an MFA challenge, or false to disable it.", + "type": "boolean", + "example": false + } + } + } + } + } + } + } + }, + "\/project\/policies\/password-dictionary": { + "patch": { + "summary": "Update password dictionary policy", + "operationId": "projectUpdatePasswordDictionaryPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-password-dictionary-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/password-history": { + "patch": { + "summary": "Update password history policy", + "operationId": "projectUpdatePasswordHistoryPolicy", + "tags": [ + "project" + ], + "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-password-history-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "total": { + "description": "Set the password history length per user. Value can be between 1 and 20, or null to disable the limit.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/password-personal-data": { + "patch": { + "summary": "Update password personal data policy", + "operationId": "projectUpdatePasswordPersonalDataPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-password-personal-data-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/password-pwned": { + "patch": { + "summary": "Update password pwned policy", + "operationId": "projectUpdatePasswordPwnedPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if passwords are checked against the Have I Been Pwned breach database. When enabled, every password a user signs up, signs in or resets with is checked and the result is recorded on the user as `passwordPwned`. On its own the policy only records. Enable `users` to reject a breached password when a user signs up or sets a new password, and `sessions` to refuse a sign-in with a breached password until it is reset. Only the first five characters of the password hash are ever shared with the service. Options left out keep their current value.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-password-pwned-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Toggle password pwned policy. Set to true to check passwords against known data breaches and record the result on the user, or false to never check. Default is true. On its own this only records; use `users` and `sessions` to block. When changing this policy, existing passwords remain valid.", + "type": "boolean", + "example": false + }, + "sessions": { + "description": "Whether a sign-in with a breached password is refused until the password is reset. Default is false, which allows the sign-in and only records the result.", + "type": "boolean", + "example": false + }, + "users": { + "description": "Whether a breached password is rejected when a user signs up or sets a new password. Default is false, which allows the password and only records the result.", + "type": "boolean", + "example": false + } + } + } + } + } + } + } + }, + "\/project\/policies\/password-strength": { + "patch": { + "summary": "Update password strength policy", + "operationId": "projectUpdatePasswordStrengthPolicy", + "tags": [ + "project" + ], + "description": "Update the password strength requirements for users in the project.", + "responses": { + "200": { + "description": "Policy Password Strength", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-password-strength-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "min": { + "description": "Minimum password length. Value must be between 8 and 256. Default is 8.", + "type": "integer", + "example": 8, + "format": "int32" + }, + "uppercase": { + "description": "Whether passwords must include at least one uppercase letter.", + "type": "boolean", + "example": false + }, + "lowercase": { + "description": "Whether passwords must include at least one lowercase letter.", + "type": "boolean", + "example": false + }, + "number": { + "description": "Whether passwords must include at least one number.", + "type": "boolean", + "example": false + }, + "symbols": { + "description": "Whether passwords must include at least one symbol.", + "type": "boolean", + "example": false + } + } + } + } + } + } + } + }, + "\/project\/policies\/session-alert": { + "patch": { + "summary": "Update session alert policy", + "operationId": "projectUpdateSessionAlertPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-session-alert-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-duration": { + "patch": { + "summary": "Update session duration policy", + "operationId": "projectUpdateSessionDurationPolicy", + "tags": [ + "project" + ], + "description": "Update maximum duration how long sessions created within a project should stay active for.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-session-duration-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "duration": { + "description": "Maximum session length in seconds. Minium allowed value is 60 seconds, and maximum is 1 year, which is 31536000 seconds.", + "type": "integer", + "example": 60, + "format": "int32" + } + }, + "required": [ + "duration" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-invalidation": { + "patch": { + "summary": "Update session invalidation policy", + "operationId": "projectUpdateSessionInvalidationPolicy", + "tags": [ + "project" + ], + "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-session-invalidation-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "enabled": { + "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/policies\/session-limit": { + "patch": { + "summary": "Update session limit policy", + "operationId": "projectUpdateSessionLimitPolicy", + "tags": [ + "project" + ], + "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-session-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "total": { + "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 100.", + "type": "integer", + "example": 1, + "format": "int32" + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/user-limit": { + "patch": { + "summary": "Update user limit policy", + "operationId": "projectUpdateUserLimitPolicy", + "tags": [ + "project" + ], + "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-user-limit-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.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": { + "total": { + "description": "Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + } + }, + "required": [ + "total" + ] + } + } + } + } + } + }, + "\/project\/policies\/{policyId}": { + "get": { + "summary": "Get project policy", + "operationId": "projectGetPolicy", + "tags": [ + "project" + ], + "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", + "responses": { + "200": { + "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Strength, or Policy Password Personal Data, or Policy Password Pwned, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy, or Policy MFA Factors, or Policy Deny Aliased Email, or Policy Deny Disposable Email, or Policy Deny Free Email, or Policy Deny Corporate Email", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/policyPasswordDictionary" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordHistory" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPersonalData" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPwned" + }, + { + "$ref": "#\/components\/schemas\/policySessionAlert" + }, + { + "$ref": "#\/components\/schemas\/policySessionDuration" + }, + { + "$ref": "#\/components\/schemas\/policySessionInvalidation" + }, + { + "$ref": "#\/components\/schemas\/policySessionLimit" + }, + { + "$ref": "#\/components\/schemas\/policyUserLimit" + }, + { + "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyMfaFactors" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyCorporateEmail" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", + "password-history": "#\/components\/schemas\/policyPasswordHistory", + "password-strength": "#\/components\/schemas\/policyPasswordStrength", + "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", + "password-pwned": "#\/components\/schemas\/policyPasswordPwned", + "session-alert": "#\/components\/schemas\/policySessionAlert", + "session-duration": "#\/components\/schemas\/policySessionDuration", + "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", + "session-limit": "#\/components\/schemas\/policySessionLimit", + "user-limit": "#\/components\/schemas\/policyUserLimit", + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", + "mfa-factors": "#\/components\/schemas\/policyMfaFactors", + "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", + "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail", + "deny-corporate-email": "#\/components\/schemas\/policyDenyCorporateEmail" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/get-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.read", + "project.policies.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, password-pwned, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, mfa-factors, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.", + "required": true, + "schema": { + "type": "string", + "example": "password-dictionary", + "title": "ProjectPolicyId", + "oneOf": [ + { + "type": "string", + "enum": [ + "password-dictionary" + ], + "title": "password-dictionary" + }, + { + "type": "string", + "enum": [ + "password-history" + ], + "title": "password-history" + }, + { + "type": "string", + "enum": [ + "password-strength" + ], + "title": "password-strength" + }, + { + "type": "string", + "enum": [ + "password-personal-data" + ], + "title": "password-personal-data" + }, + { + "type": "string", + "enum": [ + "password-pwned" + ], + "title": "password-pwned" + }, + { + "type": "string", + "enum": [ + "session-alert" + ], + "title": "session-alert" + }, + { + "type": "string", + "enum": [ + "session-duration" + ], + "title": "session-duration" + }, + { + "type": "string", + "enum": [ + "session-invalidation" + ], + "title": "session-invalidation" + }, + { + "type": "string", + "enum": [ + "session-limit" + ], + "title": "session-limit" + }, + { + "type": "string", + "enum": [ + "user-limit" + ], + "title": "user-limit" + }, + { + "type": "string", + "enum": [ + "membership-privacy" + ], + "title": "membership-privacy" + }, + { + "type": "string", + "enum": [ + "mfa-factors" + ], + "title": "mfa-factors" + }, + { + "type": "string", + "enum": [ + "deny-aliased-email" + ], + "title": "deny-aliased-email" + }, + { + "type": "string", + "enum": [ + "deny-disposable-email" + ], + "title": "deny-disposable-email" + }, + { + "type": "string", + "enum": [ + "deny-free-email" + ], + "title": "deny-free-email" + }, + { + "type": "string", + "enum": [ + "deny-corporate-email" + ], + "title": "deny-corporate-email" + } + ] + }, + "in": "path" + } + ] + } + }, + "\/project\/protocols\/{protocolId}": { + "patch": { + "summary": "Update project protocol", + "operationId": "projectUpdateProtocol", + "tags": [ + "project" + ], + "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "project\/update-protocol.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "protocolId", + "description": "Protocol name. Can be one of: rest, graphql, websocket", + "required": true, + "schema": { + "type": "string", + "example": "rest", + "title": "ProjectProtocolId", + "oneOf": [ + { + "type": "string", + "enum": [ + "rest" + ], + "title": "rest" + }, + { + "type": "string", + "enum": [ + "graphql" + ], + "title": "graphql" + }, + { + "type": "string", + "enum": [ + "websocket" + ], + "title": "websocket" + } + ] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "description": "Protocol status.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/services\/{serviceId}": { + "patch": { + "summary": "Update project service", + "operationId": "projectUpdateService", + "tags": [ + "project" + ], + "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "project\/update-service.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "serviceId", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor, oauth2", + "required": true, + "schema": { + "type": "string", + "example": "account", + "title": "ProjectServiceId", + "oneOf": [ + { + "type": "string", + "enum": [ + "account" + ], + "title": "account" + }, + { + "type": "string", + "enum": [ + "avatars" + ], + "title": "avatars" + }, + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "tablesdb" + ], + "title": "tablesdb" + }, + { + "type": "string", + "enum": [ + "locale" + ], + "title": "locale" + }, + { + "type": "string", + "enum": [ + "health" + ], + "title": "health" + }, + { + "type": "string", + "enum": [ + "project" + ], + "title": "project" + }, + { + "type": "string", + "enum": [ + "storage" + ], + "title": "storage" + }, + { + "type": "string", + "enum": [ + "teams" + ], + "title": "teams" + }, + { + "type": "string", + "enum": [ + "users" + ], + "title": "users" + }, + { + "type": "string", + "enum": [ + "vcs" + ], + "title": "vcs" + }, + { + "type": "string", + "enum": [ + "sites" + ], + "title": "sites" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "proxy" + ], + "title": "proxy" + }, + { + "type": "string", + "enum": [ + "graphql" + ], + "title": "graphql" + }, + { + "type": "string", + "enum": [ + "migrations" + ], + "title": "migrations" + }, + { + "type": "string", + "enum": [ + "messaging" + ], + "title": "messaging" + }, + { + "type": "string", + "enum": [ + "advisor" + ], + "title": "advisor" + }, + { + "type": "string", + "enum": [ + "oauth2" + ], + "title": "oauth2" + } + ] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "description": "Service status.", + "type": "boolean", + "example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, + "\/project\/smtp": { + "patch": { + "summary": "Update project SMTP configuration", + "operationId": "projectUpdateSMTP", + "tags": [ + "project" + ], + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "smtp", + "demo": "project\/update-smtp.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.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": { + "host": { + "description": "SMTP server hostname (domain)", + "type": "string", + "example": "example.com", + "nullable": true + }, + "port": { + "description": "SMTP server port", + "type": "integer", + "example": 587, + "format": "int32", + "nullable": true + }, + "username": { + "description": "SMTP server username. Pass an empty string to clear a previously set value.", + "type": "string", + "example": "<USERNAME>", + "nullable": true + }, + "password": { + "description": "SMTP server password. Pass an empty string to clear a previously set value. This property is stored securely and cannot be read in future (write-only).", + "type": "string", + "example": "password", + "format": "password", + "nullable": true + }, + "senderEmail": { + "description": "Email address shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "senderName": { + "description": "Name shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.", + "type": "string", + "example": "<SENDER_NAME>", + "nullable": true + }, + "replyToEmail": { + "description": "Email used when user replies to the email. Pass an empty string to clear a previously set value.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "replyToName": { + "description": "Name used when user replies to the email. Pass an empty string to clear a previously set value.", + "type": "string", + "example": "<REPLY_TO_NAME>", + "nullable": true + }, + "secure": { + "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", + "type": "string", + "example": "tls", + "title": "ProjectSMTPSecure", + "oneOf": [ + { + "type": "string", + "enum": [ + "tls" + ], + "title": "tls" + }, + { + "type": "string", + "enum": [ + "ssl" + ], + "title": "ssl" + } + ], + "nullable": true + }, + "enabled": { + "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + } + }, + "\/project\/smtp\/tests": { + "post": { + "summary": "Create project SMTP test", + "operationId": "projectCreateSMTPTest", + "tags": [ + "project" + ], + "description": "Send a test email to verify SMTP configuration. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "smtp", + "demo": "project\/create-smtp-test.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.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": { + "emails": { + "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "emails" + ] + } + } + } + } + } + }, + "\/project\/templates\/email": { + "get": { + "summary": "List project email templates", + "operationId": "projectListEmailTemplates", + "tags": [ + "project" + ], + "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", + "responses": { + "200": { + "description": "Email Templates List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplateList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "templates", + "demo": "project\/list-email-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.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). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "patch": { + "summary": "Update project email template", + "operationId": "projectUpdateEmailTemplate", + "tags": [ + "project" + ], + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", + "responses": { + "200": { + "description": "EmailTemplate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "templates", + "demo": "project\/update-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.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": { + "templateId": { + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery", + "type": "string", + "example": "verification", + "title": "ProjectEmailTemplateId", + "oneOf": [ + { + "type": "string", + "enum": [ + "verification" + ], + "title": "verification" + }, + { + "type": "string", + "enum": [ + "magicSession" + ], + "title": "magicSession" + }, + { + "type": "string", + "enum": [ + "recovery" + ], + "title": "recovery" + }, + { + "type": "string", + "enum": [ + "invitation" + ], + "title": "invitation" + }, + { + "type": "string", + "enum": [ + "mfaChallenge" + ], + "title": "mfaChallenge" + }, + { + "type": "string", + "enum": [ + "sessionAlert" + ], + "title": "sessionAlert" + }, + { + "type": "string", + "enum": [ + "otpSession" + ], + "title": "otpSession" + }, + { + "type": "string", + "enum": [ + "otpVerification" + ], + "title": "otpVerification" + }, + { + "type": "string", + "enum": [ + "otpRecovery" + ], + "title": "otpRecovery" + } + ] + }, + "locale": { + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "type": "string", + "example": "af", + "title": "ProjectEmailTemplateLocale", + "oneOf": [ + { + "type": "string", + "enum": [ + "af" + ], + "title": "af" + }, + { + "type": "string", + "enum": [ + "ar-ae" + ], + "title": "ar-ae" + }, + { + "type": "string", + "enum": [ + "ar-bh" + ], + "title": "ar-bh" + }, + { + "type": "string", + "enum": [ + "ar-dz" + ], + "title": "ar-dz" + }, + { + "type": "string", + "enum": [ + "ar-eg" + ], + "title": "ar-eg" + }, + { + "type": "string", + "enum": [ + "ar-iq" + ], + "title": "ar-iq" + }, + { + "type": "string", + "enum": [ + "ar-jo" + ], + "title": "ar-jo" + }, + { + "type": "string", + "enum": [ + "ar-kw" + ], + "title": "ar-kw" + }, + { + "type": "string", + "enum": [ + "ar-lb" + ], + "title": "ar-lb" + }, + { + "type": "string", + "enum": [ + "ar-ly" + ], + "title": "ar-ly" + }, + { + "type": "string", + "enum": [ + "ar-ma" + ], + "title": "ar-ma" + }, + { + "type": "string", + "enum": [ + "ar-om" + ], + "title": "ar-om" + }, + { + "type": "string", + "enum": [ + "ar-qa" + ], + "title": "ar-qa" + }, + { + "type": "string", + "enum": [ + "ar-sa" + ], + "title": "ar-sa" + }, + { + "type": "string", + "enum": [ + "ar-sy" + ], + "title": "ar-sy" + }, + { + "type": "string", + "enum": [ + "ar-tn" + ], + "title": "ar-tn" + }, + { + "type": "string", + "enum": [ + "ar-ye" + ], + "title": "ar-ye" + }, + { + "type": "string", + "enum": [ + "as" + ], + "title": "as" + }, + { + "type": "string", + "enum": [ + "az" + ], + "title": "az" + }, + { + "type": "string", + "enum": [ + "be" + ], + "title": "be" + }, + { + "type": "string", + "enum": [ + "bg" + ], + "title": "bg" + }, + { + "type": "string", + "enum": [ + "bh" + ], + "title": "bh" + }, + { + "type": "string", + "enum": [ + "bn" + ], + "title": "bn" + }, + { + "type": "string", + "enum": [ + "bs" + ], + "title": "bs" + }, + { + "type": "string", + "enum": [ + "ca" + ], + "title": "ca" + }, + { + "type": "string", + "enum": [ + "cs" + ], + "title": "cs" + }, + { + "type": "string", + "enum": [ + "cy" + ], + "title": "cy" + }, + { + "type": "string", + "enum": [ + "da" + ], + "title": "da" + }, + { + "type": "string", + "enum": [ + "de" + ], + "title": "de" + }, + { + "type": "string", + "enum": [ + "de-at" + ], + "title": "de-at" + }, + { + "type": "string", + "enum": [ + "de-ch" + ], + "title": "de-ch" + }, + { + "type": "string", + "enum": [ + "de-li" + ], + "title": "de-li" + }, + { + "type": "string", + "enum": [ + "de-lu" + ], + "title": "de-lu" + }, + { + "type": "string", + "enum": [ + "el" + ], + "title": "el" + }, + { + "type": "string", + "enum": [ + "en" + ], + "title": "en" + }, + { + "type": "string", + "enum": [ + "en-au" + ], + "title": "en-au" + }, + { + "type": "string", + "enum": [ + "en-bz" + ], + "title": "en-bz" + }, + { + "type": "string", + "enum": [ + "en-ca" + ], + "title": "en-ca" + }, + { + "type": "string", + "enum": [ + "en-gb" + ], + "title": "en-gb" + }, + { + "type": "string", + "enum": [ + "en-ie" + ], + "title": "en-ie" + }, + { + "type": "string", + "enum": [ + "en-jm" + ], + "title": "en-jm" + }, + { + "type": "string", + "enum": [ + "en-nz" + ], + "title": "en-nz" + }, + { + "type": "string", + "enum": [ + "en-tt" + ], + "title": "en-tt" + }, + { + "type": "string", + "enum": [ + "en-us" + ], + "title": "en-us" + }, + { + "type": "string", + "enum": [ + "en-za" + ], + "title": "en-za" + }, + { + "type": "string", + "enum": [ + "eo" + ], + "title": "eo" + }, + { + "type": "string", + "enum": [ + "es" + ], + "title": "es" + }, + { + "type": "string", + "enum": [ + "es-ar" + ], + "title": "es-ar" + }, + { + "type": "string", + "enum": [ + "es-bo" + ], + "title": "es-bo" + }, + { + "type": "string", + "enum": [ + "es-cl" + ], + "title": "es-cl" + }, + { + "type": "string", + "enum": [ + "es-co" + ], + "title": "es-co" + }, + { + "type": "string", + "enum": [ + "es-cr" + ], + "title": "es-cr" + }, + { + "type": "string", + "enum": [ + "es-do" + ], + "title": "es-do" + }, + { + "type": "string", + "enum": [ + "es-ec" + ], + "title": "es-ec" + }, + { + "type": "string", + "enum": [ + "es-gt" + ], + "title": "es-gt" + }, + { + "type": "string", + "enum": [ + "es-hn" + ], + "title": "es-hn" + }, + { + "type": "string", + "enum": [ + "es-mx" + ], + "title": "es-mx" + }, + { + "type": "string", + "enum": [ + "es-ni" + ], + "title": "es-ni" + }, + { + "type": "string", + "enum": [ + "es-pa" + ], + "title": "es-pa" + }, + { + "type": "string", + "enum": [ + "es-pe" + ], + "title": "es-pe" + }, + { + "type": "string", + "enum": [ + "es-pr" + ], + "title": "es-pr" + }, + { + "type": "string", + "enum": [ + "es-py" + ], + "title": "es-py" + }, + { + "type": "string", + "enum": [ + "es-sv" + ], + "title": "es-sv" + }, + { + "type": "string", + "enum": [ + "es-uy" + ], + "title": "es-uy" + }, + { + "type": "string", + "enum": [ + "es-ve" + ], + "title": "es-ve" + }, + { + "type": "string", + "enum": [ + "et" + ], + "title": "et" + }, + { + "type": "string", + "enum": [ + "eu" + ], + "title": "eu" + }, + { + "type": "string", + "enum": [ + "fa" + ], + "title": "fa" + }, + { + "type": "string", + "enum": [ + "fi" + ], + "title": "fi" + }, + { + "type": "string", + "enum": [ + "fo" + ], + "title": "fo" + }, + { + "type": "string", + "enum": [ + "fr" + ], + "title": "fr" + }, + { + "type": "string", + "enum": [ + "fr-be" + ], + "title": "fr-be" + }, + { + "type": "string", + "enum": [ + "fr-ca" + ], + "title": "fr-ca" + }, + { + "type": "string", + "enum": [ + "fr-ch" + ], + "title": "fr-ch" + }, + { + "type": "string", + "enum": [ + "fr-lu" + ], + "title": "fr-lu" + }, + { + "type": "string", + "enum": [ + "ga" + ], + "title": "ga" + }, + { + "type": "string", + "enum": [ + "gd" + ], + "title": "gd" + }, + { + "type": "string", + "enum": [ + "he" + ], + "title": "he" + }, + { + "type": "string", + "enum": [ + "hi" + ], + "title": "hi" + }, + { + "type": "string", + "enum": [ + "hr" + ], + "title": "hr" + }, + { + "type": "string", + "enum": [ + "hu" + ], + "title": "hu" + }, + { + "type": "string", + "enum": [ + "id" + ], + "title": "id" + }, + { + "type": "string", + "enum": [ + "is" + ], + "title": "is" + }, + { + "type": "string", + "enum": [ + "it" + ], + "title": "it" + }, + { + "type": "string", + "enum": [ + "it-ch" + ], + "title": "it-ch" + }, + { + "type": "string", + "enum": [ + "ja" + ], + "title": "ja" + }, + { + "type": "string", + "enum": [ + "ji" + ], + "title": "ji" + }, + { + "type": "string", + "enum": [ + "ko" + ], + "title": "ko" + }, + { + "type": "string", + "enum": [ + "ku" + ], + "title": "ku" + }, + { + "type": "string", + "enum": [ + "lt" + ], + "title": "lt" + }, + { + "type": "string", + "enum": [ + "lv" + ], + "title": "lv" + }, + { + "type": "string", + "enum": [ + "mk" + ], + "title": "mk" + }, + { + "type": "string", + "enum": [ + "ml" + ], + "title": "ml" + }, + { + "type": "string", + "enum": [ + "ms" + ], + "title": "ms" + }, + { + "type": "string", + "enum": [ + "mt" + ], + "title": "mt" + }, + { + "type": "string", + "enum": [ + "nb" + ], + "title": "nb" + }, + { + "type": "string", + "enum": [ + "ne" + ], + "title": "ne" + }, + { + "type": "string", + "enum": [ + "nl" + ], + "title": "nl" + }, + { + "type": "string", + "enum": [ + "nl-be" + ], + "title": "nl-be" + }, + { + "type": "string", + "enum": [ + "nn" + ], + "title": "nn" + }, + { + "type": "string", + "enum": [ + "no" + ], + "title": "no" + }, + { + "type": "string", + "enum": [ + "pa" + ], + "title": "pa" + }, + { + "type": "string", + "enum": [ + "pl" + ], + "title": "pl" + }, + { + "type": "string", + "enum": [ + "pt" + ], + "title": "pt" + }, + { + "type": "string", + "enum": [ + "pt-br" + ], + "title": "pt-br" + }, + { + "type": "string", + "enum": [ + "rm" + ], + "title": "rm" + }, + { + "type": "string", + "enum": [ + "ro" + ], + "title": "ro" + }, + { + "type": "string", + "enum": [ + "ro-md" + ], + "title": "ro-md" + }, + { + "type": "string", + "enum": [ + "ru" + ], + "title": "ru" + }, + { + "type": "string", + "enum": [ + "ru-md" + ], + "title": "ru-md" + }, + { + "type": "string", + "enum": [ + "sb" + ], + "title": "sb" + }, + { + "type": "string", + "enum": [ + "sk" + ], + "title": "sk" + }, + { + "type": "string", + "enum": [ + "sl" + ], + "title": "sl" + }, + { + "type": "string", + "enum": [ + "sq" + ], + "title": "sq" + }, + { + "type": "string", + "enum": [ + "sr" + ], + "title": "sr" + }, + { + "type": "string", + "enum": [ + "sv" + ], + "title": "sv" + }, + { + "type": "string", + "enum": [ + "sv-fi" + ], + "title": "sv-fi" + }, + { + "type": "string", + "enum": [ + "th" + ], + "title": "th" + }, + { + "type": "string", + "enum": [ + "tn" + ], + "title": "tn" + }, + { + "type": "string", + "enum": [ + "tr" + ], + "title": "tr" + }, + { + "type": "string", + "enum": [ + "ts" + ], + "title": "ts" + }, + { + "type": "string", + "enum": [ + "ua" + ], + "title": "ua" + }, + { + "type": "string", + "enum": [ + "ur" + ], + "title": "ur" + }, + { + "type": "string", + "enum": [ + "ve" + ], + "title": "ve" + }, + { + "type": "string", + "enum": [ + "vi" + ], + "title": "vi" + }, + { + "type": "string", + "enum": [ + "xh" + ], + "title": "xh" + }, + { + "type": "string", + "enum": [ + "zh-cn" + ], + "title": "zh-cn" + }, + { + "type": "string", + "enum": [ + "zh-hk" + ], + "title": "zh-hk" + }, + { + "type": "string", + "enum": [ + "zh-sg" + ], + "title": "zh-sg" + }, + { + "type": "string", + "enum": [ + "zh-tw" + ], + "title": "zh-tw" + }, + { + "type": "string", + "enum": [ + "zu" + ], + "title": "zu" + } + ] + }, + "subject": { + "description": "Subject of the email template. Can be up to 255 characters.", + "type": "string", + "example": "<SUBJECT>", + "nullable": true + }, + "message": { + "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", + "type": "string", + "example": "<MESSAGE>", + "nullable": true + }, + "senderName": { + "description": "Name of the email sender.", + "type": "string", + "example": "<SENDER_NAME>", + "nullable": true + }, + "senderEmail": { + "description": "Email of the sender. Pass an empty string to clear a previously set value.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "replyToEmail": { + "description": "Reply to email. Pass an empty string to clear a previously set value.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "replyToName": { + "description": "Reply to name.", + "type": "string", + "example": "<REPLY_TO_NAME>", + "nullable": true + } + }, + "required": [ + "templateId" + ] + } + } + } + } + } + }, + "\/project\/templates\/email\/{templateId}": { + "get": { + "summary": "Get project email template", + "operationId": "projectGetEmailTemplate", + "tags": [ + "project" + ], + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", + "responses": { + "200": { + "description": "EmailTemplate", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/emailTemplate" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "templates", + "demo": "project\/get-email-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "templates.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery", + "required": true, + "schema": { + "type": "string", + "example": "verification", + "title": "ProjectEmailTemplateId", + "oneOf": [ + { + "type": "string", + "enum": [ + "verification" + ], + "title": "verification" + }, + { + "type": "string", + "enum": [ + "magicSession" + ], + "title": "magicSession" + }, + { + "type": "string", + "enum": [ + "recovery" + ], + "title": "recovery" + }, + { + "type": "string", + "enum": [ + "invitation" + ], + "title": "invitation" + }, + { + "type": "string", + "enum": [ + "mfaChallenge" + ], + "title": "mfaChallenge" + }, + { + "type": "string", + "enum": [ + "sessionAlert" + ], + "title": "sessionAlert" + }, + { + "type": "string", + "enum": [ + "otpSession" + ], + "title": "otpSession" + }, + { + "type": "string", + "enum": [ + "otpVerification" + ], + "title": "otpVerification" + }, + { + "type": "string", + "enum": [ + "otpRecovery" + ], + "title": "otpRecovery" + } + ] + }, + "in": "path" + }, + { + "name": "locale", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "required": false, + "schema": { + "type": "string", + "example": "af", + "title": "ProjectEmailTemplateLocale", + "oneOf": [ + { + "type": "string", + "enum": [ + "af" + ], + "title": "af" + }, + { + "type": "string", + "enum": [ + "ar-ae" + ], + "title": "ar-ae" + }, + { + "type": "string", + "enum": [ + "ar-bh" + ], + "title": "ar-bh" + }, + { + "type": "string", + "enum": [ + "ar-dz" + ], + "title": "ar-dz" + }, + { + "type": "string", + "enum": [ + "ar-eg" + ], + "title": "ar-eg" + }, + { + "type": "string", + "enum": [ + "ar-iq" + ], + "title": "ar-iq" + }, + { + "type": "string", + "enum": [ + "ar-jo" + ], + "title": "ar-jo" + }, + { + "type": "string", + "enum": [ + "ar-kw" + ], + "title": "ar-kw" + }, + { + "type": "string", + "enum": [ + "ar-lb" + ], + "title": "ar-lb" + }, + { + "type": "string", + "enum": [ + "ar-ly" + ], + "title": "ar-ly" + }, + { + "type": "string", + "enum": [ + "ar-ma" + ], + "title": "ar-ma" + }, + { + "type": "string", + "enum": [ + "ar-om" + ], + "title": "ar-om" + }, + { + "type": "string", + "enum": [ + "ar-qa" + ], + "title": "ar-qa" + }, + { + "type": "string", + "enum": [ + "ar-sa" + ], + "title": "ar-sa" + }, + { + "type": "string", + "enum": [ + "ar-sy" + ], + "title": "ar-sy" + }, + { + "type": "string", + "enum": [ + "ar-tn" + ], + "title": "ar-tn" + }, + { + "type": "string", + "enum": [ + "ar-ye" + ], + "title": "ar-ye" + }, + { + "type": "string", + "enum": [ + "as" + ], + "title": "as" + }, + { + "type": "string", + "enum": [ + "az" + ], + "title": "az" + }, + { + "type": "string", + "enum": [ + "be" + ], + "title": "be" + }, + { + "type": "string", + "enum": [ + "bg" + ], + "title": "bg" + }, + { + "type": "string", + "enum": [ + "bh" + ], + "title": "bh" + }, + { + "type": "string", + "enum": [ + "bn" + ], + "title": "bn" + }, + { + "type": "string", + "enum": [ + "bs" + ], + "title": "bs" + }, + { + "type": "string", + "enum": [ + "ca" + ], + "title": "ca" + }, + { + "type": "string", + "enum": [ + "cs" + ], + "title": "cs" + }, + { + "type": "string", + "enum": [ + "cy" + ], + "title": "cy" + }, + { + "type": "string", + "enum": [ + "da" + ], + "title": "da" + }, + { + "type": "string", + "enum": [ + "de" + ], + "title": "de" + }, + { + "type": "string", + "enum": [ + "de-at" + ], + "title": "de-at" + }, + { + "type": "string", + "enum": [ + "de-ch" + ], + "title": "de-ch" + }, + { + "type": "string", + "enum": [ + "de-li" + ], + "title": "de-li" + }, + { + "type": "string", + "enum": [ + "de-lu" + ], + "title": "de-lu" + }, + { + "type": "string", + "enum": [ + "el" + ], + "title": "el" + }, + { + "type": "string", + "enum": [ + "en" + ], + "title": "en" + }, + { + "type": "string", + "enum": [ + "en-au" + ], + "title": "en-au" + }, + { + "type": "string", + "enum": [ + "en-bz" + ], + "title": "en-bz" + }, + { + "type": "string", + "enum": [ + "en-ca" + ], + "title": "en-ca" + }, + { + "type": "string", + "enum": [ + "en-gb" + ], + "title": "en-gb" + }, + { + "type": "string", + "enum": [ + "en-ie" + ], + "title": "en-ie" + }, + { + "type": "string", + "enum": [ + "en-jm" + ], + "title": "en-jm" + }, + { + "type": "string", + "enum": [ + "en-nz" + ], + "title": "en-nz" + }, + { + "type": "string", + "enum": [ + "en-tt" + ], + "title": "en-tt" + }, + { + "type": "string", + "enum": [ + "en-us" + ], + "title": "en-us" + }, + { + "type": "string", + "enum": [ + "en-za" + ], + "title": "en-za" + }, + { + "type": "string", + "enum": [ + "eo" + ], + "title": "eo" + }, + { + "type": "string", + "enum": [ + "es" + ], + "title": "es" + }, + { + "type": "string", + "enum": [ + "es-ar" + ], + "title": "es-ar" + }, + { + "type": "string", + "enum": [ + "es-bo" + ], + "title": "es-bo" + }, + { + "type": "string", + "enum": [ + "es-cl" + ], + "title": "es-cl" + }, + { + "type": "string", + "enum": [ + "es-co" + ], + "title": "es-co" + }, + { + "type": "string", + "enum": [ + "es-cr" + ], + "title": "es-cr" + }, + { + "type": "string", + "enum": [ + "es-do" + ], + "title": "es-do" + }, + { + "type": "string", + "enum": [ + "es-ec" + ], + "title": "es-ec" + }, + { + "type": "string", + "enum": [ + "es-gt" + ], + "title": "es-gt" + }, + { + "type": "string", + "enum": [ + "es-hn" + ], + "title": "es-hn" + }, + { + "type": "string", + "enum": [ + "es-mx" + ], + "title": "es-mx" + }, + { + "type": "string", + "enum": [ + "es-ni" + ], + "title": "es-ni" + }, + { + "type": "string", + "enum": [ + "es-pa" + ], + "title": "es-pa" + }, + { + "type": "string", + "enum": [ + "es-pe" + ], + "title": "es-pe" + }, + { + "type": "string", + "enum": [ + "es-pr" + ], + "title": "es-pr" + }, + { + "type": "string", + "enum": [ + "es-py" + ], + "title": "es-py" + }, + { + "type": "string", + "enum": [ + "es-sv" + ], + "title": "es-sv" + }, + { + "type": "string", + "enum": [ + "es-uy" + ], + "title": "es-uy" + }, + { + "type": "string", + "enum": [ + "es-ve" + ], + "title": "es-ve" + }, + { + "type": "string", + "enum": [ + "et" + ], + "title": "et" + }, + { + "type": "string", + "enum": [ + "eu" + ], + "title": "eu" + }, + { + "type": "string", + "enum": [ + "fa" + ], + "title": "fa" + }, + { + "type": "string", + "enum": [ + "fi" + ], + "title": "fi" + }, + { + "type": "string", + "enum": [ + "fo" + ], + "title": "fo" + }, + { + "type": "string", + "enum": [ + "fr" + ], + "title": "fr" + }, + { + "type": "string", + "enum": [ + "fr-be" + ], + "title": "fr-be" + }, + { + "type": "string", + "enum": [ + "fr-ca" + ], + "title": "fr-ca" + }, + { + "type": "string", + "enum": [ + "fr-ch" + ], + "title": "fr-ch" + }, + { + "type": "string", + "enum": [ + "fr-lu" + ], + "title": "fr-lu" + }, + { + "type": "string", + "enum": [ + "ga" + ], + "title": "ga" + }, + { + "type": "string", + "enum": [ + "gd" + ], + "title": "gd" + }, + { + "type": "string", + "enum": [ + "he" + ], + "title": "he" + }, + { + "type": "string", + "enum": [ + "hi" + ], + "title": "hi" + }, + { + "type": "string", + "enum": [ + "hr" + ], + "title": "hr" + }, + { + "type": "string", + "enum": [ + "hu" + ], + "title": "hu" + }, + { + "type": "string", + "enum": [ + "id" + ], + "title": "id" + }, + { + "type": "string", + "enum": [ + "is" + ], + "title": "is" + }, + { + "type": "string", + "enum": [ + "it" + ], + "title": "it" + }, + { + "type": "string", + "enum": [ + "it-ch" + ], + "title": "it-ch" + }, + { + "type": "string", + "enum": [ + "ja" + ], + "title": "ja" + }, + { + "type": "string", + "enum": [ + "ji" + ], + "title": "ji" + }, + { + "type": "string", + "enum": [ + "ko" + ], + "title": "ko" + }, + { + "type": "string", + "enum": [ + "ku" + ], + "title": "ku" + }, + { + "type": "string", + "enum": [ + "lt" + ], + "title": "lt" + }, + { + "type": "string", + "enum": [ + "lv" + ], + "title": "lv" + }, + { + "type": "string", + "enum": [ + "mk" + ], + "title": "mk" + }, + { + "type": "string", + "enum": [ + "ml" + ], + "title": "ml" + }, + { + "type": "string", + "enum": [ + "ms" + ], + "title": "ms" + }, + { + "type": "string", + "enum": [ + "mt" + ], + "title": "mt" + }, + { + "type": "string", + "enum": [ + "nb" + ], + "title": "nb" + }, + { + "type": "string", + "enum": [ + "ne" + ], + "title": "ne" + }, + { + "type": "string", + "enum": [ + "nl" + ], + "title": "nl" + }, + { + "type": "string", + "enum": [ + "nl-be" + ], + "title": "nl-be" + }, + { + "type": "string", + "enum": [ + "nn" + ], + "title": "nn" + }, + { + "type": "string", + "enum": [ + "no" + ], + "title": "no" + }, + { + "type": "string", + "enum": [ + "pa" + ], + "title": "pa" + }, + { + "type": "string", + "enum": [ + "pl" + ], + "title": "pl" + }, + { + "type": "string", + "enum": [ + "pt" + ], + "title": "pt" + }, + { + "type": "string", + "enum": [ + "pt-br" + ], + "title": "pt-br" + }, + { + "type": "string", + "enum": [ + "rm" + ], + "title": "rm" + }, + { + "type": "string", + "enum": [ + "ro" + ], + "title": "ro" + }, + { + "type": "string", + "enum": [ + "ro-md" + ], + "title": "ro-md" + }, + { + "type": "string", + "enum": [ + "ru" + ], + "title": "ru" + }, + { + "type": "string", + "enum": [ + "ru-md" + ], + "title": "ru-md" + }, + { + "type": "string", + "enum": [ + "sb" + ], + "title": "sb" + }, + { + "type": "string", + "enum": [ + "sk" + ], + "title": "sk" + }, + { + "type": "string", + "enum": [ + "sl" + ], + "title": "sl" + }, + { + "type": "string", + "enum": [ + "sq" + ], + "title": "sq" + }, + { + "type": "string", + "enum": [ + "sr" + ], + "title": "sr" + }, + { + "type": "string", + "enum": [ + "sv" + ], + "title": "sv" + }, + { + "type": "string", + "enum": [ + "sv-fi" + ], + "title": "sv-fi" + }, + { + "type": "string", + "enum": [ + "th" + ], + "title": "th" + }, + { + "type": "string", + "enum": [ + "tn" + ], + "title": "tn" + }, + { + "type": "string", + "enum": [ + "tr" + ], + "title": "tr" + }, + { + "type": "string", + "enum": [ + "ts" + ], + "title": "ts" + }, + { + "type": "string", + "enum": [ + "ua" + ], + "title": "ua" + }, + { + "type": "string", + "enum": [ + "ur" + ], + "title": "ur" + }, + { + "type": "string", + "enum": [ + "ve" + ], + "title": "ve" + }, + { + "type": "string", + "enum": [ + "vi" + ], + "title": "vi" + }, + { + "type": "string", + "enum": [ + "xh" + ], + "title": "xh" + }, + { + "type": "string", + "enum": [ + "zh-cn" + ], + "title": "zh-cn" + }, + { + "type": "string", + "enum": [ + "zh-hk" + ], + "title": "zh-hk" + }, + { + "type": "string", + "enum": [ + "zh-sg" + ], + "title": "zh-sg" + }, + { + "type": "string", + "enum": [ + "zh-tw" + ], + "title": "zh-tw" + }, + { + "type": "string", + "enum": [ + "zu" + ], + "title": "zu" + } + ] + }, + "in": "query" + } + ] + } + }, + "\/project\/variables": { + "get": { + "summary": "List project variables", + "operationId": "projectListVariables", + "tags": [ + "project" + ], + "description": "Get a list of all project environment variables.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "project\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.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: key, resourceType, resourceId, secret", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project variable", + "operationId": "projectCreateVariable", + "tags": [ + "project" + ], + "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "project\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.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": { + "variableId": { + "description": "Variable unique ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<VARIABLE_ID>" + }, + "key": { + "description": "Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.", + "type": "string", + "example": "<KEY>" + }, + "value": { + "description": "Variable value. Max length: 8192 chars.", + "type": "string", + "example": "<VALUE>" + }, + "secret": { + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "variableId", + "key", + "value" + ] + } + } + } + } + } + }, + "\/project\/variables\/{variableId}": { + "get": { + "summary": "Get project variable", + "operationId": "projectGetVariable", + "tags": [ + "project" + ], + "description": "Get a variable by its unique ID. ", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "project\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update project variable", + "operationId": "projectUpdateVariable", + "tags": [ + "project" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "project\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.", + "type": "string", + "example": "<KEY>", + "nullable": true + }, + "value": { + "description": "Variable value. Max length: 8192 chars.", + "type": "string", + "example": "<VALUE>", + "nullable": true + }, + "secret": { + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete project variable", + "operationId": "projectDeleteVariable", + "tags": [ + "project" + ], + "description": "Delete a variable by its unique ID. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "project\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/addons": { + "get": { + "summary": "List project addons", + "operationId": "projectsListAddons", + "tags": [ + "projects" + ], + "description": "List all billing addons for a project.\n", + "responses": { + "200": { + "description": "Addons list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addonList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "projects\/list-addons.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/addons\/premium-geo-db": { + "post": { + "summary": "Create Premium Geo DB addon for project", + "operationId": "projectsCreatePremiumGeoDBAddon", + "tags": [ + "projects" + ], + "description": "Create a Premium Geo DB addon for a project.\n", + "responses": { + "201": { + "description": "Addon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "projects\/create-premium-geo-db-addon.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/addons\/{addonId}": { + "get": { + "summary": "Get project addon", + "operationId": "projectsGetAddon", + "tags": [ + "projects" + ], + "description": "Get the details of a billing addon for a project.\n", + "responses": { + "200": { + "description": "Addon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "projects\/get-addon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "example": "<ADDON_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete project addon", + "operationId": "projectsDeleteAddon", + "tags": [ + "projects" + ], + "description": "Delete a billing addon for a project.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "projects\/delete-addon.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "example": "<ADDON_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/addons\/{addonId}\/confirmations": { + "post": { + "summary": "Confirm project addon payment after 3DS authentication", + "operationId": "projectsConfirmAddonPayment", + "tags": [ + "projects" + ], + "description": "Confirm payment for a billing addon for a project.\n", + "responses": { + "200": { + "description": "Addon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "projects\/confirm-addon-payment.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "example": "<ADDON_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/addons\/{addon}\/price": { + "get": { + "summary": "Get project addon price", + "operationId": "projectsGetAddonPrice", + "tags": [ + "projects" + ], + "description": "Get the price details for a billing addon for a project, including the prorated amount for the remaining days in the current billing cycle.\n", + "responses": { + "200": { + "description": "AddonPrice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addonPrice" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "projects\/get-addon-price.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "addon", + "description": "Addon key identifier (e.g. premiumGeoDB).", + "required": true, + "schema": { + "type": "string", + "example": "baa" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/console-access": { + "patch": { + "summary": "Record console access to a project", + "operationId": "projectsUpdateConsoleAccess", + "tags": [ + "projects" + ], + "description": "Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "projects\/update-console-access.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/schedules": { + "get": { + "summary": "List schedules", + "operationId": "projectsListSchedules", + "tags": [ + "projects" + ], + "description": "Get a list of all the project's schedules. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Schedules List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/scheduleList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "schedules", + "demo": "projects\/list-schedules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: resourceType, resourceId, projectId, schedule, active, region", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create schedule", + "operationId": "projectsCreateSchedule", + "tags": [ + "projects" + ], + "description": "Create a new schedule for a resource.", + "responses": { + "201": { + "description": "Schedule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/schedule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "schedules", + "demo": "projects\/create-schedule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "description": "The resource type for the schedule. Possible values: function, execution, message, backup.", + "type": "string", + "example": "function", + "title": "ScheduleResourceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "function" + ], + "title": "function" + }, + { + "type": "string", + "enum": [ + "execution" + ], + "title": "execution" + }, + { + "type": "string", + "enum": [ + "message" + ], + "title": "message" + }, + { + "type": "string", + "enum": [ + "backup" + ], + "title": "backup" + } + ] + }, + "resourceId": { + "description": "The resource ID to associate with this schedule.", + "type": "string", + "example": "<RESOURCE_ID>" + }, + "schedule": { + "description": "Schedule CRON expression.", + "type": "string", + "example": "0 0 * * *" + }, + "active": { + "description": "Whether the schedule is active.", + "type": "boolean", + "default": false, + "example": false + }, + "data": { + "description": "Schedule data as a JSON string. Used to store resource-specific context needed for execution.", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "resourceType", + "resourceId", + "schedule" + ] + } + } + } + } + } + }, + "\/projects\/{projectId}\/schedules\/{scheduleId}": { + "get": { + "summary": "Get schedule", + "operationId": "projectsGetSchedule", + "tags": [ + "projects" + ], + "description": "Get a schedule by its unique ID.", + "responses": { + "200": { + "description": "Schedule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/schedule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "schedules", + "demo": "projects\/get-schedule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "schedules.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "scheduleId", + "description": "Schedule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SCHEDULE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/stages": { + "get": { + "summary": "List stages", + "operationId": "projectsListStages", + "tags": [ + "projects" + ], + "description": "Get the onboarding stages for the current project, including each stage\u2019s SDK method key and status (for example pending, completed, or skipped).\n", + "responses": { + "200": { + "description": "Stages List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/stageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "stages", + "demo": "projects\/list-stages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "stages.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/stages\/{stageId}": { + "patch": { + "summary": "Update stage", + "operationId": "projectsUpdateStage", + "tags": [ + "projects" + ], + "description": "Update an onboarding stage for the current project. Use this endpoint to skip a stage or leave it unchanged without performing the related API action.\n", + "responses": { + "200": { + "description": "Stage", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/stage" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "stages", + "demo": "projects\/update-stage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "stages.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "stageId", + "description": "SDK method key (namespace.method).", + "required": true, + "schema": { + "type": "string", + "example": "<STAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "skip": { + "description": "Mark the stage as skipped.", + "type": "boolean", + "default": true, + "example": false + } + } + } + } + } + } + } + }, + "\/projects\/{projectId}\/status": { + "patch": { + "summary": "Update the status of a project", + "operationId": "projectsUpdateStatus", + "tags": [ + "projects" + ], + "description": "Update the status of a project. Can be used to archive\/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "projects\/update-status.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "description": "New status for the project", + "type": "string", + "example": "active", + "title": "Status", + "oneOf": [ + { + "type": "string", + "enum": [ + "active" + ], + "title": "active" + } + ] + } + }, + "required": [ + "status" + ] + } + } + } + } + } + }, + "\/projects\/{projectId}\/team": { + "patch": { + "summary": "Update project team", + "operationId": "projectsUpdateTeam", + "tags": [ + "projects" + ], + "description": "Update the team ID of a project allowing for it to be transferred to another team.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "projects", + "demo": "projects\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "description": "Team ID of the team to transfer project to.", + "type": "string", + "example": "<TEAM_ID>" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/proxy\/invalidations": { + "post": { + "summary": "Create invalidation", + "operationId": "proxyCreateInvalidation", + "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.", + "responses": { + "201": { + "description": "Invalidation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyInvalidation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "proxy\/create-invalidation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "proxy.invalidations.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": { + "domain": { + "description": "Domain name.", + "type": "string", + "example": "example.com" + }, + "type": { + "description": "Type of reference passed. Allowed values are: tag, path, all", + "type": "string", + "example": "tag", + "title": "InvalidationType", + "oneOf": [ + { + "type": "string", + "enum": [ + "tag" + ], + "title": "tag" + }, + { + "type": "string", + "enum": [ + "path" + ], + "title": "path" + }, + { + "type": "string", + "enum": [ + "all" + ], + "title": "all" + } + ] + }, + "reference": { + "description": "Reference to invalidate. Depending on type this can be: cache tag name (up to 128 characters), URL path (up to 2048 characters). Not required when type is all.", + "type": "string", + "default": "", + "example": "<REFERENCE>" + } + }, + "required": [ + "domain", + "type" + ] + } + } + } + } + } + }, + "\/proxy\/rules": { + "get": { + "summary": "List rules", + "operationId": "proxyListRules", + "tags": [ + "proxy" + ], + "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rule List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRuleList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "proxy\/list-rules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/proxy\/rules\/api": { + "post": { + "summary": "Create API rule", + "operationId": "proxyCreateAPIRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for serving Appwrite's API on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "proxy\/create-api-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.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": { + "domain": { + "description": "Domain name.", + "type": "string", + "example": "example.com" + } + }, + "required": [ + "domain" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/function": { + "post": { + "summary": "Create function rule", + "operationId": "proxyCreateFunctionRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for executing Appwrite Function on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "proxy\/create-function-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.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": { + "domain": { + "description": "Domain name.", + "type": "string", + "example": "example.com" + }, + "functionId": { + "description": "ID of function to be executed.", + "type": "string", + "example": "<FUNCTION_ID>" + }, + "branch": { + "description": "Name of VCS branch to deploy changes automatically", + "type": "string", + "default": "", + "example": "<BRANCH>" + } + }, + "required": [ + "domain", + "functionId" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/redirect": { + "post": { + "summary": "Create redirect rule", + "operationId": "proxyCreateRedirectRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for to redirect from custom domain to another domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "proxy\/create-redirect-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.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": { + "domain": { + "description": "Domain name.", + "type": "string", + "example": "example.com" + }, + "url": { + "description": "Target URL of redirection", + "type": "string", + "example": "https:\/\/example.com", + "format": "url" + }, + "statusCode": { + "description": "Status code of redirection", + "type": "string", + "example": "301", + "title": "StatusCode", + "oneOf": [ + { + "type": "string", + "enum": [ + "301" + ], + "title": "MovedPermanently" + }, + { + "type": "string", + "enum": [ + "302" + ], + "title": "Found" + }, + { + "type": "string", + "enum": [ + "307" + ], + "title": "TemporaryRedirect" + }, + { + "type": "string", + "enum": [ + "308" + ], + "title": "PermanentRedirect" + } + ] + }, + "resourceId": { + "description": "ID of parent resource.", + "type": "string", + "example": "<RESOURCE_ID>" + }, + "resourceType": { + "description": "Type of parent resource.", + "type": "string", + "example": "site", + "title": "ProxyResourceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "site" + ], + "title": "Site" + }, + { + "type": "string", + "enum": [ + "function" + ], + "title": "Function" + } + ] + } + }, + "required": [ + "domain", + "url", + "statusCode", + "resourceId", + "resourceType" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/site": { + "post": { + "summary": "Create site rule", + "operationId": "proxyCreateSiteRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for serving Appwrite Site on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "proxy\/create-site-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.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": { + "domain": { + "description": "Domain name.", + "type": "string", + "example": "example.com" + }, + "siteId": { + "description": "ID of site to be executed.", + "type": "string", + "example": "<SITE_ID>" + }, + "branch": { + "description": "Name of VCS branch to deploy changes automatically", + "type": "string", + "default": "", + "example": "<BRANCH>" + } + }, + "required": [ + "domain", + "siteId" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/{ruleId}": { + "get": { + "summary": "Get rule", + "operationId": "proxyGetRule", + "tags": [ + "proxy" + ], + "description": "Get a proxy rule by its unique ID.", + "responses": { + "200": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "proxy\/get-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete rule", + "operationId": "proxyDeleteRule", + "tags": [ + "proxy" + ], + "description": "Delete a proxy rule by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "proxy\/delete-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/proxy\/rules\/{ruleId}\/status": { + "patch": { + "summary": "Update rule status", + "operationId": "proxyUpdateRuleStatus", + "tags": [ + "proxy" + ], + "description": "If not succeeded yet, retry verification process of a proxy rule domain. This endpoint triggers domain verification by checking DNS records. If verification is successful, a TLS certificate will be automatically provisioned for the domain asynchronously in the background.", + "responses": { + "200": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "proxy\/update-rule-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/regions\/cache": { + "delete": { + "summary": "Purge platform manager cache resource from network regions", + "operationId": "regionsDeleteCache", + "tags": [ + "regions" + ], + "description": "Purges platform manager cache resource from network regions.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "regions\/delete-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true, + "auth": { + "manager": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "documentId", + "description": "Document ID.", + "required": false, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "collectionId", + "description": "CollectionID.", + "required": false, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "region", + "description": "Project Region.", + "required": false, + "schema": { + "type": "string", + "example": "fra", + "title": "Region", + "oneOf": [ + { + "type": "string", + "enum": [ + "fra" + ], + "title": "fra" + }, + { + "type": "string", + "enum": [ + "nyc" + ], + "title": "nyc" + }, + { + "type": "string", + "enum": [ + "syd" + ], + "title": "syd" + }, + { + "type": "string", + "enum": [ + "sfo" + ], + "title": "sfo" + }, + { + "type": "string", + "enum": [ + "sgp" + ], + "title": "sgp" + }, + { + "type": "string", + "enum": [ + "tor" + ], + "title": "tor" + } + ] + }, + "in": "query" + }, + { + "name": "cache", + "description": "Cache target.", + "required": false, + "schema": { + "type": "string", + "example": "cache", + "title": "CacheTarget", + "oneOf": [ + { + "type": "string", + "enum": [ + "cache" + ], + "title": "cache" + }, + { + "type": "string", + "enum": [ + "timelimit" + ], + "title": "timelimit" + }, + { + "type": "string", + "enum": [ + "locks" + ], + "title": "locks" + }, + { + "type": "string", + "enum": [ + "pubsub" + ], + "title": "pubsub" + }, + { + "type": "string", + "enum": [ + "queue" + ], + "title": "queue" + }, + { + "type": "string", + "enum": [ + "all" + ], + "title": "all" + } + ], + "default": "cache" + }, + "in": "query" + }, + { + "name": "all", + "description": "Clear the entire selected cache target.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": false + }, + "in": "query" + }, + { + "name": "database", + "description": "Database cache scope.", + "required": false, + "schema": { + "type": "string", + "example": "console", + "title": "CacheDatabase", + "oneOf": [ + { + "type": "string", + "enum": [ + "console" + ], + "title": "console" + }, + { + "type": "string", + "enum": [ + "project" + ], + "title": "project" + } + ], + "default": "console" + }, + "in": "query" + }, + { + "name": "projectId", + "description": "Project ID for project database cache.", + "required": false, + "schema": { + "type": "string", + "example": "<PROJECT_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "json", + "description": "Return JSON instead of 204.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": false + }, + "in": "query" + } + ] + } + }, + "\/regions\/deployments\/{deploymentId}\/runtime": { + "get": { + "summary": "Get the runtime information by deployment ID", + "operationId": "regionsGetDeploymentRuntime", + "tags": [ + "regions" + ], + "description": "Retrieves runtime information for a deployment by deployment ID.", + "responses": { + "200": { + "description": "Runtime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/managerRuntime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "regions\/get-deployment-runtime.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": false, + "schema": { + "type": "string", + "example": "<PROJECT_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "deploymentId", + "description": "Deployment ID", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/regions\/events": { + "post": { + "summary": "Queue an event in the given region", + "operationId": "regionsCreateEvent", + "tags": [ + "regions" + ], + "description": "Queues an event in the given region using CloudEvents specification.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "regions\/create-event.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "specversion": { + "description": "CloudEvents spec version", + "type": "string", + "default": "1.0", + "example": "<SPECVERSION>" + }, + "type": { + "description": "Event type that maps to worker. e.g. v1-stats-usage", + "type": "string", + "example": "<TYPE>" + }, + "source": { + "description": "Event source. e.g. imagine", + "type": "string", + "default": "", + "example": "<SOURCE>" + }, + "subject": { + "description": "Subject of the event, i.e. projectId", + "type": "string", + "example": "<SUBJECT>" + }, + "id": { + "description": "Unique event ID", + "type": "string", + "default": "", + "example": "<ID>" + }, + "time": { + "description": "Event timestamp in RFC3339 format", + "type": "string", + "default": "", + "example": "<TIME>" + }, + "datacontenttype": { + "description": "Content type of data", + "type": "string", + "default": "application\/json", + "example": "<DATACONTENTTYPE>" + }, + "data": { + "description": "Event data containing metrics. e.g. {\"metrics\": [...]}", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "type", + "subject", + "data" + ] + } + } + } + } + } + }, + "\/regions\/events\/execution": { + "post": { + "summary": "Create a new execution for a function or site", + "operationId": "regionsCreateExecution", + "tags": [ + "regions" + ], + "description": "Creates a new execution record for a function or site.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "regions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true + }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "projectId": { + "description": "Project ID", + "type": "string", + "default": "", + "example": "<PROJECT_ID>" + }, + "deploymentId": { + "description": "Deployment ID", + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "responseStatusCode": { + "description": "Response status code", + "type": "integer", + "example": 100, + "format": "int32" + }, + "responseHeaders": { + "description": "Response headers", + "type": "object", + "default": {}, + "example": {} + }, + "responseSize": { + "description": "Response size in bytes", + "type": "integer", + "format": "int32" + }, + "requestPath": { + "description": "Request path", + "type": "string", + "example": "<REQUEST_PATH>" + }, + "requestMethod": { + "description": "Request method", + "type": "string", + "example": "get", + "title": "RequestMethod", + "oneOf": [ + { + "type": "string", + "enum": [ + "get" + ], + "title": "get" + }, + { + "type": "string", + "enum": [ + "post" + ], + "title": "post" + }, + { + "type": "string", + "enum": [ + "put" + ], + "title": "put" + }, + { + "type": "string", + "enum": [ + "patch" + ], + "title": "patch" + }, + { + "type": "string", + "enum": [ + "delete" + ], + "title": "delete" + }, + { + "type": "string", + "enum": [ + "options" + ], + "title": "options" + }, + { + "type": "string", + "enum": [ + "head" + ], + "title": "head" + } + ] + }, + "requestHeaders": { + "description": "Request headers", + "type": "object", + "default": {}, + "example": {} + }, + "requestSize": { + "description": "Request size in bytes", + "type": "integer", + "format": "int32" + }, + "errors": { + "description": "Errors", + "type": "string", + "example": "<ERRORS>" + }, + "logs": { + "description": "Logs", + "type": "string", + "example": "<LOGS>" + }, + "duration": { + "description": "Execution duration in seconds", + "type": "number", + "format": "float" + }, + "hostname": { + "description": "Request hostname (edge-only)", + "type": "string", + "default": "", + "example": "<HOSTNAME>" + }, + "userAgent": { + "description": "Request user-agent (edge-only)", + "type": "string", + "default": "", + "example": "<USER_AGENT>" + }, + "country": { + "description": "ISO 3166-1 alpha-2 country (edge-only)", + "type": "string", + "default": "", + "example": "<COUNTRY>" + }, + "ip": { + "description": "Request client IP (edge-only)", + "type": "string", + "default": "", + "example": "<IP>" + }, + "service": { + "description": "Service name (edge-only)", + "type": "string", + "default": "", + "example": "<SERVICE>" + } + }, + "required": [ + "deploymentId", + "responseStatusCode", + "responseHeaders", + "responseSize", + "requestPath", + "requestMethod", + "requestHeaders", + "requestSize", + "errors", + "logs", + "duration" + ] + } + } + } + } + } + }, + "\/regions\/project": { + "delete": { + "summary": "Delete project from network regions", + "operationId": "regionsDeleteProject", + "tags": [ + "regions" + ], + "description": "Deletes a project from network regions.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "regions\/delete-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true, + "auth": { + "manager": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "query" + } + ] + } + }, + "\/regions\/usage": { + "post": { + "summary": "Push usage stats to stats usage queue", + "operationId": "regionsCreateUsage", + "tags": [ + "regions" + ], + "description": "Pushes usage statistics to the stats usage queue.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "regions\/create-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "manager" + ], + "packaging": false, + "public": true, + "auth": { + "manager": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "description": "Usage stats as a JSON string. Array of entries with projectId, metrics, and timestamp. eg: [{\"projectId\": \"123\", \"metrics\": [{\"key\": \"requests\", \"value\": 1}], \"timestamp\": \"2021-01-01 00:00:00\"}]", + "type": "string", + "example": "<USAGE>" + } + }, + "required": [ + "usage" + ] + } + } + } + } + } + }, + "\/reports": { + "get": { + "summary": "List reports", + "operationId": "advisorListReports", + "tags": [ + "advisor" + ], + "description": "Get a list of all the project's analyzer reports. You can use the query params to filter your results.\n", + "responses": { + "200": { + "description": "Reports List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/reportList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "reports", + "demo": "advisor\/list-reports.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "reports.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: appId, type, targetType, target, analyzedAt", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/reports\/{reportId}": { + "get": { + "summary": "Get report", + "operationId": "advisorGetReport", + "tags": [ + "advisor" + ], + "description": "Get an analyzer report by its unique ID. The response includes the report's metadata and the nested insights it produced.\n", + "responses": { + "200": { + "description": "Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/report" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "reports", + "demo": "advisor\/get-report.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "reports.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "reportId", + "description": "Report ID.", + "required": true, + "schema": { + "type": "string", + "example": "<REPORT_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete report", + "operationId": "advisorDeleteReport", + "tags": [ + "advisor" + ], + "description": "Delete an analyzer report by its unique ID. Nested insights and CTA metadata are removed asynchronously by the deletes worker.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "reports", + "demo": "advisor\/delete-report.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "projectId:{projectId},userId:{userId}", + "scope": "reports.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "reportId", + "description": "Report ID.", + "required": true, + "schema": { + "type": "string", + "example": "<REPORT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/reports\/{reportId}\/insights": { + "get": { + "summary": "List insights", + "operationId": "advisorListInsights", + "tags": [ + "advisor" + ], + "description": "List the insights produced under a single analyzer report. You can use the query params to filter your results further.\n", + "responses": { + "200": { + "description": "Insights List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/insightList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "insights", + "demo": "advisor\/list-insights.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "insights.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "reportId", + "description": "Parent report ID.", + "required": true, + "schema": { + "type": "string", + "example": "<REPORT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, severity, status, resourceType, resourceId, parentResourceType, parentResourceId, analyzedAt, dismissedAt, dismissedBy", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/reports\/{reportId}\/insights\/{insightId}": { + "get": { + "summary": "Get insight", + "operationId": "advisorGetInsight", + "tags": [ + "advisor" + ], + "description": "Get an insight by its unique ID, scoped to its parent report.\n", + "responses": { + "200": { + "description": "Insight", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/insight" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "insights", + "demo": "advisor\/get-insight.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "insights.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "reportId", + "description": "Parent report ID.", + "required": true, + "schema": { + "type": "string", + "example": "<REPORT_ID>" + }, + "in": "path" + }, + { + "name": "insightId", + "description": "Insight ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSIGHT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites": { + "get": { + "summary": "List sites", + "operationId": "sitesList", + "tags": [ + "sites" + ], + "description": "Get a list of all the project's sites. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Sites List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/siteList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sites", + "demo": "sites\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.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, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 site", + "operationId": "sitesCreate", + "tags": [ + "sites" + ], + "description": "Create a new site.", + "responses": { + "201": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sites", + "demo": "sites\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.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": { + "siteId": { + "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<SITE_ID>" + }, + "name": { + "description": "Site name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "framework": { + "description": "Sites framework.", + "type": "string", + "example": "analog", + "title": "Framework", + "oneOf": [ + { + "type": "string", + "enum": [ + "analog" + ], + "title": "analog" + }, + { + "type": "string", + "enum": [ + "angular" + ], + "title": "angular" + }, + { + "type": "string", + "enum": [ + "nextjs" + ], + "title": "nextjs" + }, + { + "type": "string", + "enum": [ + "react" + ], + "title": "react" + }, + { + "type": "string", + "enum": [ + "nuxt" + ], + "title": "nuxt" + }, + { + "type": "string", + "enum": [ + "vue" + ], + "title": "vue" + }, + { + "type": "string", + "enum": [ + "sveltekit" + ], + "title": "sveltekit" + }, + { + "type": "string", + "enum": [ + "astro" + ], + "title": "astro" + }, + { + "type": "string", + "enum": [ + "tanstack-start" + ], + "title": "tanstack-start" + }, + { + "type": "string", + "enum": [ + "remix" + ], + "title": "remix" + }, + { + "type": "string", + "enum": [ + "lynx" + ], + "title": "lynx" + }, + { + "type": "string", + "enum": [ + "flutter" + ], + "title": "flutter" + }, + { + "type": "string", + "enum": [ + "jaspr" + ], + "title": "jaspr" + }, + { + "type": "string", + "enum": [ + "react-native" + ], + "title": "react-native" + }, + { + "type": "string", + "enum": [ + "vite" + ], + "title": "vite" + }, + { + "type": "string", + "enum": [ + "other" + ], + "title": "other" + } + ] + }, + "enabled": { + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "logging": { + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "type": "boolean", + "default": true, + "example": false + }, + "timeout": { + "description": "Maximum request time in seconds.", + "type": "integer", + "default": 30, + "example": 1, + "format": "int32" + }, + "installCommand": { + "description": "Install Command.", + "type": "string", + "default": "", + "example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "description": "Build Command.", + "type": "string", + "default": "", + "example": "<BUILD_COMMAND>" + }, + "startCommand": { + "description": "Custom start command. Leave empty to use default.", + "type": "string", + "default": "", + "example": "<START_COMMAND>" + }, + "outputDirectory": { + "description": "Output Directory for site.", + "type": "string", + "default": "", + "example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "description": "Runtime to use during build step.", + "type": "string", + "example": "node-14.5", + "title": "BuildRuntime", + "oneOf": [ + { + "type": "string", + "enum": [ + "node-14.5" + ], + "title": "node-14.5" + }, + { + "type": "string", + "enum": [ + "node-16.0" + ], + "title": "node-16.0" + }, + { + "type": "string", + "enum": [ + "node-18.0" + ], + "title": "node-18.0" + }, + { + "type": "string", + "enum": [ + "node-19.0" + ], + "title": "node-19.0" + }, + { + "type": "string", + "enum": [ + "node-20.0" + ], + "title": "node-20.0" + }, + { + "type": "string", + "enum": [ + "node-21.0" + ], + "title": "node-21.0" + }, + { + "type": "string", + "enum": [ + "node-22" + ], + "title": "node-22" + }, + { + "type": "string", + "enum": [ + "node-23" + ], + "title": "node-23" + }, + { + "type": "string", + "enum": [ + "node-24" + ], + "title": "node-24" + }, + { + "type": "string", + "enum": [ + "node-25" + ], + "title": "node-25" + }, + { + "type": "string", + "enum": [ + "node-26" + ], + "title": "node-26" + }, + { + "type": "string", + "enum": [ + "php-8.0" + ], + "title": "php-8.0" + }, + { + "type": "string", + "enum": [ + "php-8.1" + ], + "title": "php-8.1" + }, + { + "type": "string", + "enum": [ + "php-8.2" + ], + "title": "php-8.2" + }, + { + "type": "string", + "enum": [ + "php-8.3" + ], + "title": "php-8.3" + }, + { + "type": "string", + "enum": [ + "php-8.4" + ], + "title": "php-8.4" + }, + { + "type": "string", + "enum": [ + "ruby-3.0" + ], + "title": "ruby-3.0" + }, + { + "type": "string", + "enum": [ + "ruby-3.1" + ], + "title": "ruby-3.1" + }, + { + "type": "string", + "enum": [ + "ruby-3.2" + ], + "title": "ruby-3.2" + }, + { + "type": "string", + "enum": [ + "ruby-3.3" + ], + "title": "ruby-3.3" + }, + { + "type": "string", + "enum": [ + "ruby-3.4" + ], + "title": "ruby-3.4" + }, + { + "type": "string", + "enum": [ + "ruby-4.0" + ], + "title": "ruby-4.0" + }, + { + "type": "string", + "enum": [ + "python-3.8" + ], + "title": "python-3.8" + }, + { + "type": "string", + "enum": [ + "python-3.9" + ], + "title": "python-3.9" + }, + { + "type": "string", + "enum": [ + "python-3.10" + ], + "title": "python-3.10" + }, + { + "type": "string", + "enum": [ + "python-3.11" + ], + "title": "python-3.11" + }, + { + "type": "string", + "enum": [ + "python-3.12" + ], + "title": "python-3.12" + }, + { + "type": "string", + "enum": [ + "python-3.13" + ], + "title": "python-3.13" + }, + { + "type": "string", + "enum": [ + "python-3.14" + ], + "title": "python-3.14" + }, + { + "type": "string", + "enum": [ + "python-ml-3.11" + ], + "title": "python-ml-3.11" + }, + { + "type": "string", + "enum": [ + "python-ml-3.12" + ], + "title": "python-ml-3.12" + }, + { + "type": "string", + "enum": [ + "python-ml-3.13" + ], + "title": "python-ml-3.13" + }, + { + "type": "string", + "enum": [ + "deno-1.21" + ], + "title": "deno-1.21" + }, + { + "type": "string", + "enum": [ + "deno-1.24" + ], + "title": "deno-1.24" + }, + { + "type": "string", + "enum": [ + "deno-1.35" + ], + "title": "deno-1.35" + }, + { + "type": "string", + "enum": [ + "deno-1.40" + ], + "title": "deno-1.40" + }, + { + "type": "string", + "enum": [ + "deno-1.46" + ], + "title": "deno-1.46" + }, + { + "type": "string", + "enum": [ + "deno-2.0" + ], + "title": "deno-2.0" + }, + { + "type": "string", + "enum": [ + "deno-2.5" + ], + "title": "deno-2.5" + }, + { + "type": "string", + "enum": [ + "deno-2.6" + ], + "title": "deno-2.6" + }, + { + "type": "string", + "enum": [ + "dart-2.15" + ], + "title": "dart-2.15" + }, + { + "type": "string", + "enum": [ + "dart-2.16" + ], + "title": "dart-2.16" + }, + { + "type": "string", + "enum": [ + "dart-2.17" + ], + "title": "dart-2.17" + }, + { + "type": "string", + "enum": [ + "dart-2.18" + ], + "title": "dart-2.18" + }, + { + "type": "string", + "enum": [ + "dart-2.19" + ], + "title": "dart-2.19" + }, + { + "type": "string", + "enum": [ + "dart-3.0" + ], + "title": "dart-3.0" + }, + { + "type": "string", + "enum": [ + "dart-3.1" + ], + "title": "dart-3.1" + }, + { + "type": "string", + "enum": [ + "dart-3.3" + ], + "title": "dart-3.3" + }, + { + "type": "string", + "enum": [ + "dart-3.5" + ], + "title": "dart-3.5" + }, + { + "type": "string", + "enum": [ + "dart-3.8" + ], + "title": "dart-3.8" + }, + { + "type": "string", + "enum": [ + "dart-3.9" + ], + "title": "dart-3.9" + }, + { + "type": "string", + "enum": [ + "dart-3.10" + ], + "title": "dart-3.10" + }, + { + "type": "string", + "enum": [ + "dart-3.11" + ], + "title": "dart-3.11" + }, + { + "type": "string", + "enum": [ + "dart-3.12" + ], + "title": "dart-3.12" + }, + { + "type": "string", + "enum": [ + "dart-3.13" + ], + "title": "dart-3.13" + }, + { + "type": "string", + "enum": [ + "dotnet-6.0" + ], + "title": "dotnet-6.0" + }, + { + "type": "string", + "enum": [ + "dotnet-7.0" + ], + "title": "dotnet-7.0" + }, + { + "type": "string", + "enum": [ + "dotnet-8.0" + ], + "title": "dotnet-8.0" + }, + { + "type": "string", + "enum": [ + "dotnet-10" + ], + "title": "dotnet-10" + }, + { + "type": "string", + "enum": [ + "java-8.0" + ], + "title": "java-8.0" + }, + { + "type": "string", + "enum": [ + "java-11.0" + ], + "title": "java-11.0" + }, + { + "type": "string", + "enum": [ + "java-17.0" + ], + "title": "java-17.0" + }, + { + "type": "string", + "enum": [ + "java-18.0" + ], + "title": "java-18.0" + }, + { + "type": "string", + "enum": [ + "java-21.0" + ], + "title": "java-21.0" + }, + { + "type": "string", + "enum": [ + "java-22" + ], + "title": "java-22" + }, + { + "type": "string", + "enum": [ + "java-25" + ], + "title": "java-25" + }, + { + "type": "string", + "enum": [ + "swift-5.5" + ], + "title": "swift-5.5" + }, + { + "type": "string", + "enum": [ + "swift-5.8" + ], + "title": "swift-5.8" + }, + { + "type": "string", + "enum": [ + "swift-5.9" + ], + "title": "swift-5.9" + }, + { + "type": "string", + "enum": [ + "swift-5.10" + ], + "title": "swift-5.10" + }, + { + "type": "string", + "enum": [ + "swift-6.2" + ], + "title": "swift-6.2" + }, + { + "type": "string", + "enum": [ + "kotlin-1.6" + ], + "title": "kotlin-1.6" + }, + { + "type": "string", + "enum": [ + "kotlin-1.8" + ], + "title": "kotlin-1.8" + }, + { + "type": "string", + "enum": [ + "kotlin-1.9" + ], + "title": "kotlin-1.9" + }, + { + "type": "string", + "enum": [ + "kotlin-2.0" + ], + "title": "kotlin-2.0" + }, + { + "type": "string", + "enum": [ + "kotlin-2.3" + ], + "title": "kotlin-2.3" + }, + { + "type": "string", + "enum": [ + "cpp-17" + ], + "title": "cpp-17" + }, + { + "type": "string", + "enum": [ + "cpp-20" + ], + "title": "cpp-20" + }, + { + "type": "string", + "enum": [ + "bun-1.0" + ], + "title": "bun-1.0" + }, + { + "type": "string", + "enum": [ + "bun-1.1" + ], + "title": "bun-1.1" + }, + { + "type": "string", + "enum": [ + "bun-1.2" + ], + "title": "bun-1.2" + }, + { + "type": "string", + "enum": [ + "bun-1.3" + ], + "title": "bun-1.3" + }, + { + "type": "string", + "enum": [ + "bun-1.4" + ], + "title": "bun-1.4" + }, + { + "type": "string", + "enum": [ + "go-1.23" + ], + "title": "go-1.23" + }, + { + "type": "string", + "enum": [ + "go-1.24" + ], + "title": "go-1.24" + }, + { + "type": "string", + "enum": [ + "go-1.25" + ], + "title": "go-1.25" + }, + { + "type": "string", + "enum": [ + "go-1.26" + ], + "title": "go-1.26" + }, + { + "type": "string", + "enum": [ + "rust-1.83" + ], + "title": "rust-1.83" + }, + { + "type": "string", + "enum": [ + "static-1" + ], + "title": "static-1" + }, + { + "type": "string", + "enum": [ + "flutter-3.24" + ], + "title": "flutter-3.24" + }, + { + "type": "string", + "enum": [ + "flutter-3.27" + ], + "title": "flutter-3.27" + }, + { + "type": "string", + "enum": [ + "flutter-3.29" + ], + "title": "flutter-3.29" + }, + { + "type": "string", + "enum": [ + "flutter-3.32" + ], + "title": "flutter-3.32" + }, + { + "type": "string", + "enum": [ + "flutter-3.35" + ], + "title": "flutter-3.35" + }, + { + "type": "string", + "enum": [ + "flutter-3.38" + ], + "title": "flutter-3.38" + }, + { + "type": "string", + "enum": [ + "flutter-3.41" + ], + "title": "flutter-3.41" + }, + { + "type": "string", + "enum": [ + "flutter-3.44" + ], + "title": "flutter-3.44" + }, + { + "type": "string", + "enum": [ + "flutter-3.47" + ], + "title": "flutter-3.47" + } + ] + }, + "adapter": { + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "type": "string", + "example": "static", + "title": "Adapter", + "oneOf": [ + { + "type": "string", + "enum": [ + "static" + ], + "title": "static" + }, + { + "type": "string", + "enum": [ + "ssr" + ], + "title": "ssr" + } + ] + }, + "installationId": { + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "type": "string", + "default": "", + "example": "<INSTALLATION_ID>" + }, + "fallbackFile": { + "description": "Fallback file for single page application sites.", + "type": "string", + "default": "", + "example": "<FALLBACK_FILE>" + }, + "providerRepositoryId": { + "description": "Repository ID of the repo linked to the site.", + "type": "string", + "default": "", + "example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "description": "Production branch for the repo linked to the site.", + "type": "string", + "default": "", + "example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "type": "boolean", + "default": false, + "example": false + }, + "providerRootDirectory": { + "description": "Path to site code in the linked repo.", + "type": "string", + "default": "", + "example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "providerBranches": { + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "providerPaths": { + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "buildSpecification": { + "description": "Build specification for the site deployments.", + "type": "string", + "default": {}, + "example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "description": "Runtime specification for the SSR executions.", + "type": "string", + "default": {}, + "example": "s-1vcpu-512mb" + }, + "deploymentRetention": { + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "scopes": { + "description": "List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.", + "type": "array", + "default": [], + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + } + } + }, + "required": [ + "siteId", + "name", + "framework", + "buildRuntime" + ] + } + } + } + } + } + }, + "\/sites\/frameworks": { + "get": { + "summary": "List frameworks", + "operationId": "sitesListFrameworks", + "tags": [ + "sites" + ], + "description": "Get a list of all frameworks that are currently available on the server instance.", + "responses": { + "200": { + "description": "Frameworks List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/frameworkList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "frameworks", + "demo": "sites\/list-frameworks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/sites\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "sitesListSpecifications", + "tags": [ + "sites" + ], + "description": "List allowed site specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/specificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "frameworks", + "demo": "sites\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "Key": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Specification type to list. Can be one of: runtimes, builds. Defaults to runtimes.", + "required": false, + "schema": { + "type": "string", + "example": "runtimes", + "default": "runtimes" + }, + "in": "query" + } + ] + } + }, + "\/sites\/templates": { + "get": { + "summary": "List templates", + "operationId": "sitesListTemplates", + "tags": [ + "sites" + ], + "description": "List available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", + "responses": { + "200": { + "description": "Site Templates List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateSiteList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "templates", + "demo": "sites\/list-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "frameworks", + "description": "List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "title": "Framework", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "analog" + ], + "title": "analog" + }, + { + "type": "string", + "enum": [ + "angular" + ], + "title": "angular" + }, + { + "type": "string", + "enum": [ + "nextjs" + ], + "title": "nextjs" + }, + { + "type": "string", + "enum": [ + "react" + ], + "title": "react" + }, + { + "type": "string", + "enum": [ + "nuxt" + ], + "title": "nuxt" + }, + { + "type": "string", + "enum": [ + "vue" + ], + "title": "vue" + }, + { + "type": "string", + "enum": [ + "sveltekit" + ], + "title": "sveltekit" + }, + { + "type": "string", + "enum": [ + "astro" + ], + "title": "astro" + }, + { + "type": "string", + "enum": [ + "tanstack-start" + ], + "title": "tanstack-start" + }, + { + "type": "string", + "enum": [ + "remix" + ], + "title": "remix" + }, + { + "type": "string", + "enum": [ + "lynx" + ], + "title": "lynx" + }, + { + "type": "string", + "enum": [ + "flutter" + ], + "title": "flutter" + }, + { + "type": "string", + "enum": [ + "jaspr" + ], + "title": "jaspr" + }, + { + "type": "string", + "enum": [ + "react-native" + ], + "title": "react-native" + }, + { + "type": "string", + "enum": [ + "vite" + ], + "title": "vite" + }, + { + "type": "string", + "enum": [ + "other" + ], + "title": "other" + } + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "useCases", + "description": "List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "title": "SiteTemplateUseCase", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "portfolio" + ], + "title": "portfolio" + }, + { + "type": "string", + "enum": [ + "starter" + ], + "title": "starter" + }, + { + "type": "string", + "enum": [ + "events" + ], + "title": "events" + }, + { + "type": "string", + "enum": [ + "ecommerce" + ], + "title": "ecommerce" + }, + { + "type": "string", + "enum": [ + "documentation" + ], + "title": "documentation" + }, + { + "type": "string", + "enum": [ + "blog" + ], + "title": "blog" + }, + { + "type": "string", + "enum": [ + "ai" + ], + "title": "ai" + }, + { + "type": "string", + "enum": [ + "forms" + ], + "title": "forms" + }, + { + "type": "string", + "enum": [ + "dashboard" + ], + "title": "dashboard" + } + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "limit", + "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Offset the list of returned templates. Maximum offset is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/sites\/templates\/{templateId}": { + "get": { + "summary": "Get site template", + "operationId": "sitesGetTemplate", + "tags": [ + "sites" + ], + "description": "Get a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", + "responses": { + "200": { + "description": "Template Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateSite" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "templates", + "demo": "sites\/get-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Template ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEMPLATE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}": { + "get": { + "summary": "Get site", + "operationId": "sitesGet", + "tags": [ + "sites" + ], + "description": "Get a site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sites", + "demo": "sites\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update site", + "operationId": "sitesUpdate", + "tags": [ + "sites" + ], + "description": "Update site by its unique ID.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sites", + "demo": "sites\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Site name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "framework": { + "description": "Sites framework.", + "type": "string", + "example": "analog", + "title": "Framework", + "oneOf": [ + { + "type": "string", + "enum": [ + "analog" + ], + "title": "analog" + }, + { + "type": "string", + "enum": [ + "angular" + ], + "title": "angular" + }, + { + "type": "string", + "enum": [ + "nextjs" + ], + "title": "nextjs" + }, + { + "type": "string", + "enum": [ + "react" + ], + "title": "react" + }, + { + "type": "string", + "enum": [ + "nuxt" + ], + "title": "nuxt" + }, + { + "type": "string", + "enum": [ + "vue" + ], + "title": "vue" + }, + { + "type": "string", + "enum": [ + "sveltekit" + ], + "title": "sveltekit" + }, + { + "type": "string", + "enum": [ + "astro" + ], + "title": "astro" + }, + { + "type": "string", + "enum": [ + "tanstack-start" + ], + "title": "tanstack-start" + }, + { + "type": "string", + "enum": [ + "remix" + ], + "title": "remix" + }, + { + "type": "string", + "enum": [ + "lynx" + ], + "title": "lynx" + }, + { + "type": "string", + "enum": [ + "flutter" + ], + "title": "flutter" + }, + { + "type": "string", + "enum": [ + "jaspr" + ], + "title": "jaspr" + }, + { + "type": "string", + "enum": [ + "react-native" + ], + "title": "react-native" + }, + { + "type": "string", + "enum": [ + "vite" + ], + "title": "vite" + }, + { + "type": "string", + "enum": [ + "other" + ], + "title": "other" + } + ] + }, + "enabled": { + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "logging": { + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "type": "boolean", + "default": true, + "example": false + }, + "timeout": { + "description": "Maximum request time in seconds.", + "type": "integer", + "default": 30, + "example": 1, + "format": "int32" + }, + "installCommand": { + "description": "Install Command.", + "type": "string", + "default": "", + "example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "description": "Build Command.", + "type": "string", + "default": "", + "example": "<BUILD_COMMAND>" + }, + "startCommand": { + "description": "Custom start command. Leave empty to use default.", + "type": "string", + "default": "", + "example": "<START_COMMAND>" + }, + "outputDirectory": { + "description": "Output Directory for site.", + "type": "string", + "default": "", + "example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "description": "Runtime to use during build step.", + "type": "string", + "example": "node-14.5", + "title": "BuildRuntime", + "oneOf": [ + { + "type": "string", + "enum": [ + "node-14.5" + ], + "title": "node-14.5" + }, + { + "type": "string", + "enum": [ + "node-16.0" + ], + "title": "node-16.0" + }, + { + "type": "string", + "enum": [ + "node-18.0" + ], + "title": "node-18.0" + }, + { + "type": "string", + "enum": [ + "node-19.0" + ], + "title": "node-19.0" + }, + { + "type": "string", + "enum": [ + "node-20.0" + ], + "title": "node-20.0" + }, + { + "type": "string", + "enum": [ + "node-21.0" + ], + "title": "node-21.0" + }, + { + "type": "string", + "enum": [ + "node-22" + ], + "title": "node-22" + }, + { + "type": "string", + "enum": [ + "node-23" + ], + "title": "node-23" + }, + { + "type": "string", + "enum": [ + "node-24" + ], + "title": "node-24" + }, + { + "type": "string", + "enum": [ + "node-25" + ], + "title": "node-25" + }, + { + "type": "string", + "enum": [ + "node-26" + ], + "title": "node-26" + }, + { + "type": "string", + "enum": [ + "php-8.0" + ], + "title": "php-8.0" + }, + { + "type": "string", + "enum": [ + "php-8.1" + ], + "title": "php-8.1" + }, + { + "type": "string", + "enum": [ + "php-8.2" + ], + "title": "php-8.2" + }, + { + "type": "string", + "enum": [ + "php-8.3" + ], + "title": "php-8.3" + }, + { + "type": "string", + "enum": [ + "php-8.4" + ], + "title": "php-8.4" + }, + { + "type": "string", + "enum": [ + "ruby-3.0" + ], + "title": "ruby-3.0" + }, + { + "type": "string", + "enum": [ + "ruby-3.1" + ], + "title": "ruby-3.1" + }, + { + "type": "string", + "enum": [ + "ruby-3.2" + ], + "title": "ruby-3.2" + }, + { + "type": "string", + "enum": [ + "ruby-3.3" + ], + "title": "ruby-3.3" + }, + { + "type": "string", + "enum": [ + "ruby-3.4" + ], + "title": "ruby-3.4" + }, + { + "type": "string", + "enum": [ + "ruby-4.0" + ], + "title": "ruby-4.0" + }, + { + "type": "string", + "enum": [ + "python-3.8" + ], + "title": "python-3.8" + }, + { + "type": "string", + "enum": [ + "python-3.9" + ], + "title": "python-3.9" + }, + { + "type": "string", + "enum": [ + "python-3.10" + ], + "title": "python-3.10" + }, + { + "type": "string", + "enum": [ + "python-3.11" + ], + "title": "python-3.11" + }, + { + "type": "string", + "enum": [ + "python-3.12" + ], + "title": "python-3.12" + }, + { + "type": "string", + "enum": [ + "python-3.13" + ], + "title": "python-3.13" + }, + { + "type": "string", + "enum": [ + "python-3.14" + ], + "title": "python-3.14" + }, + { + "type": "string", + "enum": [ + "python-ml-3.11" + ], + "title": "python-ml-3.11" + }, + { + "type": "string", + "enum": [ + "python-ml-3.12" + ], + "title": "python-ml-3.12" + }, + { + "type": "string", + "enum": [ + "python-ml-3.13" + ], + "title": "python-ml-3.13" + }, + { + "type": "string", + "enum": [ + "deno-1.21" + ], + "title": "deno-1.21" + }, + { + "type": "string", + "enum": [ + "deno-1.24" + ], + "title": "deno-1.24" + }, + { + "type": "string", + "enum": [ + "deno-1.35" + ], + "title": "deno-1.35" + }, + { + "type": "string", + "enum": [ + "deno-1.40" + ], + "title": "deno-1.40" + }, + { + "type": "string", + "enum": [ + "deno-1.46" + ], + "title": "deno-1.46" + }, + { + "type": "string", + "enum": [ + "deno-2.0" + ], + "title": "deno-2.0" + }, + { + "type": "string", + "enum": [ + "deno-2.5" + ], + "title": "deno-2.5" + }, + { + "type": "string", + "enum": [ + "deno-2.6" + ], + "title": "deno-2.6" + }, + { + "type": "string", + "enum": [ + "dart-2.15" + ], + "title": "dart-2.15" + }, + { + "type": "string", + "enum": [ + "dart-2.16" + ], + "title": "dart-2.16" + }, + { + "type": "string", + "enum": [ + "dart-2.17" + ], + "title": "dart-2.17" + }, + { + "type": "string", + "enum": [ + "dart-2.18" + ], + "title": "dart-2.18" + }, + { + "type": "string", + "enum": [ + "dart-2.19" + ], + "title": "dart-2.19" + }, + { + "type": "string", + "enum": [ + "dart-3.0" + ], + "title": "dart-3.0" + }, + { + "type": "string", + "enum": [ + "dart-3.1" + ], + "title": "dart-3.1" + }, + { + "type": "string", + "enum": [ + "dart-3.3" + ], + "title": "dart-3.3" + }, + { + "type": "string", + "enum": [ + "dart-3.5" + ], + "title": "dart-3.5" + }, + { + "type": "string", + "enum": [ + "dart-3.8" + ], + "title": "dart-3.8" + }, + { + "type": "string", + "enum": [ + "dart-3.9" + ], + "title": "dart-3.9" + }, + { + "type": "string", + "enum": [ + "dart-3.10" + ], + "title": "dart-3.10" + }, + { + "type": "string", + "enum": [ + "dart-3.11" + ], + "title": "dart-3.11" + }, + { + "type": "string", + "enum": [ + "dart-3.12" + ], + "title": "dart-3.12" + }, + { + "type": "string", + "enum": [ + "dart-3.13" + ], + "title": "dart-3.13" + }, + { + "type": "string", + "enum": [ + "dotnet-6.0" + ], + "title": "dotnet-6.0" + }, + { + "type": "string", + "enum": [ + "dotnet-7.0" + ], + "title": "dotnet-7.0" + }, + { + "type": "string", + "enum": [ + "dotnet-8.0" + ], + "title": "dotnet-8.0" + }, + { + "type": "string", + "enum": [ + "dotnet-10" + ], + "title": "dotnet-10" + }, + { + "type": "string", + "enum": [ + "java-8.0" + ], + "title": "java-8.0" + }, + { + "type": "string", + "enum": [ + "java-11.0" + ], + "title": "java-11.0" + }, + { + "type": "string", + "enum": [ + "java-17.0" + ], + "title": "java-17.0" + }, + { + "type": "string", + "enum": [ + "java-18.0" + ], + "title": "java-18.0" + }, + { + "type": "string", + "enum": [ + "java-21.0" + ], + "title": "java-21.0" + }, + { + "type": "string", + "enum": [ + "java-22" + ], + "title": "java-22" + }, + { + "type": "string", + "enum": [ + "java-25" + ], + "title": "java-25" + }, + { + "type": "string", + "enum": [ + "swift-5.5" + ], + "title": "swift-5.5" + }, + { + "type": "string", + "enum": [ + "swift-5.8" + ], + "title": "swift-5.8" + }, + { + "type": "string", + "enum": [ + "swift-5.9" + ], + "title": "swift-5.9" + }, + { + "type": "string", + "enum": [ + "swift-5.10" + ], + "title": "swift-5.10" + }, + { + "type": "string", + "enum": [ + "swift-6.2" + ], + "title": "swift-6.2" + }, + { + "type": "string", + "enum": [ + "kotlin-1.6" + ], + "title": "kotlin-1.6" + }, + { + "type": "string", + "enum": [ + "kotlin-1.8" + ], + "title": "kotlin-1.8" + }, + { + "type": "string", + "enum": [ + "kotlin-1.9" + ], + "title": "kotlin-1.9" + }, + { + "type": "string", + "enum": [ + "kotlin-2.0" + ], + "title": "kotlin-2.0" + }, + { + "type": "string", + "enum": [ + "kotlin-2.3" + ], + "title": "kotlin-2.3" + }, + { + "type": "string", + "enum": [ + "cpp-17" + ], + "title": "cpp-17" + }, + { + "type": "string", + "enum": [ + "cpp-20" + ], + "title": "cpp-20" + }, + { + "type": "string", + "enum": [ + "bun-1.0" + ], + "title": "bun-1.0" + }, + { + "type": "string", + "enum": [ + "bun-1.1" + ], + "title": "bun-1.1" + }, + { + "type": "string", + "enum": [ + "bun-1.2" + ], + "title": "bun-1.2" + }, + { + "type": "string", + "enum": [ + "bun-1.3" + ], + "title": "bun-1.3" + }, + { + "type": "string", + "enum": [ + "bun-1.4" + ], + "title": "bun-1.4" + }, + { + "type": "string", + "enum": [ + "go-1.23" + ], + "title": "go-1.23" + }, + { + "type": "string", + "enum": [ + "go-1.24" + ], + "title": "go-1.24" + }, + { + "type": "string", + "enum": [ + "go-1.25" + ], + "title": "go-1.25" + }, + { + "type": "string", + "enum": [ + "go-1.26" + ], + "title": "go-1.26" + }, + { + "type": "string", + "enum": [ + "rust-1.83" + ], + "title": "rust-1.83" + }, + { + "type": "string", + "enum": [ + "static-1" + ], + "title": "static-1" + }, + { + "type": "string", + "enum": [ + "flutter-3.24" + ], + "title": "flutter-3.24" + }, + { + "type": "string", + "enum": [ + "flutter-3.27" + ], + "title": "flutter-3.27" + }, + { + "type": "string", + "enum": [ + "flutter-3.29" + ], + "title": "flutter-3.29" + }, + { + "type": "string", + "enum": [ + "flutter-3.32" + ], + "title": "flutter-3.32" + }, + { + "type": "string", + "enum": [ + "flutter-3.35" + ], + "title": "flutter-3.35" + }, + { + "type": "string", + "enum": [ + "flutter-3.38" + ], + "title": "flutter-3.38" + }, + { + "type": "string", + "enum": [ + "flutter-3.41" + ], + "title": "flutter-3.41" + }, + { + "type": "string", + "enum": [ + "flutter-3.44" + ], + "title": "flutter-3.44" + }, + { + "type": "string", + "enum": [ + "flutter-3.47" + ], + "title": "flutter-3.47" + } + ] + }, + "adapter": { + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "type": "string", + "example": "static", + "title": "Adapter", + "oneOf": [ + { + "type": "string", + "enum": [ + "static" + ], + "title": "static" + }, + { + "type": "string", + "enum": [ + "ssr" + ], + "title": "ssr" + } + ] + }, + "fallbackFile": { + "description": "Fallback file for single page application sites.", + "type": "string", + "default": "", + "example": "<FALLBACK_FILE>" + }, + "installationId": { + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "type": "string", + "default": "", + "example": "<INSTALLATION_ID>" + }, + "providerRepositoryId": { + "description": "Repository ID of the repo linked to the site.", + "type": "string", + "default": "", + "example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "description": "Production branch for the repo linked to the site.", + "type": "string", + "default": "", + "example": "<PROVIDER_BRANCH>" + }, + "providerSilentMode": { + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", + "type": "boolean", + "default": false, + "example": false + }, + "providerRootDirectory": { + "description": "Path to site code in the linked repo.", + "type": "string", + "default": "", + "example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "providerBranches": { + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "providerPaths": { + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "buildSpecification": { + "description": "Build specification for the site deployments.", + "type": "string", + "example": "s-1vcpu-512mb", + "nullable": true + }, + "runtimeSpecification": { + "description": "Runtime specification for the SSR executions.", + "type": "string", + "default": {}, + "example": "s-1vcpu-512mb" + }, + "deploymentRetention": { + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "scopes": { + "description": "List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.", + "type": "array", + "items": { + "title": "ProjectKeyScopes", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "project.read" + ], + "title": "project.read" + }, + { + "type": "string", + "enum": [ + "project.write" + ], + "title": "project.write" + }, + { + "type": "string", + "enum": [ + "usage.read" + ], + "title": "usage.read" + }, + { + "type": "string", + "enum": [ + "keys.read" + ], + "title": "keys.read" + }, + { + "type": "string", + "enum": [ + "keys.write" + ], + "title": "keys.write" + }, + { + "type": "string", + "enum": [ + "platforms.read" + ], + "title": "platforms.read" + }, + { + "type": "string", + "enum": [ + "platforms.write" + ], + "title": "platforms.write" + }, + { + "type": "string", + "enum": [ + "mocks.read" + ], + "title": "mocks.read" + }, + { + "type": "string", + "enum": [ + "mocks.write" + ], + "title": "mocks.write" + }, + { + "type": "string", + "enum": [ + "policies.read" + ], + "title": "policies.read" + }, + { + "type": "string", + "enum": [ + "policies.write" + ], + "title": "policies.write" + }, + { + "type": "string", + "enum": [ + "project.policies.read" + ], + "title": "project.policies.read" + }, + { + "type": "string", + "enum": [ + "project.policies.write" + ], + "title": "project.policies.write" + }, + { + "type": "string", + "enum": [ + "project.oauth2.read" + ], + "title": "project.oauth2.read" + }, + { + "type": "string", + "enum": [ + "project.oauth2.write" + ], + "title": "project.oauth2.write" + }, + { + "type": "string", + "enum": [ + "templates.read" + ], + "title": "templates.read" + }, + { + "type": "string", + "enum": [ + "templates.write" + ], + "title": "templates.write" + }, + { + "type": "string", + "enum": [ + "stages.read" + ], + "title": "stages.read" + }, + { + "type": "string", + "enum": [ + "stages.write" + ], + "title": "stages.write" + }, + { + "type": "string", + "enum": [ + "users.read" + ], + "title": "users.read" + }, + { + "type": "string", + "enum": [ + "users.write" + ], + "title": "users.write" + }, + { + "type": "string", + "enum": [ + "sessions.read" + ], + "title": "sessions.read" + }, + { + "type": "string", + "enum": [ + "sessions.write" + ], + "title": "sessions.write" + }, + { + "type": "string", + "enum": [ + "teams.read" + ], + "title": "teams.read" + }, + { + "type": "string", + "enum": [ + "teams.write" + ], + "title": "teams.write" + }, + { + "type": "string", + "enum": [ + "databases.read" + ], + "title": "databases.read" + }, + { + "type": "string", + "enum": [ + "databases.write" + ], + "title": "databases.write" + }, + { + "type": "string", + "enum": [ + "tables.read" + ], + "title": "tables.read" + }, + { + "type": "string", + "enum": [ + "tables.write" + ], + "title": "tables.write" + }, + { + "type": "string", + "enum": [ + "columns.read" + ], + "title": "columns.read" + }, + { + "type": "string", + "enum": [ + "columns.write" + ], + "title": "columns.write" + }, + { + "type": "string", + "enum": [ + "indexes.read" + ], + "title": "indexes.read" + }, + { + "type": "string", + "enum": [ + "indexes.write" + ], + "title": "indexes.write" + }, + { + "type": "string", + "enum": [ + "rows.read" + ], + "title": "rows.read" + }, + { + "type": "string", + "enum": [ + "rows.write" + ], + "title": "rows.write" + }, + { + "type": "string", + "enum": [ + "embeddings.write" + ], + "title": "embeddings.write" + }, + { + "type": "string", + "enum": [ + "collections.read" + ], + "title": "collections.read" + }, + { + "type": "string", + "enum": [ + "collections.write" + ], + "title": "collections.write" + }, + { + "type": "string", + "enum": [ + "attributes.read" + ], + "title": "attributes.read" + }, + { + "type": "string", + "enum": [ + "attributes.write" + ], + "title": "attributes.write" + }, + { + "type": "string", + "enum": [ + "documents.read" + ], + "title": "documents.read" + }, + { + "type": "string", + "enum": [ + "documents.write" + ], + "title": "documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.read" + ], + "title": "documentsdb.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.write" + ], + "title": "documentsdb.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.read" + ], + "title": "documentsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections.write" + ], + "title": "documentsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.read" + ], + "title": "documentsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents.write" + ], + "title": "documentsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.read" + ], + "title": "documentsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "documentsdb.indexes.write" + ], + "title": "documentsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.read" + ], + "title": "vectorsdb.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.write" + ], + "title": "vectorsdb.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.read" + ], + "title": "vectorsdb.collections.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections.write" + ], + "title": "vectorsdb.collections.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.read" + ], + "title": "vectorsdb.documents.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents.write" + ], + "title": "vectorsdb.documents.write" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.read" + ], + "title": "vectorsdb.indexes.read" + }, + { + "type": "string", + "enum": [ + "vectorsdb.indexes.write" + ], + "title": "vectorsdb.indexes.write" + }, + { + "type": "string", + "enum": [ + "buckets.read" + ], + "title": "buckets.read" + }, + { + "type": "string", + "enum": [ + "buckets.write" + ], + "title": "buckets.write" + }, + { + "type": "string", + "enum": [ + "files.read" + ], + "title": "files.read" + }, + { + "type": "string", + "enum": [ + "files.write" + ], + "title": "files.write" + }, + { + "type": "string", + "enum": [ + "tokens.read" + ], + "title": "tokens.read" + }, + { + "type": "string", + "enum": [ + "tokens.write" + ], + "title": "tokens.write" + }, + { + "type": "string", + "enum": [ + "functions.read" + ], + "title": "functions.read" + }, + { + "type": "string", + "enum": [ + "functions.write" + ], + "title": "functions.write" + }, + { + "type": "string", + "enum": [ + "executions.read" + ], + "title": "executions.read" + }, + { + "type": "string", + "enum": [ + "executions.write" + ], + "title": "executions.write" + }, + { + "type": "string", + "enum": [ + "execution.read" + ], + "title": "execution.read" + }, + { + "type": "string", + "enum": [ + "execution.write" + ], + "title": "execution.write" + }, + { + "type": "string", + "enum": [ + "sites.read" + ], + "title": "sites.read" + }, + { + "type": "string", + "enum": [ + "sites.write" + ], + "title": "sites.write" + }, + { + "type": "string", + "enum": [ + "log.read" + ], + "title": "log.read" + }, + { + "type": "string", + "enum": [ + "log.write" + ], + "title": "log.write" + }, + { + "type": "string", + "enum": [ + "providers.read" + ], + "title": "providers.read" + }, + { + "type": "string", + "enum": [ + "providers.write" + ], + "title": "providers.write" + }, + { + "type": "string", + "enum": [ + "topics.read" + ], + "title": "topics.read" + }, + { + "type": "string", + "enum": [ + "topics.write" + ], + "title": "topics.write" + }, + { + "type": "string", + "enum": [ + "subscribers.read" + ], + "title": "subscribers.read" + }, + { + "type": "string", + "enum": [ + "subscribers.write" + ], + "title": "subscribers.write" + }, + { + "type": "string", + "enum": [ + "targets.read" + ], + "title": "targets.read" + }, + { + "type": "string", + "enum": [ + "targets.write" + ], + "title": "targets.write" + }, + { + "type": "string", + "enum": [ + "messages.read" + ], + "title": "messages.read" + }, + { + "type": "string", + "enum": [ + "messages.write" + ], + "title": "messages.write" + }, + { + "type": "string", + "enum": [ + "rules.read" + ], + "title": "rules.read" + }, + { + "type": "string", + "enum": [ + "rules.write" + ], + "title": "rules.write" + }, + { + "type": "string", + "enum": [ + "webhooks.read" + ], + "title": "webhooks.read" + }, + { + "type": "string", + "enum": [ + "webhooks.write" + ], + "title": "webhooks.write" + }, + { + "type": "string", + "enum": [ + "locale.read" + ], + "title": "locale.read" + }, + { + "type": "string", + "enum": [ + "avatars.read" + ], + "title": "avatars.read" + }, + { + "type": "string", + "enum": [ + "health.read" + ], + "title": "health.read" + }, + { + "type": "string", + "enum": [ + "assistant.read" + ], + "title": "assistant.read" + }, + { + "type": "string", + "enum": [ + "migrations.read" + ], + "title": "migrations.read" + }, + { + "type": "string", + "enum": [ + "migrations.write" + ], + "title": "migrations.write" + }, + { + "type": "string", + "enum": [ + "schedules.read" + ], + "title": "schedules.read" + }, + { + "type": "string", + "enum": [ + "schedules.write" + ], + "title": "schedules.write" + }, + { + "type": "string", + "enum": [ + "vcs.read" + ], + "title": "vcs.read" + }, + { + "type": "string", + "enum": [ + "vcs.write" + ], + "title": "vcs.write" + }, + { + "type": "string", + "enum": [ + "insights.read" + ], + "title": "insights.read" + }, + { + "type": "string", + "enum": [ + "insights.write" + ], + "title": "insights.write" + }, + { + "type": "string", + "enum": [ + "reports.read" + ], + "title": "reports.read" + }, + { + "type": "string", + "enum": [ + "reports.write" + ], + "title": "reports.write" + }, + { + "type": "string", + "enum": [ + "presences.read" + ], + "title": "presences.read" + }, + { + "type": "string", + "enum": [ + "presences.write" + ], + "title": "presences.write" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.execute" + ], + "title": "dedicatedDatabases.execute" + }, + { + "type": "string", + "enum": [ + "backups.policies.read" + ], + "title": "backups.policies.read" + }, + { + "type": "string", + "enum": [ + "backups.policies.write" + ], + "title": "backups.policies.write" + }, + { + "type": "string", + "enum": [ + "archives.read" + ], + "title": "archives.read" + }, + { + "type": "string", + "enum": [ + "archives.write" + ], + "title": "archives.write" + }, + { + "type": "string", + "enum": [ + "restorations.read" + ], + "title": "restorations.read" + }, + { + "type": "string", + "enum": [ + "restorations.write" + ], + "title": "restorations.write" + }, + { + "type": "string", + "enum": [ + "domains.read" + ], + "title": "domains.read" + }, + { + "type": "string", + "enum": [ + "domains.write" + ], + "title": "domains.write" + }, + { + "type": "string", + "enum": [ + "wafRules.read" + ], + "title": "wafRules.read" + }, + { + "type": "string", + "enum": [ + "wafRules.write" + ], + "title": "wafRules.write" + }, + { + "type": "string", + "enum": [ + "events.read" + ], + "title": "events.read" + }, + { + "type": "string", + "enum": [ + "proxy.invalidations.write" + ], + "title": "proxy.invalidations.write" + }, + { + "type": "string", + "enum": [ + "apps.read" + ], + "title": "apps.read" + }, + { + "type": "string", + "enum": [ + "apps.write" + ], + "title": "apps.write" + }, + { + "type": "string", + "enum": [ + "oauth2.read" + ], + "title": "oauth2.read" + }, + { + "type": "string", + "enum": [ + "oauth2.write" + ], + "title": "oauth2.write" + }, + { + "type": "string", + "enum": [ + "oauth2.introspect" + ], + "title": "oauth2.introspect" + } + ] + }, + "nullable": true + } + }, + "required": [ + "name", + "framework" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete site", + "operationId": "sitesDelete", + "tags": [ + "sites" + ], + "description": "Delete a site by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sites", + "demo": "sites\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployment": { + "patch": { + "summary": "Update site's deployment", + "operationId": "sitesUpdateSiteDeployment", + "tags": [ + "sites" + ], + "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sites", + "demo": "sites\/update-site-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "description": "Deployment ID.", + "type": "string", + "example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "sitesListDeployments", + "tags": [ + "sites" + ], + "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deploymentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 deployment", + "operationId": "sitesCreateDeployment", + "tags": [ + "sites" + ], + "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "installCommand": { + "description": "Install Commands.", + "type": "string", + "example": "<INSTALL_COMMAND>", + "nullable": true + }, + "buildCommand": { + "description": "Build Commands.", + "type": "string", + "example": "<BUILD_COMMAND>", + "nullable": true + }, + "outputDirectory": { + "description": "Output Directory.", + "type": "string", + "example": "<OUTPUT_DIRECTORY>", + "nullable": true + }, + "code": { + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "type": "string", + "format": "binary" + }, + "activate": { + "description": "Automatically activate the deployment when it is finished building.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "code" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "sitesCreateDuplicateDeployment", + "tags": [ + "sites" + ], + "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/create-duplicate-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "description": "Deployment ID.", + "type": "string", + "example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "sitesCreateTemplateDeployment", + "tags": [ + "sites" + ], + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/create-template-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "repository": { + "description": "Repository name of the template.", + "type": "string", + "example": "<REPOSITORY>" + }, + "owner": { + "description": "The name of the owner of the template.", + "type": "string", + "example": "<OWNER>" + }, + "rootDirectory": { + "description": "Path to site code in the template repo.", + "type": "string", + "example": "<ROOT_DIRECTORY>" + }, + "type": { + "description": "Type for the reference provided. Can be commit, branch, or tag", + "type": "string", + "example": "branch", + "title": "TemplateReferenceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "branch" + ], + "title": "branch" + }, + { + "type": "string", + "enum": [ + "commit" + ], + "title": "commit" + }, + { + "type": "string", + "enum": [ + "tag" + ], + "title": "tag" + } + ] + }, + "reference": { + "description": "Reference value, can be a commit hash, branch name, or release tag", + "type": "string", + "example": "<REFERENCE>" + }, + "activate": { + "description": "Automatically activate the deployment when it is finished building.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "repository", + "owner", + "rootDirectory", + "type", + "reference" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "sitesCreateVcsDeployment", + "tags": [ + "sites" + ], + "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/create-vcs-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Type of reference passed. Allowed values are: branch, commit", + "type": "string", + "example": "branch", + "title": "VCSReferenceType", + "oneOf": [ + { + "type": "string", + "enum": [ + "branch" + ], + "title": "branch" + }, + { + "type": "string", + "enum": [ + "commit" + ], + "title": "commit" + }, + { + "type": "string", + "enum": [ + "tag" + ], + "title": "tag" + } + ] + }, + "reference": { + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "type": "string", + "example": "<REFERENCE>" + }, + "activate": { + "description": "Automatically activate the deployment when it is finished building.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "sitesGetDeployment", + "tags": [ + "sites" + ], + "description": "Get a site deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "sitesDeleteDeployment", + "tags": [ + "sites" + ], + "description": "Delete a site deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "sitesGetDeploymentDownload", + "tags": [ + "sites" + ], + "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "content": { + "*\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "public", + "sites.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Key": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "schema": { + "type": "string", + "example": "source", + "title": "DeploymentDownloadType", + "oneOf": [ + { + "type": "string", + "enum": [ + "source" + ], + "title": "source" + }, + { + "type": "string", + "enum": [ + "output" + ], + "title": "output" + } + ], + "default": "source" + }, + "in": "query" + }, + { + "name": "token", + "description": "Presigned source-download token for accessing this deployment without a session (jobs-service).", + "required": false, + "schema": { + "type": "string", + "example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "sitesUpdateDeploymentStatus", + "tags": [ + "sites" + ], + "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "deployments", + "demo": "sites\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/logs": { + "get": { + "summary": "List logs", + "operationId": "sitesListLogs", + "tags": [ + "sites" + ], + "description": "Get a list of all site logs. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Executions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "logs", + "demo": "sites\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/logs\/{logId}": { + "get": { + "summary": "Get log", + "operationId": "sitesGetLog", + "tags": [ + "sites" + ], + "description": "Get a site request log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "logs", + "demo": "sites\/get-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "schema": { + "type": "string", + "example": "<LOG_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete log", + "operationId": "sitesDeleteLog", + "tags": [ + "sites" + ], + "description": "Delete a site log by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "logs", + "demo": "sites\/delete-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "schema": { + "type": "string", + "example": "<LOG_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "sitesListVariables", + "tags": [ + "sites" + ], + "description": "Get a list of all variables of a specific site.", + "responses": { + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "sites\/list-variables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create variable", + "operationId": "sitesCreateVariable", + "tags": [ + "sites" + ], + "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", + "responses": { + "201": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "sites\/create-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "variableId": { + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<VARIABLE_ID>" + }, + "key": { + "description": "Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.", + "type": "string", + "example": "<KEY>" + }, + "value": { + "description": "Variable value. Max length: 8192 chars.", + "type": "string", + "example": "<VALUE>" + }, + "secret": { + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "variableId", + "key", + "value" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "sitesGetVariable", + "tags": [ + "sites" + ], + "description": "Get a variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "sites\/get-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "sitesUpdateVariable", + "tags": [ + "sites" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "sites\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.", + "type": "string", + "example": "<KEY>", + "nullable": true + }, + "value": { + "description": "Variable value. Max length: 8192 chars.", + "type": "string", + "example": "<VALUE>", + "nullable": true + }, + "secret": { + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete variable", + "operationId": "sitesDeleteVariable", + "tags": [ + "sites" + ], + "description": "Delete a variable by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "variables", + "demo": "sites\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<VARIABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets": { + "get": { + "summary": "List buckets", + "operationId": "storageListBuckets", + "tags": [ + "storage" + ], + "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Buckets List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucketList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "buckets", + "demo": "storage\/list-buckets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 bucket", + "operationId": "storageCreateBucket", + "tags": [ + "storage" + ], + "description": "Create a new storage bucket.", + "responses": { + "201": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "buckets", + "demo": "storage\/create-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.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": { + "bucketId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<BUCKET_ID>" + }, + "name": { + "description": "Bucket name", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "fileSecurity": { + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "maximumFileSize": { + "description": "Maximum file size allowed in bytes. Maximum allowed value is 0B.", + "type": "integer", + "default": {}, + "example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "compression": { + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "type": "string", + "default": "none", + "example": "none", + "title": "Compression", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "gzip" + ], + "title": "gzip" + }, + { + "type": "string", + "enum": [ + "zstd" + ], + "title": "zstd" + } + ] + }, + "encryption": { + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "type": "boolean", + "default": true, + "example": false + }, + "antivirus": { + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "type": "boolean", + "default": true, + "example": false + }, + "transformations": { + "description": "Are image transformations enabled?", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "bucketId", + "name" + ] + } + } + } + } + } + }, + "\/storage\/buckets\/{bucketId}": { + "get": { + "summary": "Get bucket", + "operationId": "storageGetBucket", + "tags": [ + "storage" + ], + "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", + "responses": { + "200": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "buckets", + "demo": "storage\/get-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update bucket", + "operationId": "storageUpdateBucket", + "tags": [ + "storage" + ], + "description": "Update a storage bucket by its unique ID.", + "responses": { + "200": { + "description": "Bucket", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/bucket" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "buckets", + "demo": "storage\/update-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Bucket name", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "fileSecurity": { + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "maximumFileSize": { + "description": "Maximum file size allowed in bytes. Maximum allowed value is 0B.", + "type": "integer", + "default": {}, + "example": 1, + "format": "int32" + }, + "allowedFileExtensions": { + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "compression": { + "description": "Compression algorithm chosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled", + "type": "string", + "default": "none", + "example": "none", + "title": "Compression", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "gzip" + ], + "title": "gzip" + }, + { + "type": "string", + "enum": [ + "zstd" + ], + "title": "zstd" + } + ] + }, + "encryption": { + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "type": "boolean", + "default": true, + "example": false + }, + "antivirus": { + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "type": "boolean", + "default": true, + "example": false + }, + "transformations": { + "description": "Are image transformations enabled?", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete bucket", + "operationId": "storageDeleteBucket", + "tags": [ + "storage" + ], + "description": "Delete a storage bucket by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "buckets", + "demo": "storage\/delete-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files": { + "get": { + "summary": "List files", + "operationId": "storageListFiles", + "tags": [ + "storage" + ], + "description": "Get a list of all the user files. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Files List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/fileList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "storage\/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, folder, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 file", + "operationId": "storageCreateFile", + "tags": [ + "storage" + ], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "fileId": { + "description": "File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<FILE_ID>" + }, + "file": { + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "type": "string", + "format": "binary" + }, + "permissions": { + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "folder": { + "description": "Virtual folder to place the file in, for example \"photos\/2026\". Nest folders with `\/`. Defaults to the bucket root.", + "type": "string", + "default": "", + "example": "photos\/2026" + } + }, + "required": [ + "fileId", + "file" + ] + } + } + } + } + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", + "tags": [ + "storage" + ], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "storage\/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FILE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", + "tags": [ + "storage" + ], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "storage\/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FILE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "File name.", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete file", + "operationId": "storageDeleteFile", + "tags": [ + "storage" + ], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FILE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "get": { + "summary": "Get file for download", + "operationId": "storageGetFileDownload", + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { + "description": "File", + "content": { + "*\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "storage\/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { + "get": { + "summary": "Get file preview", + "operationId": "storageGetFilePreview", + "tags": [ + "storage" + ], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "storage\/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "schema": { + "type": "string", + "example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of auto,center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "schema": { + "type": "string", + "example": "auto", + "title": "ImageGravity", + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ], + "title": "auto" + }, + { + "type": "string", + "enum": [ + "center" + ], + "title": "center" + }, + { + "type": "string", + "enum": [ + "top-left" + ], + "title": "top-left" + }, + { + "type": "string", + "enum": [ + "top" + ], + "title": "top" + }, + { + "type": "string", + "enum": [ + "top-right" + ], + "title": "top-right" + }, + { + "type": "string", + "enum": [ + "left" + ], + "title": "left" + }, + { + "type": "string", + "enum": [ + "right" + ], + "title": "right" + }, + { + "type": "string", + "enum": [ + "bottom-left" + ], + "title": "bottom-left" + }, + { + "type": "string", + "enum": [ + "bottom" + ], + "title": "bottom" + }, + { + "type": "string", + "enum": [ + "bottom-right" + ], + "title": "bottom-right" + } + ], + "default": "center" + }, + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": -1, + "default": -1 + }, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "schema": { + "type": "string", + "example": "FFFFFF", + "default": "" + }, + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": -360, + "default": 0 + }, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "schema": { + "type": "string", + "example": "FFFFFF", + "default": "" + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "example": "jpg", + "title": "ImageFormat", + "oneOf": [ + { + "type": "string", + "enum": [ + "jpg" + ], + "title": "jpg" + }, + { + "type": "string", + "enum": [ + "jpeg" + ], + "title": "jpeg" + }, + { + "type": "string", + "enum": [ + "png" + ], + "title": "png" + }, + { + "type": "string", + "enum": [ + "webp" + ], + "title": "webp" + }, + { + "type": "string", + "enum": [ + "heic" + ], + "title": "heic" + }, + { + "type": "string", + "enum": [ + "avif" + ], + "title": "avif" + }, + { + "type": "string", + "enum": [ + "gif" + ], + "title": "gif" + } + ] + }, + "in": "query" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", + "tags": [ + "storage" + ], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { + "description": "File", + "content": { + "*\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "storage\/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [], + "ImpersonateUserId": [] + }, + "client": { + "Project": [], + "ImpersonateUserId": [] + }, + "server": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + }, + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tablesdb", + "demo": "tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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 columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 database", + "operationId": "tablesDBCreate", + "tags": [ + "tablesDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tablesdb", + "demo": "tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.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": { + "databaseId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "name": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "specification": { + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "type": "string", + "default": "serverless", + "example": "serverless" + }, + "replicas": { + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "syncMode": { + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "tablesDBListSpecifications", + "tags": [ + "tablesDB" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, its own prices and overage rates, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tablesdb", + "demo": "tablesdb\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/tablesdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "tablesDBListTransactions", + "tags": [ + "tablesDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "tablesdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", + "tags": [ + "tablesDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "tablesdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "description": "Seconds before the transaction expires.", + "type": "integer", + "default": 300, + "example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/tablesdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", + "tags": [ + "tablesDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "tablesdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", + "tags": [ + "tablesDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "tablesdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "description": "Commit transaction?", + "type": "boolean", + "default": false, + "example": false + }, + "rollback": { + "description": "Rollback transaction?", + "type": "boolean", + "default": false, + "example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "tablesdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", + "tags": [ + "tablesDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "tablesdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "description": "Array of staged operations.", + "type": "array", + "default": [], + "example": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ], + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDBGet", + "tags": [ + "tablesDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tablesdb", + "demo": "tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", + "tags": [ + "tablesDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tablesdb", + "demo": "tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "specification": { + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "type": "string", + "example": "serverless", + "nullable": true + }, + "replicas": { + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "syncMode": { + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", + "tags": [ + "tablesDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tablesdb", + "demo": "tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "tablesDBCreateFailover", + "tags": [ + "tablesDB" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "failovers", + "demo": "tablesdb\/create-failover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "type": "string", + "example": "<TARGET_REPLICA_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/migrations": { + "get": { + "summary": "List migrations", + "operationId": "tablesDBListMigrations", + "tags": [ + "tablesDB" + ], + "description": "List the dedicated migrations for a TablesDB database. A database has at most one in-flight migration.", + "responses": { + "200": { + "description": "Database Migrations List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseMigrationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "migrations", + "demo": "tablesdb\/list-migrations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create migration", + "operationId": "tablesDBCreateMigration", + "tags": [ + "tablesDB" + ], + "description": "Start migrating a serverless TablesDB database onto a dedicated MySQL compute. Data is copied to the target while the source stays live, with a brief read-only window during cutover.", + "responses": { + "201": { + "description": "Database Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseMigration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "migrations", + "demo": "tablesdb\/create-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "specification": { + "description": "Dedicated compute specification to provision as the migration target (e.g. s-2vcpu-4gb). The migration always targets a dedicated compute, so `serverless` is not accepted.", + "type": "string", + "example": "s-1vcpu-1gb" + }, + "autoCutover": { + "description": "Whether to cut over automatically once the copy is verified. When disabled the migration parks at ready_to_cutover and holds there until the cutover is performed manually.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "specification" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/migrations\/{migrationId}": { + "get": { + "summary": "Get migration", + "operationId": "tablesDBGetMigration", + "tags": [ + "tablesDB" + ], + "description": "Get a single dedicated migration for a TablesDB database by its ID.", + "responses": { + "200": { + "description": "Database Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseMigration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "migrations", + "demo": "tablesdb\/get-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete migration", + "operationId": "tablesDBDeleteMigration", + "tags": [ + "tablesDB" + ], + "description": "Abort an in-flight TablesDB dedicated migration. Only allowed before cutover; once the migration has cut over it cannot be aborted.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "migrations", + "demo": "tablesdb\/delete-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/migrations\/{migrationId}\/cutovers": { + "post": { + "summary": "Cutover migration", + "operationId": "tablesDBCreateCutover", + "tags": [ + "tablesDB" + ], + "description": "Cut a verified TablesDB migration over to its dedicated compute. Only applies to a migration created with `autoCutover` disabled, which waits at `ready_to_cutover` until this is called. The routing flip happens shortly after this returns, with a brief read-only window. One call buys one attempt: a cutover that fails a check returns the migration to `verifying` and parks it again, so call this once more to retry.", + "responses": { + "200": { + "description": "Database Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseMigration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "migrations", + "demo": "tablesdb\/create-cutover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "tablesDBListOperations", + "tags": [ + "tablesDB" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "operations", + "demo": "tablesdb\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "example": "queued" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "tablesDBGetReplicas", + "tags": [ + "tablesDB" + ], + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", + "responses": { + "200": { + "description": "Replicas", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "replicas", + "demo": "tablesdb\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "tablesDBGetStatus", + "tags": [ + "tablesDB" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tablesdb", + "demo": "tablesdb\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDBListTables", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tables", + "demo": "tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 table", + "operationId": "tablesDBCreateTable", + "tags": [ + "tablesDB" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tables", + "demo": "tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<TABLE_ID>" + }, + "name": { + "description": "Table name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "rowSecurity": { + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "columns": { + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "type": "array", + "default": [], + "items": { + "type": "object" + } + }, + "indexes": { + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "type": "array", + "default": [], + "items": { + "type": "object" + } + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDBGetTable", + "tags": [ + "tablesDB" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tables", + "demo": "tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDBUpdateTable", + "tags": [ + "tablesDB" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tables", + "demo": "tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Table name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "permissions": { + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "rowSecurity": { + "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "purge": { + "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "type": "boolean", + "default": false, + "example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDBDeleteTable", + "tags": [ + "tablesDB" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tables", + "demo": "tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDBListColumns", + "tags": [ + "tablesDB" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/bigint": { + "post": { + "summary": "Create bigint column", + "operationId": "tablesDBCreateBigIntColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a bigint column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnBigInt", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBigint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-big-int-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "integer", + "example": 1000000, + "format": "int64", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when column is required.", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/bigint\/{key}": { + "patch": { + "summary": "Update bigint column", + "operationId": "tablesDBUpdateBigIntColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a bigint column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnBigInt", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBigint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-big-int-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "integer", + "example": 1000000, + "format": "int64", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when column is required.", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "boolean", + "example": false, + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "boolean", + "example": false, + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update datetime column", + "operationId": "tablesDBUpdateDatetimeColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "elements": { + "description": "Array of enum values.", + "type": "array", + "example": [ + "active", + "inactive" + ], + "items": { + "type": "string" + } + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "active", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "description": "Updated list of enum values.", + "type": "array", + "example": [ + "active", + "inactive" + ], + "items": { + "type": "string" + } + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "active", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "number", + "example": 0, + "format": "float", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "number", + "example": 100, + "format": "float", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when required.", + "type": "number", + "example": 10.5, + "format": "float", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "number", + "example": 0, + "format": "float", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "number", + "example": 100, + "format": "float", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when required.", + "type": "number", + "example": 10.5, + "format": "float", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", + "tags": [ + "tablesDB" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "integer", + "example": 100, + "format": "int64", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when column is required.", + "type": "integer", + "example": 10, + "format": "int64", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "min": { + "description": "Minimum value", + "type": "integer", + "example": 0, + "format": "int64", + "nullable": true + }, + "max": { + "description": "Maximum value", + "type": "integer", + "example": 100, + "format": "int64", + "nullable": true + }, + "default": { + "description": "Default value. Cannot be set when column is required.", + "type": "integer", + "example": 10, + "format": "int64", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value. Cannot be set when column is required.", + "type": "string", + "example": "192.0.2.0", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value. Cannot be set when column is required.", + "type": "string", + "example": "192.0.2.0", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { + "post": { + "summary": "Create line column", + "operationId": "tablesDBCreateLineColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric line column.", + "responses": { + "202": { + "description": "ColumnLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLine" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "type": "array", + "example": [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ], + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { + "patch": { + "summary": "Update line column", + "operationId": "tablesDBUpdateLineColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a line column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLine" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-line-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "type": "array", + "example": [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ], + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { + "post": { + "summary": "Create longtext column", + "operationId": "tablesDBCreateLongtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a longtext column.\n", + "responses": { + "202": { + "description": "ColumnLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { + "patch": { + "summary": "Update longtext column", + "operationId": "tablesDBUpdateLongtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLongtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-longtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { + "post": { + "summary": "Create mediumtext column", + "operationId": "tablesDBCreateMediumtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a mediumtext column.\n", + "responses": { + "202": { + "description": "ColumnMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext column", + "operationId": "tablesDBUpdateMediumtextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnMediumtext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-mediumtext-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { + "post": { + "summary": "Create point column", + "operationId": "tablesDBCreatePointColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric point column.", + "responses": { + "202": { + "description": "ColumnPoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPoint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "type": "array", + "example": [ + 1, + 2 + ], + "items": { + "type": "number", + "format": "double" + }, + "nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { + "patch": { + "summary": "Update point column", + "operationId": "tablesDBUpdatePointColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a point column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPoint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-point-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "type": "array", + "example": [ + 1, + 2 + ], + "items": { + "type": "number", + "format": "double" + }, + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { + "post": { + "summary": "Create polygon column", + "operationId": "tablesDBCreatePolygonColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a geometric polygon column.", + "responses": { + "202": { + "description": "ColumnPolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPolygon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "type": "array", + "example": [ + [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ], + [ + 1, + 2 + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { + "patch": { + "summary": "Update polygon column", + "operationId": "tablesDBUpdatePolygonColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnPolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnPolygon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-polygon-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "type": "array", + "example": [ + [ + [ + 1, + 2 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ], + [ + 1, + 2 + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "description": "Related Table ID.", + "type": "string", + "example": "<RELATED_TABLE_ID>" + }, + "type": { + "description": "Relationship type. Possible values are: oneToOne, oneToMany, manyToOne, manyToMany.", + "type": "string", + "example": "oneToOne", + "title": "RelationshipType", + "oneOf": [ + { + "type": "string", + "enum": [ + "oneToOne" + ], + "title": "oneToOne" + }, + { + "type": "string", + "enum": [ + "manyToOne" + ], + "title": "manyToOne" + }, + { + "type": "string", + "enum": [ + "manyToMany" + ], + "title": "manyToMany" + }, + { + "type": "string", + "enum": [ + "oneToMany" + ], + "title": "oneToMany" + } + ] + }, + "twoWay": { + "description": "Is Two Way?", + "type": "boolean", + "default": false, + "example": false + }, + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>", + "nullable": true + }, + "twoWayKey": { + "description": "Two Way Column Key.", + "type": "string", + "example": "<TWO_WAY_KEY>", + "nullable": true + }, + "onDelete": { + "description": "Delete constraint. Possible values are: cascade, restrict, setNull.", + "type": "string", + "default": "restrict", + "example": "cascade", + "title": "RelationMutate", + "oneOf": [ + { + "type": "string", + "enum": [ + "cascade" + ], + "title": "cascade" + }, + { + "type": "string", + "enum": [ + "restrict" + ], + "title": "restrict" + }, + { + "type": "string", + "enum": [ + "setNull" + ], + "title": "setNull" + } + ] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship\/{key}": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", + "tags": [ + "tablesDB" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "description": "Delete constraint. Possible values are: cascade, restrict, setNull.", + "type": "string", + "example": "cascade", + "title": "RelationMutate", + "oneOf": [ + { + "type": "string", + "enum": [ + "cascade" + ], + "title": "cascade" + }, + { + "type": "string", + "enum": [ + "restrict" + ], + "title": "restrict" + }, + { + "type": "string", + "enum": [ + "setNull" + ], + "title": "setNull" + } + ], + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.9.0", + "replaceWith": "tablesDB.createTextColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "size": { + "description": "Column size for text columns, in number of characters.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTextColumn" + }, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "size": { + "description": "Maximum size of the string column.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { + "post": { + "summary": "Create text column", + "operationId": "tablesDBCreateTextColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a text column.\n", + "responses": { + "202": { + "description": "ColumnText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { + "patch": { + "summary": "Update text column", + "operationId": "tablesDBUpdateTextColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnText" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-text-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", + "tags": [ + "tablesDB" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { + "post": { + "summary": "Create varchar column", + "operationId": "tablesDBCreateVarcharColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a varchar column.\n", + "responses": { + "202": { + "description": "ColumnVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/create-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Column Key.", + "type": "string", + "example": "<KEY>" + }, + "size": { + "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "array": { + "description": "Is column an array?", + "type": "boolean", + "default": false, + "example": false + }, + "encrypt": { + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "type": "boolean", + "default": false, + "example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { + "patch": { + "summary": "Update varchar column", + "operationId": "tablesDBUpdateVarcharColumn", + "tags": [ + "tablesDB" + ], + "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnVarchar" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/update-varchar-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "description": "Is column required?", + "type": "boolean", + "example": false + }, + "default": { + "description": "Default value for column when not provided. Cannot be set when column is required.", + "type": "string", + "example": "Hello World", + "nullable": true + }, + "size": { + "description": "Maximum size of the varchar column.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "newKey": { + "description": "New Column Key.", + "type": "string", + "example": "<NEW_KEY>", + "nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", + "tags": [ + "tablesDB" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "anyOf": [ + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "boolean" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "integer" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "double" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "email" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "enum" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "url" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "ip" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "datetime" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "relationship" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnString" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + } + } + } + ] + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDBDeleteColumn", + "tags": [ + "tablesDB" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "columns", + "demo": "tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", + "tags": [ + "tablesDB" + ], + "description": "List indexes on the table.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDBCreateIndex", + "tags": [ + "tablesDB" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Index Key.", + "type": "string", + "example": "<KEY>" + }, + "type": { + "description": "Index type.", + "type": "string", + "example": "key", + "title": "TablesDBIndexType", + "oneOf": [ + { + "type": "string", + "enum": [ + "key" + ], + "title": "key" + }, + { + "type": "string", + "enum": [ + "fulltext" + ], + "title": "fulltext" + }, + { + "type": "string", + "enum": [ + "unique" + ], + "title": "unique" + }, + { + "type": "string", + "enum": [ + "spatial" + ], + "title": "spatial" + } + ] + }, + "columns": { + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "type": "array", + "items": { + "type": "string" + } + }, + "orders": { + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "type": "array", + "default": [], + "items": { + "title": "OrderBy", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "asc" + ], + "title": "asc" + }, + { + "type": "string", + "enum": [ + "desc" + ], + "title": "desc" + } + ] + } + }, + "lengths": { + "description": "Length of index. Maximum of 100", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", + "tags": [ + "tablesDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.read", + "collections.read", + "indexes.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", + "tags": [ + "tablesDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "indexes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "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" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "Create row", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + }, + { + "name": "createRows", + "namespace": "tablesDB", + "platforms": [ + "console", + "server" + ], + "summary": "Create rows", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<ROW_ID>" + }, + "data": { + "description": "Row data as JSON object.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + }, + "permissions": { + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "rows": { + "description": "Array of rows data as JSON objects.", + "type": "array", + "default": [], + "items": { + "type": "object" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + }, + "required": [ + "rowId", + "data" + ] + } + } + } + } + }, + "put": { + "summary": "Upsert rows", + "operationId": "tablesDBUpsertRows", + "tags": [ + "tablesDB" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "description": "Array of row data as JSON objects. May contain partial rows.", + "type": "array", + "items": { + "type": "object" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDBUpdateRows", + "tags": [ + "tablesDB" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + } + }, + "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.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDBDeleteRows", + "tags": [ + "tablesDB" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", + "tags": [ + "tablesDB" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ROW_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + } + }, + "permissions": { + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", + "tags": [ + "tablesDB" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ROW_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "type": "object", + "default": {}, + "example": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 33, + "isAdmin": false + } + }, + "permissions": { + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + }, + "nullable": true + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", + "tags": [ + "tablesDB" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string", + "example": "<COLUMN>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "description": "Value to increment the column by. The value must be a number.", + "type": "number", + "default": 1, + "example": 1, + "format": "float" + }, + "min": { + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "type": "number", + "example": 0, + "format": "float", + "nullable": true + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", + "tags": [ + "tablesDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rows", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string", + "example": "<COLUMN>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "description": "Value to increment the column by. The value must be a number.", + "type": "number", + "default": 1, + "example": 1, + "format": "float" + }, + "max": { + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "type": "number", + "example": 100, + "format": "float", + "nullable": true + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", + "tags": [ + "teams" + ], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "responses": { + "200": { + "description": "Teams List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/teamList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "teams", + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 team", + "operationId": "teamsCreate", + "tags": [ + "teams" + ], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "teams", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<TEAM_ID>" + }, + "name": { + "description": "Team name. Max length: 128 chars.", + "type": "string", + "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.", + "type": "array", + "default": [ + "owner" + ], + "items": { + "type": "string" + } + } + }, + "required": [ + "teamId", + "name" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", + "tags": [ + "teams" + ], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "teams", + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", + "tags": [ + "teams" + ], + "description": "Update the team's name by its unique ID.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "teams", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "New team name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "teams", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/installations": { + "get": { + "summary": "List Installations", + "operationId": "teamsListInstallations", + "tags": [ + "teams" + ], + "description": "List app installations on a team. Any team member can read installations.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "teams\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "teamsCreateInstallation", + "tags": [ + "teams" + ], + "description": "Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "teams\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "description": "Application unique ID.", + "type": "string", + "example": "<APP_ID>" + }, + "authorizationDetails": { + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "type": "string", + "default": "", + "example": "<AUTHORIZATION_DETAILS>" + } + }, + "required": [ + "appId" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "teamsGetInstallation", + "tags": [ + "teams" + ], + "description": "Get an app installation on a team by its unique ID. Any team member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "teams\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "teamsUpdateInstallation", + "tags": [ + "teams" + ], + "description": "Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "teams\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "type": "string", + "example": "<AUTHORIZATION_DETAILS>", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "teamsDeleteInstallation", + "tags": [ + "teams" + ], + "description": "Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "teams\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships": { + "get": { + "summary": "List team memberships", + "operationId": "teamsListMemberships", + "tags": [ + "teams" + ], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "teams\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 team membership", + "operationId": "teamsCreateMembership", + "tags": [ + "teams" + ], + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "responses": { + "201": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "teams\/create-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "Email of the new team member.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "userId": { + "description": "ID of the user to be added to a team.", + "type": "string", + "default": "", + "example": "<USER_ID>" + }, + "phone": { + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "default": "", + "example": "+12065550100", + "format": "phone" + }, + "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", + "items": { + "type": "string" + } + }, + "url": { + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "type": "string", + "default": "", + "example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "description": "Name of the new team member. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "roles" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}": { + "get": { + "summary": "Get team membership", + "operationId": "teamsGetMembership", + "tags": [ + "teams" + ], + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "teams\/get-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update team membership", + "operationId": "teamsUpdateMembership", + "tags": [ + "teams" + ], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "teams\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team membership", + "operationId": "teamsDeleteMembership", + "tags": [ + "teams" + ], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "teams\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "patch": { + "summary": "Update team membership status", + "operationId": "teamsUpdateMembershipStatus", + "tags": [ + "teams" + ], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "teams\/update-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "description": "User ID.", + "type": "string", + "example": "<USER_ID>" + }, + "secret": { + "description": "Secret key.", + "type": "string", + "example": "<SECRET>" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", + "tags": [ + "teams" + ], + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "teams", + "demo": "teams\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update team preferences", + "operationId": "teamsUpdatePrefs", + "tags": [ + "teams" + ], + "description": "Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "teams", + "demo": "teams\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "description": "Prefs key-value JSON object.", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "List tokens", + "operationId": "tokensList", + "tags": [ + "tokens" + ], + "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Resource Tokens List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceTokenList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "tokens\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file token", + "operationId": "tokensCreateFileToken", + "tags": [ + "tokens" + ], + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", + "responses": { + "201": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "files", + "demo": "tokens\/create-file-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<FILE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "expire": { + "description": "Token expiry date", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + } + } + } + } + } + } + }, + "\/tokens\/{tokenId}": { + "get": { + "summary": "Get token", + "operationId": "tokensGet", + "tags": [ + "tokens" + ], + "description": "Get a token by its unique ID.", + "responses": { + "200": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "tokens\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update token", + "operationId": "tokensUpdate", + "tags": [ + "tokens" + ], + "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", + "responses": { + "200": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "tokens\/update.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TOKEN_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "expire": { + "description": "File token expiry date", + "type": "string", + "example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete token", + "operationId": "tokensDelete", + "tags": [ + "tokens" + ], + "description": "Delete a token by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "tokens\/delete.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "tokenId", + "description": "Token ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + } + }, + "\/usage\/events": { + "get": { + "summary": "List usage events", + "operationId": "usageListEvents", + "tags": [ + "usage" + ], + "description": "Aggregate usage event metrics. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.\n\n**Two response shapes**:\n- Omit `interval` for a flat top-N table \u2014 one point per dimension combination, no time axis. Useful for \"top 10 paths by bandwidth in the last 7 days\".\n- Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series \u2014 one point per (time bucket \u00d7 dimension combination).\n\n`dimensions[]` breaks each point down by one or more attributes (service, path, status, country, \u2026). `queries[]` filters the underlying events using the standard Utopia query syntax \u2014 `equal(\"path\", [\"\/v1\/storage\/files\"])`, `equal(\"resourceType\", [\"bucket\"])`, `equal(\"resourceId\", [\"abc123\"])`, `startsWith(\"path\", [\"\/v1\/storage\"])`, `equal(\"status\", [\"200\", \"201\"])`, `isNotNull(\"resourceId\")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `contains`, `startsWith`, `endsWith`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N by aggregated value. When `startAt` is omitted, the default window adapts to `interval` (or 7d when interval is omitted).", + "responses": { + "200": { + "description": "usageEventList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageEventList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "events", + "demo": "usage\/list-events.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "projectId:{project.$id}", + "scope": [ + "usage.read", + "account" + ], + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "metrics", + "description": "One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts. On console: `metrics[]=affiliates.clicks`.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "anyOf": [ + { + "title": "UsageEventMetric", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "network.requests" + ], + "title": "network.requests" + }, + { + "type": "string", + "enum": [ + "network.inbound" + ], + "title": "network.inbound" + }, + { + "type": "string", + "enum": [ + "network.outbound" + ], + "title": "network.outbound" + }, + { + "type": "string", + "enum": [ + "webhooks.events.sent" + ], + "title": "webhooks.events.sent" + }, + { + "type": "string", + "enum": [ + "webhooks.events.failed" + ], + "title": "webhooks.events.failed" + }, + { + "type": "string", + "enum": [ + "auth.method.phone" + ], + "title": "auth.method.phone" + }, + { + "type": "string", + "enum": [ + "messages.sent" + ], + "title": "messages.sent" + }, + { + "type": "string", + "enum": [ + "messages.sms.sent" + ], + "title": "messages.sms.sent" + }, + { + "type": "string", + "enum": [ + "executions" + ], + "title": "executions" + }, + { + "type": "string", + "enum": [ + "executions.compute" + ], + "title": "executions.compute" + }, + { + "type": "string", + "enum": [ + "executions.mbSeconds" + ], + "title": "executions.mbSeconds" + }, + { + "type": "string", + "enum": [ + "functions.executions" + ], + "title": "functions.executions" + }, + { + "type": "string", + "enum": [ + "sites.executions" + ], + "title": "sites.executions" + }, + { + "type": "string", + "enum": [ + "functions.executions.compute" + ], + "title": "functions.executions.compute" + }, + { + "type": "string", + "enum": [ + "sites.executions.compute" + ], + "title": "sites.executions.compute" + }, + { + "type": "string", + "enum": [ + "functions.executions.mbSeconds" + ], + "title": "functions.executions.mbSeconds" + }, + { + "type": "string", + "enum": [ + "sites.executions.mbSeconds" + ], + "title": "sites.executions.mbSeconds" + }, + { + "type": "string", + "enum": [ + "builds" + ], + "title": "builds" + }, + { + "type": "string", + "enum": [ + "builds.success" + ], + "title": "builds.success" + }, + { + "type": "string", + "enum": [ + "builds.failed" + ], + "title": "builds.failed" + }, + { + "type": "string", + "enum": [ + "builds.compute" + ], + "title": "builds.compute" + }, + { + "type": "string", + "enum": [ + "builds.compute.success" + ], + "title": "builds.compute.success" + }, + { + "type": "string", + "enum": [ + "builds.compute.failed" + ], + "title": "builds.compute.failed" + }, + { + "type": "string", + "enum": [ + "builds.mbSeconds" + ], + "title": "builds.mbSeconds" + }, + { + "type": "string", + "enum": [ + "functions.builds.mbSeconds" + ], + "title": "functions.builds.mbSeconds" + }, + { + "type": "string", + "enum": [ + "sites.builds.mbSeconds" + ], + "title": "sites.builds.mbSeconds" + }, + { + "type": "string", + "enum": [ + "databases.operations.reads" + ], + "title": "databases.operations.reads" + }, + { + "type": "string", + "enum": [ + "databases.operations.writes" + ], + "title": "databases.operations.writes" + }, + { + "type": "string", + "enum": [ + "documentsdb.databases.operations.reads" + ], + "title": "documentsdb.databases.operations.reads" + }, + { + "type": "string", + "enum": [ + "documentsdb.databases.operations.writes" + ], + "title": "documentsdb.databases.operations.writes" + }, + { + "type": "string", + "enum": [ + "vectorsdb.databases.operations.reads" + ], + "title": "vectorsdb.databases.operations.reads" + }, + { + "type": "string", + "enum": [ + "vectorsdb.databases.operations.writes" + ], + "title": "vectorsdb.databases.operations.writes" + }, + { + "type": "string", + "enum": [ + "files.imagesTransformed" + ], + "title": "files.imagesTransformed" + }, + { + "type": "string", + "enum": [ + "avatars.screenshotsGenerated" + ], + "title": "avatars.screenshotsGenerated" + }, + { + "type": "string", + "enum": [ + "realtime.messages.sent" + ], + "title": "realtime.messages.sent" + }, + { + "type": "string", + "enum": [ + "realtime.inbound" + ], + "title": "realtime.inbound" + }, + { + "type": "string", + "enum": [ + "realtime.outbound" + ], + "title": "realtime.outbound" + }, + { + "type": "string", + "enum": [ + "embeddings.text" + ], + "title": "embeddings.text" + }, + { + "type": "string", + "enum": [ + "embeddings.text.totalTokens" + ], + "title": "embeddings.text.totalTokens" + }, + { + "type": "string", + "enum": [ + "embeddings.text.totalDuration" + ], + "title": "embeddings.text.totalDuration" + }, + { + "type": "string", + "enum": [ + "embeddings.text.totalErrors" + ], + "title": "embeddings.text.totalErrors" + }, + { + "type": "string", + "enum": [ + "waf.requests.denied" + ], + "title": "waf.requests.denied" + }, + { + "type": "string", + "enum": [ + "waf.requests.challenged" + ], + "title": "waf.requests.challenged" + }, + { + "type": "string", + "enum": [ + "waf.requests.rateLimited" + ], + "title": "waf.requests.rateLimited" + }, + { + "type": "string", + "enum": [ + "waf.requests.redirected" + ], + "title": "waf.requests.redirected" + }, + { + "type": "string", + "enum": [ + "waf.requests.challengeSolved" + ], + "title": "waf.requests.challengeSolved" + }, + { + "type": "string", + "enum": [ + "waf.challenge.solveTimeMs" + ], + "title": "waf.challenge.solveTimeMs" + }, + { + "type": "string", + "enum": [ + "affiliates.clicks" + ], + "title": "affiliates.clicks" + }, + { + "type": "string", + "enum": [ + "affiliates.signups" + ], + "title": "affiliates.signups" + }, + { + "type": "string", + "enum": [ + "affiliates.conversions" + ], + "title": "affiliates.conversions" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.inbound" + ], + "title": "dedicatedDatabases.inbound" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.outbound" + ], + "title": "dedicatedDatabases.outbound" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.compute" + ], + "title": "dedicatedDatabases.compute" + } + ] + }, + { + "type": "string" + } + ] + } + }, + "in": "query" + }, + { + "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\"])`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "interval", + "description": "Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.", + "required": false, + "schema": { + "type": "string", + "example": "1m", + "title": "UsageInterval", + "oneOf": [ + { + "type": "string", + "enum": [ + "1m" + ], + "title": "One Minute" + }, + { + "type": "string", + "enum": [ + "15m" + ], + "title": "Fifteen Minutes" + }, + { + "type": "string", + "enum": [ + "30m" + ], + "title": "Thirty Minutes" + }, + { + "type": "string", + "enum": [ + "1h" + ], + "title": "One Hour" + }, + { + "type": "string", + "enum": [ + "1d" + ], + "title": "One Day" + } + ] + }, + "in": "query" + }, + { + "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "title": "UsageEventDimension", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "path" + ], + "title": "path" + }, + { + "type": "string", + "enum": [ + "method" + ], + "title": "method" + }, + { + "type": "string", + "enum": [ + "status" + ], + "title": "status" + }, + { + "type": "string", + "enum": [ + "service" + ], + "title": "service" + }, + { + "type": "string", + "enum": [ + "resourceType" + ], + "title": "resourceType" + }, + { + "type": "string", + "enum": [ + "country" + ], + "title": "country" + }, + { + "type": "string", + "enum": [ + "continentCode" + ], + "title": "continentCode" + }, + { + "type": "string", + "enum": [ + "city" + ], + "title": "city" + }, + { + "type": "string", + "enum": [ + "region" + ], + "title": "region" + }, + { + "type": "string", + "enum": [ + "hostname" + ], + "title": "hostname" + }, + { + "type": "string", + "enum": [ + "ip" + ], + "title": "ip" + }, + { + "type": "string", + "enum": [ + "osName" + ], + "title": "osName" + }, + { + "type": "string", + "enum": [ + "clientType" + ], + "title": "clientType" + }, + { + "type": "string", + "enum": [ + "clientName" + ], + "title": "clientName" + }, + { + "type": "string", + "enum": [ + "deviceName" + ], + "title": "deviceName" + }, + { + "type": "string", + "enum": [ + "sdk" + ], + "title": "sdk" + }, + { + "type": "string", + "enum": [ + "sdkVersion" + ], + "title": "sdkVersion" + }, + { + "type": "string", + "enum": [ + "teamId" + ], + "title": "teamId" + }, + { + "type": "string", + "enum": [ + "resourceId" + ], + "title": "resourceId" + }, + { + "type": "string", + "enum": [ + "isp" + ], + "title": "isp" + }, + { + "type": "string", + "enum": [ + "autonomousSystemNumber" + ], + "title": "autonomousSystemNumber" + }, + { + "type": "string", + "enum": [ + "autonomousSystemOrganization" + ], + "title": "autonomousSystemOrganization" + }, + { + "type": "string", + "enum": [ + "connectionType" + ], + "title": "connectionType" + }, + { + "type": "string", + "enum": [ + "connectionUsageType" + ], + "title": "connectionUsageType" + }, + { + "type": "string", + "enum": [ + "connectionOrganization" + ], + "title": "connectionOrganization" + } + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "startAt", + "description": "Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).", + "required": false, + "schema": { + "type": "string", + "format": "datetime", + "example": "2020-10-15T06:38:00.000+00:00", + "default": "" + }, + "in": "query" + }, + { + "name": "endAt", + "description": "Range 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": "orderBy", + "description": "Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.", + "required": false, + "schema": { + "type": "string", + "example": "time", + "title": "UsageOrderBy", + "oneOf": [ + { + "type": "string", + "enum": [ + "time" + ], + "title": "time" + }, + { + "type": "string", + "enum": [ + "value" + ], + "title": "value" + } + ], + "default": "time" + }, + "in": "query" + }, + { + "name": "orderDir", + "description": "Sort direction: asc or desc. Default desc \u2014 paired with the default limit, returns the most recent \/ highest-value groups first.", + "required": false, + "schema": { + "type": "string", + "example": "asc", + "title": "UsageOrderDirection", + "oneOf": [ + { + "type": "string", + "enum": [ + "asc" + ], + "title": "asc" + }, + { + "type": "string", + "enum": [ + "desc" + ], + "title": "desc" + } + ], + "default": "desc" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum rows to return (1-5000).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 500 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Pagination offset (0-100000).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/usage\/gauges": { + "get": { + "summary": "List usage gauges", + "operationId": "usageListGauges", + "tags": [ + "usage" + ], + "description": "Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, \u2026); each point carries the latest snapshot in its interval via `argMax(value, time)`. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.\n\nA metric with no stored samples in the window returns an empty `points[]`. A metric that really did read zero returns a point whose `value` is `0`, so \"no such series\" and \"a genuine zero\" are different answers.\n\n**Two response shapes**:\n- Omit `interval` for a flat top-N table \u2014 `argMax(value, time)` per dimension combination over the whole window, no time axis. Useful for \"top 10 resources by current storage\".\n- Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series \u2014 one snapshot per (time bucket \u00d7 dimension combination).\n\n`dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`, `ordinal`. `service` and `resourceType` enable per-service \/ per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `ordinal` separates per-node series for multi-node resources such as dedicated databases. It is a stable per-node identity, not a role \u2014 ordinal 0 is the first member created, and a failover can leave the primary on any ordinal, so read the role from the database's replicas endpoint rather than inferring it here. `queries[]` filters the underlying rows using the standard Utopia query syntax \u2014 `equal(\"resourceType\", [\"bucket\"])`, `equal(\"resourceId\", [\"abc123\"])`, `equal(\"teamId\", [\"team_x\"])`, `equal(\"ordinal\", [\"0\"])`, `isNotNull(\"teamId\")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).\n\n`aggregate` selects how the samples in a bucket are combined: `last` (default) is the latest reading \u2014 correct for a snapshot such as storage \u2014 while `max` is the highest reading. Use `max` for a sampled level series: peak concurrent realtime connections is `metrics[]=realtime.connections&aggregate=max`, at whatever `interval` the chart needs, since the peak of a set of samples is just the max of their per-bucket maxima. `realtime.connections` is served only here - it is a concurrency level, not a countable event, so `\/v1\/usage\/events` rejects it.", + "responses": { + "200": { + "description": "usageGaugeList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageGaugeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "gauges", + "demo": "usage\/list-gauges.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "projectId:{project.$id}", + "scope": "usage.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "metrics", + "description": "One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=files.storage` or `metrics[]=files.storage&metrics[]=deployments.storage` for stacked charts.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "anyOf": [ + { + "title": "UsageGaugeMetric", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "teams" + ], + "title": "teams" + }, + { + "type": "string", + "enum": [ + "users" + ], + "title": "users" + }, + { + "type": "string", + "enum": [ + "messages" + ], + "title": "messages" + }, + { + "type": "string", + "enum": [ + "sessions" + ], + "title": "sessions" + }, + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "collections" + ], + "title": "collections" + }, + { + "type": "string", + "enum": [ + "documents" + ], + "title": "documents" + }, + { + "type": "string", + "enum": [ + "databases.storage" + ], + "title": "databases.storage" + }, + { + "type": "string", + "enum": [ + "documentsdb.databases" + ], + "title": "documentsdb.databases" + }, + { + "type": "string", + "enum": [ + "documentsdb.collections" + ], + "title": "documentsdb.collections" + }, + { + "type": "string", + "enum": [ + "documentsdb.documents" + ], + "title": "documentsdb.documents" + }, + { + "type": "string", + "enum": [ + "documentsdb.databases.storage" + ], + "title": "documentsdb.databases.storage" + }, + { + "type": "string", + "enum": [ + "vectorsdb.databases" + ], + "title": "vectorsdb.databases" + }, + { + "type": "string", + "enum": [ + "vectorsdb.collections" + ], + "title": "vectorsdb.collections" + }, + { + "type": "string", + "enum": [ + "vectorsdb.documents" + ], + "title": "vectorsdb.documents" + }, + { + "type": "string", + "enum": [ + "vectorsdb.databases.storage" + ], + "title": "vectorsdb.databases.storage" + }, + { + "type": "string", + "enum": [ + "buckets" + ], + "title": "buckets" + }, + { + "type": "string", + "enum": [ + "files" + ], + "title": "files" + }, + { + "type": "string", + "enum": [ + "files.storage" + ], + "title": "files.storage" + }, + { + "type": "string", + "enum": [ + "sites" + ], + "title": "sites" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "deployments" + ], + "title": "deployments" + }, + { + "type": "string", + "enum": [ + "deployments.storage" + ], + "title": "deployments.storage" + }, + { + "type": "string", + "enum": [ + "builds" + ], + "title": "builds" + }, + { + "type": "string", + "enum": [ + "builds.storage" + ], + "title": "builds.storage" + }, + { + "type": "string", + "enum": [ + "users.mau" + ], + "title": "users.mau" + }, + { + "type": "string", + "enum": [ + "users.dau" + ], + "title": "users.dau" + }, + { + "type": "string", + "enum": [ + "users.wau" + ], + "title": "users.wau" + }, + { + "type": "string", + "enum": [ + "webhooks" + ], + "title": "webhooks" + }, + { + "type": "string", + "enum": [ + "platforms" + ], + "title": "platforms" + }, + { + "type": "string", + "enum": [ + "providers" + ], + "title": "providers" + }, + { + "type": "string", + "enum": [ + "topics" + ], + "title": "topics" + }, + { + "type": "string", + "enum": [ + "targets" + ], + "title": "targets" + }, + { + "type": "string", + "enum": [ + "keys" + ], + "title": "keys" + }, + { + "type": "string", + "enum": [ + "domains" + ], + "title": "domains" + }, + { + "type": "string", + "enum": [ + "realtime.connections" + ], + "title": "realtime.connections" + }, + { + "type": "string", + "enum": [ + "backups.policies" + ], + "title": "backups.policies" + }, + { + "type": "string", + "enum": [ + "backups.storage" + ], + "title": "backups.storage" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.storage" + ], + "title": "dedicatedDatabases.storage" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.connections" + ], + "title": "dedicatedDatabases.connections" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.cpu" + ], + "title": "dedicatedDatabases.cpu" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.memory" + ], + "title": "dedicatedDatabases.memory" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.qps" + ], + "title": "dedicatedDatabases.qps" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.iopsRead" + ], + "title": "dedicatedDatabases.iopsRead" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabases.iopsWrite" + ], + "title": "dedicatedDatabases.iopsWrite" + }, + { + "type": "string", + "enum": [ + "apps" + ], + "title": "apps" + }, + { + "type": "string", + "enum": [ + "apps.users" + ], + "title": "apps.users" + }, + { + "type": "string", + "enum": [ + "apps.installations" + ], + "title": "apps.installations" + } + ] + }, + { + "type": "string" + } + ] + } + }, + "in": "query" + }, + { + "name": "queries", + "description": "Up to 10 filter queries in Utopia syntax. Allowed attributes, also published as the `UsageGaugeDimension` enum: service, resourceType, resourceId, teamId, ordinal. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal(\"resourceType\", [\"bucket\"])`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "interval", + "description": "Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.", + "required": false, + "schema": { + "type": "string", + "example": "1m", + "title": "UsageInterval", + "oneOf": [ + { + "type": "string", + "enum": [ + "1m" + ], + "title": "One Minute" + }, + { + "type": "string", + "enum": [ + "15m" + ], + "title": "Fifteen Minutes" + }, + { + "type": "string", + "enum": [ + "30m" + ], + "title": "Thirty Minutes" + }, + { + "type": "string", + "enum": [ + "1h" + ], + "title": "One Hour" + }, + { + "type": "string", + "enum": [ + "1d" + ], + "title": "One Day" + } + ] + }, + "in": "query" + }, + { + "name": "dimensions", + "description": "Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.", + "required": false, + "schema": { + "type": "array", + "items": { + "title": "UsageGaugeDimension", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "resourceId" + ], + "title": "resourceId" + }, + { + "type": "string", + "enum": [ + "teamId" + ], + "title": "teamId" + }, + { + "type": "string", + "enum": [ + "service" + ], + "title": "service" + }, + { + "type": "string", + "enum": [ + "resourceType" + ], + "title": "resourceType" + }, + { + "type": "string", + "enum": [ + "ordinal" + ], + "title": "ordinal" + } + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "startAt", + "description": "Range start in ISO 8601. Defaults to endAt - 7d.", + "required": false, + "schema": { + "type": "string", + "format": "datetime", + "example": "2020-10-15T06:38:00.000+00:00", + "default": "" + }, + "in": "query" + }, + { + "name": "endAt", + "description": "Range 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": "orderBy", + "description": "Column to order by. Allowed: time, value. Default time.", + "required": false, + "schema": { + "type": "string", + "example": "time", + "title": "UsageOrderBy", + "oneOf": [ + { + "type": "string", + "enum": [ + "time" + ], + "title": "time" + }, + { + "type": "string", + "enum": [ + "value" + ], + "title": "value" + } + ], + "default": "time" + }, + "in": "query" + }, + { + "name": "orderDir", + "description": "Sort direction: asc or desc. Default desc \u2014 paired with the default limit, this returns the most recent groups first. Pass asc for chronological charting.", + "required": false, + "schema": { + "type": "string", + "example": "asc", + "title": "UsageOrderDirection", + "oneOf": [ + { + "type": "string", + "enum": [ + "asc" + ], + "title": "asc" + }, + { + "type": "string", + "enum": [ + "desc" + ], + "title": "desc" + } + ], + "default": "desc" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum rows to return (1-5000).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 500 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Pagination offset (0-100000).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "aggregate", + "description": "How to combine the samples in each bucket. `last` (default) returns the latest reading \u2014 the right answer for a snapshot such as storage. `max` returns the highest reading, which is what a sampled level series needs: peak concurrent realtime connections is the max of `realtime.connections` over the window.", + "required": false, + "schema": { + "type": "string", + "example": "last", + "default": "last" + }, + "in": "query" + } + ] + } + }, + "\/users": { + "get": { + "summary": "List users", + "operationId": "usersList", + "tags": [ + "users" + ], + "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Users List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/userList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, passwordPwned, labels, impersonator, accessedAt", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 user", + "operationId": "usersCreate", + "tags": [ + "users" + ], + "description": "Create a new user.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email", + "nullable": true + }, + "phone": { + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "type": "string", + "example": "+12065550100", + "format": "phone", + "nullable": true + }, + "password": { + "description": "Plain text user password. Must be at least 8 chars.", + "type": "string", + "default": "", + "example": "password", + "format": "password" + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId" + ] + } + } + } + } + } + }, + "\/users\/argon2": { + "post": { + "summary": "Create user with Argon2 password", + "operationId": "usersCreateArgon2User", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/create-argon-2-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password hashed using Argon2.", + "type": "string", + "example": "password", + "format": "password" + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/create-bcrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password hashed using Bcrypt.", + "type": "string", + "example": "password", + "format": "password" + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/identities": { + "get": { + "summary": "List identities", + "operationId": "usersListIdentities", + "tags": [ + "users" + ], + "description": "Get identities for all users.", + "responses": { + "200": { + "description": "Identities List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/identityList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "identities", + "demo": "users\/list-identities.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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" + } + ] + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", + "tags": [ + "users" + ], + "description": "Delete an identity by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "identities", + "demo": "users\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "example": "<IDENTITY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/create-md-5-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password hashed using MD5.", + "type": "string", + "example": "password", + "format": "password" + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/create-ph-pass-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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": { + "userId": { + "description": "User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password hashed using PHPass.", + "type": "string", + "example": "password", + "format": "password" + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/create-scrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password hashed using Scrypt.", + "type": "string", + "example": "password", + "format": "password" + }, + "passwordSalt": { + "description": "Optional salt used to hash password.", + "type": "string", + "example": "<PASSWORD_SALT>" + }, + "passwordCpu": { + "description": "Optional CPU cost used to hash password.", + "type": "integer", + "example": 8, + "format": "int32" + }, + "passwordMemory": { + "description": "Optional memory cost used to hash password.", + "type": "integer", + "example": 65536, + "format": "int32" + }, + "passwordParallel": { + "description": "Optional parallelization cost used to hash password.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "passwordLength": { + "description": "Optional hash length used to hash password.", + "type": "integer", + "example": 64, + "format": "int32" + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } + } + } + } + }, + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/create-scrypt-modified-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password hashed using Scrypt Modified.", + "type": "string", + "example": "password", + "format": "password" + }, + "passwordSalt": { + "description": "Salt used to hash password.", + "type": "string", + "example": "<PASSWORD_SALT>" + }, + "passwordSaltSeparator": { + "description": "Salt separator used to hash password.", + "type": "string", + "example": "<PASSWORD_SALT_SEPARATOR>" + }, + "passwordSignerKey": { + "description": "Signer key used to hash password.", + "type": "string", + "example": "<PASSWORD_SIGNER_KEY>" + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } + } + } + } + }, + "\/users\/sha": { + "post": { + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/create-sha-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.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": { + "userId": { + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<USER_ID>" + }, + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + }, + "password": { + "description": "User password hashed using SHA.", + "type": "string", + "example": "password", + "format": "password" + }, + "passwordVersion": { + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "type": "string", + "example": "sha1", + "title": "PasswordHash", + "oneOf": [ + { + "type": "string", + "enum": [ + "sha1" + ], + "title": "sha1" + }, + { + "type": "string", + "enum": [ + "sha224" + ], + "title": "sha224" + }, + { + "type": "string", + "enum": [ + "sha256" + ], + "title": "sha256" + }, + { + "type": "string", + "enum": [ + "sha384" + ], + "title": "sha384" + }, + { + "type": "string", + "enum": [ + "sha512\/224" + ], + "title": "sha512\/224" + }, + { + "type": "string", + "enum": [ + "sha512\/256" + ], + "title": "sha512\/256" + }, + { + "type": "string", + "enum": [ + "sha512" + ], + "title": "sha512" + }, + { + "type": "string", + "enum": [ + "sha3-224" + ], + "title": "sha3-224" + }, + { + "type": "string", + "enum": [ + "sha3-256" + ], + "title": "sha3-256" + }, + { + "type": "string", + "enum": [ + "sha3-384" + ], + "title": "sha3-384" + }, + { + "type": "string", + "enum": [ + "sha3-512" + ], + "title": "sha3-512" + } + ] + }, + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } + } + } + } + }, + "\/users\/usage": { + "get": { + "summary": "Get users usage stats", + "operationId": "usersGetUsage", + "tags": [ + "users" + ], + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", + "responses": { + "200": { + "description": "UsageUsers", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageUsers" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "users\/get-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "example": "24h", + "title": "UsageRange", + "oneOf": [ + { + "type": "string", + "enum": [ + "24h" + ], + "title": "24h" + }, + { + "type": "string", + "enum": [ + "30d" + ], + "title": "30d" + }, + { + "type": "string", + "enum": [ + "90d" + ], + "title": "90d" + } + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/users\/{userId}": { + "get": { + "summary": "Get user", + "operationId": "usersGet", + "tags": [ + "users" + ], + "description": "Get a user by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user", + "operationId": "usersDelete", + "tags": [ + "users" + ], + "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/email": { + "patch": { + "summary": "Update email", + "operationId": "usersUpdateEmail", + "tags": [ + "users" + ], + "description": "Update the user email by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "User email.", + "type": "string", + "example": "email@example.com", + "format": "email" + } + }, + "required": [ + "email" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/impersonator": { + "patch": { + "summary": "Update user impersonator capability", + "operationId": "usersUpdateImpersonator", + "tags": [ + "users" + ], + "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-impersonator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "impersonator": { + "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", + "type": "boolean", + "example": false + } + }, + "required": [ + "impersonator" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", + "tags": [ + "users" + ], + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "responses": { + "201": { + "description": "JWT", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/jwt" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "users\/create-jwt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "description": "Session ID. Use the string 'recent()' to use the most recent session, which is also the default.", + "type": "string", + "default": "recent()", + "example": "recent()" + }, + "duration": { + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "type": "integer", + "default": 900, + "example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", + "tags": [ + "users" + ], + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-labels.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/memberships": { + "get": { + "summary": "List user memberships", + "operationId": "usersListMemberships", + "tags": [ + "users" + ], + "description": "Get the user membership list by its unique ID.", + "responses": { + "200": { + "description": "Memberships List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membershipList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "memberships", + "demo": "users\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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" + } + ] + } + }, + "\/users\/{userId}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", + "tags": [ + "users" + ], + "description": "Enable or disable MFA on a user account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "users", + "demo": "users\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "description": "Enable or disable MFA.", + "type": "boolean", + "example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "users\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "example": "totp", + "title": "AuthenticatorType", + "oneOf": [ + { + "type": "string", + "enum": [ + "totp" + ], + "title": "totp" + } + ] + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/challenges\/{challengeId}": { + "get": { + "summary": "Get MFA challenge", + "operationId": "usersGetMFAChallenge", + "tags": [ + "users" + ], + "description": "Get a custom MFA challenge for a user, including the code to be delivered through your own channel.", + "responses": { + "200": { + "description": "MFA Challenge Secret", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaChallengeSecret" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "mfa", + "demo": "users\/get-mfa-challenge.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "getMFAChallenge", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId", + "challengeId" + ], + "required": [ + "userId", + "challengeId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaChallengeSecret" + } + ], + "description": "", + "demo": "users\/get-mfa-challenge.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "challengeId", + "description": "ID of the challenge.", + "required": true, + "schema": { + "type": "string", + "example": "<CHALLENGE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "usersListMfaFactors", + "tags": [ + "users" + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "responses": { + "200": { + "description": "MFAFactors", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaFactors" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "users\/list-mfa-factors.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "users\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "usersUpdateMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "responses": { + "200": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "users\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", + "tags": [ + "users" + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "responses": { + "201": { + "description": "MFA Recovery Codes", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "group": "mfa", + "demo": "users\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/name": { + "patch": { + "summary": "Update name", + "operationId": "usersUpdateName", + "tags": [ + "users" + ], + "description": "Update the user name by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "User name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/password": { + "patch": { + "summary": "Update password", + "operationId": "usersUpdatePassword", + "tags": [ + "users" + ], + "description": "Update the user password by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "description": "New user password. Must be at least 8 chars.", + "type": "string", + "example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", + "tags": [ + "users" + ], + "description": "Update the user phone by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-phone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "number": { + "description": "User phone number.", + "type": "string", + "example": "+12065550100", + "format": "phone" + } + }, + "required": [ + "number" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", + "tags": [ + "users" + ], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user preferences", + "operationId": "usersUpdatePrefs", + "tags": [ + "users" + ], + "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "description": "Prefs key-value JSON object.", + "type": "object", + "default": {}, + "example": {} + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/sessions": { + "get": { + "summary": "List user sessions", + "operationId": "usersListSessions", + "tags": [ + "users" + ], + "description": "Get the user sessions list by its unique ID.", + "responses": { + "200": { + "description": "Sessions List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/sessionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "users\/list-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.read", + "sessions.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "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 session", + "operationId": "usersCreateSession", + "tags": [ + "users" + ], + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "users\/create-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete user sessions", + "operationId": "usersDeleteSessions", + "tags": [ + "users" + ], + "description": "Delete all user's sessions by using the user's unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "users\/delete-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/sessions\/{sessionId}": { + "delete": { + "summary": "Delete user session", + "operationId": "usersDeleteSession", + "tags": [ + "users" + ], + "description": "Delete a user sessions by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "users\/delete-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "sessionId", + "description": "Session ID.", + "required": true, + "schema": { + "type": "string", + "example": "<SESSION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/status": { + "patch": { + "summary": "Update user status", + "operationId": "usersUpdateStatus", + "tags": [ + "users" + ], + "description": "Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "type": "boolean", + "example": false + } + }, + "required": [ + "status" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", + "tags": [ + "users" + ], + "description": "List the messaging targets that are associated with a user.", + "responses": { + "200": { + "description": "Target list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/targetList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "targets", + "demo": "users\/list-targets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "Key": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", + "tags": [ + "users" + ], + "description": "Create a messaging target.", + "responses": { + "201": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "targets", + "demo": "users\/create-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "Key": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetId": { + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<TARGET_ID>" + }, + "providerType": { + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "type": "string", + "example": "email", + "title": "MessagingProviderType", + "oneOf": [ + { + "type": "string", + "enum": [ + "email" + ], + "title": "email" + }, + { + "type": "string", + "enum": [ + "sms" + ], + "title": "sms" + }, + { + "type": "string", + "enum": [ + "push" + ], + "title": "push" + } + ] + }, + "identifier": { + "description": "The target identifier (token, email, phone etc.)", + "type": "string", + "example": "<IDENTIFIER>" + }, + "providerId": { + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "type": "string", + "default": "", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "type": "string", + "default": "", + "example": "<NAME>" + } + }, + "required": [ + "targetId", + "providerType", + "identifier" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/targets\/{targetId}": { + "get": { + "summary": "Get user target", + "operationId": "usersGetTarget", + "tags": [ + "users" + ], + "description": "Get a user's push notification target by ID.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "targets", + "demo": "users\/get-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "Key": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TARGET_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update user target", + "operationId": "usersUpdateTarget", + "tags": [ + "users" + ], + "description": "Update a messaging target.", + "responses": { + "200": { + "description": "Target", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/target" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "targets", + "demo": "users\/update-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "Key": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TARGET_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "description": "The target identifier (token, email, phone etc.)", + "type": "string", + "default": "", + "example": "<IDENTIFIER>" + }, + "providerId": { + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "type": "string", + "default": "", + "example": "<PROVIDER_ID>" + }, + "name": { + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "type": "string", + "default": "", + "example": "<NAME>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", + "tags": [ + "users" + ], + "description": "Delete a messaging target.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "targets", + "demo": "users\/delete-target.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "server": { + "Project": [], + "Key": [] + }, + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TARGET_ID>" + }, + "in": "path" + } + ] + } + }, + "\/users\/{userId}\/tokens": { + "post": { + "summary": "Create token", + "operationId": "usersCreateToken", + "tags": [ + "users" + ], + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "sessions", + "demo": "users\/create-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "length": { + "description": "Token length in characters. The default length is 6 characters", + "type": "integer", + "default": 6, + "example": 4, + "format": "int32" + }, + "expire": { + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "type": "integer", + "default": 900, + "example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", + "tags": [ + "users" + ], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-email-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "description": "User email verification status.", + "type": "boolean", + "example": false + } + }, + "required": [ + "emailVerification" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", + "tags": [ + "users" + ], + "description": "Update the user phone verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "users", + "demo": "users\/update-phone-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "description": "User phone verification status.", + "type": "boolean", + "example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + } + } + } + }, + "\/vcs\/github\/installations\/{installationId}\/detections": { + "post": { + "summary": "Create repository detection", + "operationId": "vcsCreateRepositoryDetection", + "tags": [ + "vcs" + ], + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "responses": { + "200": { + "description": "DetectionRuntime, or DetectionFramework", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/detectionRuntime" + }, + { + "$ref": "#\/components\/schemas\/detectionFramework" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runtime": "#\/components\/schemas\/detectionRuntime", + "framework": "#\/components\/schemas\/detectionFramework" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "repositories", + "demo": "vcs\/create-repository-detection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerRepositoryId": { + "description": "Repository Id", + "type": "string", + "example": "<PROVIDER_REPOSITORY_ID>" + }, + "type": { + "description": "Detector type. Must be one of the following: runtime, framework", + "type": "string", + "example": "runtime", + "title": "VCSDetectionType", + "oneOf": [ + { + "type": "string", + "enum": [ + "runtime" + ], + "title": "runtime" + }, + { + "type": "string", + "enum": [ + "framework" + ], + "title": "framework" + } + ] + }, + "providerRootDirectory": { + "description": "Path to Root Directory", + "type": "string", + "default": "", + "example": "<PROVIDER_ROOT_DIRECTORY>" + } + }, + "required": [ + "providerRepositoryId", + "type" + ] + } + } + } + } + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories": { + "get": { + "summary": "List repositories", + "operationId": "vcsListRepositories", + "tags": [ + "vcs" + ], + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", + "responses": { + "200": { + "description": "Runtime Provider Repositories List, or Framework Provider Repositories List", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/providerRepositoryRuntimeList" + }, + { + "$ref": "#\/components\/schemas\/providerRepositoryFrameworkList" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runtime": "#\/components\/schemas\/providerRepositoryRuntimeList", + "framework": "#\/components\/schemas\/providerRepositoryFrameworkList" + } + } + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "repositories", + "demo": "vcs\/list-repositories.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Detector type. Must be one of the following: runtime, framework", + "required": true, + "schema": { + "type": "string", + "example": "runtime", + "title": "VCSDetectionType", + "oneOf": [ + { + "type": "string", + "enum": [ + "runtime" + ], + "title": "runtime" + }, + { + "type": "string", + "enum": [ + "framework" + ], + "title": "framework" + } + ] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "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). Only supported methods are limit, offset, and equal on namespace.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create repository", + "operationId": "vcsCreateRepository", + "tags": [ + "vcs" + ], + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", + "responses": { + "200": { + "description": "ProviderRepository", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/providerRepository" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "repositories", + "demo": "vcs\/create-repository.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Repository name (slug)", + "type": "string", + "example": "<NAME>" + }, + "private": { + "description": "Mark repository public or private", + "type": "boolean", + "example": false + }, + "providerNamespace": { + "description": "Namespace of the git repository. Defaults to the installation's own namespace.", + "type": "string", + "default": "", + "example": "<PROVIDER_NAMESPACE>" + } + }, + "required": [ + "name", + "private" + ] + } + } + } + } + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}": { + "get": { + "summary": "Get repository", + "operationId": "vcsGetRepository", + "tags": [ + "vcs" + ], + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", + "responses": { + "200": { + "description": "ProviderRepository", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/providerRepository" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "repositories", + "demo": "vcs\/get-repository.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_REPOSITORY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches": { + "get": { + "summary": "List repository branches", + "operationId": "vcsListRepositoryBranches", + "tags": [ + "vcs" + ], + "description": "Get a list of branches from a GitHub repository in your installation. This endpoint supports filtering by a search term and pagination using query strings such as `Query.limit()`, `Query.offset()`, `Query.cursorAfter()`, and `Query.cursorBefore()`. It returns branch names along with the total number of matches. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", + "responses": { + "200": { + "description": "Branches List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/branchList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "repositories", + "demo": "vcs\/list-repository-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_REPOSITORY_ID>" + }, + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "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). Only supported methods are limit, offset, cursorAfter, and cursorBefore", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/contents": { + "get": { + "summary": "Get files and directories of a VCS repository", + "operationId": "vcsGetRepositoryContents", + "tags": [ + "vcs" + ], + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "responses": { + "200": { + "description": "VCS Content List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vcsContentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "repositories", + "demo": "vcs\/get-repository-contents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "providerRepositoryId", + "description": "Repository Id", + "required": true, + "schema": { + "type": "string", + "example": "<PROVIDER_REPOSITORY_ID>" + }, + "in": "path" + }, + { + "name": "providerRootDirectory", + "description": "Path to get contents of nested directory", + "required": false, + "schema": { + "type": "string", + "example": "<PROVIDER_ROOT_DIRECTORY>", + "default": "" + }, + "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "schema": { + "type": "string", + "example": "<PROVIDER_REFERENCE>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { + "patch": { + "summary": "Update external deployment (authorize)", + "operationId": "vcsUpdateExternalDeployments", + "tags": [ + "vcs" + ], + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "repositories", + "demo": "vcs\/update-external-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "repositoryId", + "description": "VCS Repository Id", + "required": true, + "schema": { + "type": "string", + "example": "<REPOSITORY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerPullRequestId": { + "description": "GitHub Pull Request Id", + "type": "string", + "example": "<PROVIDER_PULL_REQUEST_ID>" + } + }, + "required": [ + "providerPullRequestId" + ] + } + } + } + } + } + }, + "\/vcs\/installations": { + "get": { + "summary": "List installations", + "operationId": "vcsListInstallations", + "tags": [ + "vcs" + ], + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", + "responses": { + "200": { + "description": "Installations List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/installationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "vcs\/list-installations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "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: provider, organization", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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" + } + ] + } + }, + "\/vcs\/installations\/{installationId}": { + "get": { + "summary": "Get installation", + "operationId": "vcsGetInstallation", + "tags": [ + "vcs" + ], + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", + "responses": { + "200": { + "description": "Installation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/installation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "vcs\/get-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete installation", + "operationId": "vcsDeleteInstallation", + "tags": [ + "vcs" + ], + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "installations", + "demo": "vcs\/delete-installation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vcs\/installations\/{installationId}\/namespaces": { + "get": { + "summary": "List namespaces", + "operationId": "vcsListNamespaces", + "tags": [ + "vcs" + ], + "description": "List provider namespaces available to a VCS installation. This can include the user personal namespace and any groups or organizations the installation can browse.", + "responses": { + "200": { + "description": "VCS Namespaces List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vcsNamespaceList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "namespaces", + "demo": "vcs\/list-namespaces.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vcs.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation Id", + "required": true, + "schema": { + "type": "string", + "example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "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). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/vectorsdb": { + "get": { + "summary": "List databases", + "operationId": "vectorsDBList", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "vectorsdb", + "demo": "vectorsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.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 columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "vectorsDBCreate", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "vectorsdb", + "demo": "vectorsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.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": { + "databaseId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DATABASE_ID>" + }, + "name": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "specification": { + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "type": "string", + "default": "serverless", + "example": "serverless" + }, + "replicas": { + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "syncMode": { + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/vectorsdb\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "vectorsDBListSpecifications", + "tags": [ + "vectorsDB" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, its own prices and overage rates, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "vectorsdb", + "demo": "vectorsdb\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/vectorsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", + "tags": [ + "vectorsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "vectorsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "vectorsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "description": "Seconds before the transaction expires.", + "type": "integer", + "default": 300, + "example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "vectorsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "vectorsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "description": "Commit transaction?", + "type": "boolean", + "default": false, + "example": false + }, + "rollback": { + "description": "Rollback transaction?", + "type": "boolean", + "default": false, + "example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "vectorsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", + "tags": [ + "vectorsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "transactions", + "demo": "vectorsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + }, + "client": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "description": "Array of staged operations.", + "type": "array", + "default": [], + "example": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "name": "Walter O'Brien" + } + } + ], + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "vectorsDBGet", + "tags": [ + "vectorsDB" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "vectorsdb", + "demo": "vectorsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "vectorsDBUpdate", + "tags": [ + "vectorsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "vectorsdb", + "demo": "vectorsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Database name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "enabled": { + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + }, + "specification": { + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "type": "string", + "example": "serverless", + "nullable": true + }, + "replicas": { + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "type": "integer", + "example": 0, + "format": "int32", + "nullable": true + }, + "syncMode": { + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "type": "string", + "example": "async", + "nullable": true + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "vectorsDBDelete", + "tags": [ + "vectorsDB" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "vectorsdb", + "demo": "vectorsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "vectorsDBListCollections", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "VectorsDB Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollectionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "vectorsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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 collection", + "operationId": "vectorsDBCreateCollection", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "vectorsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<COLLECTION_ID>" + }, + "name": { + "description": "Collection name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "dimension": { + "description": "Embedding dimension.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "permissions": { + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "documentSecurity": { + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "collectionId", + "name", + "dimension" + ] + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { + "get": { + "summary": "Get collection", + "operationId": "vectorsDBGetCollection", + "tags": [ + "vectorsDB" + ], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "vectorsdb\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "vectorsDBUpdateCollection", + "tags": [ + "vectorsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "VectorsDB Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "vectorsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Collection name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "dimension": { + "description": "Embedding dimensions.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "permissions": { + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "documentSecurity": { + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "boolean", + "default": false, + "example": false + }, + "enabled": { + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "type": "boolean", + "default": true, + "example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete collection", + "operationId": "vectorsDBDeleteCollection", + "tags": [ + "vectorsDB" + ], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "collections", + "demo": "vectorsdb\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 524288 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "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" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "createDocument", + "namespace": "vectorsDB", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "Create document", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "vectorsDB", + "platforms": [ + "console", + "server" + ], + "summary": "Create documents", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-documents.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "data": { + "description": "Document data as JSON object.", + "type": "object", + "default": {}, + "example": { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + } + }, + "permissions": { + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "documents": { + "description": "Array of documents data as JSON objects.", + "type": "array", + "default": [], + "items": { + "type": "object" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documentId", + "data" + ] + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "vectorsDBUpsertDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "vectorsDB", + "platforms": [ + "console", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "vectorsdb\/upsert-documents.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "description": "Array of document data as JSON objects. May contain partial documents.", + "type": "array", + "items": { + "type": "object" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "vectorsDBUpdateDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "type": "object", + "default": {}, + "example": {} + }, + "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.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "vectorsDBDeleteDocuments", + "tags": [ + "vectorsDB" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/query": { + "post": { + "summary": "Create query", + "operationId": "vectorsDBCreateQuery", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.\n", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/create-query.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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 524288 characters long.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID to read uncommitted changes within the transaction.", + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "total": { + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "type": "boolean", + "default": true, + "example": false + }, + "ttl": { + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "vectorsDBGetDocument", + "tags": [ + "vectorsDB" + ], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", + "tags": [ + "vectorsDB" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "platforms": [ + "console", + "client", + "server" + ], + "summary": "", + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "type": "object", + "default": {}, + "example": {} + }, + "permissions": { + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", + "tags": [ + "vectorsDB" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "type": "object", + "default": {}, + "example": {} + }, + "permissions": { + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "type": "array", + "example": [ + "read(\"any\")" + ], + "items": { + "type": "string" + } + }, + "transactionId": { + "description": "Transaction ID for staging the operation.", + "type": "string", + "example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", + "tags": [ + "vectorsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "documents", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "vectorsdb.documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "vectorsDBListIndexes", + "tags": [ + "vectorsDB" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "vectorsdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.indexes.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "vectorsDBCreateIndex", + "tags": [ + "vectorsDB" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "vectorsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.indexes.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "Index Key.", + "type": "string", + "example": "<KEY>" + }, + "type": { + "description": "Index type.", + "type": "string", + "example": "hnsw_euclidean", + "title": "VectorsDBIndexType", + "oneOf": [ + { + "type": "string", + "enum": [ + "hnsw_euclidean" + ], + "title": "hnsw_euclidean" + }, + { + "type": "string", + "enum": [ + "hnsw_dot" + ], + "title": "hnsw_dot" + }, + { + "type": "string", + "enum": [ + "hnsw_cosine" + ], + "title": "hnsw_cosine" + }, + { + "type": "string", + "enum": [ + "object" + ], + "title": "object" + }, + { + "type": "string", + "enum": [ + "key" + ], + "title": "key" + }, + { + "type": "string", + "enum": [ + "unique" + ], + "title": "unique" + } + ] + }, + "attributes": { + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "type": "array", + "items": { + "type": "string" + } + }, + "orders": { + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "type": "array", + "default": [], + "items": { + "title": "OrderBy", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "asc" + ], + "title": "asc" + }, + { + "type": "string", + "enum": [ + "desc" + ], + "title": "desc" + } + ] + } + }, + "lengths": { + "description": "Length of index. Maximum of 100", + "type": "array", + "default": [], + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "vectorsDBGetIndex", + "tags": [ + "vectorsDB" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "vectorsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.indexes.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "vectorsDBDeleteIndex", + "tags": [ + "vectorsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "indexes", + "demo": "vectorsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "vectorsdb.indexes.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string", + "example": "<KEY>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "vectorsDBCreateFailover", + "tags": [ + "vectorsDB" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "failovers", + "demo": "vectorsdb\/create-failover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "type": "string", + "example": "<TARGET_REPLICA_ID>", + "nullable": true + } + } + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "vectorsDBListOperations", + "tags": [ + "vectorsDB" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "operations", + "demo": "vectorsdb\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "example": "queued" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "vectorsDBGetReplicas", + "tags": [ + "vectorsDB" + ], + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", + "responses": { + "200": { + "description": "Replicas", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "replicas", + "demo": "vectorsdb\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "vectorsDBGetStatus", + "tags": [ + "vectorsDB" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "vectorsdb", + "demo": "vectorsdb\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/waf\/rules": { + "get": { + "summary": "List WAF rules.", + "operationId": "wafListRules", + "tags": [ + "waf" + ], + "description": "List WAF rules for the current project.\n", + "responses": { + "200": { + "description": "WAF rule list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/list-rules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. 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" + } + ] + } + }, + "\/waf\/rules\/bypass": { + "post": { + "summary": "Create a bypass WAF rule.", + "operationId": "wafCreateBypassRule", + "tags": [ + "waf" + ], + "description": "Create a bypass WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "201": { + "description": "WafRuleBypass", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleBypass" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/create-bypass-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.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": { + "ruleId": { + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "type": "string", + "example": "<RULE_ID>" + }, + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api" + }, + "resourceId": { + "description": "Resource identifier. Leave empty for the API resource type.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>" + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "default": "", + "example": "<DESCRIPTION>" + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "default": 0, + "example": -100000, + "format": "int32" + }, + "enabled": { + "description": "Set to false to create the rule in a disabled state.", + "type": "boolean", + "default": true, + "example": false + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "default": [] + } + }, + "required": [ + "ruleId", + "resourceType", + "name" + ] + } + } + } + } + } + }, + "\/waf\/rules\/bypass\/{ruleId}": { + "patch": { + "summary": "Update a bypass WAF rule.", + "operationId": "wafUpdateBypassRule", + "tags": [ + "waf" + ], + "description": "Update a bypass WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "200": { + "description": "WafRuleBypass", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleBypass" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/update-bypass-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api", + "nullable": true + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "example": "<DESCRIPTION>", + "nullable": true + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "example": -100000, + "format": "int32", + "nullable": true + }, + "enabled": { + "description": "Set to false to disable the rule.", + "type": "boolean", + "example": false, + "nullable": true + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "\/waf\/rules\/challenge": { + "post": { + "summary": "Create a challenge WAF rule.", + "operationId": "wafCreateChallengeRule", + "tags": [ + "waf" + ], + "description": "Create a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "201": { + "description": "WafRuleChallenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleChallenge" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/create-challenge-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.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": { + "ruleId": { + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "type": "string", + "example": "<RULE_ID>" + }, + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api" + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>" + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "default": "", + "example": "<DESCRIPTION>" + }, + "challengeType": { + "description": "Challenge type enforced by the rule.", + "type": "string", + "default": "compute", + "example": "compute" + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "default": 0, + "example": -100000, + "format": "int32" + }, + "enabled": { + "description": "Set to false to create the rule in a disabled state.", + "type": "boolean", + "default": true, + "example": false + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "default": [] + }, + "difficulty": { + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.", + "type": "integer", + "default": 3, + "example": 1, + "format": "int32" + }, + "ttl": { + "description": "How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.", + "type": "integer", + "default": 1800, + "example": 900, + "format": "int32" + } + }, + "required": [ + "ruleId", + "resourceType", + "name" + ] + } + } + } + } + } + }, + "\/waf\/rules\/challenge\/{ruleId}": { + "patch": { + "summary": "Update a challenge WAF rule.", + "operationId": "wafUpdateChallengeRule", + "tags": [ + "waf" + ], + "description": "Update a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "200": { + "description": "WafRuleChallenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleChallenge" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/update-challenge-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api", + "nullable": true + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "example": "<DESCRIPTION>", + "nullable": true + }, + "challengeType": { + "description": "Challenge type enforced by the rule.", + "type": "string", + "example": "compute", + "nullable": true + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "example": -100000, + "format": "int32", + "nullable": true + }, + "enabled": { + "description": "Set to false to disable the rule.", + "type": "boolean", + "example": false, + "nullable": true + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "nullable": true + }, + "difficulty": { + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "ttl": { + "description": "How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.", + "type": "integer", + "example": 900, + "format": "int32", + "nullable": true + } + } + } + } + } + } + } + }, + "\/waf\/rules\/deny": { + "post": { + "summary": "Create a deny WAF rule.", + "operationId": "wafCreateDenyRule", + "tags": [ + "waf" + ], + "description": "Create a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "201": { + "description": "WafRuleDeny", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleDeny" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/create-deny-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.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": { + "ruleId": { + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "type": "string", + "example": "<RULE_ID>" + }, + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api" + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>" + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "default": "", + "example": "<DESCRIPTION>" + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "default": 0, + "example": -100000, + "format": "int32" + }, + "enabled": { + "description": "Set to false to create the rule in a disabled state.", + "type": "boolean", + "default": true, + "example": false + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "default": [] + } + }, + "required": [ + "ruleId", + "resourceType", + "name" + ] + } + } + } + } + } + }, + "\/waf\/rules\/deny\/{ruleId}": { + "patch": { + "summary": "Update a deny WAF rule.", + "operationId": "wafUpdateDenyRule", + "tags": [ + "waf" + ], + "description": "Update a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "200": { + "description": "WafRuleDeny", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleDeny" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/update-deny-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api", + "nullable": true + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "example": "<DESCRIPTION>", + "nullable": true + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "example": -100000, + "format": "int32", + "nullable": true + }, + "enabled": { + "description": "Set to false to disable the rule.", + "type": "boolean", + "example": false, + "nullable": true + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "\/waf\/rules\/rate-limit": { + "post": { + "summary": "Create a rate-limit WAF rule.", + "operationId": "wafCreateRateLimitRule", + "tags": [ + "waf" + ], + "description": "Create a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "201": { + "description": "WafRuleRateLimit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleRateLimit" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/create-rate-limit-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.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": { + "ruleId": { + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "type": "string", + "example": "<RULE_ID>" + }, + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api" + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>" + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "default": "", + "example": "<DESCRIPTION>" + }, + "limit": { + "description": "Maximum number of matching requests allowed in the configured interval.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "interval": { + "description": "Interval in seconds used for rate limiting.", + "type": "integer", + "example": 1, + "format": "int32" + }, + "key": { + "description": "Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.", + "type": "string", + "default": "ip", + "example": "ip" + }, + "strategy": { + "description": "Rate limit strategy. `fixedWindow` counts requests in discrete intervals, `slidingWindow` weights the previous interval for smoother limiting, and `tokenBucket` refills allowance continuously to permit short bursts.", + "type": "string", + "default": "fixedWindow", + "example": "fixedWindow" + }, + "maxBucketSize": { + "description": "Maximum number of tokens the bucket can hold for the `tokenBucket` strategy, controlling how large a burst is allowed. The sustained refill rate is `limit \/ interval`. Defaults to `limit` when omitted. Ignored by other strategies.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "default": 0, + "example": -100000, + "format": "int32" + }, + "enabled": { + "description": "Set to false to create the rule in a disabled state.", + "type": "boolean", + "default": true, + "example": false + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "default": [] + } + }, + "required": [ + "ruleId", + "resourceType", + "name", + "limit", + "interval" + ] + } + } + } + } + } + }, + "\/waf\/rules\/rate-limit\/{ruleId}": { + "patch": { + "summary": "Update a rate-limit WAF rule.", + "operationId": "wafUpdateRateLimitRule", + "tags": [ + "waf" + ], + "description": "Update a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "200": { + "description": "WafRuleRateLimit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleRateLimit" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/update-rate-limit-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api", + "nullable": true + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "example": "<DESCRIPTION>", + "nullable": true + }, + "limit": { + "description": "Maximum number of matching requests allowed in the configured interval.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "interval": { + "description": "Interval in seconds used for rate limiting.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "key": { + "description": "Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.", + "type": "string", + "example": "ip", + "nullable": true + }, + "maxBucketSize": { + "description": "Maximum number of tokens the bucket can hold for the `tokenBucket` strategy, controlling how large a burst is allowed. The sustained refill rate is `limit \/ interval`. Ignored by other strategies. The strategy itself cannot be changed after creation.", + "type": "integer", + "example": 1, + "format": "int32", + "nullable": true + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "example": -100000, + "format": "int32", + "nullable": true + }, + "enabled": { + "description": "Set to false to disable the rule.", + "type": "boolean", + "example": false, + "nullable": true + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "\/waf\/rules\/redirect": { + "post": { + "summary": "Create a redirect WAF rule.", + "operationId": "wafCreateRedirectRule", + "tags": [ + "waf" + ], + "description": "Create a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "201": { + "description": "WafRuleRedirect", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleRedirect" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/create-redirect-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.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": { + "ruleId": { + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "type": "string", + "example": "<RULE_ID>" + }, + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api" + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>" + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "default": "", + "example": "<DESCRIPTION>" + }, + "location": { + "description": "Location used for redirect responses.", + "type": "string", + "example": "<LOCATION>" + }, + "statusCode": { + "description": "Integer status code used for redirect responses.", + "type": "integer", + "example": 300, + "format": "int32" + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "default": 0, + "example": -100000, + "format": "int32" + }, + "enabled": { + "description": "Set to false to create the rule in a disabled state.", + "type": "boolean", + "default": true, + "example": false + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "default": [] + } + }, + "required": [ + "ruleId", + "resourceType", + "name", + "location", + "statusCode" + ] + } + } + } + } + } + }, + "\/waf\/rules\/redirect\/{ruleId}": { + "patch": { + "summary": "Update a redirect WAF rule.", + "operationId": "wafUpdateRedirectRule", + "tags": [ + "waf" + ], + "description": "Update a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "200": { + "description": "WafRuleRedirect", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleRedirect" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/update-redirect-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "description": "Resource type the rule applies to.", + "type": "string", + "example": "api", + "nullable": true + }, + "resourceId": { + "description": "Resource identifier. Required for functions and sites.", + "type": "string", + "example": "<RESOURCE_ID>", + "nullable": true + }, + "name": { + "description": "Rule name.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "description": { + "description": "Optional description for the rule.", + "type": "string", + "example": "<DESCRIPTION>", + "nullable": true + }, + "location": { + "description": "Location used for redirect responses.", + "type": "string", + "example": "<LOCATION>", + "nullable": true + }, + "statusCode": { + "description": "Integer status code used for redirect responses.", + "type": "integer", + "example": 300, + "format": "int32", + "nullable": true + }, + "priority": { + "description": "Evaluation priority. Lower numbers run earlier.", + "type": "integer", + "example": -100000, + "format": "int32", + "nullable": true + }, + "enabled": { + "description": "Set to false to disable the rule.", + "type": "boolean", + "example": false, + "nullable": true + }, + "conditions": { + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "\/waf\/rules\/{ruleId}": { + "get": { + "summary": "Get a WAF rule.", + "operationId": "wafGetRule", + "tags": [ + "waf" + ], + "description": "Get a WAF rule by its ID.\n", + "responses": { + "200": { + "description": "WafRule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/get-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete a WAF rule.", + "operationId": "wafDeleteRule", + "tags": [ + "waf" + ], + "description": "Delete a WAF rule.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "rules", + "demo": "waf\/delete-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "example": "<RULE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/webhooks": { + "get": { + "summary": "List webhooks", + "operationId": "webhooksList", + "tags": [ + "webhooks" + ], + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Webhooks List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhookList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "webhooks\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.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, url, authUsername, tls, events, enabled, logs, attempts", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create webhook", + "operationId": "webhooksCreate", + "tags": [ + "webhooks" + ], + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", + "responses": { + "201": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "webhooks\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.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": { + "webhookId": { + "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "<WEBHOOK_ID>" + }, + "url": { + "description": "Webhook URL.", + "type": "string", + "example": "https:\/\/example.com\/webhook" + }, + "name": { + "description": "Webhook name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "events": { + "description": "Events list. Maximum of 100 events are allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "enabled": { + "description": "Enable or disable a webhook.", + "type": "boolean", + "default": true, + "example": false + }, + "tls": { + "description": "Certificate verification, false for disabled or true for enabled.", + "type": "boolean", + "default": false, + "example": false + }, + "authUsername": { + "description": "Webhook HTTP user. Max length: 256 chars.", + "type": "string", + "default": "", + "example": "<AUTH_USERNAME>" + }, + "authPassword": { + "description": "Webhook HTTP password. Max length: 256 chars.", + "type": "string", + "default": "", + "example": "password", + "format": "password" + }, + "secret": { + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "type": "string", + "example": "<SECRET>", + "nullable": true + } + }, + "required": [ + "webhookId", + "url", + "name", + "events" + ] + } + } + } + } + } + }, + "\/webhooks\/{webhookId}": { + "get": { + "summary": "Get webhook", + "operationId": "webhooksGet", + "tags": [ + "webhooks" + ], + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "webhooks\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update webhook", + "operationId": "webhooksUpdate", + "tags": [ + "webhooks" + ], + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "webhooks\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Webhook name. Max length: 128 chars.", + "type": "string", + "example": "<NAME>" + }, + "url": { + "description": "Webhook URL.", + "type": "string", + "example": "https:\/\/example.com\/webhook" + }, + "events": { + "description": "Events list. Maximum of 100 events are allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "enabled": { + "description": "Enable or disable a webhook.", + "type": "boolean", + "default": true, + "example": false + }, + "tls": { + "description": "Certificate verification, false for disabled or true for enabled.", + "type": "boolean", + "default": false, + "example": false + }, + "authUsername": { + "description": "Webhook HTTP user. Max length: 256 chars.", + "type": "string", + "default": "", + "example": "<AUTH_USERNAME>" + }, + "authPassword": { + "description": "Webhook HTTP password. Max length: 256 chars.", + "type": "string", + "default": "", + "example": "password", + "format": "password" + } + }, + "required": [ + "name", + "url", + "events" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete webhook", + "operationId": "webhooksDelete", + "tags": [ + "webhooks" + ], + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "webhooks\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ] + } + }, + "\/webhooks\/{webhookId}\/secret": { + "patch": { + "summary": "Update webhook secret key", + "operationId": "webhooksUpdateSecret", + "tags": [ + "webhooks" + ], + "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", + "responses": { + "200": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "webhooks\/update-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "secret": { + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "type": "string", + "example": "<SECRET>", + "nullable": true + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "ping", + "description": "" + }, + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "tablesDB", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" + }, + { + "name": "documentsDB", + "description": "" + }, + { + "name": "vectorsDB", + "description": "" + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "presences", + "description": "The Presences service allows you to track and manage real-time user presence in your project." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + }, + { + "name": "notifications", + "description": "The Notifications service allows you to read and manage your Appwrite Console notifications." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for secure file access." + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "usage", + "description": "" + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "vcs", + "description": "The VCS service allows you to interact with providers like GitHub, GitLab etc." + }, + { + "name": "webhooks", + "description": "The Webhooks service allows you to manage your project webhooks." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + }, + { + "name": "organization", + "description": "The Organization service allows you to manage organization-level projects." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "advisor", + "description": "The Advisor service surfaces actionable reports about your project resources, with CTA descriptors for one-click remediation in the console." + }, + { + "name": "mysql", + "description": "" + }, + { + "name": "postgresql", + "description": "" + }, + { + "name": "mongo", + "description": "" + }, + { + "name": "apps", + "description": "The Apps service allows you to manage OAuth2 applications, their keys, secrets, scopes, and installations." + }, + { + "name": "oauth2", + "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." + }, + { + "name": "domains", + "description": "" + }, + { + "name": "manager", + "description": "" + }, + { + "name": "regions", + "description": "" + }, + { + "name": "organizations", + "description": "The Organizations service allows you to manage organization billing, plans, invoices, and add-ons." + }, + { + "name": "affiliates", + "description": "The Affiliates service allows you to share referral codes, track conversions, and apply earned credits." + }, + { + "name": "backups", + "description": "The Backups service allows you to manage backup policies, archives, and restorations for your project." + }, + { + "name": "activities", + "description": "The Activities service allows you to list and inspect project activity events." + }, + { + "name": "waf", + "description": "" + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "embeddings", + "description": "" + }, + { + "name": "assistant", + "description": "" + }, + { + "name": "growth", + "description": "" + } + ], + "components": { + "schemas": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true, + "example": {} + }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "format": "int32", + "example": 5 + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "example": [] + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents that matched your query.", + "format": "int32", + "example": 5 + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { + "$ref": "#\/components\/schemas\/document" + }, + "example": [] + } + }, + "required": [ + "total", + "documents" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "format": "int32", + "example": 5 + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "$ref": "#\/components\/schemas\/presence" + }, + "example": [] + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables that matched your query.", + "format": "int32", + "example": 5 + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "example": [] + } + }, + "required": [ + "total", + "tables" + ], + "example": { + "total": 5, + "tables": "" + } + }, + "collectionList": { + "description": "Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "format": "int32", + "example": 5 + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "$ref": "#\/components\/schemas\/collection" + }, + "example": [] + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "databaseList": { + "description": "Databases List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases that matched your query.", + "format": "int32", + "example": 5 + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "$ref": "#\/components\/schemas\/database" + }, + "example": [] + } + }, + "required": [ + "total", + "databases" + ], + "example": { + "total": 5, + "databases": "" + } + }, + "indexList": { + "description": "Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "format": "int32", + "example": 5 + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "example": [] + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "format": "int32", + "example": 5 + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "example": [] + } + }, + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "userList": { + "description": "Users List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of users that matched your query.", + "format": "int32", + "example": 5 + }, + "users": { + "type": "array", + "description": "List of users.", + "items": { + "$ref": "#\/components\/schemas\/user" + }, + "example": [] + } + }, + "required": [ + "total", + "users" + ], + "example": { + "total": 5, + "users": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions that matched your query.", + "format": "int32", + "example": 5 + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { + "$ref": "#\/components\/schemas\/session" + }, + "example": [] + } + }, + "required": [ + "total", + "sessions" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities that matched your query.", + "format": "int32", + "example": 5 + }, + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "$ref": "#\/components\/schemas\/identity" + }, + "example": [] + } + }, + "required": [ + "total", + "identities" + ], + "example": { + "total": 5, + "identities": "" + } + }, + "notificationList": { + "description": "Notifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of notifications that matched your query.", + "format": "int32", + "example": 5 + }, + "notifications": { + "type": "array", + "description": "List of notifications.", + "items": { + "$ref": "#\/components\/schemas\/notification" + }, + "example": [] + } + }, + "required": [ + "total", + "notifications" + ], + "example": { + "total": 5, + "notifications": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files that matched your query.", + "format": "int32", + "example": 5 + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { + "$ref": "#\/components\/schemas\/file" + }, + "example": [] + } + }, + "required": [ + "total", + "files" + ], + "example": { + "total": 5, + "files": "" + } + }, + "bucketList": { + "description": "Buckets List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of buckets that matched your query.", + "format": "int32", + "example": 5 + }, + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { + "$ref": "#\/components\/schemas\/bucket" + }, + "example": [] + } + }, + "required": [ + "total", + "buckets" + ], + "example": { + "total": 5, + "buckets": "" + } + }, + "resourceTokenList": { + "description": "Resource Tokens List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tokens that matched your query.", + "format": "int32", + "example": 5 + }, + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "$ref": "#\/components\/schemas\/resourceToken" + }, + "example": [] + } + }, + "required": [ + "total", + "tokens" + ], + "example": { + "total": 5, + "tokens": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "format": "int32", + "example": 5 + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "$ref": "#\/components\/schemas\/team" + }, + "example": [] + } + }, + "required": [ + "total", + "teams" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships that matched your query.", + "format": "int32", + "example": 5 + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "$ref": "#\/components\/schemas\/membership" + }, + "example": [] + } + }, + "required": [ + "total", + "memberships" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "siteList": { + "description": "Sites List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sites that matched your query.", + "format": "int32", + "example": 5 + }, + "sites": { + "type": "array", + "description": "List of sites.", + "items": { + "$ref": "#\/components\/schemas\/site" + }, + "example": [] + } + }, + "required": [ + "total", + "sites" + ], + "example": { + "total": 5, + "sites": "" + } + }, + "templateSiteList": { + "description": "Site Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "format": "int32", + "example": 5 + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "$ref": "#\/components\/schemas\/templateSite" + }, + "example": [] + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "functionList": { + "description": "Functions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of functions that matched your query.", + "format": "int32", + "example": 5 + }, + "functions": { + "type": "array", + "description": "List of functions.", + "items": { + "$ref": "#\/components\/schemas\/function" + }, + "example": [] + } + }, + "required": [ + "total", + "functions" + ], + "example": { + "total": 5, + "functions": "" + } + }, + "templateFunctionList": { + "description": "Function Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "format": "int32", + "example": 5 + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "$ref": "#\/components\/schemas\/templateFunction" + }, + "example": [] + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "installationList": { + "description": "Installations List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "format": "int32", + "example": 5 + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/installation" + }, + "example": [] + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "providerRepositoryFrameworkList": { + "description": "Framework Provider Repositories List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworkProviderRepositories that matched your query.", + "format": "int32", + "example": 5 + }, + "frameworkProviderRepositories": { + "type": "array", + "description": "List of frameworkProviderRepositories.", + "items": { + "$ref": "#\/components\/schemas\/providerRepositoryFramework" + }, + "example": [] + }, + "type": { + "type": "string", + "description": "Provider repository list type.", + "example": "framework" + } + }, + "required": [ + "total", + "frameworkProviderRepositories", + "type" + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "", + "type": "framework" + } + }, + "providerRepositoryRuntimeList": { + "description": "Runtime Provider Repositories List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimeProviderRepositories that matched your query.", + "format": "int32", + "example": 5 + }, + "runtimeProviderRepositories": { + "type": "array", + "description": "List of runtimeProviderRepositories.", + "items": { + "$ref": "#\/components\/schemas\/providerRepositoryRuntime" + }, + "example": [] + }, + "type": { + "type": "string", + "description": "Provider repository list type.", + "example": "runtime" + } + }, + "required": [ + "total", + "runtimeProviderRepositories", + "type" + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "", + "type": "runtime" + } + }, + "vcsNamespace": { + "description": "VcsNamespace", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "VCS (Version Control System) namespace ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) namespace display name.", + "example": "Appwrite" + }, + "path": { + "type": "string", + "description": "VCS (Version Control System) namespace path, used to filter repositories by namespace.", + "example": "appwrite" + }, + "type": { + "type": "string", + "description": "Namespace type. Either the user's personal namespace or a group\/organization.", + "example": "user" + }, + "avatarUrl": { + "type": "string", + "description": "Namespace avatar URL.", + "example": "https:\/\/example.com\/avatar.png" + } + }, + "required": [ + "$id", + "name", + "path", + "type", + "avatarUrl" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "Appwrite", + "path": "appwrite", + "type": "user", + "avatarUrl": "https:\/\/example.com\/avatar.png" + } + }, + "vcsNamespaceList": { + "description": "VCS Namespaces List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of namespaces that matched your query.", + "format": "int32", + "example": 5 + }, + "namespaces": { + "type": "array", + "description": "List of namespaces.", + "items": { + "$ref": "#\/components\/schemas\/vcsNamespace" + }, + "example": [] + } + }, + "required": [ + "total", + "namespaces" + ], + "example": { + "total": 5, + "namespaces": "" + } + }, + "branchList": { + "description": "Branches List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of branches that matched your query.", + "format": "int32", + "example": 5 + }, + "branches": { + "type": "array", + "description": "List of branches.", + "items": { + "$ref": "#\/components\/schemas\/branch" + }, + "example": [] + } + }, + "required": [ + "total", + "branches" + ], + "example": { + "total": 5, + "branches": "" + } + }, + "frameworkList": { + "description": "Frameworks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworks that matched your query.", + "format": "int32", + "example": 5 + }, + "frameworks": { + "type": "array", + "description": "List of frameworks.", + "items": { + "$ref": "#\/components\/schemas\/framework" + }, + "example": [] + } + }, + "required": [ + "total", + "frameworks" + ], + "example": { + "total": 5, + "frameworks": "" + } + }, + "runtimeList": { + "description": "Runtimes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimes that matched your query.", + "format": "int32", + "example": 5 + }, + "runtimes": { + "type": "array", + "description": "List of runtimes.", + "items": { + "$ref": "#\/components\/schemas\/runtime" + }, + "example": [] + } + }, + "required": [ + "total", + "runtimes" + ], + "example": { + "total": 5, + "runtimes": "" + } + }, + "deploymentList": { + "description": "Deployments List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of deployments that matched your query.", + "format": "int32", + "example": 5 + }, + "deployments": { + "type": "array", + "description": "List of deployments.", + "items": { + "$ref": "#\/components\/schemas\/deployment" + }, + "example": [] + } + }, + "required": [ + "total", + "deployments" + ], + "example": { + "total": 5, + "deployments": "" + } + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions that matched your query.", + "format": "int32", + "example": 5 + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { + "$ref": "#\/components\/schemas\/execution" + }, + "example": [] + } + }, + "required": [ + "total", + "executions" + ], + "example": { + "total": 5, + "executions": "" + } + }, + "projectList": { + "description": "Projects List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of projects that matched your query.", + "format": "int32", + "example": 5 + }, + "projects": { + "type": "array", + "description": "List of projects.", + "items": { + "$ref": "#\/components\/schemas\/project" + }, + "example": [] + } + }, + "required": [ + "total", + "projects" + ], + "example": { + "total": 5, + "projects": "" + } + }, + "webhookList": { + "description": "Webhooks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of webhooks that matched your query.", + "format": "int32", + "example": 5 + }, + "webhooks": { + "type": "array", + "description": "List of webhooks.", + "items": { + "$ref": "#\/components\/schemas\/webhook" + }, + "example": [] + } + }, + "required": [ + "total", + "webhooks" + ], + "example": { + "total": 5, + "webhooks": "" + } + }, + "keyList": { + "description": "API Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "format": "int32", + "example": 5 + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/key" + }, + "example": [] + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries that matched your query.", + "format": "int32", + "example": 5 + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { + "$ref": "#\/components\/schemas\/country" + }, + "example": [] + } + }, + "required": [ + "total", + "countries" + ], + "example": { + "total": 5, + "countries": "" + } + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents that matched your query.", + "format": "int32", + "example": 5 + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { + "$ref": "#\/components\/schemas\/continent" + }, + "example": [] + } + }, + "required": [ + "total", + "continents" + ], + "example": { + "total": 5, + "continents": "" + } + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages that matched your query.", + "format": "int32", + "example": 5 + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { + "$ref": "#\/components\/schemas\/language" + }, + "example": [] + } + }, + "required": [ + "total", + "languages" + ], + "example": { + "total": 5, + "languages": "" + } + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies that matched your query.", + "format": "int32", + "example": 5 + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { + "$ref": "#\/components\/schemas\/currency" + }, + "example": [] + } + }, + "required": [ + "total", + "currencies" + ], + "example": { + "total": 5, + "currencies": "" + } + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones that matched your query.", + "format": "int32", + "example": 5 + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { + "$ref": "#\/components\/schemas\/phone" + }, + "example": [] + } + }, + "required": [ + "total", + "phones" + ], + "example": { + "total": 5, + "phones": "" + } + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables that matched your query.", + "format": "int32", + "example": 5 + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "example": [] + } + }, + "required": [ + "total", + "variables" + ], + "example": { + "total": 5, + "variables": "" + } + }, + "mockNumberList": { + "description": "Mock Numbers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of mockNumbers that matched your query.", + "format": "int32", + "example": 5 + }, + "mockNumbers": { + "type": "array", + "description": "List of mockNumbers.", + "items": { + "$ref": "#\/components\/schemas\/mockNumber" + }, + "example": [] + } + }, + "required": [ + "total", + "mockNumbers" + ], + "example": { + "total": 5, + "mockNumbers": "" + } + }, + "policyList": { + "description": "Policies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of policies in the given project.", + "format": "int32", + "example": 10 + }, + "policies": { + "type": "array", + "description": "List of policies.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/policyPasswordDictionary" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordHistory" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPersonalData" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPwned" + }, + { + "$ref": "#\/components\/schemas\/policySessionAlert" + }, + { + "$ref": "#\/components\/schemas\/policySessionDuration" + }, + { + "$ref": "#\/components\/schemas\/policySessionInvalidation" + }, + { + "$ref": "#\/components\/schemas\/policySessionLimit" + }, + { + "$ref": "#\/components\/schemas\/policyUserLimit" + }, + { + "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyMfaFactors" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyCorporateEmail" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", + "password-history": "#\/components\/schemas\/policyPasswordHistory", + "password-strength": "#\/components\/schemas\/policyPasswordStrength", + "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", + "password-pwned": "#\/components\/schemas\/policyPasswordPwned", + "session-alert": "#\/components\/schemas\/policySessionAlert", + "session-duration": "#\/components\/schemas\/policySessionDuration", + "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", + "session-limit": "#\/components\/schemas\/policySessionLimit", + "user-limit": "#\/components\/schemas\/policyUserLimit", + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", + "mfa-factors": "#\/components\/schemas\/policyMfaFactors", + "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", + "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail", + "deny-corporate-email": "#\/components\/schemas\/policyDenyCorporateEmail" + } + } + }, + "example": [] + } + }, + "required": [ + "total", + "policies" + ], + "example": { + "total": 10, + "policies": "" + } + }, + "emailTemplateList": { + "description": "Email Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "format": "int32", + "example": 5 + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "$ref": "#\/components\/schemas\/emailTemplate" + }, + "example": [] + } + }, + "required": [ + "total", + "templates" + ], + "example": { + "total": 5, + "templates": "" + } + }, + "proxyRuleList": { + "description": "Rule List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rules that matched your query.", + "format": "int32", + "example": 5 + }, + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "$ref": "#\/components\/schemas\/proxyRule" + }, + "example": [] + } + }, + "required": [ + "total", + "rules" + ], + "example": { + "total": 5, + "rules": "" + } + }, + "scheduleList": { + "description": "Schedules List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of schedules that matched your query.", + "format": "int32", + "example": 5 + }, + "schedules": { + "type": "array", + "description": "List of schedules.", + "items": { + "$ref": "#\/components\/schemas\/schedule" + }, + "example": [] + } + }, + "required": [ + "total", + "schedules" + ], + "example": { + "total": 5, + "schedules": "" + } + }, + "stageList": { + "description": "Stages List", + "type": "object", + "properties": { + "stages": { + "type": "array", + "description": "List of stages.", + "items": { + "$ref": "#\/components\/schemas\/stage" + }, + "example": [] + } + }, + "required": [ + "stages" + ], + "example": { + "stages": "" + } + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes that matched your query.", + "format": "int32", + "example": 5 + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "$ref": "#\/components\/schemas\/localeCode" + }, + "example": [] + } + }, + "required": [ + "total", + "localeCodes" + ], + "example": { + "total": 5, + "localeCodes": "" + } + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers that matched your query.", + "format": "int32", + "example": 5 + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "$ref": "#\/components\/schemas\/provider" + }, + "example": [] + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages that matched your query.", + "format": "int32", + "example": 5 + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "$ref": "#\/components\/schemas\/message" + }, + "example": [] + } + }, + "required": [ + "total", + "messages" + ], + "example": { + "total": 5, + "messages": "" + } + }, + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics that matched your query.", + "format": "int32", + "example": 5 + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "$ref": "#\/components\/schemas\/topic" + }, + "example": [] + } + }, + "required": [ + "total", + "topics" + ], + "example": { + "total": 5, + "topics": "" + } + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers that matched your query.", + "format": "int32", + "example": 5 + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "$ref": "#\/components\/schemas\/subscriber" + }, + "example": [] + } + }, + "required": [ + "total", + "subscribers" + ], + "example": { + "total": 5, + "subscribers": "" + } + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets that matched your query.", + "format": "int32", + "example": 5 + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "example": [] + } + }, + "required": [ + "total", + "targets" + ], + "example": { + "total": 5, + "targets": "" + } + }, + "transactionList": { + "description": "Transaction List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of transactions that matched your query.", + "format": "int32", + "example": 5 + }, + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "$ref": "#\/components\/schemas\/transaction" + }, + "example": [] + } + }, + "required": [ + "total", + "transactions" + ], + "example": { + "total": 5, + "transactions": "" + } + }, + "migrationList": { + "description": "Migrations List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of migrations that matched your query.", + "format": "int32", + "example": 5 + }, + "migrations": { + "type": "array", + "description": "List of migrations.", + "items": { + "$ref": "#\/components\/schemas\/migration" + }, + "example": [] + } + }, + "required": [ + "total", + "migrations" + ], + "example": { + "total": 5, + "migrations": "" + } + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications that matched your query.", + "format": "int32", + "example": 5 + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "$ref": "#\/components\/schemas\/specification" + }, + "example": [] + } + }, + "required": [ + "total", + "specifications" + ], + "example": { + "total": 5, + "specifications": "" + } + }, + "vcsContentList": { + "description": "VCS Content List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of contents that matched your query.", + "format": "int32", + "example": 5 + }, + "contents": { + "type": "array", + "description": "List of contents.", + "items": { + "$ref": "#\/components\/schemas\/vcsContent" + }, + "example": [] + } + }, + "required": [ + "total", + "contents" + ], + "example": { + "total": 5, + "contents": "" + } + }, + "vectorsdbCollectionList": { + "description": "VectorsDB Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "format": "int32", + "example": 5 + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + }, + "example": [] + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "embeddingList": { + "description": "Embedding list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of embeddings that matched your query.", + "format": "int32", + "example": 5 + }, + "embeddings": { + "type": "array", + "description": "List of embeddings.", + "items": { + "$ref": "#\/components\/schemas\/embedding" + }, + "example": [] + } + }, + "required": [ + "total", + "embeddings" + ], + "example": { + "total": 5, + "embeddings": "" + } + }, + "insightList": { + "description": "Insights List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of insights that matched your query.", + "format": "int32", + "example": 5 + }, + "insights": { + "type": "array", + "description": "List of insights.", + "items": { + "$ref": "#\/components\/schemas\/insight" + }, + "example": [] + } + }, + "required": [ + "total", + "insights" + ], + "example": { + "total": 5, + "insights": "" + } + }, + "reportList": { + "description": "Reports List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of reports that matched your query.", + "format": "int32", + "example": 5 + }, + "reports": { + "type": "array", + "description": "List of reports.", + "items": { + "$ref": "#\/components\/schemas\/report" + }, + "example": [] + } + }, + "required": [ + "total", + "reports" + ], + "example": { + "total": 5, + "reports": "" + } + }, + "database": { + "description": "Database", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database name.", + "example": "My Database" + }, + "$createdAt": { + "type": "string", + "description": "Database creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "enabled": { + "type": "boolean", + "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "example": false + }, + "type": { + "description": "Database type.", + "example": "legacy", + "title": "DatabaseType", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "legacy" + ], + "title": "legacy" + }, + { + "type": "string", + "enum": [ + "tablesdb" + ], + "title": "tablesdb" + }, + { + "type": "string", + "enum": [ + "documentsdb" + ], + "title": "documentsdb" + }, + { + "type": "string", + "enum": [ + "vectorsdb" + ], + "title": "vectorsdb" + }, + { + "type": "string", + "enum": [ + "mysql" + ], + "title": "mysql" + }, + { + "type": "string", + "enum": [ + "postgresql" + ], + "title": "postgresql" + }, + { + "type": "string", + "enum": [ + "mongodb" + ], + "title": "mongodb" + } + ] + }, + "status": { + "description": "Dedicated database lifecycle status. Null when the database has no valid dedicated backing.", + "readOnly": true, + "example": "ready", + "title": "DatabaseStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "provisioning" + ], + "title": "provisioning" + }, + { + "type": "string", + "enum": [ + "ready" + ], + "title": "ready" + }, + { + "type": "string", + "enum": [ + "inactive" + ], + "title": "inactive" + }, + { + "type": "string", + "enum": [ + "paused" + ], + "title": "paused" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "deleted" + ], + "title": "deleted" + }, + { + "type": "string", + "enum": [ + "restoring" + ], + "title": "restoring" + }, + { + "type": "string", + "enum": [ + "scaling" + ], + "title": "scaling" + }, + { + "type": "string", + "enum": [ + "upgrading" + ], + "title": "upgrading" + }, + { + "type": "string", + "enum": [ + "migrating" + ], + "title": "migrating" + }, + { + "type": "string", + "enum": [ + "pausing" + ], + "title": "pausing" + }, + { + "type": "string", + "enum": [ + "resuming" + ], + "title": "resuming" + }, + { + "type": "string", + "enum": [ + "failing-over" + ], + "title": "failing-over" + } + ], + "nullable": true + }, + "engine": { + "type": "string", + "description": "Underlying engine of the dedicated backing: postgresql, mysql, or mongodb. A managed product (tablesdb, documentsdb, vectorsdb) reports the engine it runs on, so its type and engine can differ. Null when the database has no dedicated backing.", + "readOnly": true, + "example": "postgresql", + "nullable": true + }, + "specification": { + "type": "string", + "description": "Compute specification identifier of the dedicated backing, e.g. s-2vcpu-2gb. Null when the database has no dedicated backing.", + "readOnly": true, + "example": "s-2vcpu-2gb", + "nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of secondary high availability replicas, excluding the primary. Null when backing configuration is unavailable.", + "format": "int32", + "readOnly": true, + "example": 0, + "nullable": true + }, + "error": { + "type": "string", + "description": "Error message when the dedicated backing failed. Null when the database has no dedicated backing or has not failed.", + "readOnly": true, + "example": "", + "nullable": true + }, + "containerStatus": { + "type": "string", + "description": "Container status of the dedicated backing: active, inactive, or failed (a wake was declined because the backing namespace is gone). Null when the database has no dedicated backing or the runtime has not reported one.", + "readOnly": true, + "example": "active", + "nullable": true + }, + "lifecycleState": { + "type": "string", + "description": "Idle-lifecycle state of the dedicated backing: active, warm, cold, or hibernated. Null when the database has no dedicated backing or the runtime has not reported one.", + "readOnly": true, + "example": "active", + "nullable": true + }, + "policies": { + "type": "array", + "description": "Database backup policies.", + "items": { + "$ref": "#\/components\/schemas\/backupPolicy" + }, + "example": [], + "nullable": true + }, + "archives": { + "type": "array", + "description": "Database backup archives.", + "items": { + "$ref": "#\/components\/schemas\/backupArchive" + }, + "example": [], + "nullable": true + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy", + "status": "ready", + "engine": "postgresql", + "specification": "s-2vcpu-2gb", + "replicas": 0, + "error": "", + "containerStatus": "active", + "lifecycleState": "active", + "policies": {}, + "archives": {} + } + }, + "embedding": { + "description": "Embedding", + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "Embedding model used to generate embeddings.", + "example": "nomic-embed-text" + }, + "dimension": { + "type": "integer", + "description": "Number of dimensions for each embedding vector.", + "format": "int32", + "example": 768 + }, + "embedding": { + "type": "array", + "description": "Embedding vector values. If an error occurs, this will be an empty array.", + "items": { + "type": "number", + "format": "double" + }, + "example": [ + 0.01, + 0.02, + 0.03 + ] + }, + "error": { + "type": "string", + "description": "Error message if embedding generation fails. Empty string if no error.", + "example": "Error message" + } + }, + "required": [ + "model", + "dimension", + "embedding", + "error" + ], + "example": { + "model": "nomic-embed-text", + "dimension": 768, + "embedding": [ + 0.01, + 0.02, + 0.03 + ], + "error": "Error message" + } + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "anyOf": [ + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "boolean" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeBigint" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "bigint" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "integer" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "double" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "email" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "enum" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "url" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "ip" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "datetime" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "relationship" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributePoint" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "point" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeLine" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "linestring" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributePolygon" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "polygon" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeVarchar" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "varchar" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeText" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "text" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeMediumtext" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "mediumtext" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeLongtext" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "longtext" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeString" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + } + } + } + ] + } + ] + }, + "example": [] + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "example": [] + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "format": "int32", + "example": 65535 + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "format": "int32", + "example": 1500 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "attributeList": { + "description": "Attributes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of attributes in the given collection.", + "format": "int32", + "example": 5 + }, + "attributes": { + "type": "array", + "description": "List of attributes.", + "items": { + "anyOf": [ + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "boolean" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeBigint" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "bigint" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "integer" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "double" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "email" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "enum" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "url" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "ip" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "datetime" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "relationship" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributePoint" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "point" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeLine" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "linestring" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributePolygon" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "polygon" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeVarchar" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "varchar" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeText" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "text" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeMediumtext" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "mediumtext" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeLongtext" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "longtext" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/attributeString" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + } + } + } + ] + } + ] + }, + "example": [] + } + }, + "required": [ + "total", + "attributes" + ], + "example": { + "total": 5, + "attributes": "" + } + }, + "attributeString": { + "description": "AttributeString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "format": "int32", + "example": 128 + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeInteger": { + "description": "AttributeInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "integer" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "format": "int64", + "example": 1, + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "format": "int64", + "example": 10, + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "format": "int32", + "example": 10, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "attributeBigint": { + "description": "AttributeBigInt", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "bigint" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "format": "int64", + "example": 1, + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "format": "int64", + "example": 10, + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "format": "int64", + "example": 10, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "bigint", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "attributeFloat": { + "description": "AttributeFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "double" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "format": "double", + "example": 1.5, + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "format": "double", + "example": 10.5, + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "format": "double", + "example": 2.5, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "attributeBoolean": { + "description": "AttributeBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "boolean" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "attributeEmail": { + "description": "AttributeEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "userEmail" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "attributeEnum": { + "description": "AttributeEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "status" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "example": [ + "element" + ] + }, + "format": { + "type": "string", + "description": "String format.", + "example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "attributeIp": { + "description": "AttributeIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "attributeUrl": { + "description": "AttributeURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "example": "url" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "http:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } + }, + "attributeDatetime": { + "description": "AttributeDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "birthDay" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "datetime" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeRelationship": { + "description": "AttributeRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "attributePoint": { + "description": "AttributePoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": [ + 0, + 0 + ], + "items": { + "type": "number", + "format": "double" + }, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "attributeLine": { + "description": "AttributeLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "attributePolygon": { + "description": "AttributePolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "attributeVarchar": { + "description": "AttributeVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "format": "int32", + "example": 128 + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "attributeText": { + "description": "AttributeText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeMediumtext": { + "description": "AttributeMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "attributeLongtext": { + "description": "AttributeLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "vectorsdbCollection": { + "description": "VectorsDB Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeObject" + }, + { + "$ref": "#\/components\/schemas\/attributeVector" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "object": "#\/components\/schemas\/attributeObject", + "vector": "#\/components\/schemas\/attributeVector" + } + } + }, + "example": [] + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "example": [] + }, + "bytesMax": { + "type": "integer", + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "format": "int32", + "example": 65535 + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used document size in bytes based on defined attributes.", + "format": "int32", + "example": 1500 + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "format": "int32", + "example": 1536 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed", + "dimension" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500, + "dimension": 1536 + } + }, + "attributeObject": { + "description": "AttributeObject", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "attributeVector": { + "description": "AttributeVector", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "example": "string" + }, + "status": { + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "AttributeStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Vector dimensions.", + "format": "int32", + "example": 1536 + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 1536 + } + }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "boolean" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnBigint" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "bigint" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "integer" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "double" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "email" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "enum" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "url" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "ip" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "datetime" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "relationship" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnPoint" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "point" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnLine" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "linestring" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnPolygon" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "polygon" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnVarchar" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "varchar" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnText" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "text" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnMediumtext" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "mediumtext" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnLongtext" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "longtext" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnString" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + } + } + } + ] + } + ] + }, + "example": [] + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "example": [] + }, + "bytesMax": { + "type": "integer", + "description": "Maximum row size in bytes. Returns 0 when no limit applies.", + "format": "int32", + "example": 65535 + }, + "bytesUsed": { + "type": "integer", + "description": "Currently used row size in bytes based on defined columns.", + "format": "int32", + "example": 1500 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes", + "bytesMax", + "bytesUsed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 + } + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "format": "int32", + "example": 5 + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "boolean" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnBigint" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "bigint" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "integer" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "double" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "email" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "enum" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "url" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "type": "object", + "required": [ + "type", + "format" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + }, + "format": { + "enum": [ + "ip" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "datetime" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "relationship" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnPoint" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "point" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnLine" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "linestring" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnPolygon" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "polygon" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnVarchar" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "varchar" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnText" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "text" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnMediumtext" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "mediumtext" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnLongtext" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "longtext" + ] + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#\/components\/schemas\/columnString" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "string" + ] + } + } + } + ] + } + ] + }, + "example": [] + } + }, + "required": [ + "total", + "columns" + ], + "example": { + "total": 5, + "columns": "" + } + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "format": "int32", + "example": 128 + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "integer" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "format": "int64", + "example": 1, + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "format": "int64", + "example": 10, + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "format": "int32", + "example": 10, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "columnBigint": { + "description": "ColumnBigInt", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "bigint" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "format": "int64", + "example": 1, + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "format": "int64", + "example": 10, + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "format": "int64", + "example": 10, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "count", + "type": "bigint", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "double" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "format": "double", + "example": 1.5, + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "format": "double", + "example": 10.5, + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "format": "double", + "example": 2.5, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "boolean" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "example": "email" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "example": [ + "element" + ] + }, + "format": { + "type": "string", + "description": "String format.", + "example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "datetime" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Only null is optional", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } + }, + "columnPoint": { + "description": "ColumnPoint", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": [ + 0, + 0 + ], + "items": { + "type": "number", + "format": "double" + }, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] + } + }, + "columnLine": { + "description": "ColumnLine", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] + } + }, + "columnPolygon": { + "description": "ColumnPolygon", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "array", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] + } + }, + "columnVarchar": { + "description": "ColumnVarchar", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "format": "int32", + "example": 128 + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } + }, + "columnText": { + "description": "ColumnText", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnMediumtext": { + "description": "ColumnMediumtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "columnLongtext": { + "description": "ColumnLongtext", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "example": "string" + }, + "status": { + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "title": "ColumnStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "index": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Index key.", + "example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "example": "primary" + }, + "status": { + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "available" + ], + "title": "available" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "deleting" + ], + "title": "deleting" + }, + { + "type": "string", + "enum": [ + "stuck" + ], + "title": "stuck" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "example": "string" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { + "type": "string" + }, + "example": [] + }, + "lengths": { + "type": "array", + "description": "Index attributes length.", + "items": { + "type": "integer", + "format": "int32" + }, + "example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "example": [], + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Index Key.", + "example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "example": [], + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "columns", + "lengths" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Row sequence ID.", + "readOnly": true, + "example": "1" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "readOnly": true, + "example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "readOnly": true, + "example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Document sequence ID.", + "readOnly": true, + "example": "1" + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "readOnly": true, + "example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "readOnly": true, + "example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } + }, + "presence": { + "description": "Presence", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Presence ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Presence creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Presence update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "userId": { + "type": "string", + "description": "User ID.", + "example": "674af8f3e12a5f9ac0be" + }, + "status": { + "type": "string", + "description": "Presence status.", + "example": "online", + "nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "example": { + "key": "value" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "userId", + "source" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } + } + }, + "user": { + "description": "User", + "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" + }, + "password": { + "type": "string", + "description": "Hashed user password.", + "example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "nullable": true + }, + "hash": { + "type": "string", + "description": "Password hashing algorithm.", + "example": "argon2", + "nullable": true + }, + "hashOptions": { + "type": "object", + "description": "Password hashing algorithm configuration.", + "example": {}, + "allOf": [ + { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/algoArgon2" + }, + { + "$ref": "#\/components\/schemas\/algoScrypt" + }, + { + "$ref": "#\/components\/schemas\/algoScryptModified" + }, + { + "$ref": "#\/components\/schemas\/algoBcrypt" + }, + { + "$ref": "#\/components\/schemas\/algoPhpass" + }, + { + "$ref": "#\/components\/schemas\/algoSha" + }, + { + "$ref": "#\/components\/schemas\/algoMd5" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/components\/schemas\/algoArgon2", + "scrypt": "#\/components\/schemas\/algoScrypt", + "scryptMod": "#\/components\/schemas\/algoScryptModified", + "bcrypt": "#\/components\/schemas\/algoBcrypt", + "phpass": "#\/components\/schemas\/algoPhpass", + "sha": "#\/components\/schemas\/algoSha", + "md5": "#\/components\/schemas\/algoMd5" + } + } + } + ], + "nullable": true + }, + "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", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "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" + } + }, + "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 + } + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Session creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Session update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "example": "5e5bb8c16897e" + }, + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", + "example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", + "example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "example": true + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "identity": { + "description": "Identity", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Identity ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Identity creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Identity update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "example": "5e5bb8c16897e" + }, + "provider": { + "type": "string", + "description": "Identity Provider.", + "example": "email" + }, + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "example": "5e5bb8c16897e" + }, + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "string", + "description": "The date of when the access token expires in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerIdToken": { + "type": "string", + "description": "Identity Provider ID token (JWT) from the most recent native sign-in. Empty for identities created through the browser OAuth2 flow.", + "example": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjBhYzNmMWQwNWExYjhlN2YifQ.eyJzdWIiOiIxMTAxNjk0ODQ0NzQzODYyNzYzMzQifQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "providerIdToken" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerIdToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjBhYzNmMWQwNWExYjhlN2YifQ.eyJzdWIiOiIxMTAxNjk0ODQ0NzQzODYyNzYzMzQifQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "notification": { + "description": "Notification", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Notification ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Notification creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Notification update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "messageId": { + "type": "string", + "description": "Stable message ID used for dedup.", + "example": "session.create", + "nullable": true + }, + "type": { + "type": "string", + "description": "Notification type: info, warning, error.", + "example": "info" + }, + "channel": { + "type": "string", + "description": "Channel: email, sms, push, console, webhook.", + "example": "email" + }, + "resourceType": { + "type": "string", + "description": "Resource type this notification is addressed to.", + "example": "users" + }, + "resourceId": { + "type": "string", + "description": "Resource ID this notification is addressed to.", + "example": "5e5bb8c16897e" + }, + "parentResourceType": { + "type": "string", + "description": "Parent resource type for the notification.", + "example": "projects" + }, + "parentResourceId": { + "type": "string", + "description": "Parent resource ID for the notification.", + "example": "5e5bb8c16897e" + }, + "projectId": { + "type": "string", + "description": "Project the notification pertains to.", + "example": "5e5bb8c16897e", + "nullable": true + }, + "title": { + "type": "string", + "description": "Notification title.", + "example": "New sign-in detected" + }, + "body": { + "type": "string", + "description": "Notification body.", + "example": "A new device signed in to your account." + }, + "read": { + "type": "boolean", + "description": "Whether the notification has been read.", + "example": false, + "nullable": true + }, + "firstSeen": { + "type": "string", + "description": "First time the notification was viewed from a notification logo.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "lastSeen": { + "type": "string", + "description": "Most recent time the notification was viewed from a notification logo.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "channel", + "resourceType", + "resourceId", + "parentResourceType", + "parentResourceId", + "title", + "body" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "messageId": "session.create", + "type": "info", + "channel": "email", + "resourceType": "users", + "resourceId": "5e5bb8c16897e", + "parentResourceType": "projects", + "parentResourceId": "5e5bb8c16897e", + "projectId": "5e5bb8c16897e", + "title": "New sign-in detected", + "body": "A new device signed in to your account.", + "read": false, + "firstSeen": "2020-10-15T06:38:00.000+00:00", + "lastSeen": "2020-10-15T06:38:00.000+00:00" + } + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "example": "" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "example": "Golden Fox" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the European Union.", + "example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", + "example": "USD" + }, + "city": { + "type": "string", + "description": "City", + "example": "Kathmandu", + "nullable": true + }, + "timeZone": { + "type": "string", + "description": "Name of timezone", + "example": "Asia\/Kathmandu", + "nullable": true + }, + "postalCode": { + "type": "string", + "description": "Postal code", + "example": "44600", + "nullable": true + }, + "latitude": { + "type": "number", + "description": "Latitude", + "format": "double", + "example": 82.345, + "nullable": true + }, + "longitude": { + "type": "number", + "description": "Longitude", + "format": "double", + "example": 82.345, + "nullable": true + }, + "autonomousSystemNumber": { + "type": "string", + "description": "Autonomous System Number (ASN) of the IP", + "example": "15169", + "nullable": true + }, + "autonomousSystemOrganization": { + "type": "string", + "description": "Organization that owns the ASN", + "example": "GOOGLE", + "nullable": true + }, + "isp": { + "type": "string", + "description": "Internet service provider of the IP", + "example": "Google", + "nullable": true + }, + "connectionType": { + "type": "string", + "description": "Connection type of the IP (e.g. cable, cellular, corporate)", + "example": "cable", + "nullable": true + }, + "connectionUsageType": { + "type": "string", + "description": "User type classification of the IP (e.g. residential, business, hosting)", + "example": "residential", + "nullable": true + }, + "connectionOrganization": { + "type": "string", + "description": "Registered organization of the IP", + "example": "Google LLC", + "nullable": true + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD", + "city": "Kathmandu", + "timeZone": "Asia\/Kathmandu", + "postalCode": "44600", + "latitude": "82.345", + "longitude": "82.345", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "isp": "Google", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC" + } + }, + "localeCode": { + "description": "LocaleCode", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "example": "en-us" + }, + "name": { + "type": "string", + "description": "Locale name", + "example": "US" + } + }, + "required": [ + "code", + "name" + ], + "example": { + "code": "en-us", + "name": "US" + } + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "File creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "File update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "name": { + "type": "string", + "description": "File name.", + "example": "Pink.png" + }, + "folder": { + "type": "string", + "description": "Virtual folder containing the file, with a trailing slash. Empty for the bucket root.", + "example": "photos\/2026\/" + }, + "key": { + "type": "string", + "description": "Full virtual path of the file: the folder followed by the file name.", + "example": "photos\/2026\/Pink.png" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "example": "image\/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "format": "int32", + "example": 17890 + }, + "sizeActual": { + "type": "integer", + "description": "File actual stored size in bytes after compression and\/or encryption.", + "format": "int32", + "example": 12345 + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "format": "int32", + "example": 17890 + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "format": "int32", + "example": 17890 + }, + "encryption": { + "type": "boolean", + "description": "Whether file contents are encrypted at rest.", + "example": true + }, + "compression": { + "type": "string", + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "folder", + "key", + "signature", + "mimeType", + "sizeOriginal", + "sizeActual", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "folder": "photos\/2026\/", + "key": "photos\/2026\/Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "sizeActual": 12345, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Bucket creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Bucket update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "example": true + }, + "name": { + "type": "string", + "description": "Bucket name.", + "example": "Documents" + }, + "enabled": { + "type": "boolean", + "description": "Bucket enabled.", + "example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size supported.", + "format": "int32", + "example": 100 + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions.", + "items": { + "type": "string" + }, + "example": [ + "jpg", + "png" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "example": "gzip" + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "example": false + }, + "transformations": { + "type": "boolean", + "description": "Image transformations are enabled.", + "example": false + }, + "totalSize": { + "type": "integer", + "description": "Total size of this bucket in bytes.", + "format": "int32", + "example": 128 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "fileSecurity", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus", + "transformations", + "totalSize" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false, + "transformations": false, + "totalSize": 128 + } + }, + "resourceToken": { + "description": "ResourceToken", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "example": "5e5ea5c168bb8:5e5ea5c168bb8" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "example": "files" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "JWT encoded string.", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + "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" + } + }, + "required": [ + "$id", + "$createdAt", + "resourceId", + "resourceType", + "expire", + "secret", + "accessedAt" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "format": "int32", + "example": 7 + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "example": { + "theme": "pink", + "timezone": "UTC" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Membership creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Membership update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "example": "John Doe" + }, + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "example": "john@appwrite.io" + }, + "userPhone": { + "type": "string", + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "example": "+1 555 555 5555" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "teamName": { + "type": "string", + "description": "Team name.", + "example": "VIP" + }, + "invited": { + "type": "string", + "description": "Date, the user has been invited to join the team in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "joined": { + "type": "string", + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "example": false + }, + "userAccessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. Show this attribute by toggling membership privacy in the Console.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "example": [ + "owner" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "userAccessedAt", + "roles" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", + "roles": [ + "owner" + ] + } + }, + "site": { + "description": "Site", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Site ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Site creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Site update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Site name.", + "example": "My Site" + }, + "enabled": { + "type": "boolean", + "description": "Site enabled.", + "example": false + }, + "live": { + "type": "boolean", + "description": "Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration.", + "example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "example": false + }, + "framework": { + "type": "string", + "description": "Site framework.", + "example": "react" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "format": "int32", + "example": 7 + }, + "deploymentId": { + "type": "string", + "description": "Site's active deployment ID.", + "example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "deploymentScreenshotLight": { + "type": "string", + "description": "Screenshot of active deployment with light theme preference file ID.", + "example": "5e5ea5c16897e" + }, + "deploymentScreenshotDark": { + "type": "string", + "description": "Screenshot of active deployment with dark theme preference file ID.", + "example": "5e5ea5c16897e" + }, + "latestDeploymentId": { + "type": "string", + "description": "Site's latest deployment ID.", + "example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "example": "ready" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "example": [ + "users.read" + ] + }, + "vars": { + "type": "array", + "description": "Site variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "example": [] + }, + "timeout": { + "type": "integer", + "description": "Site request timeout in seconds.", + "format": "int32", + "example": 300 + }, + "installCommand": { + "type": "string", + "description": "The install command used to install the site dependencies.", + "example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "The build command used to build the site.", + "example": "npm run build" + }, + "startCommand": { + "type": "string", + "description": "Custom command to use when starting site runtime.", + "example": "node custom-server.mjs" + }, + "outputDirectory": { + "type": "string", + "description": "The directory where the site build output is located.", + "example": "build" + }, + "installationId": { + "type": "string", + "description": "Site VCS (Version Control System) installation id.", + "example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site in VCS (Version Control System) repository", + "example": "sites\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "example": false + }, + "providerBranches": { + "type": "array", + "description": "List of branch name patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all branches.", + "items": { + "type": "string" + }, + "example": [ + "main", + "feat\/*" + ] + }, + "providerPaths": { + "type": "array", + "description": "List of file path patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all file changes.", + "items": { + "type": "string" + }, + "example": [ + "src\/**", + "!docs\/**" + ] + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for SSR executions.", + "example": "s-1vcpu-512mb" + }, + "buildRuntime": { + "type": "string", + "description": "Site build runtime.", + "example": "node-22" + }, + "adapter": { + "type": "string", + "description": "Site framework adapter.", + "example": "static" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "example": "index.html" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "enabled", + "live", + "logging", + "framework", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "deploymentScreenshotLight", + "deploymentScreenshotDark", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "scopes", + "vars", + "timeout", + "installCommand", + "buildCommand", + "startCommand", + "outputDirectory", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "providerBranches", + "providerPaths", + "buildSpecification", + "runtimeSpecification", + "buildRuntime", + "adapter", + "fallbackFile" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "startCommand": "node custom-server.mjs", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "providerBranches": [ + "main", + "feat\/*" + ], + "providerPaths": [ + "src\/**", + "!docs\/**" + ], + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } + }, + "templateSite": { + "description": "Template Site", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Site Template ID.", + "example": "starter" + }, + "name": { + "type": "string", + "description": "Site Template Name.", + "example": "Starter site" + }, + "tagline": { + "type": "string", + "description": "Short description of template", + "example": "Minimal web app integrating with Appwrite." + }, + "demoUrl": { + "type": "string", + "description": "URL hosting a template demo.", + "example": "https:\/\/nextjs-starter.appwrite.network\/", + "nullable": true + }, + "screenshotDark": { + "type": "string", + "description": "File URL with preview screenshot in dark theme preference.", + "example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png" + }, + "screenshotLight": { + "type": "string", + "description": "File URL with preview screenshot in light theme preference.", + "example": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png" + }, + "useCases": { + "type": "array", + "description": "Site use cases.", + "items": { + "type": "string" + }, + "example": [ + "Starter" + ] + }, + "frameworks": { + "type": "array", + "description": "List of frameworks that can be used with this template.", + "items": { + "$ref": "#\/components\/schemas\/templateFramework" + }, + "example": [] + }, + "vcsProvider": { + "type": "string", + "description": "VCS (Version Control System) Provider.", + "example": "github" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "example": "templates" + }, + "providerOwner": { + "type": "string", + "description": "VCS (Version Control System) Owner.", + "example": "appwrite" + }, + "providerVersion": { + "type": "string", + "description": "VCS (Version Control System) branch version (tag).", + "example": "main" + }, + "variables": { + "type": "array", + "description": "Site variables.", + "items": { + "$ref": "#\/components\/schemas\/templateVariable" + }, + "example": [] + } + }, + "required": [ + "key", + "name", + "tagline", + "screenshotDark", + "screenshotLight", + "useCases", + "frameworks", + "vcsProvider", + "providerRepositoryId", + "providerOwner", + "providerVersion", + "variables" + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } + }, + "templateFramework": { + "description": "Template Framework", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Parent framework key.", + "example": "sveltekit" + }, + "name": { + "type": "string", + "description": "Framework Name.", + "example": "SvelteKit" + }, + "installCommand": { + "type": "string", + "description": "The install command used to install the dependencies.", + "example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "The build command used to build the deployment.", + "example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "The output directory to store the build output.", + "example": ".\/build" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site in VCS (Version Control System) repository", + "example": ".\/svelte-kit\/starter" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime used during build step of template.", + "example": "node-22" + }, + "adapter": { + "type": "string", + "description": "Site framework runtime", + "example": "ssr" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for SPA. Only relevant for static serve runtime.", + "example": "index.html", + "nullable": true + } + }, + "required": [ + "key", + "name", + "installCommand", + "buildCommand", + "outputDirectory", + "providerRootDirectory", + "buildRuntime", + "adapter" + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } + }, + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "example": [ + "users" + ] + }, + "name": { + "type": "string", + "description": "Function name.", + "example": "My Function" + }, + "enabled": { + "type": "boolean", + "description": "Function enabled.", + "example": false + }, + "live": { + "type": "boolean", + "description": "Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.", + "example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "example": false + }, + "runtime": { + "type": "string", + "description": "Function execution and build runtime.", + "example": "python-3.8" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "format": "int32", + "example": 7 + }, + "deploymentId": { + "type": "string", + "description": "Function's active deployment ID.", + "example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentId": { + "type": "string", + "description": "Function's latest deployment ID.", + "example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "example": "ready" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "example": [ + "users.read" + ] + }, + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "example": [] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "example": [ + "account.create" + ] + }, + "schedule": { + "type": "string", + "description": "Function execution schedule in CRON format.", + "example": "5 4 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "format": "int32", + "example": 300 + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "example": "index.js" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "example": "npm install" + }, + "version": { + "type": "string", + "description": "Version of Open Runtimes used for the function.", + "example": "v2" + }, + "installationId": { + "type": "string", + "description": "Function VCS (Version Control System) installation id.", + "example": "6m40at4ejk5h2u9s1hboo" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "example": "appwrite" + }, + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "example": "main" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "example": "functions\/helloWorld" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests", + "example": false + }, + "providerBranches": { + "type": "array", + "description": "List of branch name patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all branches.", + "items": { + "type": "string" + }, + "example": [ + "main", + "feat\/*" + ] + }, + "providerPaths": { + "type": "array", + "description": "List of file path patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all file changes.", + "items": { + "type": "string" + }, + "example": [ + "src\/**", + "!docs\/**" + ] + }, + "buildSpecification": { + "type": "string", + "description": "Machine specification for deployment builds.", + "example": "s-1vcpu-512mb" + }, + "runtimeSpecification": { + "type": "string", + "description": "Machine specification for executions.", + "example": "s-1vcpu-512mb" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "providerBranches", + "providerPaths", + "buildSpecification", + "runtimeSpecification" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "providerBranches": [ + "main", + "feat\/*" + ], + "providerPaths": [ + "src\/**", + "!docs\/**" + ], + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb" + } + }, + "templateFunction": { + "description": "Template Function", + "type": "object", + "properties": { + "icon": { + "type": "string", + "description": "Function Template Icon.", + "example": "icon-lightning-bolt" + }, + "id": { + "type": "string", + "description": "Function Template ID.", + "example": "starter" + }, + "name": { + "type": "string", + "description": "Function Template Name.", + "example": "Starter function" + }, + "tagline": { + "type": "string", + "description": "Function Template Tagline.", + "example": "A simple function to get started." + }, + "permissions": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "example": [ + "any" + ] + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "example": [ + "account.create" + ] + }, + "cron": { + "type": "string", + "description": "Function execution schedult in CRON format.", + "example": "0 0 * * *" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "format": "int32", + "example": 300 + }, + "useCases": { + "type": "array", + "description": "Function use cases.", + "items": { + "type": "string" + }, + "example": [ + "Starter" + ] + }, + "runtimes": { + "type": "array", + "description": "List of runtimes that can be used with this template.", + "items": { + "$ref": "#\/components\/schemas\/templateRuntime" + }, + "example": [] + }, + "instructions": { + "type": "string", + "description": "Function Template Instructions.", + "example": "For documentation and instructions check out <link>." + }, + "vcsProvider": { + "type": "string", + "description": "VCS (Version Control System) Provider.", + "example": "github" + }, + "providerRepositoryId": { + "type": "string", + "description": "VCS (Version Control System) Repository ID", + "example": "templates" + }, + "providerOwner": { + "type": "string", + "description": "VCS (Version Control System) Owner.", + "example": "appwrite" + }, + "providerVersion": { + "type": "string", + "description": "VCS (Version Control System) branch version (tag).", + "example": "main" + }, + "variables": { + "type": "array", + "description": "Function variables.", + "items": { + "$ref": "#\/components\/schemas\/templateVariable" + }, + "example": [] + }, + "scopes": { + "type": "array", + "description": "Function scopes.", + "items": { + "type": "string" + }, + "example": [ + "users.read" + ] + } + }, + "required": [ + "icon", + "id", + "name", + "tagline", + "permissions", + "events", + "cron", + "timeout", + "useCases", + "runtimes", + "instructions", + "vcsProvider", + "providerRepositoryId", + "providerOwner", + "providerVersion", + "variables", + "scopes" + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out <link>.", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } + }, + "templateRuntime": { + "description": "Template Runtime", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Runtime Name.", + "example": "node-19.0" + }, + "commands": { + "type": "string", + "description": "The build command used to build the deployment.", + "example": "npm install" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file used to execute the deployment.", + "example": "index.js" + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "example": "node\/starter" + } + }, + "required": [ + "name", + "commands", + "entrypoint", + "providerRootDirectory" + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } + }, + "templateVariable": { + "description": "Template Variable", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Variable Name.", + "example": "APPWRITE_DATABASE_ID" + }, + "description": { + "type": "string", + "description": "Variable Description.", + "example": "The ID of the Appwrite database that contains the collection to sync." + }, + "value": { + "type": "string", + "description": "Variable Value.", + "example": "512" + }, + "secret": { + "type": "boolean", + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "example": false + }, + "placeholder": { + "type": "string", + "description": "Variable Placeholder.", + "example": "64a55...7b912" + }, + "required": { + "type": "boolean", + "description": "Is the variable required?", + "example": false + }, + "type": { + "type": "string", + "description": "Variable Type.", + "example": "password" + } + }, + "required": [ + "name", + "description", + "value", + "secret", + "placeholder", + "required", + "type" + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } + }, + "installation": { + "description": "Installation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Function creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Function update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "example": "github" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name.", + "example": "appwrite" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "example": "5322" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "provider", + "organization", + "providerInstallationId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } + }, + "providerRepository": { + "description": "ProviderRepository", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "example": "github" + }, + "private": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository private?", + "example": true + }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "example": "main" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "example": [ + "PORT", + "NODE_ENV" + ] + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ] + } + }, + "providerRepositoryFramework": { + "description": "ProviderRepositoryFramework", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "example": "github" + }, + "private": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository private?", + "example": true + }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "example": "main" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "example": [ + "PORT", + "NODE_ENV" + ] + }, + "framework": { + "type": "string", + "description": "Auto-detected framework. Empty if type is not \"framework\".", + "example": "nextjs" + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables", + "framework" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ], + "framework": "nextjs" + } + }, + "providerRepositoryRuntime": { + "description": "ProviderRepositoryRuntime", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "VCS (Version Control System) repository ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) repository name.", + "example": "appwrite" + }, + "organization": { + "type": "string", + "description": "VCS (Version Control System) organization name", + "example": "appwrite" + }, + "provider": { + "type": "string", + "description": "VCS (Version Control System) provider name.", + "example": "github" + }, + "private": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository private?", + "example": true + }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "example": "main" + }, + "providerInstallationId": { + "type": "string", + "description": "VCS (Version Control System) installation ID.", + "example": "108104697" + }, + "authorized": { + "type": "boolean", + "description": "Is VCS (Version Control System) repository authorized for the installation?", + "example": true + }, + "pushedAt": { + "type": "string", + "description": "Last commit date in ISO 8601 format.", + "example": "datetime" + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "type": "string" + }, + "example": [ + "PORT", + "NODE_ENV" + ] + }, + "runtime": { + "type": "string", + "description": "Auto-detected runtime. Empty if type is not \"runtime\".", + "example": "node-22" + } + }, + "required": [ + "id", + "name", + "organization", + "provider", + "private", + "defaultBranch", + "providerInstallationId", + "authorized", + "pushedAt", + "variables", + "runtime" + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "providerInstallationId": "108104697", + "authorized": true, + "pushedAt": "datetime", + "variables": [ + "PORT", + "NODE_ENV" + ], + "runtime": "node-22" + } + }, + "detectionFramework": { + "description": "DetectionFramework", + "type": "object", + "properties": { + "type": { + "description": "Repository detection type.", + "example": "framework", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "framework" + ], + "title": "framework" + } + ] + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "$ref": "#\/components\/schemas\/detectionVariable" + }, + "example": [], + "nullable": true + }, + "framework": { + "type": "string", + "description": "Framework", + "example": "nuxt" + }, + "installCommand": { + "type": "string", + "description": "Site Install Command", + "example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "Site Build Command", + "example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "Site Output Directory", + "example": "dist" + } + }, + "required": [ + "type", + "framework", + "installCommand", + "buildCommand", + "outputDirectory" + ], + "example": { + "type": "framework", + "variables": {}, + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } + }, + "detectionRuntime": { + "description": "DetectionRuntime", + "type": "object", + "properties": { + "type": { + "description": "Repository detection type.", + "example": "runtime", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "runtime" + ], + "title": "runtime" + } + ] + }, + "variables": { + "type": "array", + "description": "Environment variables found in .env files", + "items": { + "$ref": "#\/components\/schemas\/detectionVariable" + }, + "example": [], + "nullable": true + }, + "runtime": { + "type": "string", + "description": "Runtime", + "example": "node" + }, + "entrypoint": { + "type": "string", + "description": "Function Entrypoint", + "example": "index.js" + }, + "commands": { + "type": "string", + "description": "Function install and build commands", + "example": "npm install && npm run build" + } + }, + "required": [ + "type", + "runtime", + "entrypoint", + "commands" + ], + "example": { + "type": "runtime", + "variables": {}, + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } + }, + "detectionVariable": { + "description": "DetectionVariable", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of environment variable", + "example": "NODE_ENV" + }, + "value": { + "type": "string", + "description": "Value of environment variable", + "example": "production" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "NODE_ENV", + "value": "production" + } + }, + "vcsContent": { + "description": "VcsContents", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Content size in bytes. Only files have size, and for directories, 0 is returned.", + "format": "int32", + "example": 1523, + "nullable": true + }, + "isDirectory": { + "type": "boolean", + "description": "If a content is a directory. Directories can be used to check nested contents.", + "example": true, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of directory or file.", + "example": "Main.java" + } + }, + "required": [ + "name" + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } + }, + "branch": { + "description": "Branch", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Branch Name.", + "example": "main" + } + }, + "required": [ + "name" + ], + "example": { + "name": "main" + } + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "example": "python-3.8" + }, + "key": { + "type": "string", + "description": "Parent runtime key.", + "example": "python" + }, + "name": { + "type": "string", + "description": "Runtime Name.", + "example": "Python" + }, + "version": { + "type": "string", + "description": "Runtime version.", + "example": "3.8" + }, + "base": { + "type": "string", + "description": "Base Docker image used to build the runtime.", + "example": "python:3.8-alpine" + }, + "image": { + "type": "string", + "description": "Image name of Docker Hub.", + "example": "appwrite\\\/runtime-for-python:3.8" + }, + "logo": { + "type": "string", + "description": "Name of the logo image.", + "example": "python.png" + }, + "supports": { + "type": "array", + "description": "List of supported architectures.", + "items": { + "type": "string" + }, + "example": [ + "amd64" + ] + } + }, + "required": [ + "$id", + "key", + "name", + "version", + "base", + "image", + "logo", + "supports" + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } + }, + "framework": { + "description": "Framework", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Framework key.", + "example": "sveltekit" + }, + "name": { + "type": "string", + "description": "Framework Name.", + "example": "SvelteKit" + }, + "buildRuntime": { + "type": "string", + "description": "Default runtime version.", + "example": "node-22" + }, + "runtimes": { + "type": "array", + "description": "List of supported runtime versions.", + "items": { + "type": "string" + }, + "example": [ + "static-1", + "node-22" + ] + }, + "adapters": { + "type": "array", + "description": "List of supported adapters.", + "items": { + "$ref": "#\/components\/schemas\/frameworkAdapter" + }, + "example": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "required": [ + "key", + "name", + "buildRuntime", + "runtimes", + "adapters" + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } + }, + "frameworkAdapter": { + "description": "Framework Adapter", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Adapter key.", + "example": "static" + }, + "installCommand": { + "type": "string", + "description": "Default command to download dependencies.", + "example": "npm install" + }, + "buildCommand": { + "type": "string", + "description": "Default command to build site into output directory.", + "example": "npm run build" + }, + "outputDirectory": { + "type": "string", + "description": "Default output directory of build.", + "example": ".\/dist" + }, + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "example": "index.html", + "nullable": true + } + }, + "required": [ + "key", + "installCommand", + "buildCommand", + "outputDirectory" + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Deployment creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Deployment update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "Type of deployment.", + "example": "vcs" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "example": "functions" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "example": "index.js" + }, + "sourceSize": { + "type": "integer", + "description": "The code size in bytes.", + "format": "int32", + "example": 128 + }, + "buildSize": { + "type": "integer", + "description": "The build output size in bytes.", + "format": "int32", + "example": 128 + }, + "totalSize": { + "type": "integer", + "description": "The total size in bytes (source and build output).", + "format": "int32", + "example": 128 + }, + "buildId": { + "type": "string", + "description": "The current build ID.", + "example": "5e5ea5c16897e" + }, + "activate": { + "type": "boolean", + "description": "Whether the deployment should be automatically activated.", + "example": true + }, + "screenshotLight": { + "type": "string", + "description": "Screenshot with light theme preference file ID.", + "example": "5e5ea5c16897e" + }, + "screenshotDark": { + "type": "string", + "description": "Screenshot with dark theme preference file ID.", + "example": "5e5ea5c16897e" + }, + "status": { + "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", + "example": "ready", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "waiting" + ], + "title": "waiting" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "building" + ], + "title": "building" + }, + { + "type": "string", + "enum": [ + "ready" + ], + "title": "ready" + }, + { + "type": "string", + "enum": [ + "canceled" + ], + "title": "canceled" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + }, + "buildLogs": { + "type": "string", + "description": "The build logs.", + "example": "Compiling source files..." + }, + "buildDuration": { + "type": "integer", + "description": "The current build time in seconds.", + "format": "int32", + "example": 128 + }, + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "example": "database" + }, + "providerRepositoryOwner": { + "type": "string", + "description": "The name of the vcs provider repository owner", + "example": "utopia" + }, + "providerRepositoryUrl": { + "type": "string", + "description": "The url of the vcs provider repository", + "example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" + }, + "providerCommitHash": { + "type": "string", + "description": "The commit hash of the vcs commit", + "example": "7c3f25d" + }, + "providerCommitAuthorUrl": { + "type": "string", + "description": "The url of vcs commit author", + "example": "https:\/\/github.com\/vermakhushboo" + }, + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "example": "Khushboo Verma" + }, + "providerCommitMessage": { + "type": "string", + "description": "The commit message", + "example": "Update index.js" + }, + "providerCommitUrl": { + "type": "string", + "description": "The url of the vcs commit", + "example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" + }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "example": "0.7.x" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "resourceId", + "resourceType", + "entrypoint", + "sourceSize", + "buildSize", + "totalSize", + "buildId", + "activate", + "screenshotLight", + "screenshotDark", + "status", + "buildLogs", + "buildDuration", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranch", + "providerBranchUrl" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Execution creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "example": [ + "any" + ] + }, + "resourceId": { + "type": "string", + "description": "Function or site ID.", + "example": "5e5ea6g16897e" + }, + "resourceType": { + "description": "Execution resource type.", + "example": "functions", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "sites" + ], + "title": "sites" + } + ] + }, + "deploymentId": { + "type": "string", + "description": "Deployment ID used to create the execution.", + "example": "5e5ea5c16897e" + }, + "trigger": { + "description": "The trigger that caused the resource to execute. Possible values can be: `http`, `schedule`, or `event`.", + "example": "http", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "http" + ], + "title": "http" + }, + { + "type": "string", + "enum": [ + "schedule" + ], + "title": "schedule" + }, + { + "type": "string", + "enum": [ + "event" + ], + "title": "event" + } + ] + }, + "status": { + "description": "The status of the resource execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "example": "processing", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "waiting" + ], + "title": "waiting" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "completed" + ], + "title": "completed" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + }, + { + "type": "string", + "enum": [ + "scheduled" + ], + "title": "scheduled" + } + ] + }, + "requestMethod": { + "type": "string", + "description": "HTTP request method type.", + "example": "GET" + }, + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "example": "\/articles?id=5" + }, + "requestHeaders": { + "type": "array", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "format": "int32", + "example": 200 + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "logs": { + "type": "string", + "description": "Resource logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "example": "" + }, + "errors": { + "type": "string", + "description": "Resource errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "example": "" + }, + "duration": { + "type": "number", + "description": "Total time the resource(function\/site) took to respond, in seconds.", + "format": "double", + "example": 1.23 + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "resourceId", + "resourceType", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 1.23, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "project": { + "description": "Project", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Project creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Project update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Project name.", + "example": "New Project" + }, + "teamId": { + "type": "string", + "description": "Project team ID.", + "example": "1592981250" + }, + "region": { + "type": "string", + "description": "Project region", + "example": "fra" + }, + "smtpEnabled": { + "type": "boolean", + "description": "Status for custom SMTP", + "example": false + }, + "smtpSenderName": { + "type": "string", + "description": "SMTP sender name", + "example": "John Appwrite" + }, + "smtpSenderEmail": { + "type": "string", + "description": "SMTP sender email", + "example": "john@appwrite.io" + }, + "smtpReplyToName": { + "type": "string", + "description": "SMTP reply to name", + "example": "Support Team" + }, + "smtpReplyToEmail": { + "type": "string", + "description": "SMTP reply to email", + "example": "support@appwrite.io" + }, + "smtpHost": { + "type": "string", + "description": "SMTP server host name", + "example": "mail.appwrite.io" + }, + "smtpPort": { + "type": "integer", + "description": "SMTP server port", + "format": "int32", + "example": 25 + }, + "smtpUsername": { + "type": "string", + "description": "SMTP server username", + "example": "emailuser" + }, + "smtpPassword": { + "type": "string", + "description": "SMTP server password. This property is write-only and always returned empty.", + "format": "password", + "example": "smtp-password" + }, + "smtpSecure": { + "type": "string", + "description": "SMTP server secure protocol", + "example": "tls" + }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "format": "int32", + "example": 1 + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "labels": { + "type": "array", + "description": "Labels for the project.", + "items": { + "type": "string" + }, + "example": [ + "vip" + ] + }, + "status": { + "type": "string", + "description": "Project status", + "example": "active" + }, + "onboarding": { + "type": "object", + "additionalProperties": true, + "description": "Stage progress (completed or skipped) with timestamps and actor types, keyed by stage id.", + "example": {} + }, + "authMethods": { + "type": "array", + "description": "List of auth methods.", + "items": { + "$ref": "#\/components\/schemas\/projectAuthMethod" + }, + "example": [] + }, + "services": { + "type": "array", + "description": "List of services.", + "items": { + "$ref": "#\/components\/schemas\/projectService" + }, + "example": [] + }, + "protocols": { + "type": "array", + "description": "List of protocols.", + "items": { + "$ref": "#\/components\/schemas\/projectProtocol" + }, + "example": [] + }, + "blocks": { + "type": "array", + "description": "Project blocks information", + "items": { + "$ref": "#\/components\/schemas\/block" + }, + "example": [] + }, + "consoleAccessedAt": { + "type": "string", + "description": "Last time the project was accessed via console. Used with plan's projectInactivityDays to determine if project is paused.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "wafEnabled": { + "type": "boolean", + "description": "Whether WAF enforcement is enabled for the project.", + "example": true, + "nullable": true + }, + "billingLimits": { + "type": "object", + "description": "Billing limits reached", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingLimits" + } + ], + "nullable": true + }, + "firstAccessedAt": { + "type": "string", + "description": "First time the project received a non-console API request. Empty until the project is used.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "mcpAccessedAt": { + "type": "string", + "description": "Last time the project was accessed through the MCP server. Empty if it was never accessed via MCP.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "oAuth2ServerEnabled": { + "type": "boolean", + "description": "OAuth2 server status", + "example": false, + "nullable": true + }, + "oAuth2ServerAuthorizationUrl": { + "type": "string", + "description": "OAuth2 server authorization URL", + "example": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", + "nullable": true + }, + "oAuth2ServerScopes": { + "type": "array", + "description": "OAuth2 server allowed scopes", + "items": { + "type": "string" + }, + "example": [ + "read", + "write" + ], + "nullable": true + }, + "oAuth2ServerDefaultScopes": { + "type": "array", + "description": "OAuth2 server scopes used when an authorization request omits the scope parameter", + "items": { + "type": "string" + }, + "example": [ + "read" + ], + "nullable": true + }, + "oAuth2ServerInstallationScopes": { + "type": "array", + "description": "Scopes an application may request when installed on a team", + "items": { + "type": "string" + }, + "example": [ + "project:all" + ], + "nullable": true + }, + "oAuth2ServerAuthorizationDetailsTypes": { + "type": "array", + "description": "OAuth2 server accepted RFC 9396 authorization_details types", + "items": { + "type": "string" + }, + "example": [ + "calendar" + ], + "nullable": true + }, + "oAuth2ServerAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for confidential clients", + "format": "int32", + "example": 3600, + "nullable": true + }, + "oAuth2ServerRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for confidential clients", + "format": "int32", + "example": 86400, + "nullable": true + }, + "oAuth2ServerPublicAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native)", + "format": "int32", + "example": 3600, + "nullable": true + }, + "oAuth2ServerPublicRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native)", + "format": "int32", + "example": 2592000, + "nullable": true + }, + "oAuth2ServerInstallationAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for app installation access tokens", + "format": "int32", + "example": 3600, + "nullable": true + }, + "oAuth2ServerConfidentialPkce": { + "type": "boolean", + "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", + "example": false, + "nullable": true + }, + "oAuth2ServerVerificationUrl": { + "type": "string", + "description": "URL to your application page where users enter the device flow user code. Empty when the Device Authorization Grant is not configured.", + "example": "https:\/\/cloud.appwrite.io\/device", + "nullable": true + }, + "oAuth2ServerUserCodeLength": { + "type": "integer", + "description": "Number of characters in the device flow user code, excluding the formatting separator.", + "format": "int32", + "example": 8, + "nullable": true + }, + "oAuth2ServerUserCodeFormat": { + "type": "string", + "description": "Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`.", + "example": "alphanumeric", + "nullable": true + }, + "oAuth2ServerDeviceCodeDuration": { + "type": "integer", + "description": "Lifetime in seconds of device flow device codes and user codes.", + "format": "int32", + "example": 600, + "nullable": true + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "example": "https:\/\/auth.example.com\/.well-known\/openid-configuration", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "teamId", + "region", + "smtpEnabled", + "smtpSenderName", + "smtpSenderEmail", + "smtpReplyToName", + "smtpReplyToEmail", + "smtpHost", + "smtpPort", + "smtpUsername", + "smtpPassword", + "smtpSecure", + "pingCount", + "pingedAt", + "labels", + "status", + "onboarding", + "authMethods", + "services", + "protocols", + "blocks", + "consoleAccessedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "teamId": "1592981250", + "region": "fra", + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyToName": "Support Team", + "smtpReplyToEmail": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "smtp-password", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [ + "vip" + ], + "status": "active", + "onboarding": {}, + "authMethods": {}, + "services": {}, + "protocols": {}, + "blocks": "", + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", + "wafEnabled": true, + "billingLimits": "", + "firstAccessedAt": "2020-10-15T06:38:00.000+00:00", + "mcpAccessedAt": "2020-10-15T06:38:00.000+00:00", + "oAuth2ServerEnabled": false, + "oAuth2ServerAuthorizationUrl": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", + "oAuth2ServerScopes": [ + "read", + "write" + ], + "oAuth2ServerDefaultScopes": [ + "read" + ], + "oAuth2ServerInstallationScopes": [ + "project:all" + ], + "oAuth2ServerAuthorizationDetailsTypes": [ + "calendar" + ], + "oAuth2ServerAccessTokenDuration": 3600, + "oAuth2ServerRefreshTokenDuration": 86400, + "oAuth2ServerPublicAccessTokenDuration": 3600, + "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerInstallationAccessTokenDuration": 3600, + "oAuth2ServerConfidentialPkce": false, + "oAuth2ServerVerificationUrl": "https:\/\/cloud.appwrite.io\/device", + "oAuth2ServerUserCodeLength": 8, + "oAuth2ServerUserCodeFormat": "alphanumeric", + "oAuth2ServerDeviceCodeDuration": 600, + "oAuth2ServerDiscoveryUrl": "https:\/\/auth.example.com\/.well-known\/openid-configuration" + } + }, + "projectAuthMethod": { + "description": "ProjectAuthMethod", + "type": "object", + "properties": { + "$id": { + "description": "Auth method ID.", + "example": "email-password", + "title": "ProjectAuthMethodId", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "email-password" + ], + "title": "email-password" + }, + { + "type": "string", + "enum": [ + "magic-url" + ], + "title": "magic-url" + }, + { + "type": "string", + "enum": [ + "email-otp" + ], + "title": "email-otp" + }, + { + "type": "string", + "enum": [ + "anonymous" + ], + "title": "anonymous" + }, + { + "type": "string", + "enum": [ + "invites" + ], + "title": "invites" + }, + { + "type": "string", + "enum": [ + "jwt" + ], + "title": "jwt" + }, + { + "type": "string", + "enum": [ + "phone" + ], + "title": "phone" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Auth method status.", + "example": false + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "email-password", + "enabled": false + } + }, + "projectService": { + "description": "ProjectService", + "type": "object", + "properties": { + "$id": { + "description": "Service ID.", + "example": "sites", + "title": "ProjectServiceId", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "account" + ], + "title": "account" + }, + { + "type": "string", + "enum": [ + "avatars" + ], + "title": "avatars" + }, + { + "type": "string", + "enum": [ + "databases" + ], + "title": "databases" + }, + { + "type": "string", + "enum": [ + "tablesdb" + ], + "title": "tablesdb" + }, + { + "type": "string", + "enum": [ + "locale" + ], + "title": "locale" + }, + { + "type": "string", + "enum": [ + "health" + ], + "title": "health" + }, + { + "type": "string", + "enum": [ + "project" + ], + "title": "project" + }, + { + "type": "string", + "enum": [ + "storage" + ], + "title": "storage" + }, + { + "type": "string", + "enum": [ + "teams" + ], + "title": "teams" + }, + { + "type": "string", + "enum": [ + "users" + ], + "title": "users" + }, + { + "type": "string", + "enum": [ + "vcs" + ], + "title": "vcs" + }, + { + "type": "string", + "enum": [ + "sites" + ], + "title": "sites" + }, + { + "type": "string", + "enum": [ + "functions" + ], + "title": "functions" + }, + { + "type": "string", + "enum": [ + "proxy" + ], + "title": "proxy" + }, + { + "type": "string", + "enum": [ + "graphql" + ], + "title": "graphql" + }, + { + "type": "string", + "enum": [ + "migrations" + ], + "title": "migrations" + }, + { + "type": "string", + "enum": [ + "messaging" + ], + "title": "messaging" + }, + { + "type": "string", + "enum": [ + "advisor" + ], + "title": "advisor" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Service status.", + "example": false + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "sites", + "enabled": false + } + }, + "projectProtocol": { + "description": "ProjectProtocol", + "type": "object", + "properties": { + "$id": { + "description": "Protocol ID.", + "example": "graphql", + "title": "ProjectProtocolId", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "rest" + ], + "title": "rest" + }, + { + "type": "string", + "enum": [ + "graphql" + ], + "title": "graphql" + }, + { + "type": "string", + "enum": [ + "websocket" + ], + "title": "websocket" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Protocol status.", + "example": false + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "graphql", + "enabled": false + } + }, + "webhook": { + "description": "Webhook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Webhook ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Webhook creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Webhook update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Webhook name.", + "example": "My Webhook" + }, + "url": { + "type": "string", + "description": "Webhook URL endpoint.", + "example": "https:\/\/example.com\/webhook" + }, + "events": { + "type": "array", + "description": "Webhook trigger events.", + "items": { + "type": "string" + }, + "example": [ + "databases.tables.update", + "databases.collections.update" + ] + }, + "tls": { + "type": "boolean", + "description": "Indicates if SSL \/ TLS certificate verification is enabled.", + "example": true + }, + "authUsername": { + "type": "string", + "description": "HTTP basic authentication username.", + "example": "username" + }, + "authPassword": { + "type": "string", + "description": "HTTP basic authentication password.", + "format": "password", + "example": "webhook-password" + }, + "secret": { + "type": "string", + "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", + "example": "ad3d581ca230e2b7059c545e5a" + }, + "enabled": { + "type": "boolean", + "description": "Indicates if this webhook is enabled.", + "example": true + }, + "logs": { + "type": "string", + "description": "Webhook error logs from the most recent failure.", + "example": "Failed to connect to remote server." + }, + "attempts": { + "type": "integer", + "description": "Number of consecutive failed webhook attempts.", + "format": "int32", + "example": 10 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "url", + "events", + "tls", + "authUsername", + "authPassword", + "secret", + "enabled", + "logs", + "attempts" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "tls": true, + "authUsername": "username", + "authPassword": "webhook-password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } + }, + "key": { + "description": "Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "example": [ + "users.read" + ] + }, + "secret": { + "type": "string", + "description": "Secret key.", + "example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "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" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "example": [ + "appwrite:flutter" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "ephemeralKey": { + "description": "Ephemeral Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "example": "My API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "example": [ + "users.read" + ] + }, + "secret": { + "type": "string", + "description": "Secret key.", + "example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "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" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "example": [ + "appwrite:flutter" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } + }, + "mockNumber": { + "description": "Mock Number", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", + "example": "+1612842323" + }, + "otp": { + "type": "string", + "description": "Mock OTP for the number. ", + "example": "123456" + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "number", + "otp", + "$createdAt", + "$updatedAt" + ], + "example": { + "number": "+1612842323", + "otp": "123456", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "oAuth2Github": { + "description": "OAuth2GitHub", + "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": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", + "example": "e4d87900000000540733" + }, + "clientSecret": { + "type": "string", + "description": "GitHub OAuth2 client secret.", + "example": "5e07c00000000000000000000000000000198bcc" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "e4d87900000000540733", + "clientSecret": "5e07c00000000000000000000000000000198bcc" + } + }, + "oAuth2Discord": { + "description": "OAuth2Discord", + "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": "Discord OAuth2 client ID.", + "example": "950722000000343754" + }, + "clientSecret": { + "type": "string", + "description": "Discord OAuth2 client secret.", + "example": "YmPXnM000000000000000000002zFg5D" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "950722000000343754", + "clientSecret": "YmPXnM000000000000000000002zFg5D" + } + }, + "oAuth2Figma": { + "description": "OAuth2Figma", + "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": "Figma OAuth2 client ID.", + "example": "byay5H0000000000VtiI40" + }, + "clientSecret": { + "type": "string", + "description": "Figma OAuth2 client secret.", + "example": "yEpOYn0000000000000000004iIsU5" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "byay5H0000000000VtiI40", + "clientSecret": "yEpOYn0000000000000000004iIsU5" + } + }, + "oAuth2Dropbox": { + "description": "OAuth2Dropbox", + "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 + }, + "appKey": { + "type": "string", + "description": "Dropbox OAuth2 app key.", + "example": "jl000000000009t" + }, + "appSecret": { + "type": "string", + "description": "Dropbox OAuth2 app secret.", + "example": "g200000000000vw" + } + }, + "required": [ + "$id", + "enabled", + "appKey", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appKey": "jl000000000009t", + "appSecret": "g200000000000vw" + } + }, + "oAuth2Dailymotion": { + "description": "OAuth2Dailymotion", + "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 + }, + "apiKey": { + "type": "string", + "description": "Dailymotion OAuth2 API key.", + "example": "07a9000000000000067f" + }, + "apiSecret": { + "type": "string", + "description": "Dailymotion OAuth2 API secret.", + "example": "a399a90000000000000000000000000000d90639" + } + }, + "required": [ + "$id", + "enabled", + "apiKey", + "apiSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "apiKey": "07a9000000000000067f", + "apiSecret": "a399a90000000000000000000000000000d90639" + } + }, + "oAuth2Bitbucket": { + "description": "OAuth2Bitbucket", + "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 + }, + "key": { + "type": "string", + "description": "Bitbucket OAuth2 key.", + "example": "Knt70000000000ByRc" + }, + "secret": { + "type": "string", + "description": "Bitbucket OAuth2 secret.", + "example": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "required": [ + "$id", + "enabled", + "key", + "secret" + ], + "example": { + "$id": "github", + "enabled": false, + "key": "Knt70000000000ByRc", + "secret": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "oAuth2Bitly": { + "description": "OAuth2Bitly", + "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": "Bitly OAuth2 client ID.", + "example": "d95151000000000000000000000000000067af9b" + }, + "clientSecret": { + "type": "string", + "description": "Bitly OAuth2 client secret.", + "example": "a13e250000000000000000000000000000d73095" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "d95151000000000000000000000000000067af9b", + "clientSecret": "a13e250000000000000000000000000000d73095" + } + }, + "oAuth2Box": { + "description": "OAuth2Box", + "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": "Box OAuth2 client ID.", + "example": "deglcs00000000000000000000x2og6y" + }, + "clientSecret": { + "type": "string", + "description": "Box OAuth2 client secret.", + "example": "OKM1f100000000000000000000eshEif" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "deglcs00000000000000000000x2og6y", + "clientSecret": "OKM1f100000000000000000000eshEif" + } + }, + "oAuth2Autodesk": { + "description": "OAuth2Autodesk", + "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": "Autodesk OAuth2 client ID.", + "example": "5zw90v00000000000000000000kVYXN7" + }, + "clientSecret": { + "type": "string", + "description": "Autodesk OAuth2 client secret.", + "example": "7I000000000000MW" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "5zw90v00000000000000000000kVYXN7", + "clientSecret": "7I000000000000MW" + } + }, + "oAuth2Google": { + "description": "OAuth2Google", + "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": "Google OAuth2 client ID.", + "example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" + }, + "clientSecret": { + "type": "string", + "description": "Google OAuth2 client secret.", + "example": "GOCSPX-2k8gsR0000000000000000VNahJj" + }, + "prompt": { + "type": "array", + "description": "Google OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + }, + { + "type": "string", + "enum": [ + "select_account" + ], + "title": "select_account" + } + ] + }, + "example": [ + "consent" + ] + }, + "nativeEnabled": { + "type": "boolean", + "description": "Native Google sign-in is active and can be used to create sessions from an ID token. Independent of enabled, which only controls the browser-based flow.", + "example": false + }, + "nativeClientIds": { + "type": "array", + "description": "Additional OAuth2 client IDs accepted as ID token audiences for native sign-in, next to the client ID.", + "items": { + "type": "string" + }, + "example": [ + "YOUR_ANDROID_CLIENT_ID.apps.googleusercontent.com" + ] + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "prompt", + "nativeEnabled", + "nativeClientIds" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj", + "prompt": [ + "consent" + ], + "nativeEnabled": false, + "nativeClientIds": [ + "YOUR_ANDROID_CLIENT_ID.apps.googleusercontent.com" + ] + } + }, + "oAuth2Zoom": { + "description": "OAuth2Zoom", + "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": "Zoom OAuth2 client ID.", + "example": "QMAC00000000000000w0AQ" + }, + "clientSecret": { + "type": "string", + "description": "Zoom OAuth2 client secret.", + "example": "GAWsG4000000000000000000007U01ON" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "QMAC00000000000000w0AQ", + "clientSecret": "GAWsG4000000000000000000007U01ON" + } + }, + "oAuth2Zoho": { + "description": "OAuth2Zoho", + "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": "Zoho OAuth2 client ID.", + "example": "1000.83C178000000000000000000RPNX0B" + }, + "clientSecret": { + "type": "string", + "description": "Zoho OAuth2 client secret.", + "example": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "1000.83C178000000000000000000RPNX0B", + "clientSecret": "fb5cac000000000000000000000000000000a68f6e" + } + }, + "oAuth2Yandex": { + "description": "OAuth2Yandex", + "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": "Yandex OAuth2 client ID.", + "example": "6a8a6a0000000000000000000091483c" + }, + "clientSecret": { + "type": "string", + "description": "Yandex OAuth2 client secret.", + "example": "bbf98500000000000000000000c75a63" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6a8a6a0000000000000000000091483c", + "clientSecret": "bbf98500000000000000000000c75a63" + } + }, + "oAuth2X": { + "description": "OAuth2X", + "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 + }, + "customerKey": { + "type": "string", + "description": "X OAuth2 customer key.", + "example": "slzZV0000000000000NFLaWT" + }, + "secretKey": { + "type": "string", + "description": "X OAuth2 secret key.", + "example": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "slzZV0000000000000NFLaWT", + "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" + } + }, + "oAuth2WordPress": { + "description": "OAuth2WordPress", + "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": "WordPress OAuth2 client ID.", + "example": "130005" + }, + "clientSecret": { + "type": "string", + "description": "WordPress OAuth2 client secret.", + "example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "130005", + "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" + } + }, + "oAuth2Twitch": { + "description": "OAuth2Twitch", + "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": "Twitch OAuth2 client ID.", + "example": "vvi0in000000000000000000ikmt9p" + }, + "clientSecret": { + "type": "string", + "description": "Twitch OAuth2 client secret.", + "example": "pmapue000000000000000000zylw3v" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "vvi0in000000000000000000ikmt9p", + "clientSecret": "pmapue000000000000000000zylw3v" + } + }, + "oAuth2Stripe": { + "description": "OAuth2Stripe", + "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": "Stripe OAuth2 client ID.", + "example": "ca_UKibXX0000000000000000000006byvR" + }, + "apiSecretKey": { + "type": "string", + "description": "Stripe OAuth2 API secret key.", + "example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "apiSecretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "ca_UKibXX0000000000000000000006byvR", + "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + } + }, + "oAuth2Spotify": { + "description": "OAuth2Spotify", + "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": "Spotify OAuth2 client ID.", + "example": "6ec271000000000000000000009beace" + }, + "clientSecret": { + "type": "string", + "description": "Spotify OAuth2 client secret.", + "example": "db068a000000000000000000008b5b9f" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6ec271000000000000000000009beace", + "clientSecret": "db068a000000000000000000008b5b9f" + } + }, + "oAuth2Slack": { + "description": "OAuth2Slack", + "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": "Slack OAuth2 client ID.", + "example": "23000000089.15000000000023" + }, + "clientSecret": { + "type": "string", + "description": "Slack OAuth2 client secret.", + "example": "81656000000000000000000000f3d2fd" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "23000000089.15000000000023", + "clientSecret": "81656000000000000000000000f3d2fd" + } + }, + "oAuth2Podio": { + "description": "OAuth2Podio", + "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": "Podio OAuth2 client ID.", + "example": "appwrite-oauth-test-app" + }, + "clientSecret": { + "type": "string", + "description": "Podio OAuth2 client secret.", + "example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-oauth-test-app", + "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "oAuth2Notion": { + "description": "OAuth2Notion", + "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 + }, + "oauthClientId": { + "type": "string", + "description": "Notion OAuth2 client ID.", + "example": "341d8700-0000-0000-0000-000000446ee3" + }, + "oauthClientSecret": { + "type": "string", + "description": "Notion OAuth2 client secret.", + "example": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "required": [ + "$id", + "enabled", + "oauthClientId", + "oauthClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", + "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" + } + }, + "oAuth2Salesforce": { + "description": "OAuth2Salesforce", + "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 + }, + "customerKey": { + "type": "string", + "description": "Salesforce OAuth2 consumer key.", + "example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" + }, + "customerSecret": { + "type": "string", + "description": "Salesforce OAuth2 consumer secret.", + "example": "3w000000000000e2" + } + }, + "required": [ + "$id", + "enabled", + "customerKey", + "customerSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "customerSecret": "3w000000000000e2" + } + }, + "oAuth2Yahoo": { + "description": "OAuth2Yahoo", + "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": "Yahoo OAuth2 client ID.", + "example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" + }, + "clientSecret": { + "type": "string", + "description": "Yahoo OAuth2 client secret.", + "example": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "clientSecret": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "oAuth2Cloudflare": { + "description": "OAuth2Cloudflare", + "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": "Cloudflare OAuth2 client ID.", + "example": "4b866000000000000000000000c9e4e2" + }, + "clientSecret": { + "type": "string", + "description": "Cloudflare OAuth2 client secret.", + "example": "cfoc_5Q6YRl0000000000000000000000000000000000003d214f" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "4b866000000000000000000000c9e4e2", + "clientSecret": "cfoc_5Q6YRl0000000000000000000000000000000000003d214f" + } + }, + "oAuth2HuggingFace": { + "description": "OAuth2HuggingFace", + "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": "Hugging Face OAuth2 client ID.", + "example": "2ab9cff9-d711-40ad-a91e-b08a49c42d24" + }, + "clientSecret": { + "type": "string", + "description": "Hugging Face OAuth2 client secret.", + "example": "oauth_app_secret_wcLhRtl000000000000000000000xbNdLt" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "2ab9cff9-d711-40ad-a91e-b08a49c42d24", + "clientSecret": "oauth_app_secret_wcLhRtl000000000000000000000xbNdLt" + } + }, + "oAuth2Linkedin": { + "description": "OAuth2Linkedin", + "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": "LinkedIn OAuth2 client ID.", + "example": "770000000000dv" + }, + "primaryClientSecret": { + "type": "string", + "description": "LinkedIn OAuth2 primary client secret.", + "example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "primaryClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "770000000000dv", + "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" + } + }, + "oAuth2Disqus": { + "description": "OAuth2Disqus", + "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 + }, + "publicKey": { + "type": "string", + "description": "Disqus OAuth2 public key.", + "example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" + }, + "secretKey": { + "type": "string", + "description": "Disqus OAuth2 secret key.", + "example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "required": [ + "$id", + "enabled", + "publicKey", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + } + }, + "oAuth2Amazon": { + "description": "OAuth2Amazon", + "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": "Amazon OAuth2 client ID.", + "example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" + }, + "clientSecret": { + "type": "string", + "description": "Amazon OAuth2 client secret.", + "example": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "oAuth2Etsy": { + "description": "OAuth2Etsy", + "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 + }, + "keyString": { + "type": "string", + "description": "Etsy OAuth2 keystring.", + "example": "nsgzxh0000000000008j85a2" + }, + "sharedSecret": { + "type": "string", + "description": "Etsy OAuth2 shared secret.", + "example": "tp000000ru" + } + }, + "required": [ + "$id", + "enabled", + "keyString", + "sharedSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "keyString": "nsgzxh0000000000008j85a2", + "sharedSecret": "tp000000ru" + } + }, + "oAuth2Facebook": { + "description": "OAuth2Facebook", + "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 + }, + "appId": { + "type": "string", + "description": "Facebook OAuth2 app ID.", + "example": "260600000007694" + }, + "appSecret": { + "type": "string", + "description": "Facebook OAuth2 app secret.", + "example": "2d0b2800000000000000000000d38af4" + } + }, + "required": [ + "$id", + "enabled", + "appId", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appId": "260600000007694", + "appSecret": "2d0b2800000000000000000000d38af4" + } + }, + "oAuth2Tradeshift": { + "description": "OAuth2Tradeshift", + "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 + }, + "oauth2ClientId": { + "type": "string", + "description": "Tradeshift OAuth2 client ID.", + "example": "appwrite-test-org.appwrite-test-app" + }, + "oauth2ClientSecret": { + "type": "string", + "description": "Tradeshift OAuth2 client secret.", + "example": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "required": [ + "$id", + "enabled", + "oauth2ClientId", + "oauth2ClientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "oauth2ClientId": "appwrite-test-org.appwrite-test-app", + "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" + } + }, + "oAuth2Paypal": { + "description": "OAuth2Paypal", + "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": "PayPal OAuth2 client ID.", + "example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" + }, + "secretKey": { + "type": "string", + "description": "PayPal OAuth2 secret key.", + "example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "oAuth2Gitlab": { + "description": "OAuth2Gitlab", + "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 + }, + "applicationId": { + "type": "string", + "description": "GitLab OAuth2 application ID.", + "example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" + }, + "secret": { + "type": "string", + "description": "GitLab OAuth2 secret.", + "example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" + }, + "endpoint": { + "type": "string", + "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", + "example": "https:\/\/gitlab.com" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "secret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "endpoint": "https:\/\/gitlab.com" + } + }, + "oAuth2Appwrite": { + "description": "OAuth2Appwrite", + "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": "Appwrite OAuth2 client ID.", + "example": "6a42000000000000b5a0" + }, + "clientSecret": { + "type": "string", + "description": "Appwrite OAuth2 client secret.", + "example": "b86afd000000000000000000000000000000000000000000000000000ced5f93" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6a42000000000000b5a0", + "clientSecret": "b86afd000000000000000000000000000000000000000000000000000ced5f93" + } + }, + "oAuth2Authentik": { + "description": "OAuth2Authentik", + "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": "Authentik OAuth2 client ID.", + "example": "dTKOPa0000000000000000000000000000e7G8hv" + }, + "clientSecret": { + "type": "string", + "description": "Authentik OAuth2 client secret.", + "example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" + }, + "endpoint": { + "type": "string", + "description": "Authentik OAuth2 endpoint domain.", + "example": "example.authentik.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dTKOPa0000000000000000000000000000e7G8hv", + "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "endpoint": "example.authentik.com" + } + }, + "oAuth2Auth0": { + "description": "OAuth2Auth0", + "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": "Auth0 OAuth2 client ID.", + "example": "OaOkIA000000000000000000005KLSYq" + }, + "clientSecret": { + "type": "string", + "description": "Auth0 OAuth2 client secret.", + "example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" + }, + "endpoint": { + "type": "string", + "description": "Auth0 OAuth2 endpoint domain.", + "example": "example.us.auth0.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "OaOkIA000000000000000000005KLSYq", + "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "endpoint": "example.us.auth0.com" + } + }, + "oAuth2FusionAuth": { + "description": "OAuth2FusionAuth", + "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": "FusionAuth OAuth2 client ID.", + "example": "b2222c00-0000-0000-0000-000000862097" + }, + "clientSecret": { + "type": "string", + "description": "FusionAuth OAuth2 client secret.", + "example": "Jx4s0C0000000000000000000000000000000wGqLsc" + }, + "endpoint": { + "type": "string", + "description": "FusionAuth OAuth2 endpoint domain.", + "example": "example.fusionauth.io" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "b2222c00-0000-0000-0000-000000862097", + "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", + "endpoint": "example.fusionauth.io" + } + }, + "oAuth2Keycloak": { + "description": "OAuth2Keycloak", + "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": "Keycloak OAuth2 client ID.", + "example": "appwrite-o0000000st-app" + }, + "clientSecret": { + "type": "string", + "description": "Keycloak OAuth2 client secret.", + "example": "jdjrJd00000000000000000000HUsaZO" + }, + "endpoint": { + "type": "string", + "description": "Keycloak OAuth2 endpoint domain.", + "example": "keycloak.example.com" + }, + "realmName": { + "type": "string", + "description": "Keycloak OAuth2 realm name.", + "example": "appwrite-realm" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint", + "realmName" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-o0000000st-app", + "clientSecret": "jdjrJd00000000000000000000HUsaZO", + "endpoint": "keycloak.example.com", + "realmName": "appwrite-realm" + } + }, + "oAuth2Oidc": { + "description": "OAuth2Oidc", + "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": "OpenID Connect OAuth2 client ID.", + "example": "qibI2x0000000000000000000000000006L2YFoG" + }, + "clientSecret": { + "type": "string", + "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.", + "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": [ + "consent" + ] + }, + "maxAge": { + "type": "integer", + "description": "Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds.", + "format": "int32", + "example": 3600, + "nullable": true + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "wellKnownURL", + "authorizationURL", + "tokenURL", + "userInfoURL", + "prompt" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "qibI2x0000000000000000000000000006L2YFoG", + "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "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 + } + }, + "oAuth2Okta": { + "description": "OAuth2Okta", + "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": "Okta OAuth2 client ID.", + "example": "0oa00000000000000698" + }, + "clientSecret": { + "type": "string", + "description": "Okta OAuth2 client secret.", + "example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" + }, + "domain": { + "type": "string", + "description": "Okta OAuth2 domain.", + "example": "trial-6400025.okta.com" + }, + "authorizationServerId": { + "type": "string", + "description": "Okta OAuth2 authorization server ID.", + "example": "aus000000000000000h7z" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "domain", + "authorizationServerId" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "0oa00000000000000698", + "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "domain": "trial-6400025.okta.com", + "authorizationServerId": "aus000000000000000h7z" + } + }, + "oAuth2Kick": { + "description": "OAuth2Kick", + "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": "Kick OAuth2 client ID.", + "example": "01KQ7C00000000000001MFHS32" + }, + "clientSecret": { + "type": "string", + "description": "Kick OAuth2 client secret.", + "example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "01KQ7C00000000000001MFHS32", + "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "oAuth2Apple": { + "description": "OAuth2Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "example": "apple" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "example": false + }, + "serviceId": { + "type": "string", + "description": "Apple OAuth2 service ID.", + "example": "ip.appwrite.app.web" + }, + "keyId": { + "type": "string", + "description": "Apple OAuth2 key ID.", + "example": "P4000000N8" + }, + "teamId": { + "type": "string", + "description": "Apple OAuth2 team ID.", + "example": "D4000000R6" + }, + "p8File": { + "type": "string", + "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", + "example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + }, + "nativeEnabled": { + "type": "boolean", + "description": "Native Sign in with Apple is active and can be used to create sessions from an ID token. Independent of enabled, which only controls the browser-based flow.", + "example": false + }, + "nativeClientIds": { + "type": "array", + "description": "App bundle IDs accepted as ID token audiences for native Sign in with Apple, next to the Services ID.", + "items": { + "type": "string" + }, + "example": [ + "com.example.app" + ] + } + }, + "required": [ + "$id", + "enabled", + "serviceId", + "keyId", + "teamId", + "p8File", + "nativeEnabled", + "nativeClientIds" + ], + "example": { + "$id": "apple", + "enabled": false, + "serviceId": "ip.appwrite.app.web", + "keyId": "P4000000N8", + "teamId": "D4000000R6", + "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", + "nativeEnabled": false, + "nativeClientIds": [ + "com.example.app" + ] + } + }, + "oAuth2Microsoft": { + "description": "OAuth2Microsoft", + "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 + }, + "applicationId": { + "type": "string", + "description": "Microsoft OAuth2 application ID.", + "example": "00001111-aaaa-2222-bbbb-3333cccc4444" + }, + "applicationSecret": { + "type": "string", + "description": "Microsoft OAuth2 application secret.", + "example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", + "example": "common" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "applicationSecret", + "tenant" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", + "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "tenant": "common" + } + }, + "oAuth2Resend": { + "description": "OAuth2Resend", + "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": "Resend OAuth2 client ID.", + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479" + }, + "clientSecret": { + "type": "string", + "description": "Resend OAuth2 client secret.", + "example": "9c1e4b00000000000000000000000000000000000000000000000000a72d5f4" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "clientSecret": "9c1e4b00000000000000000000000000000000000000000000000000a72d5f4" + } + }, + "oAuth2TikTok": { + "description": "OAuth2TikTok", + "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": "TikTok OAuth2 client key.", + "example": "awz000000000tyw0" + }, + "clientSecret": { + "type": "string", + "description": "TikTok OAuth2 client secret.", + "example": "6wXewM00000000000000000000yXnite" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "awz000000000tyw0", + "clientSecret": "6wXewM00000000000000000000yXnite" + } + }, + "oAuth2Kakao": { + "description": "OAuth2Kakao", + "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": "Kakao OAuth2 REST API key.", + "example": "839ff5000000000000000000013206de" + }, + "clientSecret": { + "type": "string", + "description": "Kakao OAuth2 client secret.", + "example": "jLNVOK00000000000000000000yJebea" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "839ff5000000000000000000013206de", + "clientSecret": "jLNVOK00000000000000000000yJebea" + } + }, + "oAuth2ProviderList": { + "description": "OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers in the given project.", + "format": "int32", + "example": 5 + }, + "providers": { + "type": "array", + "description": "List of OAuth2 providers.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/oAuth2Github" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Discord" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Figma" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Box" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Google" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + }, + { + "$ref": "#\/components\/schemas\/oAuth2X" + }, + { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Slack" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Podio" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Notion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Appwrite" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + }, + { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Apple" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Okta" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kick" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + }, + { + "$ref": "#\/components\/schemas\/oAuth2HuggingFace" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Resend" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Cloudflare" + }, + { + "$ref": "#\/components\/schemas\/oAuth2TikTok" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kakao" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/components\/schemas\/oAuth2Github", + "discord": "#\/components\/schemas\/oAuth2Discord", + "figma": "#\/components\/schemas\/oAuth2Figma", + "dropbox": "#\/components\/schemas\/oAuth2Dropbox", + "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", + "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", + "bitly": "#\/components\/schemas\/oAuth2Bitly", + "box": "#\/components\/schemas\/oAuth2Box", + "autodesk": "#\/components\/schemas\/oAuth2Autodesk", + "google": "#\/components\/schemas\/oAuth2Google", + "zoom": "#\/components\/schemas\/oAuth2Zoom", + "zoho": "#\/components\/schemas\/oAuth2Zoho", + "yandex": "#\/components\/schemas\/oAuth2Yandex", + "x": "#\/components\/schemas\/oAuth2X", + "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "twitch": "#\/components\/schemas\/oAuth2Twitch", + "stripe": "#\/components\/schemas\/oAuth2Stripe", + "spotify": "#\/components\/schemas\/oAuth2Spotify", + "slack": "#\/components\/schemas\/oAuth2Slack", + "podio": "#\/components\/schemas\/oAuth2Podio", + "notion": "#\/components\/schemas\/oAuth2Notion", + "salesforce": "#\/components\/schemas\/oAuth2Salesforce", + "yahoo": "#\/components\/schemas\/oAuth2Yahoo", + "linkedin": "#\/components\/schemas\/oAuth2Linkedin", + "disqus": "#\/components\/schemas\/oAuth2Disqus", + "amazon": "#\/components\/schemas\/oAuth2Amazon", + "etsy": "#\/components\/schemas\/oAuth2Etsy", + "facebook": "#\/components\/schemas\/oAuth2Facebook", + "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", + "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", + "paypal": "#\/components\/schemas\/oAuth2Paypal", + "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", + "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "appwrite": "#\/components\/schemas\/oAuth2Appwrite", + "authentik": "#\/components\/schemas\/oAuth2Authentik", + "auth0": "#\/components\/schemas\/oAuth2Auth0", + "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", + "keycloak": "#\/components\/schemas\/oAuth2Keycloak", + "oidc": "#\/components\/schemas\/oAuth2Oidc", + "apple": "#\/components\/schemas\/oAuth2Apple", + "okta": "#\/components\/schemas\/oAuth2Okta", + "kick": "#\/components\/schemas\/oAuth2Kick", + "microsoft": "#\/components\/schemas\/oAuth2Microsoft", + "huggingface": "#\/components\/schemas\/oAuth2HuggingFace", + "resend": "#\/components\/schemas\/oAuth2Resend", + "cloudflare": "#\/components\/schemas\/oAuth2Cloudflare", + "tiktok": "#\/components\/schemas\/oAuth2TikTok", + "kakao": "#\/components\/schemas\/oAuth2Kakao" + } + } + }, + "example": [] + } + }, + "required": [ + "total", + "providers" + ], + "example": { + "total": 5, + "providers": "" + } + }, + "policyPasswordDictionary": { + "description": "Policy Password Dictionary", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password dictionary policy is enabled.", + "example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyPasswordHistory": { + "description": "Policy Password History", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Password history length. A value of 0 means the policy is disabled.", + "format": "int32", + "example": 5 + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 5 + } + }, + "policyPasswordStrength": { + "description": "Policy Password Strength", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "min": { + "type": "integer", + "description": "Minimum password length required for user passwords.", + "format": "int32", + "example": 12 + }, + "uppercase": { + "type": "boolean", + "description": "Whether passwords must include at least one uppercase letter.", + "example": true + }, + "lowercase": { + "type": "boolean", + "description": "Whether passwords must include at least one lowercase letter.", + "example": true + }, + "number": { + "type": "boolean", + "description": "Whether passwords must include at least one number.", + "example": true + }, + "symbols": { + "type": "boolean", + "description": "Whether passwords must include at least one symbol.", + "example": true + } + }, + "required": [ + "$id", + "min", + "uppercase", + "lowercase", + "number", + "symbols" + ], + "example": { + "$id": "password-dictionary", + "min": 12, + "uppercase": true, + "lowercase": true, + "number": true, + "symbols": true + } + }, + "policyPasswordPersonalData": { + "description": "Policy Password Personal Data", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether password personal data policy is enabled.", + "example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyPasswordPwned": { + "description": "Policy Password Pwned", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether passwords are checked against known data breaches and the result recorded on the user.", + "example": true + }, + "sessions": { + "type": "boolean", + "description": "Whether a sign-in with a breached password is refused until the password is reset.", + "example": false + }, + "users": { + "type": "boolean", + "description": "Whether a breached password is rejected when a user signs up or sets a new password.", + "example": false + } + }, + "required": [ + "$id", + "enabled", + "sessions", + "users" + ], + "example": { + "$id": "password-dictionary", + "enabled": true, + "sessions": false, + "users": false + } + }, + "policySessionAlert": { + "description": "Policy Session Alert", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session alert policy is enabled.", + "example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionDuration": { + "description": "Policy Session Duration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "duration": { + "type": "integer", + "description": "Session duration in seconds.", + "format": "int32", + "example": 3600 + } + }, + "required": [ + "$id", + "duration" + ], + "example": { + "$id": "password-dictionary", + "duration": 3600 + } + }, + "policySessionInvalidation": { + "description": "Policy Session Invalidation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session invalidation policy is enabled.", + "example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionLimit": { + "description": "Policy Session Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", + "format": "int32", + "example": 10 + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 10 + } + }, + "policyUserLimit": { + "description": "Policy User Limit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "total": { + "type": "integer", + "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", + "format": "int32", + "example": 100 + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 100 + } + }, + "policyMembershipPrivacy": { + "description": "Policy Membership Privacy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "userId": { + "type": "boolean", + "description": "Whether user ID is visible in memberships.", + "example": true + }, + "userEmail": { + "type": "boolean", + "description": "Whether user email is visible in memberships.", + "example": true + }, + "userPhone": { + "type": "boolean", + "description": "Whether user phone is visible in memberships.", + "example": true + }, + "userName": { + "type": "boolean", + "description": "Whether user name is visible in memberships.", + "example": true + }, + "userMFA": { + "type": "boolean", + "description": "Whether user MFA status is visible in memberships.", + "example": true + }, + "userAccessedAt": { + "type": "boolean", + "description": "Whether user last access time is visible in memberships.", + "example": true + } + }, + "required": [ + "$id", + "userId", + "userEmail", + "userPhone", + "userName", + "userMFA", + "userAccessedAt" + ], + "example": { + "$id": "password-dictionary", + "userId": true, + "userEmail": true, + "userPhone": true, + "userName": true, + "userMFA": true, + "userAccessedAt": true + } + }, + "policyMfaFactors": { + "description": "Policy MFA Factors", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "totp": { + "type": "boolean", + "description": "Whether TOTP can be used to complete an MFA challenge.", + "example": true + }, + "email": { + "type": "boolean", + "description": "Whether email can be used to complete an MFA challenge.", + "example": true + }, + "phone": { + "type": "boolean", + "description": "Whether phone (SMS) can be used to complete an MFA challenge.", + "example": true + }, + "custom": { + "type": "boolean", + "description": "Whether the custom factor can be used to complete an MFA challenge.", + "example": true + } + }, + "required": [ + "$id", + "totp", + "email", + "phone", + "custom" + ], + "example": { + "$id": "password-dictionary", + "totp": true, + "email": true, + "phone": true, + "custom": true + } + }, + "policyDenyAliasedEmail": { + "description": "Policy Deny Aliased Email", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny aliased email policy is enabled.", + "example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyDenyDisposableEmail": { + "description": "Policy Deny Disposable Email", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny disposable email policy is enabled.", + "example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyDenyFreeEmail": { + "description": "Policy Deny Free Email", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny free email policy is enabled.", + "example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyDenyCorporateEmail": { + "description": "Policy Deny Corporate Email", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny non-corporate email policy is enabled.", + "example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "platformWeb": { + "description": "Platform Web", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "example": "My Web App" + }, + "type": { + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "example": "web", + "title": "PlatformType", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "windows" + ], + "title": "windows" + }, + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "android" + ], + "title": "android" + }, + { + "type": "string", + "enum": [ + "linux" + ], + "title": "linux" + }, + { + "type": "string", + "enum": [ + "web" + ], + "title": "web" + } + ] + }, + "hostname": { + "type": "string", + "description": "Web app hostname. Empty string for other platforms.", + "example": "app.example.com" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "hostname", + "key" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "hostname": "app.example.com" + } + }, + "platformApple": { + "description": "Platform Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "example": "My Web App" + }, + "type": { + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "example": "web", + "title": "PlatformType", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "windows" + ], + "title": "windows" + }, + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "android" + ], + "title": "android" + }, + { + "type": "string", + "enum": [ + "linux" + ], + "title": "linux" + }, + { + "type": "string", + "enum": [ + "web" + ], + "title": "web" + } + ] + }, + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier.", + "example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "bundleIdentifier" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "bundleIdentifier": "com.company.appname" + } + }, + "platformAndroid": { + "description": "Platform Android", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "example": "My Web App" + }, + "type": { + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "example": "web", + "title": "PlatformType", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "windows" + ], + "title": "windows" + }, + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "android" + ], + "title": "android" + }, + { + "type": "string", + "enum": [ + "linux" + ], + "title": "linux" + }, + { + "type": "string", + "enum": [ + "web" + ], + "title": "web" + } + ] + }, + "applicationId": { + "type": "string", + "description": "Android application ID.", + "example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "applicationId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "applicationId": "com.company.appname" + } + }, + "platformWindows": { + "description": "Platform Windows", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "example": "My Web App" + }, + "type": { + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "example": "web", + "title": "PlatformType", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "windows" + ], + "title": "windows" + }, + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "android" + ], + "title": "android" + }, + { + "type": "string", + "enum": [ + "linux" + ], + "title": "linux" + }, + { + "type": "string", + "enum": [ + "web" + ], + "title": "web" + } + ] + }, + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name.", + "example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageIdentifierName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageIdentifierName": "com.company.appname" + } + }, + "platformLinux": { + "description": "Platform Linux", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Platform creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Platform update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Platform name.", + "example": "My Web App" + }, + "type": { + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "example": "web", + "title": "PlatformType", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "windows" + ], + "title": "windows" + }, + { + "type": "string", + "enum": [ + "apple" + ], + "title": "apple" + }, + { + "type": "string", + "enum": [ + "android" + ], + "title": "android" + }, + { + "type": "string", + "enum": [ + "linux" + ], + "title": "linux" + }, + { + "type": "string", + "enum": [ + "web" + ], + "title": "web" + } + ] + }, + "packageName": { + "type": "string", + "description": "Linux package name.", + "example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "packageName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" + } + }, + "platformList": { + "description": "Platforms List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of platforms in the given project.", + "format": "int32", + "example": 5 + }, + "platforms": { + "type": "array", + "description": "List of platforms.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + }, + "example": [] + } + }, + "required": [ + "total", + "platforms" + ], + "example": { + "total": 5, + "platforms": "" + } + }, + "variable": { + "description": "Variable", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Variable ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "key": { + "type": "string", + "description": "Variable key.", + "example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Variable value.", + "example": "myPa$$word1" + }, + "secret": { + "type": "boolean", + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "example": false + }, + "resourceType": { + "type": "string", + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "example": "function" + }, + "resourceId": { + "type": "string", + "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function.", + "example": "myAwesomeFunction" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "value", + "secret", + "resourceType", + "resourceId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "example": "US" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "United States", + "code": "US" + } + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "example": "EU" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "Europe", + "code": "EU" + } + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "example": "Italiano" + } + }, + "required": [ + "name", + "code", + "nativeName" + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "format": "int32", + "example": 2 + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "format": "double", + "example": 0 + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", + "example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "metric": { + "description": "Metric", + "type": "object", + "properties": { + "value": { + "type": "integer", + "description": "The value of this metric at the timestamp.", + "format": "int32", + "example": 1 + }, + "date": { + "type": "string", + "description": "The date at which this metric was aggregated in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "value", + "date" + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } + }, + "usageUsers": { + "description": "UsageUsers", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "example": "30d" + }, + "usersTotal": { + "type": "integer", + "description": "Total aggregated number of statistics of users.", + "format": "int32", + "example": 0 + }, + "sessionsTotal": { + "type": "integer", + "description": "Total aggregated number of active sessions.", + "format": "int32", + "example": 0 + }, + "users": { + "type": "array", + "description": "Aggregated number of users per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "sessions": { + "type": "array", + "description": "Aggregated number of active sessions per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + } + }, + "required": [ + "range", + "usersTotal", + "sessionsTotal", + "users", + "sessions" + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } + }, + "usagePresence": { + "description": "UsagePresence", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "example": "30d" + }, + "usersOnlineTotal": { + "type": "integer", + "description": "Current total number of online users.", + "format": "int32", + "example": 0 + }, + "presences": { + "type": "array", + "description": "Aggregated number of online users per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + } + }, + "required": [ + "range", + "usersOnlineTotal", + "presences" + ], + "example": { + "range": "30d", + "usersOnlineTotal": 0, + "presences": [] + } + }, + "usageDataPoint": { + "description": "usageDataPoint", + "type": "object", + "properties": { + "time": { + "type": "string", + "description": "Bucket start timestamp in ISO 8601. Omitted for flat dimension aggregates.", + "example": "2026-04-09T12:00:00.000+00:00", + "nullable": true + }, + "value": { + "type": "number", + "description": "Aggregated value for the point.", + "format": "double", + "example": 5000 + }, + "path": { + "type": "string", + "description": "Value when broken down by `path`.", + "example": "\/v1\/storage\/files", + "nullable": true + }, + "method": { + "type": "string", + "description": "Value when broken down by `method`.", + "example": "POST", + "nullable": true + }, + "status": { + "type": "string", + "description": "Value when broken down by `status`.", + "example": "201", + "nullable": true + }, + "service": { + "type": "string", + "description": "Value when broken down by `service`.", + "example": "storage", + "nullable": true + }, + "country": { + "type": "string", + "description": "Value when broken down by `country`.", + "example": "us", + "nullable": true + }, + "region": { + "type": "string", + "description": "Value when broken down by `region`.", + "example": "default", + "nullable": true + }, + "hostname": { + "type": "string", + "description": "Value when broken down by `hostname`.", + "example": "app.example.com", + "nullable": true + }, + "ip": { + "type": "string", + "description": "Value when broken down by `ip`.", + "example": "192.0.2.44", + "nullable": true + }, + "protocol": { + "type": "string", + "description": "Value when broken down by `protocol`.", + "example": "https", + "nullable": true + }, + "accept": { + "type": "string", + "description": "Value when broken down by `accept`.", + "example": "application\/json", + "nullable": true + }, + "acceptLanguage": { + "type": "string", + "description": "Value when broken down by `acceptLanguage`.", + "example": "en-US", + "nullable": true + }, + "queryKeys": { + "type": "string", + "description": "Value when broken down by `queryKeys`.", + "example": "project,mode", + "nullable": true + }, + "osName": { + "type": "string", + "description": "Value when broken down by `osName`.", + "example": "iOS", + "nullable": true + }, + "clientType": { + "type": "string", + "description": "Value when broken down by `clientType`.", + "example": "browser", + "nullable": true + }, + "clientName": { + "type": "string", + "description": "Value when broken down by `clientName`.", + "example": "Chrome", + "nullable": true + }, + "sdk": { + "type": "string", + "description": "Value when broken down by `sdk`.", + "example": "web", + "nullable": true + }, + "sdkVersion": { + "type": "string", + "description": "Value when broken down by `sdkVersion`.", + "example": "14.0.0", + "nullable": true + }, + "deviceName": { + "type": "string", + "description": "Value when broken down by `deviceName`.", + "example": "smartphone", + "nullable": true + }, + "resourceId": { + "type": "string", + "description": "Value when broken down by `resourceId`.", + "example": "abc123", + "nullable": true + }, + "resourceType": { + "type": "string", + "description": "Value when broken down by `resourceType`.", + "example": "bucket", + "nullable": true + }, + "ordinal": { + "type": "string", + "description": "Value when broken down by `ordinal`.", + "example": "0", + "nullable": true + }, + "continentCode": { + "type": "string", + "description": "Continent code when broken down by `continentCode`.", + "example": "NA", + "nullable": true + }, + "city": { + "type": "string", + "description": "City name when broken down by `city`.", + "example": "Mountain View", + "nullable": true + }, + "subdivisions": { + "type": "string", + "description": "Region\/state chain when broken down by `subdivisions`.", + "example": "California", + "nullable": true + }, + "isp": { + "type": "string", + "description": "Internet service provider when broken down by `isp`.", + "example": "Google", + "nullable": true + }, + "autonomousSystemNumber": { + "type": "string", + "description": "Autonomous System Number (ASN) when broken down by `autonomousSystemNumber`.", + "example": "15169", + "nullable": true + }, + "autonomousSystemOrganization": { + "type": "string", + "description": "Organization owning the ASN when broken down by `autonomousSystemOrganization`.", + "example": "GOOGLE", + "nullable": true + }, + "connectionType": { + "type": "string", + "description": "Connection type when broken down by `connectionType`.", + "example": "cable", + "nullable": true + }, + "connectionUsageType": { + "type": "string", + "description": "Connection usage type when broken down by `connectionUsageType`.", + "example": "residential", + "nullable": true + }, + "connectionOrganization": { + "type": "string", + "description": "Registered organization of the IP when broken down by `connectionOrganization`.", + "example": "Google LLC", + "nullable": true + }, + "teamId": { + "type": "string", + "description": "Owning team ID when broken down by `teamId`.", + "example": "team_abc", + "nullable": true + } + }, + "required": [ + "value" + ], + "example": { + "time": "2026-04-09T12:00:00.000+00:00", + "value": 5000, + "path": "\/v1\/storage\/files", + "method": "POST", + "status": "201", + "service": "storage", + "country": "us", + "region": "default", + "hostname": "app.example.com", + "ip": "192.0.2.44", + "protocol": "https", + "accept": "application\/json", + "acceptLanguage": "en-US", + "queryKeys": "project,mode", + "osName": "iOS", + "clientType": "browser", + "clientName": "Chrome", + "sdk": "web", + "sdkVersion": "14.0.0", + "deviceName": "smartphone", + "resourceId": "abc123", + "resourceType": "bucket", + "ordinal": "0", + "continentCode": "NA", + "city": "Mountain View", + "subdivisions": "California", + "isp": "Google", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC", + "teamId": "team_abc" + } + }, + "usageMetric": { + "description": "usageMetric", + "type": "object", + "properties": { + "metric": { + "type": "string", + "description": "Metric key this series describes.", + "example": "files.storage" + }, + "points": { + "type": "array", + "description": "Data points in the requested order.", + "items": { + "$ref": "#\/components\/schemas\/usageDataPoint" + }, + "example": [] + } + }, + "required": [ + "metric", + "points" + ], + "example": { + "metric": "files.storage", + "points": "" + } + }, + "usageEventList": { + "description": "usageEventList", + "type": "object", + "properties": { + "interval": { + "type": "string", + "description": "Requested interval, or an empty string for a flat aggregate.", + "example": "1h" + }, + "metrics": { + "type": "array", + "description": "One series per requested event metric.", + "items": { + "$ref": "#\/components\/schemas\/usageMetric" + }, + "example": [] + } + }, + "required": [ + "interval", + "metrics" + ], + "example": { + "interval": "1h", + "metrics": "" + } + }, + "usageGaugeList": { + "description": "usageGaugeList", + "type": "object", + "properties": { + "interval": { + "type": "string", + "description": "Requested interval, or an empty string for a flat aggregate.", + "example": "1h" + }, + "metrics": { + "type": "array", + "description": "One series per requested gauge metric.", + "items": { + "$ref": "#\/components\/schemas\/usageMetric" + }, + "example": [] + } + }, + "required": [ + "interval", + "metrics" + ], + "example": { + "interval": "1h", + "metrics": "" + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "format": "int32", + "example": 512 + }, + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "format": "double", + "example": 1 + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "example": "s-1vcpu-512mb" + } + }, + "required": [ + "memory", + "cpus", + "enabled", + "slug" + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } + }, + "proxyRule": { + "description": "Rule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Rule creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Rule update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "example": "appwrite.company.com" + }, + "type": { + "type": "string", + "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", + "example": "deployment" + }, + "trigger": { + "type": "string", + "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", + "example": "manual" + }, + "redirectUrl": { + "type": "string", + "description": "URL to redirect to. Used if type is \"redirect\"", + "example": "https:\/\/appwrite.io\/docs" + }, + "redirectStatusCode": { + "type": "integer", + "description": "Status code to apply during redirect. Used if type is \"redirect\"", + "format": "int32", + "example": 301 + }, + "deploymentId": { + "type": "string", + "description": "ID of deployment. Used if type is \"deployment\"", + "example": "n3u9feiwmf" + }, + "deploymentResourceType": { + "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", + "example": "function", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "function" + ], + "title": "function" + }, + { + "type": "string", + "enum": [ + "site" + ], + "title": "site" + } + ], + "nullable": true + }, + "deploymentResourceId": { + "type": "string", + "description": "ID of deployment's resource (site or function ID). Used if type is \"deployment\"", + "example": "n3u9feiwmf" + }, + "deploymentVcsProviderBranch": { + "type": "string", + "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", + "example": "main" + }, + "status": { + "description": "Domain verification status. Possible values are \"unverified\", \"verifying\", \"verified\"", + "example": "verified", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "unverified" + ], + "title": "unverified" + }, + { + "type": "string", + "enum": [ + "verifying" + ], + "title": "verifying" + }, + { + "type": "string", + "enum": [ + "verified" + ], + "title": "verified" + } + ] + }, + "logs": { + "type": "string", + "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", + "example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." + }, + "renewAt": { + "type": "string", + "description": "Certificate auto-renewal date in ISO 8601 format.", + "example": "datetime" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "domain", + "type", + "trigger", + "redirectUrl", + "redirectStatusCode", + "deploymentId", + "deploymentResourceId", + "deploymentVcsProviderBranch", + "status", + "logs", + "renewAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "main", + "status": "verified", + "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", + "renewAt": "datetime" + } + }, + "schedule": { + "description": "Schedule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Schedule ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Schedule creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Schedule update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type associated with this schedule.", + "example": "function" + }, + "resourceId": { + "type": "string", + "description": "The resource ID associated with this schedule.", + "example": "5e5ea5c16897e" + }, + "resourceUpdatedAt": { + "type": "string", + "description": "Change-tracking timestamp used by the scheduler to detect resource changes in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "projectId": { + "type": "string", + "description": "The project ID associated with this schedule.", + "example": "5e5ea5c16897e" + }, + "schedule": { + "type": "string", + "description": "The CRON schedule expression.", + "example": "5 4 * * *" + }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Schedule data used to store resource-specific context needed for execution.", + "example": {} + }, + "active": { + "type": "boolean", + "description": "Whether the schedule is active.", + "example": true + }, + "region": { + "type": "string", + "description": "The region where the schedule is deployed.", + "example": "fra" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "resourceType", + "resourceId", + "resourceUpdatedAt", + "projectId", + "schedule", + "data", + "active", + "region" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "function", + "resourceId": "5e5ea5c16897e", + "resourceUpdatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "schedule": "5 4 * * *", + "data": [], + "active": true, + "region": "fra" + } + }, + "stage": { + "description": "Stage", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stage ID.", + "example": "tablesDB.create" + }, + "sdk": { + "type": "string", + "description": "SDK method key (namespace.name) for this stage.", + "example": "tablesDB.create" + }, + "status": { + "type": "string", + "description": "Stage status.", + "example": "completed" + }, + "at": { + "type": "string", + "description": "When the stage was completed or skipped, in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "actorType": { + "type": "string", + "description": "Actor type when the stage was recorded.", + "example": "user" + } + }, + "required": [ + "id", + "sdk", + "status", + "at", + "actorType" + ], + "example": { + "id": "tablesDB.create", + "sdk": "tablesDB.create", + "status": "completed", + "at": "2020-10-15T06:38:00.000+00:00", + "actorType": "user" + } + }, + "emailTemplate": { + "description": "EmailTemplate", + "type": "object", + "properties": { + "templateId": { + "type": "string", + "description": "Template type", + "example": "verification" + }, + "locale": { + "type": "string", + "description": "Template locale", + "example": "en_us" + }, + "message": { + "type": "string", + "description": "Template message", + "example": "Click on the link to verify your account." + }, + "senderName": { + "type": "string", + "description": "Name of the sender", + "example": "My User" + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "example": "mail@appwrite.io" + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email address", + "example": "emails@appwrite.io" + }, + "replyToName": { + "type": "string", + "description": "Reply to name", + "example": "Support Team" + }, + "subject": { + "type": "string", + "description": "Email subject", + "example": "Please verify your email address" + } + }, + "required": [ + "templateId", + "locale", + "message", + "senderName", + "senderEmail", + "replyToEmail", + "replyToName", + "subject" + ], + "example": { + "templateId": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyToEmail": "emails@appwrite.io", + "replyToName": "Support Team", + "subject": "Please verify your email address" + } + }, + "consoleVariables": { + "description": "Console Variables", + "type": "object", + "properties": { + "_APP_DOMAIN_TARGET_CNAME": { + "type": "string", + "description": "CNAME target for your Appwrite custom domains.", + "example": "appwrite.io" + }, + "_APP_DOMAIN_TARGET_A": { + "type": "string", + "description": "A target for your Appwrite custom domains.", + "example": "127.0.0.1" + }, + "_APP_COMPUTE_BUILD_TIMEOUT": { + "type": "integer", + "description": "Maximum build timeout in seconds.", + "format": "int32", + "example": 900 + }, + "_APP_DOMAIN_TARGET_AAAA": { + "type": "string", + "description": "AAAA target for your Appwrite custom domains.", + "example": "::1" + }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "example": "digicert.com" + }, + "_APP_STORAGE_LIMIT": { + "type": "integer", + "description": "Maximum file size allowed for file upload in bytes.", + "format": "int32", + "example": 30000000 + }, + "_APP_COMPUTE_SIZE_LIMIT": { + "type": "integer", + "description": "Maximum file size allowed for deployment in bytes.", + "format": "int32", + "example": 30000000 + }, + "_APP_USAGE_STATS": { + "type": "string", + "description": "Defines if usage stats are enabled. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'.", + "example": "enabled" + }, + "_APP_VCS_ENABLED": { + "type": "boolean", + "description": "Defines if VCS (Version Control System) is enabled.", + "example": true + }, + "_APP_VCS_PROVIDERS": { + "type": "array", + "description": "List of configured VCS providers.", + "items": { + "type": "string" + }, + "example": [ + "github" + ] + }, + "_APP_VCS_PROVIDERS_WITH_REPOSITORY_CREATION": { + "type": "array", + "description": "List of configured VCS providers that support repository creation.", + "items": { + "type": "string" + }, + "example": [ + "github" + ] + }, + "_APP_VCS_PROVIDERS_WITH_PUBLIC_REPOSITORIES": { + "type": "array", + "description": "List of configured VCS providers that can host public repositories.", + "items": { + "type": "string" + }, + "example": [ + "github" + ] + }, + "_APP_DOMAIN_ENABLED": { + "type": "boolean", + "description": "Defines if main domain is configured. If so, custom domains can be created.", + "example": true + }, + "_APP_ASSISTANT_ENABLED": { + "type": "boolean", + "description": "Defines if AI assistant is enabled.", + "example": true + }, + "_APP_DOMAIN_SITES": { + "type": "string", + "description": "A comma separated list of domains to use for site URLs.", + "example": "sites.localhost,sites.example.com" + }, + "_APP_DOMAIN_FUNCTIONS": { + "type": "string", + "description": "A domain to use for function URLs.", + "example": "functions.localhost" + }, + "_APP_OPTIONS_FORCE_HTTPS": { + "type": "string", + "description": "Defines if HTTPS is enforced for all requests.", + "example": "enabled" + }, + "_APP_DOMAINS_NAMESERVERS": { + "type": "string", + "description": "Comma-separated list of nameservers.", + "example": "ns1.example.com,ns2.example.com" + }, + "_APP_DB_ADAPTER": { + "type": "string", + "description": "Database adapter in use.", + "example": "mysql" + }, + "supportForRelationships": { + "type": "boolean", + "description": "Whether the database adapter supports relationships.", + "example": true + }, + "supportForOperators": { + "type": "boolean", + "description": "Whether the database adapter supports operators.", + "example": true + }, + "supportForSpatials": { + "type": "boolean", + "description": "Whether the database adapter supports spatial attributes.", + "example": true + }, + "supportForSpatialIndexNull": { + "type": "boolean", + "description": "Whether the database adapter supports spatial indexes on nullable columns.", + "example": false + }, + "supportForFulltextWildcard": { + "type": "boolean", + "description": "Whether the database adapter supports fulltext wildcard search.", + "example": true + }, + "supportForMultipleFulltextIndexes": { + "type": "boolean", + "description": "Whether the database adapter supports multiple fulltext indexes per collection.", + "example": true + }, + "supportForAttributeResizing": { + "type": "boolean", + "description": "Whether the database adapter supports resizing attributes.", + "example": true + }, + "supportForSchemas": { + "type": "boolean", + "description": "Whether the database adapter supports fixed schemas with row width limits.", + "example": true + }, + "maxIndexLength": { + "type": "integer", + "description": "Maximum index length supported by the database adapter.", + "format": "int32", + "example": 768 + }, + "supportForIntegerIds": { + "type": "boolean", + "description": "Whether the database adapter uses integer sequence IDs.", + "example": true + }, + "_APP_CONSOLE_EMAIL_VERIFICATION": { + "type": "string", + "description": "Whether email verification for console users is required. Can be \"true\" or \"false\".", + "example": "true" + } + }, + "required": [ + "_APP_DOMAIN_TARGET_CNAME", + "_APP_DOMAIN_TARGET_A", + "_APP_COMPUTE_BUILD_TIMEOUT", + "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", + "_APP_STORAGE_LIMIT", + "_APP_COMPUTE_SIZE_LIMIT", + "_APP_USAGE_STATS", + "_APP_VCS_ENABLED", + "_APP_VCS_PROVIDERS", + "_APP_VCS_PROVIDERS_WITH_REPOSITORY_CREATION", + "_APP_VCS_PROVIDERS_WITH_PUBLIC_REPOSITORIES", + "_APP_DOMAIN_ENABLED", + "_APP_ASSISTANT_ENABLED", + "_APP_DOMAIN_SITES", + "_APP_DOMAIN_FUNCTIONS", + "_APP_OPTIONS_FORCE_HTTPS", + "_APP_DOMAINS_NAMESERVERS", + "_APP_DB_ADAPTER", + "supportForRelationships", + "supportForOperators", + "supportForSpatials", + "supportForSpatialIndexNull", + "supportForFulltextWildcard", + "supportForMultipleFulltextIndexes", + "supportForAttributeResizing", + "supportForSchemas", + "maxIndexLength", + "supportForIntegerIds", + "_APP_CONSOLE_EMAIL_VERIFICATION" + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_COMPUTE_BUILD_TIMEOUT": 900, + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_VCS_PROVIDERS": [ + "github" + ], + "_APP_VCS_PROVIDERS_WITH_REPOSITORY_CREATION": [ + "github" + ], + "_APP_VCS_PROVIDERS_WITH_PUBLIC_REPOSITORIES": [ + "github" + ], + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost,sites.example.com", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com", + "_APP_DB_ADAPTER": "mysql", + "supportForRelationships": true, + "supportForOperators": true, + "supportForSpatials": true, + "supportForSpatialIndexNull": false, + "supportForFulltextWildcard": true, + "supportForMultipleFulltextIndexes": true, + "supportForAttributeResizing": true, + "supportForSchemas": true, + "maxIndexLength": 768, + "supportForIntegerIds": true, + "_APP_CONSOLE_EMAIL_VERIFICATION": "true" + } + }, + "consoleOAuth2ProviderParameter": { + "description": "Console OAuth2 Provider Parameter", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Parameter ID. Maps to the request body field used by the project OAuth2 update endpoint (e.g. `clientId`, `appKey`, `tenant`).", + "example": "clientId" + }, + "name": { + "type": "string", + "description": "Verbose, user-facing parameter name as shown in the provider's own dashboard. Includes alternate names when the provider exposes more than one.", + "example": "Client ID or App ID" + }, + "example": { + "type": "string", + "description": "Example value for this parameter.", + "example": "e4d87900000000540733" + }, + "hint": { + "type": "string", + "description": "Optional hint for this parameter, typically calling out a common wrong value. Empty string when no hint is set.", + "example": "Example of wrong value: 370006" + } + }, + "required": [ + "$id", + "name", + "example", + "hint" + ], + "example": { + "$id": "clientId", + "name": "Client ID or App ID", + "example": "e4d87900000000540733", + "hint": "Example of wrong value: 370006" + } + }, + "consoleOAuth2Provider": { + "description": "Console OAuth2 Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "example": "github" + }, + "parameters": { + "type": "array", + "description": "List of parameters required to configure this OAuth2 provider.", + "items": { + "$ref": "#\/components\/schemas\/consoleOAuth2ProviderParameter" + }, + "example": [] + } + }, + "required": [ + "$id", + "parameters" + ], + "example": { + "$id": "github", + "parameters": "" + } + }, + "consoleOAuth2ProviderList": { + "description": "Console OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers exposed by the server.", + "format": "int32", + "example": 5 + }, + "oAuth2Providers": { + "type": "array", + "description": "List of OAuth2 providers, each with the parameters required to configure it.", + "items": { + "$ref": "#\/components\/schemas\/consoleOAuth2Provider" + }, + "example": [] + } + }, + "required": [ + "total", + "oAuth2Providers" + ], + "example": { + "total": 5, + "oAuth2Providers": "" + } + }, + "consoleKeyScope": { + "description": "Console Key Scope", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Scope ID.", + "example": "users.read" + }, + "description": { + "type": "string", + "description": "Scope description.", + "example": "Access to read your project's users" + }, + "category": { + "type": "string", + "description": "Scope category.", + "example": "Auth" + }, + "deprecated": { + "type": "boolean", + "description": "Scope is deprecated.", + "example": true + } + }, + "required": [ + "$id", + "description", + "category", + "deprecated" + ], + "example": { + "$id": "users.read", + "description": "Access to read your project's users", + "category": "Auth", + "deprecated": true + } + }, + "consoleKeyScopeList": { + "description": "Console Key Scopes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of key scopes exposed by the server.", + "format": "int32", + "example": 5 + }, + "scopes": { + "type": "array", + "description": "List of key scopes, each with its ID and description.", + "items": { + "$ref": "#\/components\/schemas\/consoleKeyScope" + }, + "example": [] + } + }, + "required": [ + "total", + "scopes" + ], + "example": { + "total": 5, + "scopes": "" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaChallengeSecret": { + "description": "MFA Challenge Secret", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "code": { + "type": "string", + "description": "Challenge code to be delivered to the end user through a custom channel.", + "example": "446372" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire", + "code" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00", + "code": "446372" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "example": "[SHARED_SECRET]" + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "example": true + }, + "custom": { + "type": "boolean", + "description": "Can custom factor be used for MFA challenge for this account.", + "example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode", + "custom" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true, + "custom": true + } + }, + "provider": { + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "example": "mailgun" + }, + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "example": true + }, + "type": { + "type": "string", + "description": "Type of provider.", + "example": "sms" + }, + "credentials": { + "type": "object", + "additionalProperties": true, + "description": "Provider credentials.", + "example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "additionalProperties": true, + "description": "Provider options.", + "example": { + "from": "sender-email@mydomain" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } + }, + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "providerType": { + "type": "string", + "description": "Message provider type.", + "example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "format": "int32", + "example": 1 + }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Data of the message.", + "example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "description": "Status of delivery.", + "example": "processing", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "draft" + ], + "title": "draft" + }, + { + "type": "string", + "enum": [ + "processing" + ], + "title": "processing" + }, + { + "type": "string", + "enum": [ + "scheduled" + ], + "title": "scheduled" + }, + { + "type": "string", + "enum": [ + "sent" + ], + "title": "sent" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + } + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "processing" + } + }, + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "example": "events" + }, + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "format": "int32", + "example": 100 + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "format": "int32", + "example": 100 + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "format": "int32", + "example": 100 + }, + "subscribe": { + "type": "array", + "description": "Subscribe permissions.", + "items": { + "type": "string" + }, + "example": [ + "users" + ] + }, + "qos": { + "type": "integer", + "description": "MQTT QoS for delivery on this topic. Null lets the subscriber choose their level.", + "format": "int32", + "example": 1, + "nullable": true + }, + "expiry": { + "type": "integer", + "description": "Message retention in seconds for offline delivery.", + "format": "int32", + "example": 604800, + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users", + "qos": 1, + "expiry": 604800 + } + }, + "transaction": { + "description": "Transaction", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Transaction ID.", + "example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "example": "pending" + }, + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "format": "int32", + "example": 5 + }, + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "targetId": { + "type": "string", + "description": "Target ID.", + "example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/target" + } + ] + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "example": "259125845563242502", + "nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } + }, + "migration": { + "description": "Migration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Migration ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Migration creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Migration status ( pending, processing, failed, completed ) ", + "example": "pending" + }, + "stage": { + "type": "string", + "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", + "example": "init" + }, + "source": { + "type": "string", + "description": "A string containing the type of source of the migration.", + "example": "Appwrite" + }, + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "example": "Appwrite" + }, + "resources": { + "type": "array", + "description": "Resources to migrate.", + "items": { + "type": "string" + }, + "example": [ + "user" + ] + }, + "resourceId": { + "type": "string", + "description": "ID of the resource being migrated.", + "example": "collectionId" + }, + "resourceInternalId": { + "type": "string", + "description": "Internal ID of the resource being migrated.", + "example": "1" + }, + "resourceType": { + "type": "string", + "description": "Type of the resource being migrated.", + "example": "collection" + }, + "parentResourceId": { + "type": "string", + "description": "ID of the parent resource that contains the migrated resource.", + "example": "databaseId" + }, + "parentResourceInternalId": { + "type": "string", + "description": "Internal ID of the parent resource that contains the migrated resource.", + "example": "1" + }, + "parentResourceType": { + "type": "string", + "description": "Type of the parent resource that contains the migrated resource.", + "example": "database" + }, + "destinationResourceId": { + "type": "string", + "description": "ID of the destination resource created or overwritten by the migration.", + "example": "databaseId" + }, + "destinationResourceInternalId": { + "type": "string", + "description": "Internal ID of the destination resource created or overwritten by the migration.", + "example": "1" + }, + "destinationResourceType": { + "type": "string", + "description": "Type of the destination resource created or overwritten by the migration.", + "example": "database" + }, + "statusCounters": { + "type": "object", + "additionalProperties": true, + "description": "A group of counters that represent the total progress of the migration.", + "example": { + "Database": { + "PENDING": 0, + "SUCCESS": 1, + "ERROR": 0, + "SKIP": 0, + "PROCESSING": 0, + "WARNING": 0 + } + } + }, + "resourceData": { + "type": "array", + "description": "An array of objects containing the report data of the resources that were migrated.", + "items": { + "type": "object" + }, + "example": [ + { + "resource": "Database", + "id": "public", + "status": "SUCCESS", + "message": "" + } + ] + }, + "errors": { + "type": "array", + "description": "All errors that occurred during the migration process.", + "items": { + "type": "string" + }, + "example": [] + }, + "options": { + "type": "object", + "additionalProperties": true, + "description": "Migration options used during the migration process.", + "example": { + "bucketId": "exports", + "notify": false + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "stage", + "source", + "destination", + "resources", + "resourceId", + "resourceInternalId", + "resourceType", + "parentResourceId", + "parentResourceInternalId", + "parentResourceType", + "destinationResourceId", + "destinationResourceInternalId", + "destinationResourceType", + "statusCounters", + "resourceData", + "errors", + "options" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "collectionId", + "resourceInternalId": "1", + "resourceType": "collection", + "parentResourceId": "databaseId", + "parentResourceInternalId": "1", + "parentResourceType": "database", + "destinationResourceId": "databaseId", + "destinationResourceInternalId": "1", + "destinationResourceType": "database", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [], + "options": "{\"bucketId\": \"exports\", \"notify\": false}" + } + }, + "migrationReport": { + "description": "Migration Report", + "type": "object", + "properties": { + "user": { + "type": "integer", + "description": "Number of users to be migrated.", + "format": "int32", + "example": 20 + }, + "team": { + "type": "integer", + "description": "Number of teams to be migrated.", + "format": "int32", + "example": 20 + }, + "database": { + "type": "integer", + "description": "Number of databases to be migrated.", + "format": "int32", + "example": 20 + }, + "row": { + "type": "integer", + "description": "Number of rows to be migrated.", + "format": "int32", + "example": 20 + }, + "file": { + "type": "integer", + "description": "Number of files to be migrated.", + "format": "int32", + "example": 20 + }, + "bucket": { + "type": "integer", + "description": "Number of buckets to be migrated.", + "format": "int32", + "example": 20 + }, + "function": { + "type": "integer", + "description": "Number of functions to be migrated.", + "format": "int32", + "example": 20 + }, + "platform": { + "type": "integer", + "description": "Number of platforms to be migrated.", + "format": "int32", + "example": 5 + }, + "api-key": { + "type": "integer", + "description": "Number of API keys to be migrated.", + "format": "int32", + "example": 5 + }, + "project-variable": { + "type": "integer", + "description": "Number of project variables to be migrated.", + "format": "int32", + "example": 5 + }, + "webhook": { + "type": "integer", + "description": "Number of webhooks to be migrated.", + "format": "int32", + "example": 5 + }, + "auth-methods": { + "type": "integer", + "description": "Number of auth-method configs to be migrated (always 0 or 1 \u2014 the project-level flag bundle).", + "format": "int32", + "example": 1 + }, + "project-protocols": { + "type": "integer", + "description": "Number of protocol configs to be migrated (always 0 or 1 \u2014 the project-level REST\/GraphQL\/WebSocket flags).", + "format": "int32", + "example": 1 + }, + "project-labels": { + "type": "integer", + "description": "Number of label sets to be migrated (always 0 or 1 \u2014 the project-level RBAC label array).", + "format": "int32", + "example": 1 + }, + "project-services": { + "type": "integer", + "description": "Number of service configs to be migrated (always 0 or 1 \u2014 the project-level enable\/disable flags for all 17 services).", + "format": "int32", + "example": 1 + }, + "policies": { + "type": "integer", + "description": "Number of policy bundles to be migrated (always 0 or 1 \u2014 the project-level security policies covering password rules, session behavior, user limits, and membership privacy).", + "format": "int32", + "example": 1 + }, + "smtp": { + "type": "integer", + "description": "Number of SMTP configurations to be migrated (always 0 or 1 \u2014 the project-level custom SMTP settings; password is not exposed by the source API).", + "format": "int32", + "example": 1 + }, + "rule": { + "type": "integer", + "description": "Number of custom-domain proxy rules to be migrated. Auto-generated `.appwrite.network` rules are skipped \u2014 they are recreated by parent Function\/Site migration.", + "format": "int32", + "example": 5 + }, + "project-email-template": { + "type": "integer", + "description": "Number of custom email templates to be migrated (one per templateId \u00d7 locale pair).", + "format": "int32", + "example": 7 + }, + "site": { + "type": "integer", + "description": "Number of sites to be migrated.", + "format": "int32", + "example": 5 + }, + "provider": { + "type": "integer", + "description": "Number of providers to be migrated.", + "format": "int32", + "example": 5 + }, + "topic": { + "type": "integer", + "description": "Number of topics to be migrated.", + "format": "int32", + "example": 10 + }, + "subscriber": { + "type": "integer", + "description": "Number of subscribers to be migrated.", + "format": "int32", + "example": 100 + }, + "message": { + "type": "integer", + "description": "Number of messages to be migrated.", + "format": "int32", + "example": 50 + }, + "size": { + "type": "integer", + "description": "Size of files to be migrated in mb.", + "format": "int32", + "example": 30000 + }, + "version": { + "type": "string", + "description": "Version of the Appwrite instance to be migrated.", + "example": "1.4.0" + }, + "oauth2-provider": { + "type": "integer", + "description": "Number of OAuth2 provider configurations to be migrated. Secrets (clientSecret, p8File) are never migrated \u2014 destination admin must re-enter them per provider.", + "format": "int32", + "example": 5 + }, + "backup-policy": { + "type": "integer", + "description": "Number of backup policies to be migrated.", + "format": "int32", + "example": 5 + } + }, + "required": [ + "user", + "team", + "database", + "row", + "file", + "bucket", + "function", + "platform", + "api-key", + "project-variable", + "webhook", + "auth-methods", + "project-protocols", + "project-labels", + "project-services", + "policies", + "smtp", + "rule", + "project-email-template", + "site", + "provider", + "topic", + "subscriber", + "message", + "size", + "version", + "oauth2-provider", + "backup-policy" + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "platform": 5, + "api-key": 5, + "project-variable": 5, + "webhook": 5, + "auth-methods": 1, + "project-protocols": 1, + "project-labels": 1, + "project-services": 1, + "policies": 1, + "smtp": 1, + "rule": 5, + "project-email-template": 7, + "site": 5, + "provider": 5, + "topic": 10, + "subscriber": 100, + "message": 50, + "size": 30000, + "version": "1.4.0", + "oauth2-provider": 5, + "backup-policy": 5 + } + }, + "insight": { + "description": "Insight", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Insight ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Insight creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Insight update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "reportId": { + "type": "string", + "description": "Parent report ID. Insights always belong to a report.", + "example": "5e5ea5c16897e" + }, + "type": { + "type": "string", + "description": "Insight type. One of databaseIndex (legacy), tablesDBIndex, documentsDBIndex, vectorsDBIndex, databasePerformance, sitePerformance, siteAccessibility, siteSeo, functionPerformance. The index types are engine-specific so each CTA can pair the right service+method (databases.createIndex, tablesDB.createIndex, documentsDB.createIndex, or vectorsDB.createIndex).", + "example": "tablesDBIndex" + }, + "severity": { + "type": "string", + "description": "Insight severity. One of info, warning, critical.", + "example": "warning" + }, + "status": { + "type": "string", + "description": "Insight status. One of active, dismissed.", + "example": "active" + }, + "resourceType": { + "type": "string", + "description": "Type of the resource the insight is about. Plural noun, e.g. databases, sites, functions.", + "example": "databases" + }, + "resourceId": { + "type": "string", + "description": "ID of the resource the insight is about.", + "example": "main" + }, + "parentResourceType": { + "type": "string", + "description": "Plural noun for the parent resource that contains the insight's resource, e.g. an insight about a column index on a table \u2192 resourceType=indexes, parentResourceType=tables. Empty when the resource has no parent.", + "example": "tables" + }, + "parentResourceId": { + "type": "string", + "description": "ID of the parent resource. Empty when the resource has no parent.", + "example": "orders" + }, + "title": { + "type": "string", + "description": "Insight title.", + "example": "Missing index on collection orders" + }, + "summary": { + "type": "string", + "description": "Short markdown summary describing the insight.", + "example": "Queries against `orders.status` are scanning the full collection." + }, + "ctas": { + "type": "array", + "description": "List of call-to-action buttons attached to this insight.", + "items": { + "$ref": "#\/components\/schemas\/insightCTA" + }, + "example": [] + }, + "analyzedAt": { + "type": "string", + "description": "Time the insight was analyzed in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "dismissedAt": { + "type": "string", + "description": "Time the insight was dismissed in ISO 8601 format. Empty when not dismissed.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "dismissedBy": { + "type": "string", + "description": "User ID that dismissed the insight. Empty when not dismissed.", + "example": "5e5ea5c16897e", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "reportId", + "type", + "severity", + "status", + "resourceType", + "resourceId", + "parentResourceType", + "parentResourceId", + "title", + "summary", + "ctas" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "reportId": "5e5ea5c16897e", + "type": "tablesDBIndex", + "severity": "warning", + "status": "active", + "resourceType": "databases", + "resourceId": "main", + "parentResourceType": "tables", + "parentResourceId": "orders", + "title": "Missing index on collection orders", + "summary": "Queries against `orders.status` are scanning the full collection.", + "ctas": [], + "analyzedAt": "2020-10-15T06:38:00.000+00:00", + "dismissedAt": "2020-10-15T06:38:00.000+00:00", + "dismissedBy": "5e5ea5c16897e" + } + }, + "insightCTA": { + "description": "InsightCTA", + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Human-readable label for the CTA, used in UI.", + "example": "Create missing index" + }, + "service": { + "type": "string", + "description": "Public API service (SDK namespace) the client should invoke. Must match the engine that owns the resource \u2014 for index suggestions: databases (legacy), tablesDB, documentsDB, or vectorsDB.", + "example": "tablesDB" + }, + "method": { + "type": "string", + "description": "Public API method on the chosen service the client should invoke when this CTA is triggered.", + "example": "createIndex" + }, + "params": { + "type": "object", + "additionalProperties": true, + "description": "Parameter map the client should pass to the service method when this CTA is triggered. Keys match the target API's parameter names (e.g. databaseId\/tableId\/columns for tablesDB, databaseId\/collectionId\/attributes for the legacy Databases API).", + "example": { + "databaseId": "main", + "tableId": "orders", + "key": "_idx_status", + "type": "key", + "columns": [ + "status" + ] + } + } + }, + "required": [ + "label", + "service", + "method", + "params" + ], + "example": { + "label": "Create missing index", + "service": "tablesDB", + "method": "createIndex", + "params": { + "databaseId": "main", + "tableId": "orders", + "key": "_idx_status", + "type": "key", + "columns": [ + "status" + ] + } + } + }, + "report": { + "description": "Report", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Report ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Report creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Report update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "ID of the third-party app that submitted the report.", + "example": "5e5ea5c16897e" + }, + "type": { + "type": "string", + "description": "Analyzer that produced this report. e.g. lighthouse, audit, databaseAnalyzer.", + "example": "lighthouse" + }, + "title": { + "type": "string", + "description": "Short, human-readable title for the report.", + "example": "Lighthouse audit for https:\/\/appwrite.io\/" + }, + "summary": { + "type": "string", + "description": "Markdown summary describing the report.", + "example": "Performance score 78. 4 opportunities found." + }, + "targetType": { + "type": "string", + "description": "Plural noun describing what the report analyzes, e.g. databases, sites, urls.", + "example": "urls" + }, + "target": { + "type": "string", + "description": "Free-form target identifier (URL for lighthouse, resource ID for db).", + "example": "https:\/\/appwrite.io\/" + }, + "categories": { + "type": "array", + "description": "Categories covered by the report, e.g. performance, accessibility.", + "items": { + "type": "string" + }, + "example": [ + "performance", + "accessibility" + ] + }, + "insights": { + "type": "array", + "description": "Insights nested under this report.", + "items": { + "$ref": "#\/components\/schemas\/insight" + }, + "example": [] + }, + "analyzedAt": { + "type": "string", + "description": "Time the report was analyzed in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "type", + "title", + "summary", + "targetType", + "target", + "categories", + "insights" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "type": "lighthouse", + "title": "Lighthouse audit for https:\/\/appwrite.io\/", + "summary": "Performance score 78. 4 opportunities found.", + "targetType": "urls", + "target": "https:\/\/appwrite.io\/", + "categories": [ + "performance", + "accessibility" + ], + "insights": [], + "analyzedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "activityEvent": { + "description": "ActivityEvent", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Event ID.", + "example": "5e5ea5c16897e" + }, + "actorType": { + "type": "string", + "description": "Actor type.", + "example": "user" + }, + "actorId": { + "type": "string", + "description": "Actor ID.", + "example": "610fc2f985ee0" + }, + "actorEmail": { + "type": "string", + "description": "Actor Email.", + "example": "john@appwrite.io" + }, + "actorName": { + "type": "string", + "description": "Actor Name.", + "example": "John Doe" + }, + "resourceParent": { + "type": "string", + "description": "Resource parent.", + "example": "database\/ID" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "example": "collection" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "example": "610fc2f985ee0" + }, + "resource": { + "type": "string", + "description": "Resource.", + "example": "collections\/610fc2f985ee0" + }, + "event": { + "type": "string", + "description": "Event name.", + "example": "account.sessions.create" + }, + "userAgent": { + "type": "string", + "description": "User agent.", + "example": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36" + }, + "ip": { + "type": "string", + "description": "IP address.", + "example": "127.0.0.1" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "example": "admin" + }, + "country": { + "type": "string", + "description": "Location.", + "example": "US" + }, + "continentCode": { + "type": "string", + "description": "Continent code.", + "example": "NA" + }, + "city": { + "type": "string", + "description": "City name.", + "example": "Mountain View" + }, + "subdivisions": { + "type": "string", + "description": "Region\/state chain.", + "example": "California" + }, + "isp": { + "type": "string", + "description": "Internet service provider.", + "example": "Google" + }, + "autonomousSystemNumber": { + "type": "string", + "description": "Autonomous System Number (ASN).", + "example": "15169" + }, + "autonomousSystemOrganization": { + "type": "string", + "description": "Organization that owns the ASN.", + "example": "GOOGLE" + }, + "connectionType": { + "type": "string", + "description": "Connection type (e.g. cable, cellular, corporate).", + "example": "cable" + }, + "connectionUsageType": { + "type": "string", + "description": "User type (e.g. residential, business, hosting).", + "example": "residential" + }, + "connectionOrganization": { + "type": "string", + "description": "Registered organization of the IP.", + "example": "Google LLC" + }, + "time": { + "type": "string", + "description": "Log creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "610fc2f985ee0" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "610fc2f985ee0" + }, + "hostname": { + "type": "string", + "description": "Hostname.", + "example": "appwrite.io" + }, + "sdk": { + "type": "string", + "description": "Name of the SDK that triggered the event.", + "example": "web" + }, + "sdkVersion": { + "type": "string", + "description": "Version of the SDK that triggered the event.", + "example": "14.0.0" + } + }, + "required": [ + "$id", + "actorType", + "actorId", + "actorEmail", + "actorName", + "resourceParent", + "resourceType", + "resourceId", + "resource", + "event", + "userAgent", + "ip", + "mode", + "country", + "continentCode", + "city", + "subdivisions", + "isp", + "autonomousSystemNumber", + "autonomousSystemOrganization", + "connectionType", + "connectionUsageType", + "connectionOrganization", + "time", + "projectId", + "teamId", + "hostname", + "sdk", + "sdkVersion" + ], + "example": { + "$id": "5e5ea5c16897e", + "actorType": "user", + "actorId": "610fc2f985ee0", + "actorEmail": "john@appwrite.io", + "actorName": "John Doe", + "resourceParent": "database\/ID", + "resourceType": "collection", + "resourceId": "610fc2f985ee0", + "resource": "collections\/610fc2f985ee0", + "event": "account.sessions.create", + "userAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36", + "ip": "127.0.0.1", + "mode": "admin", + "country": "US", + "continentCode": "NA", + "city": "Mountain View", + "subdivisions": "California", + "isp": "Google", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC", + "time": "2020-10-15T06:38:00.000+00:00", + "projectId": "610fc2f985ee0", + "teamId": "610fc2f985ee0", + "hostname": "appwrite.io", + "sdk": "web", + "sdkVersion": "14.0.0" + } + }, + "additionalResource": { + "description": "AdditionalResource", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Resource name", + "example": "" + }, + "unit": { + "type": "string", + "description": "Resource unit", + "example": "GB" + }, + "currency": { + "type": "string", + "description": "Price currency", + "example": "USD" + }, + "price": { + "type": "number", + "description": "Price", + "format": "double", + "example": 5 + }, + "value": { + "type": "integer", + "description": "Resource value", + "format": "int32", + "example": 25 + }, + "invoiceDesc": { + "type": "string", + "description": "Description on invoice", + "example": "" + } + }, + "required": [ + "name", + "unit", + "currency", + "price", + "value", + "invoiceDesc" + ], + "example": { + "name": "", + "unit": "GB", + "currency": "USD", + "price": 5, + "value": 25, + "invoiceDesc": "" + } + }, + "addon": { + "description": "Addon", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Addon ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Addon creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Addon update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Addon permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "key": { + "type": "string", + "description": "Addon key", + "example": "baa" + }, + "resourceType": { + "type": "string", + "description": "Resource type (organization or project)", + "example": "organization" + }, + "resourceId": { + "type": "string", + "description": "Resource ID", + "example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "Payment status. Possible values: pending (awaiting payment confirmation e.g. 3DS), active (payment confirmed and addon is running).", + "example": "active" + }, + "currentValue": { + "type": "integer", + "description": "Current value for this billing cycle. For toggle addons: 1 (on) or 0 (off). For numeric addons: the active quantity.", + "format": "int32", + "example": 1 + }, + "nextValue": { + "type": "integer", + "description": "Value to apply at the start of the next billing cycle. Null means no change is scheduled. For toggle addons, 0 means the addon will be removed at the next cycle.", + "format": "int32", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "key", + "resourceType", + "resourceId", + "status", + "currentValue" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "key": "baa", + "resourceType": "organization", + "resourceId": "5e5ea5c16897e", + "status": "active", + "currentValue": 1, + "nextValue": null + } + }, + "addonPrice": { + "description": "AddonPrice", + "type": "object", + "properties": { + "addonKey": { + "type": "string", + "description": "Addon key.", + "example": "baa" + }, + "name": { + "type": "string", + "description": "Addon display name.", + "example": "HIPAA BAA" + }, + "monthlyPrice": { + "type": "number", + "description": "Full monthly price of the addon.", + "format": "double", + "example": 350 + }, + "proratedAmount": { + "type": "number", + "description": "Calculated prorated amount for the current billing cycle.", + "format": "double", + "example": 175.5 + }, + "remainingDays": { + "type": "integer", + "description": "Days remaining in the current billing cycle.", + "format": "int32", + "example": 15 + }, + "totalCycleDays": { + "type": "integer", + "description": "Total days in the billing cycle.", + "format": "int32", + "example": 30 + }, + "currency": { + "type": "string", + "description": "Currency code.", + "example": "USD" + }, + "billingCycleEnd": { + "type": "string", + "description": "When the current billing cycle ends.", + "example": "2024-02-01T00:00:00.000+00:00" + } + }, + "required": [ + "addonKey", + "name", + "monthlyPrice", + "proratedAmount", + "remainingDays", + "totalCycleDays", + "currency", + "billingCycleEnd" + ], + "example": { + "addonKey": "baa", + "name": "HIPAA BAA", + "monthlyPrice": 350, + "proratedAmount": 175.5, + "remainingDays": 15, + "totalCycleDays": 30, + "currency": "USD", + "billingCycleEnd": "2024-02-01T00:00:00.000+00:00" + } + }, + "affiliateLink": { + "description": "AffiliateLink", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Link ID. This is the shareable referral code.", + "example": "my-campaign" + }, + "$createdAt": { + "type": "string", + "description": "Link creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Link update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID of the link owner.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Optional link name.", + "example": "Launch campaign" + }, + "status": { + "type": "string", + "description": "Link status. Can be one of `active` or `disabled`.", + "example": "active" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "name", + "status" + ], + "example": { + "$id": "my-campaign", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "name": "Launch campaign", + "status": "active" + } + }, + "affiliateLinkList": { + "description": "Affiliate links list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of links that matched your query.", + "format": "int32", + "example": 5 + }, + "links": { + "type": "array", + "description": "List of links.", + "items": { + "$ref": "#\/components\/schemas\/affiliateLink" + }, + "example": [] + } + }, + "required": [ + "total", + "links" + ], + "example": { + "total": 5, + "links": "" + } + }, + "affiliateReferral": { + "description": "AffiliateReferral", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Referral ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Referral creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Referral update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "linkId": { + "type": "string", + "description": "Affiliate link ID used for attribution.", + "example": "my-campaign" + }, + "referredUserMaskedId": { + "type": "string", + "description": "Privacy-safe truncated referred user ID.", + "example": "****97e" + }, + "referredUserCountry": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code of the referred user at signup, when available.", + "example": "us" + }, + "status": { + "type": "string", + "description": "Referral status. Can be one of `pending`, `converted`, or `expired`. `expired` is derived from `expiresAt` when still pending.", + "example": "pending" + }, + "attributedAt": { + "type": "string", + "description": "Attribution time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "expiresAt": { + "type": "string", + "description": "Attribution expiry time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "convertedAt": { + "type": "string", + "description": "Conversion time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "linkId", + "referredUserMaskedId", + "referredUserCountry", + "status", + "attributedAt", + "expiresAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "linkId": "my-campaign", + "referredUserMaskedId": "****97e", + "referredUserCountry": "us", + "status": "pending", + "attributedAt": "2020-10-15T06:38:00.000+00:00", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "convertedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "affiliateReferralList": { + "description": "Affiliate referrals list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of referrals that matched your query.", + "format": "int32", + "example": 5 + }, + "referrals": { + "type": "array", + "description": "List of referrals.", + "items": { + "$ref": "#\/components\/schemas\/affiliateReferral" + }, + "example": [] + } + }, + "required": [ + "total", + "referrals" + ], + "example": { + "total": 5, + "referrals": "" + } + }, + "affiliateReward": { + "description": "AffiliateReward", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Reward ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Reward creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Reward update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID of the reward owner.", + "example": "5e5ea5c16897e" + }, + "linkId": { + "type": "string", + "description": "Affiliate link ID that earned this reward.", + "example": "my-campaign" + }, + "referralId": { + "type": "string", + "description": "Referral ID that earned this reward.", + "example": "5e5ea5c16897e" + }, + "amount": { + "type": "number", + "description": "Reward amount in USD.", + "format": "double", + "example": 10 + }, + "status": { + "type": "string", + "description": "Reward status. Can be one of `pending` or `claimed`.", + "example": "pending" + }, + "teamId": { + "type": "string", + "description": "Organization ID the reward was claimed on.", + "example": "5e5ea5c16897e", + "nullable": true + }, + "creditId": { + "type": "string", + "description": "Credit document ID created when the reward was claimed.", + "example": "5e5ea5c16897e", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "linkId", + "referralId", + "amount", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "linkId": "my-campaign", + "referralId": "5e5ea5c16897e", + "amount": 10, + "status": "pending", + "teamId": "5e5ea5c16897e", + "creditId": "5e5ea5c16897e" + } + }, + "affiliateRewardList": { + "description": "Affiliate rewards list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rewards that matched your query.", + "format": "int32", + "example": 5 + }, + "rewards": { + "type": "array", + "description": "List of rewards.", + "items": { + "$ref": "#\/components\/schemas\/affiliateReward" + }, + "example": [] + } + }, + "required": [ + "total", + "rewards" + ], + "example": { + "total": 5, + "rewards": "" + } + }, + "aggregationBreakdown": { + "description": "Breakdown", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Aggregation ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Project name", + "example": "" + }, + "region": { + "type": "string", + "description": "Project region", + "example": "fra" + }, + "amount": { + "type": "integer", + "description": "Aggregated amount", + "format": "int32", + "example": 2 + }, + "resources": { + "type": "array", + "description": "", + "items": { + "$ref": "#\/components\/schemas\/usageResources" + }, + "example": [] + } + }, + "required": [ + "$id", + "name", + "region", + "amount", + "resources" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "", + "region": "fra", + "amount": 2, + "resources": "" + } + }, + "aggregationTeam": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Aggregation ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Aggregation creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Aggregation update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Aggregation permissions. [Learn more about permissions](\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "from": { + "type": "string", + "description": "Beginning date of the invoice", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "to": { + "type": "string", + "description": "End date of the invoice", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "usageStorage": { + "type": "integer", + "description": "Total storage usage", + "format": "int32", + "example": 20009090 + }, + "usageTotalStorage": { + "type": "integer", + "description": "Total storage usage with builds storage", + "format": "int32", + "example": 20009090 + }, + "usageFilesStorage": { + "type": "integer", + "description": "Total files storage usage", + "format": "int32", + "example": 20009090 + }, + "usageDeploymentsStorage": { + "type": "integer", + "description": "Total deployments storage usage", + "format": "int32", + "example": 20009090 + }, + "usageBuildsStorage": { + "type": "integer", + "description": "Total builds storage usage", + "format": "int32", + "example": 20009090 + }, + "usageDatabasesStorage": { + "type": "integer", + "description": "Total databases storage usage", + "format": "int32", + "example": 2009090 + }, + "usageFunctionsStorage": { + "type": "integer", + "description": "Total functions storage usage, deployments and builds together. Supersedes usageDeploymentsStorage and usageBuildsStorage.", + "format": "int32", + "example": 20009090 + }, + "usageSitesStorage": { + "type": "integer", + "description": "Total sites storage usage, deployments and builds together. Supersedes usageDeploymentsStorage and usageBuildsStorage.", + "format": "int32", + "example": 20009090 + }, + "usageUsers": { + "type": "integer", + "description": "Total active users for the billing period", + "format": "int32", + "example": 2000 + }, + "usageExecutions": { + "type": "integer", + "description": "Total number of executions for the billing period", + "format": "int32", + "example": 2000 + }, + "usageBandwidth": { + "type": "integer", + "description": "Total bandwidth usage for the billing period", + "format": "int32", + "example": 2000 + }, + "usageRealtime": { + "type": "integer", + "description": "Peak concurrent realtime connections for the billing period", + "format": "int32", + "example": 200 + }, + "usageRealtimeMessages": { + "type": "integer", + "description": "Total realtime messages sent for the billing period", + "format": "int32", + "example": 10000 + }, + "usageRealtimeBandwidth": { + "type": "integer", + "description": "Total realtime bandwidth usage for the billing period", + "format": "int32", + "example": 5000000 + }, + "additionalMembers": { + "type": "integer", + "description": "Additional members", + "format": "int32", + "example": 5 + }, + "additionalMemberAmount": { + "type": "integer", + "description": "Additional members cost", + "format": "int32", + "example": 30 + }, + "additionalStorageAmount": { + "type": "integer", + "description": "Additional storage usage cost", + "format": "int32", + "example": 40 + }, + "additionalUsersAmount": { + "type": "integer", + "description": "Additional users usage cost.", + "format": "int32", + "example": 4 + }, + "additionalExecutionsAmount": { + "type": "integer", + "description": "Additional executions usage cost", + "format": "int32", + "example": 30 + }, + "additionalBandwidthAmount": { + "type": "integer", + "description": "Additional bandwidth usage cost", + "format": "int32", + "example": 40 + }, + "additionalRealtimeAmount": { + "type": "integer", + "description": "Additional realtime usage cost", + "format": "int32", + "example": 20 + }, + "plan": { + "type": "string", + "description": "Billing plan", + "example": "tier-0" + }, + "amount": { + "type": "integer", + "description": "Aggregated amount", + "format": "int32", + "example": 2 + }, + "breakdown": { + "type": "array", + "description": "Aggregation project breakdown", + "items": { + "$ref": "#\/components\/schemas\/aggregationBreakdown" + }, + "example": [] + }, + "resources": { + "type": "array", + "description": "Usage resources", + "items": { + "$ref": "#\/components\/schemas\/usageResources" + }, + "example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "from", + "to", + "usageStorage", + "usageTotalStorage", + "usageFilesStorage", + "usageDeploymentsStorage", + "usageBuildsStorage", + "usageDatabasesStorage", + "usageFunctionsStorage", + "usageSitesStorage", + "usageUsers", + "usageExecutions", + "usageBandwidth", + "usageRealtime", + "usageRealtimeMessages", + "usageRealtimeBandwidth", + "additionalMembers", + "additionalMemberAmount", + "additionalStorageAmount", + "additionalUsersAmount", + "additionalExecutionsAmount", + "additionalBandwidthAmount", + "additionalRealtimeAmount", + "plan", + "amount", + "breakdown", + "resources" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "from": "2020-10-15T06:38:00.000+00:00", + "to": "2020-10-15T06:38:00.000+00:00", + "usageStorage": 20009090, + "usageTotalStorage": 20009090, + "usageFilesStorage": 20009090, + "usageDeploymentsStorage": 20009090, + "usageBuildsStorage": 20009090, + "usageDatabasesStorage": 2009090, + "usageFunctionsStorage": 20009090, + "usageSitesStorage": 20009090, + "usageUsers": 2000, + "usageExecutions": 2000, + "usageBandwidth": 2000, + "usageRealtime": 200, + "usageRealtimeMessages": 10000, + "usageRealtimeBandwidth": 5000000, + "additionalMembers": 5, + "additionalMemberAmount": 30, + "additionalStorageAmount": 40, + "additionalUsersAmount": 4, + "additionalExecutionsAmount": 30, + "additionalBandwidthAmount": 40, + "additionalRealtimeAmount": 20, + "plan": "tier-0", + "amount": 2, + "breakdown": [], + "resources": [] + } + }, + "backupArchive": { + "description": "Archive", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Archive ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Archive creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Archive update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "policyId": { + "type": "string", + "description": "Archive policy ID.", + "example": "did8jx6ws45jana098ab7" + }, + "size": { + "type": "integer", + "description": "Archive size in bytes.", + "format": "int32", + "example": 100000 + }, + "status": { + "type": "string", + "description": "The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.", + "example": "completed" + }, + "startedAt": { + "type": "string", + "description": "The backup start time.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "migrationId": { + "type": "string", + "description": "Migration ID.", + "example": "did8jx6ws45jana098ab7" + }, + "services": { + "type": "array", + "description": "The services that are backed up by this archive.", + "items": { + "type": "string" + }, + "example": [ + "['databases', 'storage']" + ] + }, + "resources": { + "type": "array", + "description": "The resources that are backed up by this archive.", + "items": { + "type": "string" + }, + "example": [ + "['databases', 'collections', 'attributes', 'indexes']" + ] + }, + "resourceId": { + "type": "string", + "description": "The resource ID to backup. Set only if this archive should backup a single resource.", + "example": "DB1", + "nullable": true + }, + "resourceType": { + "type": "string", + "description": "The resource type to backup. Set only if this archive should backup a single resource.", + "example": "database", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "policyId", + "size", + "status", + "startedAt", + "migrationId", + "services", + "resources" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "policyId": "did8jx6ws45jana098ab7", + "size": 100000, + "status": "completed", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "migrationId": "did8jx6ws45jana098ab7", + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "resourceId": "DB1", + "resourceType": "database" + } + }, + "dedicatedDatabaseBackup": { + "description": "Backup", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Backup ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Backup creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "databaseId": { + "type": "string", + "description": "Database ID this backup belongs to.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "5e5ea5c16897e" + }, + "policyId": { + "type": "string", + "description": "Backup policy ID when the backup was created by a schedule.", + "example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "Backup trigger. Possible values: manual, schedule.", + "example": "schedule" + }, + "type": { + "type": "string", + "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival).", + "example": "full" + }, + "requestedType": { + "type": "string", + "description": "Backup type that was requested. Differs from `type` when the backend could not run the requested type and took a different one instead, in which case `fallbackReason` explains why. Empty for backups taken before the requested type was recorded.", + "example": "incremental" + }, + "fallbackReason": { + "type": "string", + "description": "Why the backend ran a different backup type than the one requested. Empty when the backup ran as requested.", + "example": "PostgreSQL incremental backups are not offered because they cannot be restored: archived WAL is physical and cannot replay onto a logically-restored base. A full backup was taken instead; use a point-in-time restore (targetTime) to recover to a moment between fulls." + }, + "status": { + "type": "string", + "description": "Backup status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error), verified (integrity check passed).", + "example": "completed" + }, + "sizeBytes": { + "type": "integer", + "description": "Backup size in bytes.", + "format": "int32", + "example": 1073741824 + }, + "startedAt": { + "type": "string", + "description": "Backup start time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "completedAt": { + "type": "string", + "description": "Backup completion time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "verifiedAt": { + "type": "string", + "description": "Backup verification time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "expiresAt": { + "type": "string", + "description": "Backup expiration time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "logPosition": { + "type": "string", + "description": "Transaction-log position the backup anchors at, in the engine's own notation: PostgreSQL `{walSegment}|{lsn}`, MySQL and MariaDB `{binlogFile}|{offset}`, MongoDB `{seconds}|{increment}`. Empty when the backup recorded no position, which is the case for backup types that carry none.", + "example": "000000010000000000000003|0\/3000148", + "nullable": true + }, + "error": { + "type": "string", + "description": "Error message if backup failed.", + "example": "" + } + }, + "required": [ + "$id", + "$createdAt", + "databaseId", + "projectId", + "policyId", + "trigger", + "type", + "requestedType", + "fallbackReason", + "status", + "sizeBytes", + "error" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "databaseId": "5e5ea5c16897e", + "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", + "type": "full", + "requestedType": "incremental", + "fallbackReason": "PostgreSQL incremental backups are not offered because they cannot be restored: archived WAL is physical and cannot replay onto a logically-restored base. A full backup was taken instead; use a point-in-time restore (targetTime) to recover to a moment between fulls.", + "status": "completed", + "sizeBytes": 1073741824, + "startedAt": "2020-10-15T06:38:00.000+00:00", + "completedAt": "2020-10-15T06:38:00.000+00:00", + "verifiedAt": "2020-10-15T06:38:00.000+00:00", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "logPosition": "000000010000000000000003|0\/3000148", + "error": "" + } + }, + "dedicatedDatabaseBackupList": { + "description": "BackupList", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of backups.", + "format": "int32", + "example": 5 + }, + "backups": { + "type": "array", + "description": "List of backups.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + }, + "example": [] + } + }, + "required": [ + "total", + "backups" + ], + "example": { + "total": 5, + "backups": [] + } + }, + "dedicatedDatabaseBackupStorage": { + "description": "BackupStorageConfig", + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Storage provider. Possible values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "example": "s3" + }, + "bucket": { + "type": "string", + "description": "Storage bucket or container name.", + "example": "my-backup-bucket" + }, + "region": { + "type": "string", + "description": "Storage region.", + "example": "us-east-1" + }, + "prefix": { + "type": "string", + "description": "Object key prefix for backups.", + "example": "backups\/" + }, + "endpoint": { + "type": "string", + "description": "Custom endpoint for S3-compatible storage.", + "example": "https:\/\/minio.example.com" + } + }, + "required": [ + "provider", + "bucket", + "region", + "prefix", + "endpoint" + ], + "example": { + "provider": "s3", + "bucket": "my-backup-bucket", + "region": "us-east-1", + "prefix": "backups\/", + "endpoint": "https:\/\/minio.example.com" + } + }, + "billingAddress": { + "description": "Address", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Region ID", + "example": "eu-fr" + }, + "userId": { + "type": "string", + "description": "User ID", + "example": "5e5ea5c16897e" + }, + "streetAddress": { + "type": "string", + "description": "Street address", + "example": "13th Avenue" + }, + "addressLine2": { + "type": "string", + "description": "Address line 2", + "example": "" + }, + "country": { + "type": "string", + "description": "Address country", + "example": "USA" + }, + "city": { + "type": "string", + "description": "city", + "example": "" + }, + "state": { + "type": "string", + "description": "state", + "example": "" + }, + "postalCode": { + "type": "string", + "description": "postal code", + "example": "" + } + }, + "required": [ + "$id", + "userId", + "streetAddress", + "addressLine2", + "country", + "city", + "state", + "postalCode" + ], + "example": { + "$id": "eu-fr", + "userId": "5e5ea5c16897e", + "streetAddress": "13th Avenue", + "addressLine2": "", + "country": "USA", + "city": "", + "state": "", + "postalCode": "" + } + }, + "billingLimits": { + "description": "Limits", + "type": "object", + "properties": { + "bandwidth": { + "type": "integer", + "description": "Bandwidth limit", + "format": "int32", + "example": 5, + "nullable": true + }, + "storage": { + "type": "integer", + "description": "Storage limit", + "format": "int32", + "example": 150, + "nullable": true + }, + "users": { + "type": "integer", + "description": "Users limit", + "format": "int32", + "example": 200000, + "nullable": true + }, + "executions": { + "type": "integer", + "description": "Executions limit", + "format": "int32", + "example": 750000, + "nullable": true + }, + "GBHours": { + "type": "integer", + "description": "GBHours limit", + "format": "int32", + "example": 100, + "nullable": true + }, + "imageTransformations": { + "type": "integer", + "description": "Image transformations limit", + "format": "int32", + "example": 100, + "nullable": true + }, + "authPhone": { + "type": "integer", + "description": "Auth phone limit", + "format": "int32", + "example": 10, + "nullable": true + }, + "budgetLimit": { + "type": "integer", + "description": "Budget limit percentage", + "format": "int32", + "example": 100, + "nullable": true + } + }, + "example": { + "bandwidth": 5, + "storage": 150, + "users": 200000, + "executions": 750000, + "GBHours": 100, + "imageTransformations": 100, + "authPhone": 10, + "budgetLimit": 100 + } + }, + "billingPlan": { + "description": "billingPlan", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Plan ID.", + "example": "tier-0" + }, + "name": { + "type": "string", + "description": "Plan name", + "example": "Hobby" + }, + "desc": { + "type": "string", + "description": "Plan description", + "example": "Hobby plan" + }, + "order": { + "type": "integer", + "description": "Plan order", + "format": "int32", + "example": 0 + }, + "price": { + "type": "number", + "description": "Price", + "format": "double", + "example": 25 + }, + "trial": { + "type": "integer", + "description": "Trial days", + "format": "int32", + "example": 14 + }, + "bandwidth": { + "type": "integer", + "description": "Bandwidth", + "format": "int32", + "example": 25 + }, + "storage": { + "type": "integer", + "description": "Storage", + "format": "int32", + "example": 25 + }, + "imageTransformations": { + "type": "integer", + "description": "Image Transformations", + "format": "int32", + "example": 100 + }, + "screenshotsGenerated": { + "type": "integer", + "description": "Screenshots generated", + "format": "int32", + "example": 50 + }, + "members": { + "type": "integer", + "description": "Members", + "format": "int32", + "example": 25, + "nullable": true + }, + "webhooks": { + "type": "integer", + "description": "Webhooks", + "format": "int32", + "example": 25 + }, + "wafRules": { + "type": "integer", + "description": "Maximum WAF rules per project", + "format": "int32", + "example": 2 + }, + "projects": { + "type": "integer", + "description": "Projects", + "format": "int32", + "example": 2 + }, + "platforms": { + "type": "integer", + "description": "Platforms", + "format": "int32", + "example": 3 + }, + "users": { + "type": "integer", + "description": "Users", + "format": "int32", + "example": 25 + }, + "teams": { + "type": "integer", + "description": "Teams", + "format": "int32", + "example": 25 + }, + "databases": { + "type": "integer", + "description": "Databases", + "format": "int32", + "example": 25 + }, + "databasesReads": { + "type": "integer", + "description": "Database reads per month", + "format": "int32", + "example": 500000 + }, + "databasesWrites": { + "type": "integer", + "description": "Database writes per month", + "format": "int32", + "example": 250000 + }, + "databasesBatchSize": { + "type": "integer", + "description": "Database batch size limit", + "format": "int32", + "example": 100 + }, + "buckets": { + "type": "integer", + "description": "Buckets", + "format": "int32", + "example": 25 + }, + "fileSize": { + "type": "integer", + "description": "File size", + "format": "int32", + "example": 25 + }, + "functions": { + "type": "integer", + "description": "Functions", + "format": "int32", + "example": 25 + }, + "sites": { + "type": "integer", + "description": "Sites", + "format": "int32", + "example": 1 + }, + "executions": { + "type": "integer", + "description": "Function executions", + "format": "int32", + "example": 25 + }, + "executionsRetentionCount": { + "type": "integer", + "description": "Rolling max executions retained per function\/site", + "format": "int32", + "example": 10000 + }, + "GBHours": { + "type": "integer", + "description": "GB hours for functions", + "format": "int32", + "example": 100 + }, + "realtime": { + "type": "integer", + "description": "Realtime connections", + "format": "int32", + "example": 25 + }, + "realtimeMessages": { + "type": "integer", + "description": "Realtime messages", + "format": "int32", + "example": 100000 + }, + "messages": { + "type": "integer", + "description": "Messages per month", + "format": "int32", + "example": 1000 + }, + "topics": { + "type": "integer", + "description": "Topics for messaging", + "format": "int32", + "example": 1 + }, + "authPhone": { + "type": "integer", + "description": "SMS authentications per month", + "format": "int32", + "example": 10 + }, + "domains": { + "type": "integer", + "description": "Custom domains", + "format": "int32", + "example": 5 + }, + "activityLogs": { + "type": "integer", + "description": "Activity log days", + "format": "int32", + "example": 7, + "nullable": true + }, + "usageLogs": { + "type": "integer", + "description": "Usage history days", + "format": "int32", + "example": 30 + }, + "usageLogsIntervals": { + "type": "array", + "description": "Usage log time intervals allowed for this plan (e.g. 15m, 1h, 1d).", + "items": { + "type": "string" + }, + "example": [ + "15m", + "1h", + "1d" + ], + "nullable": true + }, + "usageAggregateOnlyMetrics": { + "type": "array", + "description": "Metrics this plan only records as a total. They cannot be broken down by dimension or filtered, because the stored events cover a fraction of the real traffic.", + "items": { + "type": "string" + }, + "example": [ + "network.requests", + "network.inbound", + "network.outbound" + ], + "nullable": true + }, + "projectInactivityDays": { + "type": "integer", + "description": "Number of days of console inactivity before a project is paused. 0 means pausing is disabled.", + "format": "int32", + "example": 7 + }, + "alertLimit": { + "type": "integer", + "description": "Alert threshold percentage", + "format": "int32", + "example": 80 + }, + "usage": { + "type": "object", + "description": "Additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/usageBillingPlan" + } + ] + }, + "addons": { + "type": "object", + "description": "Addons", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddon" + } + ] + }, + "budgetCapEnabled": { + "type": "boolean", + "description": "Budget cap enabled or disabled.", + "example": true + }, + "customSmtp": { + "type": "boolean", + "description": "Custom SMTP", + "example": true + }, + "emailBranding": { + "type": "boolean", + "description": "Appwrite branding in email", + "example": true + }, + "requiresPaymentMethod": { + "type": "boolean", + "description": "Does plan require payment method", + "example": true + }, + "requiresBillingAddress": { + "type": "boolean", + "description": "Does plan require billing address", + "example": true + }, + "eligibleCountries": { + "type": "array", + "description": "ISO country codes eligible for this regional plan. Empty means no restriction.", + "items": { + "type": "string" + }, + "example": [ + "IN", + "NP" + ], + "nullable": true + }, + "isAvailable": { + "type": "boolean", + "description": "Is the billing plan available", + "example": true + }, + "selfService": { + "type": "boolean", + "description": "Can user change the plan themselves", + "example": true + }, + "premiumSupport": { + "type": "boolean", + "description": "Does plan enable premium support", + "example": true + }, + "budgeting": { + "type": "boolean", + "description": "Does plan support budget cap", + "example": true + }, + "supportsMockNumbers": { + "type": "boolean", + "description": "Does plan support mock numbers", + "example": true + }, + "supportsOrganizationRoles": { + "type": "boolean", + "description": "Does plan support organization roles", + "example": true + }, + "supportsCredits": { + "type": "boolean", + "description": "Does plan support credit", + "example": true + }, + "supportsDedicatedDatabases": { + "type": "boolean", + "description": "Does plan support dedicated databases.", + "example": true + }, + "supportsDisposableEmailValidation": { + "type": "boolean", + "description": "Does plan support blocking disposable email addresses.", + "example": true + }, + "supportsCanonicalEmailValidation": { + "type": "boolean", + "description": "Does plan support requiring canonical email addresses.", + "example": true + }, + "supportsFreeEmailValidation": { + "type": "boolean", + "description": "Does plan support blocking free email addresses.", + "example": true + }, + "supportsCorporateEmailValidation": { + "type": "boolean", + "description": "Does plan support restricting sign-ups to corporate email addresses only.", + "example": true + }, + "supportsProjectSpecificRoles": { + "type": "boolean", + "description": "Does plan support project-specific member roles.", + "example": true + }, + "backupsEnabled": { + "type": "boolean", + "description": "Does plan support backup policies.", + "example": true, + "nullable": true + }, + "usagePerProject": { + "type": "boolean", + "description": "Whether usage addons are calculated per project.", + "example": true + }, + "supportedAddons": { + "type": "object", + "description": "Supported addons for this plan", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanSupportedAddons" + } + ] + }, + "backupPolicies": { + "type": "integer", + "description": "How many policies does plan support", + "format": "int32", + "example": 1, + "nullable": true + }, + "deploymentSize": { + "type": "integer", + "description": "Maximum function and site deployment size in MB", + "format": "int32", + "example": 30 + }, + "buildSize": { + "type": "integer", + "description": "Maximum function and site deployment size in MB", + "format": "int32", + "example": 2000 + }, + "databasesAllowEncrypt": { + "type": "boolean", + "description": "Does the plan support encrypted string attributes or not.", + "example": false + }, + "limits": { + "type": "object", + "description": "Plan specific limits", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanLimits" + } + ], + "nullable": true + }, + "group": { + "description": "Group of this billing plan for variants", + "example": "pro", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "free" + ], + "title": "free" + }, + { + "type": "string", + "enum": [ + "start" + ], + "title": "start" + }, + { + "type": "string", + "enum": [ + "pro" + ], + "title": "pro" + }, + { + "type": "string", + "enum": [ + "scale" + ], + "title": "scale" + } + ] + }, + "program": { + "type": "object", + "description": "Details of the program this plan is a part of.", + "allOf": [ + { + "$ref": "#\/components\/schemas\/program" + } + ], + "nullable": true + }, + "databaseComputeCredit": { + "type": "number", + "description": "Included monthly dedicated-database compute credit in USD. Resets each billing cycle with no roll-over.", + "format": "double", + "example": 10 + }, + "dedicatedDatabases": { + "type": "object", + "description": "Dedicated database limits available to this plan.", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanDedicatedDatabaseLimits" + } + ], + "nullable": true + } + }, + "required": [ + "$id", + "name", + "desc", + "order", + "price", + "trial", + "bandwidth", + "storage", + "imageTransformations", + "screenshotsGenerated", + "webhooks", + "wafRules", + "projects", + "platforms", + "users", + "teams", + "databases", + "databasesReads", + "databasesWrites", + "databasesBatchSize", + "buckets", + "fileSize", + "functions", + "sites", + "executions", + "executionsRetentionCount", + "GBHours", + "realtime", + "realtimeMessages", + "messages", + "topics", + "authPhone", + "domains", + "usageLogs", + "projectInactivityDays", + "alertLimit", + "usage", + "addons", + "budgetCapEnabled", + "customSmtp", + "emailBranding", + "requiresPaymentMethod", + "requiresBillingAddress", + "isAvailable", + "selfService", + "premiumSupport", + "budgeting", + "supportsMockNumbers", + "supportsOrganizationRoles", + "supportsCredits", + "supportsDedicatedDatabases", + "supportsDisposableEmailValidation", + "supportsCanonicalEmailValidation", + "supportsFreeEmailValidation", + "supportsCorporateEmailValidation", + "supportsProjectSpecificRoles", + "usagePerProject", + "supportedAddons", + "deploymentSize", + "buildSize", + "databasesAllowEncrypt", + "group", + "databaseComputeCredit" + ], + "example": { + "$id": "tier-0", + "name": "Hobby", + "desc": "Hobby plan", + "order": 0, + "price": 25, + "trial": 14, + "bandwidth": 25, + "storage": 25, + "imageTransformations": 100, + "screenshotsGenerated": 50, + "members": 25, + "webhooks": 25, + "wafRules": 2, + "projects": 2, + "platforms": 3, + "users": 25, + "teams": 25, + "databases": 25, + "databasesReads": 500000, + "databasesWrites": 250000, + "databasesBatchSize": 100, + "buckets": 25, + "fileSize": 25, + "functions": 25, + "sites": 1, + "executions": 25, + "executionsRetentionCount": 10000, + "GBHours": 100, + "realtime": 25, + "realtimeMessages": 100000, + "messages": 1000, + "topics": 1, + "authPhone": 10, + "domains": 5, + "activityLogs": 7, + "usageLogs": 30, + "usageLogsIntervals": [ + "15m", + "1h", + "1d" + ], + "usageAggregateOnlyMetrics": [ + "network.requests", + "network.inbound", + "network.outbound" + ], + "projectInactivityDays": 7, + "alertLimit": 80, + "usage": null, + "addons": null, + "budgetCapEnabled": true, + "customSmtp": true, + "emailBranding": true, + "requiresPaymentMethod": true, + "requiresBillingAddress": true, + "eligibleCountries": [ + "IN", + "NP" + ], + "isAvailable": true, + "selfService": true, + "premiumSupport": true, + "budgeting": true, + "supportsMockNumbers": true, + "supportsOrganizationRoles": true, + "supportsCredits": true, + "supportsDedicatedDatabases": true, + "supportsDisposableEmailValidation": true, + "supportsCanonicalEmailValidation": true, + "supportsFreeEmailValidation": true, + "supportsCorporateEmailValidation": true, + "supportsProjectSpecificRoles": true, + "backupsEnabled": true, + "usagePerProject": true, + "supportedAddons": null, + "backupPolicies": 1, + "deploymentSize": 30, + "buildSize": 2000, + "databasesAllowEncrypt": false, + "limits": null, + "group": "pro", + "program": null, + "databaseComputeCredit": 10, + "dedicatedDatabases": null + } + }, + "billingPlanAddon": { + "description": "Addon", + "type": "object", + "properties": { + "seats": { + "type": "object", + "description": "Addon seats", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddonDetails" + } + ], + "nullable": true + }, + "projects": { + "type": "object", + "description": "Addon projects", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddonDetails" + } + ], + "nullable": true + } + }, + "example": { + "seats": null, + "projects": null + } + }, + "billingPlanAddonDetails": { + "description": "Details", + "type": "object", + "properties": { + "supported": { + "type": "boolean", + "description": "Is the addon supported in the plan?", + "example": true + }, + "planIncluded": { + "type": "integer", + "description": "Addon plan included value", + "format": "int32", + "example": 1 + }, + "limit": { + "type": "integer", + "description": "Addon limit", + "format": "int32", + "example": 5 + }, + "type": { + "type": "string", + "description": "Addon type", + "example": "numeric" + }, + "currency": { + "type": "string", + "description": "Price currency", + "example": "USD", + "nullable": true + }, + "price": { + "type": "number", + "description": "Price", + "format": "double", + "example": 5 + }, + "value": { + "type": "integer", + "description": "Resource value", + "format": "int32", + "example": 25 + }, + "invoiceDesc": { + "type": "string", + "description": "Description on invoice", + "example": "" + } + }, + "required": [ + "supported", + "planIncluded", + "limit", + "type", + "price", + "value", + "invoiceDesc" + ], + "example": { + "supported": true, + "planIncluded": 1, + "limit": 5, + "type": "numeric", + "currency": "USD", + "price": 5, + "value": 25, + "invoiceDesc": "" + } + }, + "billingPlanLimits": { + "description": "PlanLimits", + "type": "object", + "properties": { + "credits": { + "type": "integer", + "description": "Credits limit per billing cycle", + "format": "int32", + "example": 100, + "nullable": true + }, + "dailyCredits": { + "type": "integer", + "description": "Daily credits limit (if applicable)", + "format": "int32", + "example": 5, + "nullable": true + } + }, + "example": { + "credits": 100, + "dailyCredits": 5 + } + }, + "billingPlanDedicatedDatabaseLimits": { + "description": "dedicatedDatabaseLimits", + "type": "object", + "properties": { + "minCpu": { + "type": "integer", + "description": "Minimum CPU allocation in millicores.", + "format": "int32", + "example": 125, + "nullable": true + }, + "maxCpu": { + "type": "integer", + "description": "Maximum CPU allocation in millicores.", + "format": "int32", + "example": 32000, + "nullable": true + }, + "minMemoryMb": { + "type": "integer", + "description": "Minimum memory allocation in megabytes.", + "format": "int32", + "example": 128, + "nullable": true + }, + "maxMemoryMb": { + "type": "integer", + "description": "Maximum memory allocation in megabytes.", + "format": "int32", + "example": 262144, + "nullable": true + }, + "minStorageGb": { + "type": "integer", + "description": "Minimum storage allocation in gigabytes.", + "format": "int32", + "example": 1, + "nullable": true + }, + "maxStorageGb": { + "type": "integer", + "description": "Maximum storage allocation in gigabytes.", + "format": "int32", + "example": 16384, + "nullable": true + }, + "maxReplicas": { + "type": "integer", + "description": "Maximum number of high-availability replicas per dedicated database.", + "format": "int32", + "example": 5, + "nullable": true + }, + "maxConnections": { + "type": "integer", + "description": "Maximum number of client connections.", + "format": "int32", + "example": 10000, + "nullable": true + }, + "maxIpAllowlistSize": { + "type": "integer", + "description": "Maximum number of entries allowed in the IP allowlist.", + "format": "int32", + "example": 100, + "nullable": true + }, + "maxExtensions": { + "type": "integer", + "description": "Maximum number of database extensions that can be enabled.", + "format": "int32", + "example": 50, + "nullable": true + }, + "maxBackupRetentionDays": { + "type": "integer", + "description": "Maximum number of days a backup can be retained.", + "format": "int32", + "example": 365, + "nullable": true + }, + "maxPitrRetentionDays": { + "type": "integer", + "description": "Maximum number of days of point-in-time recovery data that can be retained.", + "format": "int32", + "example": 35, + "nullable": true + }, + "maxSqlApiMaxRows": { + "type": "integer", + "description": "Maximum number of rows a single SQL API query can return.", + "format": "int32", + "example": 1000000, + "nullable": true + }, + "maxSqlApiMaxBytes": { + "type": "integer", + "description": "Maximum response size in bytes for a single SQL API query.", + "format": "int32", + "example": 104857600, + "nullable": true + }, + "maxSqlApiTimeoutSeconds": { + "type": "integer", + "description": "Maximum execution time in seconds for a single SQL API query.", + "format": "int32", + "example": 300, + "nullable": true + }, + "maxSqlApiAllowedStatements": { + "type": "integer", + "description": "Maximum number of SQL statement types that can be permitted through the SQL API.", + "format": "int32", + "example": 10, + "nullable": true + }, + "allowedSqlStatements": { + "type": "array", + "description": "SQL statement types permitted through the SQL API.", + "items": { + "type": "string" + }, + "example": [ + "select", + "insert", + "update", + "delete", + "explain" + ], + "nullable": true + }, + "allowedStorageClasses": { + "type": "array", + "description": "Storage classes available for dedicated databases.", + "items": { + "type": "string" + }, + "example": [ + "ssd" + ], + "nullable": true + }, + "allowedSyncModes": { + "type": "array", + "description": "Replica synchronization modes available for dedicated databases.", + "items": { + "type": "string" + }, + "example": [ + "async", + "sync", + "quorum" + ], + "nullable": true + } + }, + "example": { + "minCpu": 125, + "maxCpu": 32000, + "minMemoryMb": 128, + "maxMemoryMb": 262144, + "minStorageGb": 1, + "maxStorageGb": 16384, + "maxReplicas": 5, + "maxConnections": 10000, + "maxIpAllowlistSize": 100, + "maxExtensions": 50, + "maxBackupRetentionDays": 365, + "maxPitrRetentionDays": 35, + "maxSqlApiMaxRows": 1000000, + "maxSqlApiMaxBytes": 104857600, + "maxSqlApiTimeoutSeconds": 300, + "maxSqlApiAllowedStatements": 10, + "allowedSqlStatements": [ + "select", + "insert", + "update", + "delete", + "explain" + ], + "allowedStorageClasses": [ + "ssd" + ], + "allowedSyncModes": [ + "async", + "sync", + "quorum" + ] + } + }, + "billingPlanSupportedAddons": { + "description": "BillingPlanSupportedAddons", + "type": "object", + "properties": { + "baa": { + "type": "boolean", + "description": "Whether the plan supports BAA (Business Associate Agreement) addon", + "example": true + }, + "premiumGeoDB": { + "type": "boolean", + "description": "Whether the plan supports Premium Geo DB addon (project-level)", + "example": true + }, + "premiumGeoDBOrg": { + "type": "boolean", + "description": "Whether the plan supports Premium Geo DB addon (organization-level)", + "example": true + } + }, + "required": [ + "baa", + "premiumGeoDB", + "premiumGeoDBOrg" + ], + "example": { + "baa": true, + "premiumGeoDB": true, + "premiumGeoDBOrg": true + } + }, + "block": { + "description": "Block", + "type": "object", + "properties": { + "$createdAt": { + "type": "string", + "description": "Block creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "Resource type that is blocked", + "example": "project" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier that is blocked", + "example": "5e5ea5c16897e" + }, + "mode": { + "type": "string", + "description": "Block mode. full blocks reads and writes; readOnly blocks writes only.", + "example": "readOnly" + }, + "expiredAt": { + "type": "string", + "description": "Block expiration date in ISO 8601 format. Can be null if the block does not expire.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$createdAt", + "resourceType", + "resourceId", + "mode" + ], + "example": { + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "project", + "resourceId": "5e5ea5c16897e", + "mode": "readOnly", + "expiredAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "dedicatedDatabaseBranch": { + "description": "Branch", + "type": "object", + "properties": { + "branchId": { + "type": "string", + "description": "Branch identifier.", + "example": "a1b2c3d4" + }, + "branchName": { + "type": "string", + "description": "Branch name.", + "example": "branch-a1b2c3d4" + }, + "namespace": { + "type": "string", + "description": "Kubernetes namespace where the branch is deployed.", + "example": "db-myproject-mydb-branch-a1b2c3d4" + }, + "expiresAt": { + "type": "integer", + "description": "Unix timestamp when the branch expires.", + "format": "int32", + "example": 1711411200 + }, + "host": { + "type": "string", + "description": "Branch hostname for direct connections.", + "example": "db-myproject-mydb-a1b2c3d4.fra.appwrite.center" + }, + "port": { + "type": "integer", + "description": "Branch port. Null until the backing reports one.", + "format": "int32", + "example": 5432 + }, + "database": { + "type": "string", + "description": "Advertised catalog the client connects to. MySQL\/MariaDB use default; Postgres uses the routing label.", + "example": "db-myproject-mydb-a1b2c3d4" + }, + "username": { + "type": "string", + "description": "Database username. Shared with the parent database.", + "example": "appwrite" + }, + "password": { + "type": "string", + "description": "Database password. Shared with the parent database.", + "example": "********" + }, + "ssl": { + "type": "boolean", + "description": "Whether SSL is required.", + "example": false + }, + "engine": { + "type": "string", + "description": "Database engine. Possible values: postgresql, mysql, mongodb.", + "example": "postgresql" + }, + "connectionString": { + "type": "string", + "description": "Full connection string for the branch.", + "example": "postgresql:\/\/appwrite:****@db-myproject-mydb-a1b2c3d4.fra.appwrite.center:5432\/db-myproject-mydb-a1b2c3d4?sslmode=require" + } + }, + "required": [ + "branchId", + "branchName", + "namespace", + "expiresAt", + "host", + "port", + "database", + "username", + "password", + "ssl", + "engine", + "connectionString" + ], + "example": { + "branchId": "a1b2c3d4", + "branchName": "branch-a1b2c3d4", + "namespace": "db-myproject-mydb-branch-a1b2c3d4", + "expiresAt": 1711411200, + "host": "db-myproject-mydb-a1b2c3d4.fra.appwrite.center", + "port": 5432, + "database": "db-myproject-mydb-a1b2c3d4", + "username": "appwrite", + "password": "********", + "ssl": false, + "engine": "postgresql", + "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb-a1b2c3d4.fra.appwrite.center:5432\/db-myproject-mydb-a1b2c3d4?sslmode=require" + } + }, + "dedicatedDatabaseBranchList": { + "description": "BranchList", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of branches.", + "format": "int32", + "example": 2 + }, + "branches": { + "type": "array", + "description": "List of branches.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranch" + }, + "example": [] + } + }, + "required": [ + "total", + "branches" + ], + "example": { + "total": 2, + "branches": [] + } + }, + "campaign": { + "description": "Campaign", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Campaign ID", + "example": "" + }, + "template": { + "type": "string", + "description": "Campaign template", + "example": "" + }, + "title": { + "type": "string", + "description": "Campaign title", + "example": "" + }, + "description": { + "type": "string", + "description": "Campaign description", + "example": "" + }, + "plan": { + "type": "string", + "description": "Billing plan campaign is associated with", + "example": "", + "nullable": true + }, + "cta": { + "type": "string", + "description": "Campaign CTA", + "example": "", + "nullable": true + }, + "claimed": { + "type": "string", + "description": "Campaign info when claimed", + "example": "", + "nullable": true + }, + "unclaimed": { + "type": "string", + "description": "Campaign infor when unclaimed", + "example": "", + "nullable": true + }, + "image": { + "type": "object", + "additionalProperties": true, + "description": "Campaign images" + }, + "reviews": { + "type": "array", + "description": "Campaign reviews", + "items": { + "$ref": "#\/components\/schemas\/review" + }, + "example": [], + "nullable": true + }, + "onlyNewOrgs": { + "type": "boolean", + "description": "Campaign valid only for new orgs.", + "nullable": true + }, + "footer": { + "type": "boolean", + "description": "Is footer", + "nullable": true + } + }, + "required": [ + "$id", + "template", + "title", + "description" + ], + "example": { + "$id": "", + "template": "", + "title": "", + "description": "", + "plan": "", + "cta": "", + "claimed": "", + "unclaimed": "", + "image": "", + "reviews": "", + "onlyNewOrgs": "", + "footer": "" + } + }, + "coupon": { + "description": "Coupon", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "coupon ID", + "example": "NEWBONUS" + }, + "code": { + "type": "string", + "description": "coupon ID", + "example": "NEWBONUS" + }, + "credits": { + "type": "number", + "description": "Provided credit amount", + "format": "double", + "example": 50 + }, + "expiration": { + "type": "string", + "description": "Coupon expiration time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "validity": { + "type": "integer", + "description": "Credit validity in days.", + "format": "int32", + "example": 180 + }, + "campaign": { + "type": "string", + "description": "Campaign the coupon is associated with`.", + "example": "AppwriteHeroes" + }, + "status": { + "type": "string", + "description": "Status of the coupon. Can be one of `disabled`, `active` or `expired`.", + "example": "disabled" + }, + "onlyNewOrgs": { + "type": "boolean", + "description": "If the coupon is only valid for new organizations or not.", + "example": true + } + }, + "required": [ + "$id", + "code", + "credits", + "expiration", + "validity", + "campaign", + "status", + "onlyNewOrgs" + ], + "example": { + "$id": "NEWBONUS", + "code": "NEWBONUS", + "credits": 50, + "expiration": "2020-10-15T06:38:00.000+00:00", + "validity": 180, + "campaign": "AppwriteHeroes", + "status": "disabled", + "onlyNewOrgs": true + } + }, + "credit": { + "description": "Credit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Credit ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Credit creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Credit update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Credit permissions. [Learn more about permissions](\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "couponId": { + "type": "string", + "description": "coupon ID", + "example": "NEWBONUS" + }, + "userId": { + "type": "string", + "description": "ID of the User.", + "example": "5e5ea5c16897e" + }, + "teamId": { + "type": "string", + "description": "ID of the Team.", + "example": "5e5ea5c16897e" + }, + "credits": { + "type": "number", + "description": "Provided credit amount", + "format": "double", + "example": 50 + }, + "total": { + "type": "number", + "description": "Provided credit amount", + "format": "double", + "example": 50 + }, + "expiration": { + "type": "string", + "description": "Credit expiration time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "string", + "description": "Status of the credit. Can be one of `disabled`, `active` or `expired`.", + "example": "disabled" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "couponId", + "userId", + "teamId", + "credits", + "total", + "expiration", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "couponId": "NEWBONUS", + "userId": "5e5ea5c16897e", + "teamId": "5e5ea5c16897e", + "credits": 50, + "total": 50, + "expiration": "2020-10-15T06:38:00.000+00:00", + "status": "disabled" + } + }, + "creditAvailable": { + "description": "CreditAvailable", + "type": "object", + "properties": { + "available": { + "type": "integer", + "description": "Total available credits for the organization.", + "format": "int32", + "example": 100 + } + }, + "required": [ + "available" + ], + "example": { + "available": 100 + } + }, + "creditList": { + "description": "CreditList", + "type": "object", + "properties": { + "credits": { + "type": "array", + "description": "Credits", + "items": { + "$ref": "#\/components\/schemas\/credit" + }, + "example": [ + 5 + ] + }, + "total": { + "type": "integer", + "description": "Total number of credits", + "format": "int32", + "example": 5 + }, + "available": { + "type": "number", + "description": "Total available credit balance in USD", + "format": "double", + "example": 5 + } + }, + "required": [ + "credits", + "total", + "available" + ], + "example": { + "credits": 5, + "total": 5, + "available": 5 + } + }, + "databaseMigration": { + "description": "Database Migration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database migration ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Migration creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Migration update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "projectId": { + "type": "string", + "description": "Project ID that owns the migrating database.", + "example": "5e5ea5c16897e" + }, + "databaseId": { + "type": "string", + "description": "Logical database ID being migrated.", + "example": "5e5ea5c16897e" + }, + "specification": { + "type": "string", + "description": "Dedicated compute specification provisioned for the migration target.", + "example": "s-2vcpu-4gb" + }, + "phase": { + "type": "string", + "description": "Migration phase. Possible values: pending, provisioned, capturing, backfilling, catching_up, verifying, ready_to_cutover, cutover, soaking, done, failed, rolled_back.", + "example": "pending" + }, + "attempt": { + "type": "integer", + "description": "Number of times a migration step has failed and been recorded.", + "format": "int32", + "example": 0 + }, + "lastError": { + "type": "string", + "description": "Reason the most recent migration step failed, empty while none has.", + "example": "" + }, + "lagDocuments": { + "type": "integer", + "description": "Number of documents still pending replication to the target.", + "format": "int32", + "example": 0 + }, + "changelogWatermark": { + "type": "integer", + "description": "Highest source changelog sequence applied to the target so far.", + "format": "int32", + "example": 0 + }, + "verifiedAt": { + "type": "string", + "description": "Time the migrated data was verified against the source in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "cutoverAt": { + "type": "string", + "description": "Time routing was flipped to the target in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "soakUntil": { + "type": "string", + "description": "Time the post-cutover soak window ends in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "autoCutover": { + "type": "boolean", + "description": "Whether the migration cuts over automatically once ready. Set when the migration is created and never changed afterwards, so it always reports what was asked for.", + "example": true + }, + "cutoverRequested": { + "type": "boolean", + "description": "Whether a cutover has been requested and not yet attempted. Set by the cutover endpoint and cleared when the attempt is made, so a cutover that fails a check parks the migration again rather than retrying on its own.", + "example": false + }, + "paused": { + "type": "boolean", + "description": "Whether the migration is paused.", + "example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "projectId", + "databaseId", + "specification", + "phase", + "attempt", + "lastError", + "lagDocuments", + "changelogWatermark", + "verifiedAt", + "cutoverAt", + "soakUntil", + "autoCutover", + "cutoverRequested", + "paused" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "databaseId": "5e5ea5c16897e", + "specification": "s-2vcpu-4gb", + "phase": "pending", + "attempt": 0, + "lastError": "", + "lagDocuments": 0, + "changelogWatermark": 0, + "verifiedAt": "2020-10-15T06:38:00.000+00:00", + "cutoverAt": "2020-10-15T06:38:00.000+00:00", + "soakUntil": "2020-10-15T06:38:00.000+00:00", + "autoCutover": true, + "cutoverRequested": false, + "paused": false + } + }, + "dedicatedDatabase": { + "description": "DedicatedDatabase", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Dedicated database ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Database creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "projectId": { + "type": "string", + "description": "Project ID that owns this database.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database display name.", + "example": "My Production Database" + }, + "api": { + "type": "string", + "description": "Product API that owns this database: tablesdb, documentsdb, vectorsdb, mysql, postgresql, or mongodb.", + "example": "postgresql" + }, + "engine": { + "type": "string", + "description": "Database engine: postgresql, mysql, or mongodb. Null until the backing reports one.", + "example": "postgresql" + }, + "version": { + "type": "string", + "description": "Database engine version.", + "example": "16" + }, + "specification": { + "type": "string", + "description": "Specification identifier.", + "example": "s-2vcpu-2gb" + }, + "backend": { + "type": "string", + "description": "Database backend provider. Possible values: edge.", + "example": "edge" + }, + "hostname": { + "type": "string", + "description": "Database hostname for connections.", + "example": "db-myproject-mydb.fra.appwrite.center" + }, + "connectionPort": { + "type": "integer", + "description": "Database port for connections. Derived from the engine when the backing has not reported one yet.", + "format": "int32", + "example": 5432 + }, + "connectionUser": { + "type": "string", + "description": "Database username for connections.", + "example": "appwrite_user" + }, + "connectionPassword": { + "type": "string", + "description": "Database password for connections.", + "example": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" + }, + "credentialGeneration": { + "type": "integer", + "description": "Committed generation of the primary connection credentials. Null until the rotation contract has been initialized.", + "format": "int32", + "example": 1 + }, + "connectionString": { + "type": "string", + "description": "Full database connection string (URI format).", + "example": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres?sslmode=require" + }, + "ssl": { + "type": "boolean", + "description": "Whether SSL\/TLS is required for client connections.", + "example": true + }, + "status": { + "type": "string", + "description": "Database status. Possible values: provisioning, ready, inactive, paused, failed, deleted, restoring, scaling.", + "example": "ready" + }, + "containerStatus": { + "type": "string", + "description": "Container status for lifecycle-managed database runtimes: active, inactive, or failed (a wake was declined because the backing namespace is gone).", + "example": "active" + }, + "lastAccessedAt": { + "type": "string", + "description": "Last activity timestamp in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "idleUntil": { + "type": "string", + "description": "Display-only timestamp when the database is expected to be considered idle (ISO 8601 format). Derived from last activity; lifecycle transitions are driven by lifecycleState.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "lifecycleState": { + "type": "string", + "description": "Idle-lifecycle state of the database. Possible values: active, warm, cold, hibernated.", + "example": "active" + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes of inactivity before container scales to zero.", + "format": "int32", + "example": 15 + }, + "cpu": { + "type": "integer", + "description": "CPU allocated in millicores.", + "format": "int32", + "example": 2000 + }, + "memory": { + "type": "integer", + "description": "Memory allocated in MB.", + "format": "int32", + "example": 4096 + }, + "storage": { + "type": "integer", + "description": "Storage allocated in GB.", + "format": "int32", + "example": 100 + }, + "storageStatus": { + "type": "string", + "description": "Storage resize status. Possible values: idle (no resize in flight), resizing (the volume is growing towards storageTargetGb).", + "example": "resizing" + }, + "storageTargetGb": { + "type": "integer", + "description": "Size in GB the volume is growing towards while storageStatus is resizing. 0 when no resize is in flight.", + "format": "int32", + "example": 120 + }, + "storageResizeStartedAt": { + "type": "string", + "description": "Time the in-flight storage resize started, in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "storageClass": { + "type": "string", + "description": "Storage class. Currently always 'ssd'; DigitalOcean exposes a single block-storage class.", + "example": "ssd" + }, + "storageMaxGb": { + "type": "integer", + "description": "Maximum storage allowed in GB. 0 means use system default.", + "format": "int32", + "example": 100 + }, + "nodePool": { + "type": "string", + "description": "Kubernetes node pool where the database is scheduled.", + "example": "db-pool-4vcpu-8gb" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas. High availability is enabled when greater than 0.", + "format": "int32", + "example": 2 + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode: async, sync, or quorum.", + "example": "async" + }, + "networkMaxConnections": { + "type": "integer", + "description": "Maximum concurrent client connections. This is the limit a client pool may reach; the engine's own max_connections reported by the status endpoint is a smaller backend limit the pooler multiplexes onto and does not constrain a client pool.", + "format": "int32", + "example": 500 + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "format": "int32", + "example": 900 + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "items": { + "type": "string" + }, + "example": [ + "10.0.0.0\/8", + "192.168.1.0\/24" + ] + }, + "backupEnabled": { + "type": "boolean", + "description": "Whether automatic backups are enabled.", + "example": true + }, + "pitr": { + "type": "boolean", + "description": "Whether point-in-time recovery is enabled.", + "example": true + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Number of days to retain PITR data.", + "format": "int32", + "example": 14 + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Whether automatic storage expansion is enabled.", + "example": true + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage that triggers automatic expansion.", + "format": "int32", + "example": 85 + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.", + "format": "int32", + "example": 30 + }, + "maintenanceWindowDay": { + "type": "string", + "description": "Day of the week for the maintenance window. Possible values: sun, mon, tue, wed, thu, fri, sat.", + "example": "sun" + }, + "maintenanceWindowHourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) when the maintenance window starts.", + "format": "int32", + "example": 3 + }, + "metricsEnabled": { + "type": "boolean", + "description": "Whether metrics collection is enabled.", + "example": false + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Whether the SQL API sidecar is enabled for this database.", + "example": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types accepted by the SQL API. Defaults to read\/write DML only; DDL\/DCL types (CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE) are opt-in per database. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "items": { + "type": "string" + }, + "example": [ + "SELECT" + ] + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution. Results larger than this are truncated.", + "format": "int32", + "example": 10000 + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes. Results larger than this are truncated.", + "format": "int32", + "example": 10485760 + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Maximum server-side SQL API execution time in seconds before the query is cancelled.", + "format": "int32", + "example": 30 + }, + "error": { + "type": "string", + "description": "Error message if status is failed.", + "example": "" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "projectId", + "name", + "api", + "engine", + "version", + "specification", + "backend", + "hostname", + "connectionPort", + "connectionUser", + "connectionPassword", + "credentialGeneration", + "connectionString", + "ssl", + "status", + "containerStatus", + "lifecycleState", + "idleTimeoutMinutes", + "cpu", + "memory", + "storage", + "storageStatus", + "storageTargetGb", + "storageClass", + "storageMaxGb", + "nodePool", + "replicas", + "syncMode", + "networkMaxConnections", + "networkIdleTimeoutSeconds", + "networkIPAllowlist", + "backupEnabled", + "pitr", + "pitrRetentionDays", + "storageAutoscaling", + "storageAutoscalingThresholdPercent", + "storageAutoscalingMaxGb", + "maintenanceWindowDay", + "maintenanceWindowHourUtc", + "metricsEnabled", + "sqlApiEnabled", + "sqlApiAllowedStatements", + "sqlApiMaxRows", + "sqlApiMaxBytes", + "sqlApiTimeoutSeconds", + "error" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "name": "My Production Database", + "api": "postgresql", + "engine": "postgresql", + "version": "16", + "specification": "s-2vcpu-2gb", + "backend": "edge", + "hostname": "db-myproject-mydb.fra.appwrite.center", + "connectionPort": 5432, + "connectionUser": "appwrite_user", + "connectionPassword": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", + "credentialGeneration": 1, + "connectionString": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres?sslmode=require", + "ssl": true, + "status": "ready", + "containerStatus": "active", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00", + "idleUntil": "2020-10-15T06:38:00.000+00:00", + "lifecycleState": "active", + "idleTimeoutMinutes": 15, + "cpu": 2000, + "memory": 4096, + "storage": 100, + "storageStatus": "resizing", + "storageTargetGb": 120, + "storageResizeStartedAt": "2020-10-15T06:38:00.000+00:00", + "storageClass": "ssd", + "storageMaxGb": 100, + "nodePool": "db-pool-4vcpu-8gb", + "replicas": 2, + "syncMode": "async", + "networkMaxConnections": 500, + "networkIdleTimeoutSeconds": 900, + "networkIPAllowlist": [ + "10.0.0.0\/8", + "192.168.1.0\/24" + ], + "backupEnabled": true, + "pitr": true, + "pitrRetentionDays": 14, + "storageAutoscaling": true, + "storageAutoscalingThresholdPercent": 85, + "storageAutoscalingMaxGb": 30, + "maintenanceWindowDay": "sun", + "maintenanceWindowHourUtc": 3, + "metricsEnabled": false, + "sqlApiEnabled": true, + "sqlApiAllowedStatements": "SELECT", + "sqlApiMaxRows": 10000, + "sqlApiMaxBytes": 10485760, + "sqlApiTimeoutSeconds": 30, + "error": "" + } + }, + "dedicatedDatabaseExecution": { + "description": "Execution", + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Result rows as a list of column-name => value maps. Empty for non-returning statements.", + "items": { + "type": "object" + }, + "example": [ + { + "id": 1, + "name": "example" + } + ] + }, + "rowCount": { + "type": "integer", + "description": "Number of rows returned (for SELECT) or affected (for INSERT\/UPDATE\/DELETE).", + "format": "int32", + "example": 1 + }, + "columns": { + "type": "array", + "description": "Column metadata in result-set order.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecutionColumn" + }, + "example": [] + }, + "durationMs": { + "type": "integer", + "description": "Server-side execution time in milliseconds.", + "format": "int32", + "example": 12 + }, + "truncated": { + "type": "boolean", + "description": "True when the configured row or byte cap was hit and the result was truncated.", + "example": false + }, + "bytes": { + "type": "integer", + "description": "Serialised payload size in bytes.", + "format": "int32", + "example": 1024 + } + }, + "required": [ + "rows", + "rowCount", + "columns", + "durationMs", + "truncated", + "bytes" + ], + "example": { + "rows": [ + { + "id": 1, + "name": "example" + } + ], + "rowCount": 1, + "columns": [], + "durationMs": 12, + "truncated": false, + "bytes": 1024 + } + }, + "dedicatedDatabaseExecutionColumn": { + "description": "ExecutionColumn", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Column name as returned by the database.", + "example": "id" + }, + "type": { + "type": "string", + "description": "Engine-specific column type (e.g. int4, text, timestamptz).", + "example": "int4" + } + }, + "required": [ + "name", + "type" + ], + "example": { + "name": "id", + "type": "int4" + } + }, + "dedicatedDatabaseRestoration": { + "description": "Restoration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Restoration ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Restoration creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "databaseId": { + "type": "string", + "description": "Database ID being restored into.", + "example": "5e5ea5c16897e" + }, + "sourceDatabaseId": { + "type": "string", + "description": "Source database ID when restoring a backup into another database.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "5e5ea5c16897e" + }, + "backupId": { + "type": "string", + "description": "Backup ID used for restoration (null for PITR).", + "example": "5e5ea5c16897e" + }, + "type": { + "type": "string", + "description": "Restoration type. Possible values: backup (restore from a specific backup snapshot), pitr (point-in-time recovery to a specific timestamp).", + "example": "backup" + }, + "status": { + "type": "string", + "description": "Restoration status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error).", + "example": "completed" + }, + "targetTime": { + "type": "string", + "description": "Target time for PITR restoration in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "startedAt": { + "type": "string", + "description": "Restoration start time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "completedAt": { + "type": "string", + "description": "Restoration completion time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "error": { + "type": "string", + "description": "Error message if restoration failed.", + "example": "" + } + }, + "required": [ + "$id", + "$createdAt", + "databaseId", + "sourceDatabaseId", + "projectId", + "backupId", + "type", + "status", + "targetTime", + "startedAt", + "completedAt", + "error" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "databaseId": "5e5ea5c16897e", + "sourceDatabaseId": "5e5ea5c16897e", + "projectId": "5e5ea5c16897e", + "backupId": "5e5ea5c16897e", + "type": "backup", + "status": "completed", + "targetTime": "2020-10-15T06:38:00.000+00:00", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "completedAt": "2020-10-15T06:38:00.000+00:00", + "error": "" + } + }, + "databaseStatus": { + "description": "Status", + "type": "object", + "properties": { + "health": { + "type": "string", + "description": "Overall health status: healthy, degraded, unhealthy, or unknown when nothing could be measured.", + "example": "healthy" + }, + "ready": { + "type": "boolean", + "description": "Whether the database is ready to accept connections.", + "example": true + }, + "engine": { + "type": "string", + "description": "Database engine: postgresql, mysql, or mongodb.", + "example": "postgresql" + }, + "version": { + "type": "string", + "description": "Database engine version.", + "example": "17" + }, + "uptime": { + "type": "integer", + "description": "Database uptime in seconds.", + "format": "int32", + "example": 86400 + }, + "connections": { + "type": "object", + "description": "Connection statistics.", + "example": { + "current": 12, + "max": 100 + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/databaseStatusConnections" + } + ] + }, + "syncMode": { + "type": "string", + "description": "Requested replication sync mode. Possible values: async, sync, quorum. Compare with effectiveSyncMode for what the primary is enforcing.", + "example": "async" + }, + "effectiveSyncMode": { + "type": "string", + "description": "Replication sync mode the primary is actually enforcing. Null when high availability is disabled or the state could not be read.", + "example": "async", + "nullable": true + }, + "syncDegraded": { + "type": "boolean", + "description": "Whether the enforced replication is weaker than the requested syncMode.", + "example": false + }, + "syncAcknowledgements": { + "type": "integer", + "description": "Number of standby acknowledgements the primary waits for before a write is committed.", + "format": "int32", + "example": 1 + }, + "syncStandbyCount": { + "type": "integer", + "description": "Number of standbys registered with the primary for synchronous replication.", + "format": "int32", + "example": 2 + }, + "syncStateConfirmed": { + "type": "boolean", + "description": "Whether the other sync fields are an engine reading rather than a recorded estimate. True when the primary answered what it is enforcing, including when that answer contradicted the record, in which case the contradicted values are replaced by the ones the engine reports. False when the reading could not be taken: the probe did not answer, there was no engine to ask, or the values describe a configuration change just applied rather than anything measured. Absent when no engine was asked at all, so an unprobed database is distinguishable from an unconfirmed one. False never means a standby was found lagging, because it is the absence of a reading rather than a negative one, so draw no conclusion about replication health from it or from a response that omits it.", + "example": true, + "nullable": true + }, + "replicas": { + "type": "array", + "description": "List of database replicas and their status. Every configured member appears, including one the backend has not brought up, which is reported as not healthy.", + "items": { + "$ref": "#\/components\/schemas\/databaseStatusReplica" + }, + "example": [ + { + "index": 0, + "role": "primary", + "healthy": true, + "replicating": null, + "lagSeconds": null + }, + { + "index": 1, + "role": "replica", + "healthy": true, + "replicating": true, + "lagSeconds": 0.2 + } + ] + }, + "volumes": { + "type": "array", + "description": "Storage volume information.", + "items": { + "$ref": "#\/components\/schemas\/databaseStatusVolume" + }, + "example": [ + { + "data": { + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true + } + } + ] + } + }, + "required": [ + "health", + "ready", + "engine", + "version", + "uptime", + "connections", + "syncMode", + "syncDegraded", + "syncAcknowledgements", + "syncStandbyCount", + "replicas", + "volumes" + ], + "example": { + "health": "healthy", + "ready": true, + "engine": "postgresql", + "version": "17", + "uptime": 86400, + "connections": { + "current": 12, + "max": 100 + }, + "syncMode": "async", + "effectiveSyncMode": "async", + "syncDegraded": false, + "syncAcknowledgements": 1, + "syncStandbyCount": 2, + "syncStateConfirmed": true, + "replicas": [ + { + "index": 0, + "role": "primary", + "healthy": true, + "replicating": null, + "lagSeconds": null + }, + { + "index": 1, + "role": "replica", + "healthy": true, + "replicating": true, + "lagSeconds": 0.2 + } + ], + "volumes": { + "data": { + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true + } + } + } + }, + "dnsRecord": { + "description": "DNSRecord", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "DNS Record ID.", + "example": "5f40a6e10c65e" + }, + "$createdAt": { + "type": "string", + "description": "DNS Record creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "DNS Record update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "type": { + "type": "string", + "description": "DNS record type (e.g. A, CNAME, MX).", + "example": "A" + }, + "name": { + "type": "string", + "description": "Record name or subdomain.", + "example": "mail" + }, + "value": { + "type": "string", + "description": "Value of the record (IP address, domain, etc.).", + "example": "192.0.2.1" + }, + "ttl": { + "type": "integer", + "description": "Time to live (in seconds).", + "format": "int32", + "example": 86400 + }, + "priority": { + "type": "integer", + "description": "Record priority (commonly used for MX).", + "format": "int32", + "example": 10 + }, + "lock": { + "type": "boolean", + "description": "Whether this record is locked (read-only).", + "example": false + }, + "weight": { + "type": "integer", + "description": "Record weight (used for SRV records).", + "format": "int32", + "example": 10 + }, + "port": { + "type": "integer", + "description": "Target port (used for SRV records).", + "format": "int32", + "example": 443 + }, + "comment": { + "type": "string", + "description": "Comment for the DNS record.", + "example": "Mail server record" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "name", + "value", + "ttl", + "priority", + "lock", + "weight", + "port", + "comment" + ], + "example": { + "$id": "5f40a6e10c65e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "A", + "name": "mail", + "value": "192.0.2.1", + "ttl": 86400, + "priority": 10, + "lock": false, + "weight": 10, + "port": 443, + "comment": "Mail server record" + } + }, + "domain": { + "description": "Domain", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Domain ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Domain creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Domain update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "example": "example.com" + }, + "registrar": { + "type": "string", + "description": "Domain registrar (e.g. \"appwrite\" or \"third_party\").", + "example": "appwrite" + }, + "nameservers": { + "type": "string", + "description": "Nameservers setting. \"Appwrite\" or empty string.", + "example": "Appwrite" + }, + "expire": { + "type": "string", + "description": "Domain expiry date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "renewal": { + "type": "string", + "description": "Domain renewal date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "autoRenewal": { + "type": "boolean", + "description": "If set to true, the domain will automatically renew.", + "example": true + }, + "renewalPrice": { + "type": "integer", + "description": "Renewal price (in cents).", + "format": "int32", + "example": 2599 + }, + "transferStatus": { + "description": "Transfer status for domains being transferred in. Null when the domain is not being transferred.", + "example": "pending_registry", + "title": "DomainTransferStatusEnum", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "transferrable" + ], + "title": "transferrable" + }, + { + "type": "string", + "enum": [ + "not_transferrable" + ], + "title": "not_transferrable" + }, + { + "type": "string", + "enum": [ + "pending_owner" + ], + "title": "pending_owner" + }, + { + "type": "string", + "enum": [ + "pending_admin" + ], + "title": "pending_admin" + }, + { + "type": "string", + "enum": [ + "pending_registry" + ], + "title": "pending_registry" + }, + { + "type": "string", + "enum": [ + "completed" + ], + "title": "completed" + }, + { + "type": "string", + "enum": [ + "cancelled" + ], + "title": "cancelled" + }, + { + "type": "string", + "enum": [ + "service_unavailable" + ], + "title": "service_unavailable" + } + ], + "nullable": true + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "dnsRecords": { + "type": "array", + "description": "Dns records", + "items": { + "$ref": "#\/components\/schemas\/dnsRecord" + }, + "example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "domain", + "registrar", + "nameservers", + "expire", + "renewal", + "autoRenewal", + "renewalPrice", + "teamId", + "dnsRecords" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "example.com", + "registrar": "appwrite", + "nameservers": "Appwrite", + "expire": "2020-10-15T06:38:00.000+00:00", + "renewal": "2020-10-15T06:38:00.000+00:00", + "autoRenewal": true, + "renewalPrice": 2599, + "transferStatus": "pending_registry", + "teamId": "5e5ea5c16897e", + "dnsRecords": [] + } + }, + "domainPrice": { + "description": "DomainPrice", + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "example": "example.com" + }, + "tld": { + "type": "string", + "description": "Top-level domain for the requested domain.", + "example": "com" + }, + "available": { + "type": "boolean", + "description": "Whether the domain is currently available for registration.", + "example": true + }, + "price": { + "type": "number", + "description": "Domain registration price. Null when the price could not be resolved, for example for an unsupported TLD.", + "format": "double", + "example": 25.99, + "nullable": true + }, + "periodYears": { + "type": "integer", + "description": "Price period in years.", + "format": "int32", + "example": 1 + }, + "premium": { + "type": "boolean", + "description": "Whether the domain is a premium domain.", + "example": false + }, + "renewalPrice": { + "type": "number", + "description": "Domain renewal price for the same period. Null when the domain was not priced or the registrar has no renewal price for it.", + "format": "double", + "example": 27.99, + "nullable": true + }, + "renewalPeriodYears": { + "type": "integer", + "description": "Renewal price period in years.", + "format": "int32", + "example": 1 + } + }, + "required": [ + "domain", + "tld", + "available", + "periodYears", + "premium", + "renewalPeriodYears" + ], + "example": { + "domain": "example.com", + "tld": "com", + "available": true, + "price": 25.99, + "periodYears": 1, + "premium": false, + "renewalPrice": 27.99, + "renewalPeriodYears": 1 + } + }, + "domainPurchase": { + "description": "DomainPurchase", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Purchase\/invoice ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Purchase creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Purchase update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "domainId": { + "type": "string", + "description": "Domain document ID.", + "example": "5e5ea5c16897e" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "example": "example.com" + }, + "organizationId": { + "type": "string", + "description": "Team ID that owns the domain.", + "example": "5e5ea5c16897e" + }, + "status": { + "description": "Domain purchase status.", + "example": "pending", + "title": "DomainPurchaseStatus", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "pending" + ], + "title": "pending" + }, + { + "type": "string", + "enum": [ + "succeeded" + ], + "title": "succeeded" + }, + { + "type": "string", + "enum": [ + "failed" + ], + "title": "failed" + }, + { + "type": "string", + "enum": [ + "cancelled" + ], + "title": "cancelled" + } + ] + }, + "clientSecret": { + "type": "string", + "description": "Stripe client secret for 3DS; empty when not applicable.", + "example": "" + }, + "amount": { + "type": "number", + "description": "Purchase amount.", + "format": "double", + "example": 25.99 + }, + "currency": { + "type": "string", + "description": "Currency code.", + "example": "USD" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "domainId", + "domain", + "organizationId", + "status", + "clientSecret", + "amount", + "currency" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domainId": "5e5ea5c16897e", + "domain": "example.com", + "organizationId": "5e5ea5c16897e", + "status": "pending", + "clientSecret": "", + "amount": 25.99, + "currency": "USD" + } + }, + "domainSuggestion": { + "description": "DomainSuggestion", + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain suggestion.", + "example": "example.com" + }, + "premium": { + "type": "boolean", + "description": "Is the domain premium?", + "example": true + }, + "price": { + "type": "number", + "description": "Domain price.", + "format": "double", + "example": 25.99, + "nullable": true + }, + "available": { + "type": "boolean", + "description": "Is the domain available?", + "example": true + } + }, + "required": [ + "domain", + "premium", + "available" + ], + "example": { + "domain": "example.com", + "premium": true, + "price": 25.99, + "available": true + } + }, + "domainTransferOut": { + "description": "domainTransferOut", + "type": "object", + "properties": { + "authCode": { + "type": "string", + "description": "Domain transfer authorization code.", + "example": "mock_1a2b3c4d" + } + }, + "required": [ + "authCode" + ], + "example": { + "authCode": "mock_1a2b3c4d" + } + }, + "domainTransferStatus": { + "description": "domainTransferStatus", + "type": "object", + "properties": { + "status": { + "description": "Transfer status.", + "example": "pending_registry", + "title": "DomainTransferStatusEnum", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "transferrable" + ], + "title": "transferrable" + }, + { + "type": "string", + "enum": [ + "not_transferrable" + ], + "title": "not_transferrable" + }, + { + "type": "string", + "enum": [ + "pending_owner" + ], + "title": "pending_owner" + }, + { + "type": "string", + "enum": [ + "pending_admin" + ], + "title": "pending_admin" + }, + { + "type": "string", + "enum": [ + "pending_registry" + ], + "title": "pending_registry" + }, + { + "type": "string", + "enum": [ + "completed" + ], + "title": "completed" + }, + { + "type": "string", + "enum": [ + "cancelled" + ], + "title": "cancelled" + }, + { + "type": "string", + "enum": [ + "service_unavailable" + ], + "title": "service_unavailable" + } + ] + }, + "reason": { + "type": "string", + "description": "Additional transfer status information.", + "example": "Transfer in progress" + }, + "timestamp": { + "type": "string", + "description": "Transfer status timestamp in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "status", + "reason", + "timestamp" + ], + "example": { + "status": "pending_registry", + "reason": "Transfer in progress", + "timestamp": "2020-10-15T06:38:00.000+00:00" + } + }, + "downgradeFeedback": { + "description": "Downgrade Feedback", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Feedback ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Feedback creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Feedback update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "title": { + "type": "string", + "description": "Feedback reason", + "example": "I encountered a bug and outage that caused my app to lose its value" + }, + "message": { + "type": "string", + "description": "Feedback message", + "example": "The platform experienced significant downtime which affected my users." + }, + "fromPlanId": { + "type": "string", + "description": "Plan ID downgrading from", + "example": "pro" + }, + "toPlanId": { + "type": "string", + "description": "Plan ID downgrading to", + "example": "free" + }, + "teamId": { + "type": "string", + "description": "Organization ID", + "example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID who submitted feedback", + "example": "5e5ea5c16897e" + }, + "version": { + "type": "string", + "description": "Console version", + "example": "1.8.0" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "title", + "message", + "fromPlanId", + "toPlanId", + "teamId", + "userId", + "version" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "title": "I encountered a bug and outage that caused my app to lose its value", + "message": "The platform experienced significant downtime which affected my users.", + "fromPlanId": "pro", + "toPlanId": "free", + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "version": "1.8.0" + } + }, + "estimation": { + "description": "Estimation", + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Total amount", + "format": "double", + "example": 50 + }, + "grossAmount": { + "type": "number", + "description": "Gross payable amount", + "format": "double", + "example": 50 + }, + "discount": { + "type": "number", + "description": "Discount amount", + "format": "double", + "example": 50 + }, + "credits": { + "type": "number", + "description": "Credits amount", + "format": "double", + "example": 50 + }, + "items": { + "type": "array", + "description": "Estimation items", + "items": { + "$ref": "#\/components\/schemas\/estimation_item" + }, + "example": [] + }, + "discounts": { + "type": "array", + "description": "Estimation discount items", + "items": { + "$ref": "#\/components\/schemas\/estimation_item" + }, + "example": [] + }, + "trialDays": { + "type": "integer", + "description": "Trial days", + "format": "int32", + "example": 14 + }, + "trialEndDate": { + "type": "string", + "description": "Trial end date", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "amount", + "grossAmount", + "discount", + "credits", + "items", + "discounts", + "trialDays" + ], + "example": { + "amount": 50, + "grossAmount": 50, + "discount": 50, + "credits": 50, + "items": [], + "discounts": [], + "trialDays": 14, + "trialEndDate": "2020-10-15T06:38:00.000+00:00" + } + }, + "estimationDeleteOrganization": { + "description": "DeleteOrganization", + "type": "object", + "properties": { + "unpaidInvoices": { + "type": "array", + "description": "List of unpaid invoices", + "items": { + "$ref": "#\/components\/schemas\/invoice" + }, + "example": [] + } + }, + "required": [ + "unpaidInvoices" + ], + "example": { + "unpaidInvoices": [] + } + }, + "estimation_item": { + "description": "Item", + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Label", + "example": "Plan name" + }, + "value": { + "type": "number", + "description": "Gross payable amount", + "format": "double", + "example": 50 + } + }, + "required": [ + "label", + "value" + ], + "example": { + "label": "Plan name", + "value": 50 + } + }, + "estimationPlanChange": { + "description": "EstimationPlanChange", + "type": "object", + "properties": { + "currentBillingPlanId": { + "type": "string", + "description": "Current billing plan ID", + "example": "tier-2" + }, + "targetBillingPlanId": { + "type": "string", + "description": "Target billing plan ID", + "example": "tier-0" + }, + "direction": { + "type": "string", + "description": "Direction of plan change: upgrade, downgrade, or same", + "example": "downgrade" + }, + "estimation": { + "type": "object", + "description": "Cost estimation details", + "allOf": [ + { + "$ref": "#\/components\/schemas\/planChangeEstimationDetails" + } + ] + }, + "limits": { + "type": "object", + "description": "Plan limits and compliance information", + "allOf": [ + { + "$ref": "#\/components\/schemas\/planChangeLimits" + } + ] + } + }, + "required": [ + "currentBillingPlanId", + "targetBillingPlanId", + "direction", + "estimation", + "limits" + ], + "example": { + "currentBillingPlanId": "tier-2", + "targetBillingPlanId": "tier-0", + "direction": "downgrade", + "estimation": null, + "limits": null + } + }, + "estimationUpdatePlan": { + "description": "UpdatePlan", + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Total amount", + "format": "double", + "example": 50 + }, + "grossAmount": { + "type": "number", + "description": "Gross payable amount", + "format": "double", + "example": 50 + }, + "discount": { + "type": "number", + "description": "Discount amount", + "format": "double", + "example": 50 + }, + "credits": { + "type": "number", + "description": "Credits amount", + "format": "double", + "example": 50 + }, + "items": { + "type": "array", + "description": "Estimation items", + "items": { + "$ref": "#\/components\/schemas\/estimation_item" + }, + "example": [] + }, + "discounts": { + "type": "array", + "description": "Estimation discount items", + "items": { + "$ref": "#\/components\/schemas\/estimation_item" + }, + "example": [] + }, + "trialDays": { + "type": "integer", + "description": "Trial days", + "format": "int32", + "example": 14 + }, + "trialEndDate": { + "type": "string", + "description": "Trial end date", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "organizationCredits": { + "type": "number", + "description": "Organization's existing credits", + "format": "double", + "example": 0 + } + }, + "required": [ + "amount", + "grossAmount", + "discount", + "credits", + "items", + "discounts", + "trialDays", + "organizationCredits" + ], + "example": { + "amount": 50, + "grossAmount": 50, + "discount": 50, + "credits": 50, + "items": [], + "discounts": [], + "trialDays": 14, + "trialEndDate": "2020-10-15T06:38:00.000+00:00", + "organizationCredits": 0 + } + }, + "dedicatedDatabaseExtensions": { + "description": "Extensions", + "type": "object", + "properties": { + "installed": { + "type": "array", + "description": "List of installed extensions.", + "items": { + "type": "string" + }, + "example": [ + "pgvector", + "uuid-ossp" + ] + }, + "available": { + "type": "array", + "description": "List of available extensions that can be installed.", + "items": { + "type": "string" + }, + "example": [ + "postgis", + "pg_trgm" + ] + }, + "metadata": { + "type": "array", + "description": "Curated metadata (display name, description, category) for each available extension.", + "items": { + "$ref": "#\/components\/schemas\/postgresExtension" + }, + "example": [] + } + }, + "required": [ + "installed", + "available", + "metadata" + ], + "example": { + "installed": [ + "pgvector", + "uuid-ossp" + ], + "available": [ + "postgis", + "pg_trgm" + ], + "metadata": [] + } + }, + "dedicatedDatabaseMember": { + "description": "Member", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Member identifier.", + "example": "1" + }, + "role": { + "type": "string", + "description": "Member role. Possible values: primary (accepts reads and writes), replica (read-only follower), unknown (placement not established; reported while a transition is moving or restarting the topology and this member has not been probed, so no member can be named the write target).", + "example": "replica" + }, + "status": { + "type": "string", + "description": "Member pod status. Possible values: pending (configured but absent from the backend topology, so nothing is bringing it up), provisioning (pod missing or Pending), starting (Running but not Ready), active (Running and Ready), failed (Failed phase or CrashLoopBackOff container), or the lowercased pod phase reported by the cluster.", + "example": "active" + }, + "replicating": { + "type": "boolean", + "description": "Whether the engine reports this member's replication stream as up. Null when no reading was taken: a primary has no stream to report, and a member that is not active, or whose probe did not answer, has none yet. False is a reading and null is the absence of one, so the two are not interchangeable. Read it beside lagSeconds before expecting a failover that names no target to find a promotable standby: a member streaming at a known lag is one, and a member reporting null is not evidence either way.", + "example": true, + "nullable": true + }, + "lagSeconds": { + "type": "number", + "description": "Replication lag in seconds. Null when the lag is not known: a primary has none to report, and a member the backend has not probed has none yet. Also null against `replicating: true`, for a member that is streaming but whose engine printed no numeric lag.", + "format": "double", + "example": 0.5, + "nullable": true + } + }, + "required": [ + "$id", + "role", + "status" + ], + "example": { + "$id": "1", + "role": "replica", + "status": "active", + "replicating": true, + "lagSeconds": 0.5 + } + }, + "dedicatedDatabaseOperation": { + "description": "Operation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Operation ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Operation creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "databaseId": { + "type": "string", + "description": "Database ID the operation ran against.", + "example": "5e5ea5c16897e" + }, + "type": { + "type": "string", + "description": "Operation type, such as provision, update, credentials-update, restore, pausing, resuming, failover, backup-create or cross-region-enable.", + "example": "update" + }, + "status": { + "type": "string", + "description": "Operation status. Possible values: queued (accepted and waiting to resume), running (in progress), completed (finished successfully), failed (ended in an error).", + "example": "completed" + }, + "attempts": { + "type": "integer", + "description": "Number of times this operation has been attempted.", + "format": "int32", + "example": 1 + }, + "requestedAt": { + "type": "string", + "description": "Time the operation was requested, in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "startedAt": { + "type": "string", + "description": "Time the operation started, in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "completedAt": { + "type": "string", + "description": "Time the operation reached a terminal state, in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "Machine-readable failure code. `Interrupted` marks an attempt that ended before its outcome could be confirmed.", + "example": "Interrupted" + }, + "errorMessage": { + "type": "string", + "description": "Failure message if the operation failed.", + "example": "" + } + }, + "required": [ + "$id", + "$createdAt", + "databaseId", + "type", + "status", + "attempts", + "errorCode", + "errorMessage" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "databaseId": "5e5ea5c16897e", + "type": "update", + "status": "completed", + "attempts": 1, + "requestedAt": "2020-10-15T06:38:00.000+00:00", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "completedAt": "2020-10-15T06:38:00.000+00:00", + "errorCode": "Interrupted", + "errorMessage": "" + } + }, + "dedicatedDatabaseOperationList": { + "description": "OperationList", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of operations.", + "format": "int32", + "example": 5 + }, + "operations": { + "type": "array", + "description": "List of operations.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperation" + }, + "example": [] + } + }, + "required": [ + "total", + "operations" + ], + "example": { + "total": 5, + "operations": "" + } + }, + "dedicatedDatabaseReplicas": { + "description": "Replicas", + "type": "object", + "properties": { + "replicas": { + "type": "integer", + "description": "Number of configured replicas. Zero means high availability is disabled.", + "format": "int32", + "example": 2 + }, + "syncMode": { + "type": "string", + "description": "Requested replication sync mode. Possible values: async (asynchronous, fastest), sync (synchronous, strong consistency), quorum (quorum-based, majority of replicas must confirm). This is what was asked for; compare it with effectiveSyncMode for what the primary is enforcing.", + "example": "async" + }, + "effectiveSyncMode": { + "type": "string", + "description": "Replication sync mode the primary is actually enforcing. Null when high availability is disabled or the state could not be read. A value below the requested syncMode means writes are being acknowledged with weaker durability than configured.", + "example": "async", + "nullable": true + }, + "syncDegraded": { + "type": "boolean", + "description": "Whether the enforced replication is weaker than the requested syncMode.", + "example": false + }, + "syncAcknowledgements": { + "type": "integer", + "description": "Number of standby acknowledgements the primary waits for before a write is committed. Zero means writes are acknowledged locally.", + "format": "int32", + "example": 1 + }, + "syncStandbyCount": { + "type": "integer", + "description": "Number of standbys registered with the primary for synchronous replication.", + "format": "int32", + "example": 2 + }, + "syncStateConfirmed": { + "type": "boolean", + "description": "Whether the other sync fields are an engine reading rather than a recorded estimate. True when the primary answered what it is enforcing, including when that answer contradicted the record, in which case the contradicted values are replaced by the ones the engine reports. False when the reading could not be taken: the probe did not answer, there was no engine to ask, or the values describe a configuration change just applied rather than anything measured. Absent when no engine was asked at all, so an unprobed database is distinguishable from an unconfirmed one. False never means a standby was found lagging, because it is the absence of a reading rather than a negative one, so draw no conclusion about replication health from it or from a response that omits it.", + "example": true, + "nullable": true + }, + "members": { + "type": "array", + "description": "Per-pod statuses for the primary and every replica.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseMember" + }, + "example": [] + } + }, + "required": [ + "replicas", + "syncMode", + "syncDegraded", + "syncAcknowledgements", + "syncStandbyCount", + "members" + ], + "example": { + "replicas": 2, + "syncMode": "async", + "effectiveSyncMode": "async", + "syncDegraded": false, + "syncAcknowledgements": 1, + "syncStandbyCount": 2, + "syncStateConfirmed": true, + "members": [] + } + }, + "proxyInvalidation": { + "description": "Invalidation", + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "example": "appwrite.company.com" + }, + "type": { + "type": "string", + "description": "Invalidation type. Possible values are \"tag\", \"path\", or \"all\".", + "example": "tag" + }, + "reference": { + "type": "string", + "description": "Invalidated reference. Depending on type this is a cache tag name, a URL path, or empty when type is all.", + "example": "products" + }, + "status": { + "type": "string", + "description": "Invalidation status.", + "example": "success" + } + }, + "required": [ + "domain", + "type", + "reference", + "status" + ], + "example": { + "domain": "appwrite.company.com", + "type": "tag", + "reference": "products", + "status": "success" + } + }, + "invoice": { + "description": "Invoice", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Invoice ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Invoice creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Invoice update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Invoice permissions. [Learn more about permissions](\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "teamId": { + "type": "string", + "description": "Project ID", + "example": "5e5ea5c16897e" + }, + "aggregationId": { + "type": "string", + "description": "Aggregation ID", + "example": "5e5ea5c16897e" + }, + "plan": { + "type": "string", + "description": "Billing plan selected. Can be one of `tier-0`, `tier-1` or `tier-2`.", + "example": "tier-1" + }, + "usage": { + "type": "array", + "description": "Usage breakdown per resource", + "items": { + "$ref": "#\/components\/schemas\/usageResources" + }, + "example": [] + }, + "amount": { + "type": "number", + "description": "Invoice Amount", + "format": "double", + "example": 50 + }, + "tax": { + "type": "number", + "description": "Tax percentage", + "format": "double", + "example": 17 + }, + "taxAmount": { + "type": "number", + "description": "Tax amount", + "format": "double", + "example": 12.5 + }, + "vat": { + "type": "number", + "description": "VAT percentage", + "format": "double", + "example": 17 + }, + "vatAmount": { + "type": "number", + "description": "VAT amount", + "format": "double", + "example": 12.5 + }, + "grossAmount": { + "type": "number", + "description": "Gross amount after vat, tax, and discounts applied.", + "format": "double", + "example": 12.5 + }, + "creditsUsed": { + "type": "number", + "description": "Credits used.", + "format": "double", + "example": 30 + }, + "currency": { + "type": "string", + "description": "Currency the invoice is in", + "example": "USD" + }, + "clientSecret": { + "type": "string", + "description": "Client secret for processing failed payments in front-end", + "example": "pi_daslfasdfkla_asdkfl" + }, + "status": { + "type": "string", + "description": "Invoice status", + "example": "succeeded" + }, + "type": { + "type": "string", + "description": "Invoice type. Can be one of `subscription`, `domain_purchase`, `domain_renewal`, `domain_transfer`, or `addon_*`.", + "example": "subscription" + }, + "lastError": { + "type": "string", + "description": "Last payment error associated with the invoice", + "example": "Your card has insufficient balance." + }, + "dueAt": { + "type": "string", + "description": "Invoice due date.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "from": { + "type": "string", + "description": "Beginning date of the invoice", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "to": { + "type": "string", + "description": "End date of the invoice", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "teamId", + "aggregationId", + "plan", + "usage", + "amount", + "tax", + "taxAmount", + "vat", + "vatAmount", + "grossAmount", + "creditsUsed", + "currency", + "clientSecret", + "status", + "type", + "lastError", + "dueAt", + "from", + "to" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "teamId": "5e5ea5c16897e", + "aggregationId": "5e5ea5c16897e", + "plan": "tier-1", + "usage": [], + "amount": 50, + "tax": 17, + "taxAmount": 12.5, + "vat": 17, + "vatAmount": 12.5, + "grossAmount": 12.5, + "creditsUsed": 30, + "currency": "USD", + "clientSecret": "pi_daslfasdfkla_asdkfl", + "status": "succeeded", + "type": "subscription", + "lastError": "Your card has insufficient balance.", + "dueAt": "2020-10-15T06:38:00.000+00:00", + "from": "2020-10-15T06:38:00.000+00:00", + "to": "2020-10-15T06:38:00.000+00:00" + } + }, + "managerBlock": { + "description": "ManagerBlock", + "type": "object", + "properties": { + "$createdAt": { + "type": "string", + "description": "Block creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "Resource type that is blocked", + "example": "project" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier that is blocked", + "example": "5e5ea5c16897e" + }, + "mode": { + "type": "string", + "description": "Block mode. full blocks reads and writes; readOnly blocks writes only.", + "example": "readOnly" + }, + "expiredAt": { + "type": "string", + "description": "Block expiration date in ISO 8601 format. Can be null if the block does not expire.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "reason": { + "type": "string", + "description": "Reason for the block. Can be null if no reason was provided.", + "example": "Payment overdue", + "nullable": true + }, + "projectName": { + "type": "string", + "description": "Name of the project this block applies to.", + "example": "My Project" + }, + "region": { + "type": "string", + "description": "Region of the project this block applies to.", + "example": "fra" + }, + "organizationName": { + "type": "string", + "description": "Name of the organization that owns the project.", + "example": "Acme Inc." + }, + "organizationId": { + "type": "string", + "description": "ID of the organization that owns the project.", + "example": "5e5ea5c16897e" + }, + "billingPlan": { + "type": "string", + "description": "Billing plan of the organization that owns the project.", + "example": "pro" + } + }, + "required": [ + "$createdAt", + "resourceType", + "resourceId", + "mode", + "projectName", + "region", + "organizationName", + "organizationId", + "billingPlan" + ], + "example": { + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "project", + "resourceId": "5e5ea5c16897e", + "mode": "readOnly", + "expiredAt": "2020-10-15T06:38:00.000+00:00", + "reason": "Payment overdue", + "projectName": "My Project", + "region": "fra", + "organizationName": "Acme Inc.", + "organizationId": "5e5ea5c16897e", + "billingPlan": "pro" + } + }, + "managerBlockDelete": { + "description": "ManagerBlockDelete", + "type": "object", + "properties": { + "deleted": { + "type": "integer", + "description": "Number of blocks deleted", + "format": "int32", + "example": 1 + }, + "blocks": { + "type": "array", + "description": "List of deleted blocks", + "items": { + "$ref": "#\/components\/schemas\/managerBlock" + }, + "example": [] + } + }, + "required": [ + "deleted", + "blocks" + ], + "example": { + "deleted": 1, + "blocks": [] + } + }, + "managerDatabase": { + "description": "ManagerDatabase", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database ID.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID that owns this database.", + "example": "project-abc123" + }, + "projectInternalId": { + "type": "string", + "description": "Internal (sequence) ID of the owning project generation. The Edge namespace reaper compares this against the labelled namespace generation before tearing down an orphan, so it must always be a non-empty string for a live database.", + "example": "42" + }, + "databaseInternalId": { + "type": "string", + "description": "Internal (sequence) ID of this database generation. The Edge namespace reaper compares this against the labelled namespace generation before tearing down an orphan, so it must always be a non-empty string for a live database.", + "example": "7" + }, + "database": { + "type": "string", + "description": "Physical database\/catalog name. Defaults to the database ID.", + "example": "mydb" + }, + "hostname": { + "type": "string", + "description": "Database hostname for connections.", + "example": "db-myproject-mydb.fra.appwrite.center" + }, + "port": { + "type": "integer", + "description": "Database port. Null until the backing reports one.", + "format": "int32", + "example": 5432 + }, + "engine": { + "type": "string", + "description": "Database engine: postgresql, mysql, or mongodb.", + "example": "postgresql" + }, + "status": { + "type": "string", + "description": "Database status: provisioning, ready, inactive, paused, failed, deleting, deleted, restoring, scaling, upgrading, migrating.", + "example": "ready" + }, + "containerStatus": { + "type": "string", + "description": "Container status for lifecycle-managed database runtimes: active, inactive, or failed (a wake was declined because the backing namespace is gone).", + "example": "active" + }, + "lastErrorCode": { + "type": "string", + "description": "Code of the last failure recorded against this database. The Edge proxy reads it to refuse immediately instead of spending its cold-start budget on a wake that cannot succeed: dedicated_database_abandoned means a wake was already declined because the backing namespace is gone. Empty when no error is recorded.", + "example": "dedicated_database_abandoned" + }, + "lifecycleState": { + "type": "string", + "description": "Idle-lifecycle state at fetch time: active, warm, cold, or hibernated. The Edge proxy labels wake telemetry with it so warm-start, cold-start, and hibernate-resume durations chart separately.", + "example": "warm" + }, + "suspended": { + "type": "boolean", + "description": "Whether access to this database is suspended because the owning project is blocked, the organization is read-only (e.g. payment issue), or the plan no longer permits it. When true, the Edge proxy refuses new connections and never cold-starts the database. Recovers automatically once the underlying condition clears.", + "example": false + }, + "suspendedReason": { + "type": "string", + "description": "Reason access is suspended: blocked, readonly, or plan. Empty when not suspended.", + "example": "readonly" + }, + "type": { + "type": "string", + "description": "Database type: shared (scale-to-zero pod) or dedicated (StatefulSet).", + "example": "dedicated" + }, + "region": { + "type": "string", + "description": "Region identifier (e.g., fra, nyc, syd).", + "example": "fra" + }, + "backend": { + "type": "string", + "description": "Database backend provider: edge.", + "example": "edge" + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Whether the SQL API is enabled for this database.", + "example": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types accepted by the SQL API. Defaults to read\/write DML only; DDL\/DCL types (CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE) are opt-in per database. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "items": { + "type": "string" + }, + "example": [ + "SELECT" + ] + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution. Results larger than this are truncated.", + "format": "int32", + "example": 10000 + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes. Results larger than this are truncated.", + "format": "int32", + "example": 10485760 + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Maximum server-side SQL API execution time in seconds before the query is cancelled.", + "format": "int32", + "example": 30 + } + }, + "required": [ + "$id", + "projectId", + "projectInternalId", + "databaseInternalId", + "database", + "hostname", + "port", + "engine", + "status", + "containerStatus", + "lastErrorCode", + "lifecycleState", + "suspended", + "suspendedReason", + "type", + "region", + "backend", + "sqlApiEnabled", + "sqlApiAllowedStatements", + "sqlApiMaxRows", + "sqlApiMaxBytes", + "sqlApiTimeoutSeconds" + ], + "example": { + "$id": "5e5ea5c16897e", + "projectId": "project-abc123", + "projectInternalId": "42", + "databaseInternalId": "7", + "database": "mydb", + "hostname": "db-myproject-mydb.fra.appwrite.center", + "port": 5432, + "engine": "postgresql", + "status": "ready", + "containerStatus": "active", + "lastErrorCode": "dedicated_database_abandoned", + "lifecycleState": "warm", + "suspended": false, + "suspendedReason": "readonly", + "type": "dedicated", + "region": "fra", + "backend": "edge", + "sqlApiEnabled": true, + "sqlApiAllowedStatements": "SELECT", + "sqlApiMaxRows": 10000, + "sqlApiMaxBytes": 10485760, + "sqlApiTimeoutSeconds": 30 + } + }, + "managerDomain": { + "description": "ManagerDomain", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Domain ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Domain creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Domain update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "example": "example.com" + }, + "registrar": { + "type": "string", + "description": "Domain registrar (e.g. \"appwrite\" or \"third_party\").", + "example": "appwrite" + }, + "nameservers": { + "type": "string", + "description": "Nameservers setting. \"Appwrite\" or empty string.", + "example": "Appwrite" + }, + "expire": { + "type": "string", + "description": "Domain expiry date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "renewal": { + "type": "string", + "description": "Domain renewal date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "autoRenewal": { + "type": "boolean", + "description": "If set to true, the domain will automatically renew.", + "example": true + }, + "renewalPrice": { + "type": "integer", + "description": "Renewal price (in cents).", + "format": "int32", + "example": 2599 + }, + "transferStatus": { + "description": "Transfer status for domains being transferred in. Null when the domain is not being transferred.", + "example": "pending_registry", + "title": "DomainTransferStatusEnum", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "transferrable" + ], + "title": "transferrable" + }, + { + "type": "string", + "enum": [ + "not_transferrable" + ], + "title": "not_transferrable" + }, + { + "type": "string", + "enum": [ + "pending_owner" + ], + "title": "pending_owner" + }, + { + "type": "string", + "enum": [ + "pending_admin" + ], + "title": "pending_admin" + }, + { + "type": "string", + "enum": [ + "pending_registry" + ], + "title": "pending_registry" + }, + { + "type": "string", + "enum": [ + "completed" + ], + "title": "completed" + }, + { + "type": "string", + "enum": [ + "cancelled" + ], + "title": "cancelled" + }, + { + "type": "string", + "enum": [ + "service_unavailable" + ], + "title": "service_unavailable" + } + ], + "nullable": true + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "dnsRecords": { + "type": "array", + "description": "Dns records", + "items": { + "$ref": "#\/components\/schemas\/dnsRecord" + }, + "example": [] + }, + "soaSerial": { + "type": "integer", + "description": "SOA serial number", + "format": "int32", + "example": 12 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "domain", + "registrar", + "nameservers", + "expire", + "renewal", + "autoRenewal", + "renewalPrice", + "teamId", + "dnsRecords", + "soaSerial" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "example.com", + "registrar": "appwrite", + "nameservers": "Appwrite", + "expire": "2020-10-15T06:38:00.000+00:00", + "renewal": "2020-10-15T06:38:00.000+00:00", + "autoRenewal": true, + "renewalPrice": 2599, + "transferStatus": "pending_registry", + "teamId": "5e5ea5c16897e", + "dnsRecords": [], + "soaSerial": 12 + } + }, + "managerProjectKey": { + "description": "ManagerProjectKey", + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "Project ID that owns this API key.", + "example": "project-abc123" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "example": [ + "databases.write" + ] + } + }, + "required": [ + "projectId", + "scopes" + ], + "example": { + "projectId": "project-abc123", + "scopes": "databases.write" + } + }, + "managerProjectUser": { + "description": "ManagerProjectUser", + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "ID of the user the JWT resolves to within the project.", + "example": "user-abc123" + } + }, + "required": [ + "userId" + ], + "example": { + "userId": "user-abc123" + } + }, + "managerWafRule": { + "description": "ManagerWafRule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human friendly rule name.", + "example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "example": "functionId" + }, + "action": { + "description": "Action performed when the rule matches.", + "example": "deny", + "title": "WafRuleAction", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "bypass" + ], + "title": "bypass" + }, + { + "type": "string", + "enum": [ + "deny" + ], + "title": "deny" + }, + { + "type": "string", + "enum": [ + "challenge" + ], + "title": "challenge" + }, + { + "type": "string", + "enum": [ + "rateLimit" + ], + "title": "rateLimit" + }, + { + "type": "string", + "enum": [ + "redirect" + ], + "title": "redirect" + } + ] + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "format": "int32", + "example": 100 + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "example": true + }, + "conditions": { + "type": "array", + "description": "List of conditions evaluated for this rule.", + "items": { + "type": "object" + }, + "example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "example": {} + }, + "resourceInternalId": { + "type": "integer", + "description": "Internal resource sequence ID used by Edge WAF usage.", + "format": "int32", + "example": 1, + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" + ], + "example": { + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "resourceInternalId": 1 + } + }, + "organization": { + "description": "Organization", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Team creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Team update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Team name.", + "example": "VIP" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "format": "int32", + "example": 7 + }, + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "example": { + "theme": "pink", + "timezone": "UTC" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } + ] + }, + "billingBudget": { + "type": "integer", + "description": "Project budget limit. Null when no budget is set.", + "format": "int32", + "example": 50, + "nullable": true + }, + "budgetAlerts": { + "type": "array", + "description": "Project budget limit", + "items": { + "type": "integer", + "format": "int32" + }, + "example": [ + 50, + 75 + ] + }, + "billingPlan": { + "type": "string", + "description": "Organization's billing plan ID.", + "example": "tier-1" + }, + "billingPlanId": { + "type": "string", + "description": "Organization's billing plan ID.", + "example": "tier-1" + }, + "billingPlanDetails": { + "type": "object", + "description": "Organization's billing plan.", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlan" + } + ] + }, + "billingEmail": { + "type": "string", + "description": "Billing email set for the organization.", + "example": "billing@org.example" + }, + "billingStartDate": { + "type": "string", + "description": "Billing cycle start date.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "billingCurrentInvoiceDate": { + "type": "string", + "description": "Current invoice cycle start date.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "billingNextInvoiceDate": { + "type": "string", + "description": "Next invoice cycle start date.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "billingTrialStartDate": { + "type": "string", + "description": "Start date of trial.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "billingTrialDays": { + "type": "integer", + "description": "Number of trial days.", + "format": "int32", + "example": 14 + }, + "billingAggregationId": { + "type": "string", + "description": "Current active aggregation id.", + "example": "adbc3de4rddfsd" + }, + "billingInvoiceId": { + "type": "string", + "description": "Current active aggregation id.", + "example": "adbc3de4rddfsd" + }, + "paymentMethodId": { + "type": "string", + "description": "Default payment method.", + "example": "adbc3de4rddfsd" + }, + "billingAddressId": { + "type": "string", + "description": "Default payment method.", + "example": "adbc3de4rddfsd", + "nullable": true + }, + "backupPaymentMethodId": { + "type": "string", + "description": "Backup payment method.", + "example": "adbc3de4rddfsd", + "nullable": true + }, + "status": { + "type": "string", + "description": "Team status.", + "example": "active" + }, + "remarks": { + "type": "string", + "description": "Remarks on team status.", + "example": "Pending initial payment", + "nullable": true + }, + "agreementBAA": { + "type": "string", + "description": "Organization agreements", + "example": "", + "nullable": true + }, + "programManagerName": { + "type": "string", + "description": "Program manager's name.", + "example": "", + "nullable": true + }, + "programManagerCalendar": { + "type": "string", + "description": "Program manager's calendar link.", + "example": "", + "nullable": true + }, + "programDiscordChannelName": { + "type": "string", + "description": "Program's discord channel name.", + "example": "", + "nullable": true + }, + "programDiscordChannelUrl": { + "type": "string", + "description": "Program's discord channel URL.", + "example": "", + "nullable": true + }, + "billingLimits": { + "type": "object", + "description": "Billing limits reached", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingLimits" + } + ], + "nullable": true + }, + "billingPlanDowngrade": { + "type": "string", + "description": "Billing plan selected for downgrade.", + "example": "tier-1", + "nullable": true + }, + "billingTaxId": { + "type": "string", + "description": "Tax Id", + "example": "", + "nullable": true + }, + "markedForDeletion": { + "type": "boolean", + "description": "Marked for deletion" + }, + "platform": { + "type": "string", + "description": "Product with which the organization is associated (appwrite or imagine)", + "example": "imagine" + }, + "projects": { + "type": "array", + "description": "Selected projects", + "items": { + "type": "string" + }, + "example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "total", + "prefs", + "budgetAlerts", + "billingPlan", + "billingPlanId", + "billingPlanDetails", + "billingEmail", + "billingStartDate", + "billingCurrentInvoiceDate", + "billingNextInvoiceDate", + "billingTrialDays", + "billingAggregationId", + "billingInvoiceId", + "paymentMethodId", + "status", + "markedForDeletion", + "platform", + "projects" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "billingBudget": 50, + "budgetAlerts": [ + 50, + 75 + ], + "billingPlan": "tier-1", + "billingPlanId": "tier-1", + "billingPlanDetails": null, + "billingEmail": "billing@org.example", + "billingStartDate": "2020-10-15T06:38:00.000+00:00", + "billingCurrentInvoiceDate": "2020-10-15T06:38:00.000+00:00", + "billingNextInvoiceDate": "2020-10-15T06:38:00.000+00:00", + "billingTrialStartDate": "2020-10-15T06:38:00.000+00:00", + "billingTrialDays": 14, + "billingAggregationId": "adbc3de4rddfsd", + "billingInvoiceId": "adbc3de4rddfsd", + "paymentMethodId": "adbc3de4rddfsd", + "billingAddressId": "adbc3de4rddfsd", + "backupPaymentMethodId": "adbc3de4rddfsd", + "status": "active", + "remarks": "Pending initial payment", + "agreementBAA": "", + "programManagerName": "", + "programManagerCalendar": "", + "programDiscordChannelName": "", + "programDiscordChannelUrl": "", + "billingLimits": "", + "billingPlanDowngrade": "tier-1", + "billingTaxId": "", + "markedForDeletion": "", + "platform": "imagine", + "projects": "" + } + }, + "paymentAuthentication": { + "description": "PaymentAuthentication", + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Message for the end user to show on Console.", + "example": "" + }, + "clientSecret": { + "type": "string", + "description": "Stripe client secret to use for validation.", + "example": "" + }, + "organizationId": { + "type": "string", + "description": "Organization ID for which the payment authentication is needed.", + "example": "" + }, + "invoiceId": { + "type": "string", + "description": "Invoice ID against which the payment needs to be validated.", + "example": "" + }, + "addonId": { + "type": "string", + "description": "Addon ID to use when calling the addon validate endpoint. Empty when authentication is not for an addon.", + "example": "" + }, + "projectId": { + "type": "string", + "description": "Project ID for project-level addon payments. Empty for organization-level addons.", + "example": "" + } + }, + "required": [ + "message", + "clientSecret", + "organizationId", + "invoiceId", + "addonId", + "projectId" + ], + "example": { + "message": "", + "clientSecret": "", + "organizationId": "", + "invoiceId": "", + "addonId": "", + "projectId": "" + } + }, + "paymentMethod": { + "description": "paymentMethod", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Payment Method ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Payment method creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Payment method update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Payment method permissions. [Learn more about permissions](\/docs\/permissions).", + "items": { + "type": "string" + }, + "example": [ + "read(\"any\")" + ] + }, + "providerMethodId": { + "type": "string", + "description": "Payment method ID from the payment provider", + "example": "abdk3ed3sdkfj" + }, + "clientSecret": { + "type": "string", + "description": "Client secret hash for payment setup", + "example": "seti_ddfe" + }, + "providerUserId": { + "type": "string", + "description": "User ID from the payment provider.", + "example": "abdk3ed3sdkfj" + }, + "userId": { + "type": "string", + "description": "ID of the Team.", + "example": "5e5ea5c16897e" + }, + "expiryMonth": { + "type": "integer", + "description": "Expiry month of the payment method.", + "format": "int32", + "example": 2 + }, + "expiryYear": { + "type": "integer", + "description": "Expiry year of the payment method.", + "format": "int32", + "example": 2024 + }, + "last4": { + "type": "string", + "description": "Last 4 digit of the payment method", + "example": "4242" + }, + "brand": { + "type": "string", + "description": "Payment method brand", + "example": "visa" + }, + "name": { + "type": "string", + "description": "Name of the owner", + "example": "John Doe" + }, + "mandateId": { + "type": "string", + "description": "Mandate ID of the payment method", + "example": "yxc" + }, + "country": { + "type": "string", + "description": "Country of the payment method", + "example": "de" + }, + "state": { + "type": "string", + "description": "State of the payment method", + "example": "" + }, + "lastError": { + "type": "string", + "description": "Last payment error associated with the payment method.", + "example": "Your card has insufficient funds." + }, + "default": { + "type": "boolean", + "description": "True when it's the default payment method.", + "example": false + }, + "expired": { + "type": "boolean", + "description": "True when payment method has expired.", + "example": false + }, + "failed": { + "type": "boolean", + "description": "True when payment method has failed to process multiple times.", + "example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "providerMethodId", + "clientSecret", + "providerUserId", + "userId", + "expiryMonth", + "expiryYear", + "last4", + "brand", + "name", + "mandateId", + "country", + "state", + "lastError", + "default", + "expired", + "failed" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "providerMethodId": "abdk3ed3sdkfj", + "clientSecret": "seti_ddfe", + "providerUserId": "abdk3ed3sdkfj", + "userId": "5e5ea5c16897e", + "expiryMonth": 2, + "expiryYear": 2024, + "last4": "4242", + "brand": "visa", + "name": "John Doe", + "mandateId": "yxc", + "country": "de", + "state": "", + "lastError": "Your card has insufficient funds.", + "default": false, + "expired": false, + "failed": false + } + }, + "dedicatedDatabasePITRWindows": { + "description": "PITRWindows", + "type": "object", + "properties": { + "earliest": { + "type": "string", + "description": "Earliest available recovery point.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "latest": { + "type": "string", + "description": "Latest available recovery point.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "earliest", + "latest" + ], + "example": { + "earliest": "2020-10-15T06:38:00.000+00:00", + "latest": "2020-10-15T06:38:00.000+00:00" + } + }, + "planChangeEstimationDetails": { + "description": "PlanChangeEstimationDetails", + "type": "object", + "properties": { + "currency": { + "type": "string", + "description": "Currency code", + "example": "USD" + }, + "grossAmount": { + "type": "number", + "description": "Gross amount after all discounts and credits", + "format": "double", + "example": 15 + }, + "credits": { + "type": "number", + "description": "Credits applied from coupon", + "format": "double", + "example": 0 + }, + "organizationCredits": { + "type": "number", + "description": "Organization's existing credits applied", + "format": "double", + "example": 5 + }, + "discount": { + "type": "number", + "description": "Discount amount from prorated invoices", + "format": "double", + "example": 0 + }, + "amount": { + "type": "number", + "description": "Total amount before discounts and credits", + "format": "double", + "example": 20 + }, + "nextInvoiceDate": { + "type": "string", + "description": "Next invoice date", + "example": "2025-12-01T00:00:00.000Z" + }, + "items": { + "type": "array", + "description": "Line items breakdown", + "items": { + "type": "object" + }, + "example": [ + { + "label": "Free plan", + "value": 0 + }, + { + "label": "Additional seats", + "value": 10 + } + ] + }, + "discounts": { + "type": "array", + "description": "Applied discounts breakdown", + "items": { + "type": "object" + }, + "example": [ + { + "label": "Organization credits", + "value": 5 + } + ] + } + }, + "required": [ + "currency", + "grossAmount", + "credits", + "organizationCredits", + "discount", + "amount", + "nextInvoiceDate", + "items", + "discounts" + ], + "example": { + "currency": "USD", + "grossAmount": 15, + "credits": 0, + "organizationCredits": 5, + "discount": 0, + "amount": 20, + "nextInvoiceDate": "2025-12-01T00:00:00.000Z", + "items": [ + { + "label": "Free plan", + "value": 0 + }, + { + "label": "Additional seats", + "value": 10 + } + ], + "discounts": [ + { + "label": "Organization credits", + "value": 5 + } + ] + } + }, + "planChangeLimits": { + "description": "PlanChangeLimits", + "type": "object", + "properties": { + "canChangePlan": { + "type": "boolean", + "description": "Whether the plan change is allowed", + "example": false + }, + "unsupportedAddons": { + "type": "array", + "description": "Active addon keys that the target plan does not support. When non-empty, `canChangePlan` is false.", + "items": { + "type": "string" + }, + "example": [ + "baa" + ] + }, + "projects": { + "type": "object", + "description": "Project count against the target plan limit", + "example": {}, + "allOf": [ + { + "$ref": "#\/components\/schemas\/planChangeResourceCompliance" + } + ] + }, + "members": { + "type": "object", + "description": "Organization member count against the target plan limit", + "example": {}, + "allOf": [ + { + "$ref": "#\/components\/schemas\/planChangeResourceCompliance" + } + ] + }, + "domains": { + "type": "object", + "description": "Custom domain count against the target plan limit", + "example": {}, + "allOf": [ + { + "$ref": "#\/components\/schemas\/planChangeResourceCompliance" + } + ] + }, + "nonCompliantProjects": { + "type": "integer", + "description": "Number of projects exceeding target plan limits", + "format": "int32", + "example": 2 + }, + "projectCompliance": { + "type": "array", + "description": "Per-project compliance details. Populated for downgrades only.", + "items": { + "$ref": "#\/components\/schemas\/planChangeProjectCompliance" + }, + "example": [] + } + }, + "required": [ + "canChangePlan", + "unsupportedAddons", + "projects", + "members", + "domains", + "nonCompliantProjects", + "projectCompliance" + ], + "example": { + "canChangePlan": false, + "unsupportedAddons": [ + "baa" + ], + "projects": {}, + "members": {}, + "domains": {}, + "nonCompliantProjects": 2, + "projectCompliance": [] + } + }, + "planChangeProjectCompliance": { + "description": "PlanChangeProjectCompliance", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID", + "example": "proj_a" + }, + "name": { + "type": "string", + "description": "Project name", + "example": "Marketing Site" + }, + "isCompliant": { + "type": "boolean", + "description": "Whether the project complies with target plan limits", + "example": false + }, + "resources": { + "type": "array", + "description": "Resource compliance details", + "items": { + "$ref": "#\/components\/schemas\/planChangeResourceCompliance" + }, + "example": [] + }, + "error": { + "type": "string", + "description": "Failure reason when compliance could not be evaluated. Present only when the project DB or Regions API was unreachable; in that case `isCompliant` is false (fail closed) and `resources` is empty.", + "example": "Failed to get project compliance from Regions API. Status: 500", + "nullable": true + } + }, + "required": [ + "$id", + "name", + "isCompliant", + "resources" + ], + "example": { + "$id": "proj_a", + "name": "Marketing Site", + "isCompliant": false, + "resources": [], + "error": "Failed to get project compliance from Regions API. Status: 500" + } + }, + "planChangeResourceCompliance": { + "description": "PlanChangeResourceCompliance", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type", + "example": "databases" + }, + "currentUsage": { + "type": "integer", + "description": "Current usage count", + "format": "int32", + "example": 3 + }, + "limit": { + "type": "integer", + "description": "Allowed limit in target plan", + "format": "int32", + "example": 1 + }, + "status": { + "type": "string", + "description": "Compliance status. Either `over_limit` or `within_limit`.", + "example": "over_limit" + }, + "excess": { + "type": "integer", + "description": "Number of resources exceeding the limit", + "format": "int32", + "example": 2 + }, + "resolutionHint": { + "type": "string", + "description": "Suggestion for resolving the compliance issue. Empty when the resource is within limits.", + "example": "Delete or migrate 2 databases." + } + }, + "required": [ + "type", + "currentUsage", + "limit", + "status", + "excess", + "resolutionHint" + ], + "example": { + "type": "databases", + "currentUsage": 3, + "limit": 1, + "status": "over_limit", + "excess": 2, + "resolutionHint": "Delete or migrate 2 databases." + } + }, + "backupPolicy": { + "description": "backup", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Backup policy ID.", + "example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Backup policy name.", + "example": "Hourly backups" + }, + "$createdAt": { + "type": "string", + "description": "Policy creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Policy update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "services": { + "type": "array", + "description": "The services that are backed up by this policy.", + "items": { + "type": "string" + }, + "example": [ + "['databases', 'storage']" + ] + }, + "resources": { + "type": "array", + "description": "The resources that are backed up by this policy.", + "items": { + "type": "string" + }, + "example": [ + "['databases', 'collections', 'attributes', 'indexes']" + ] + }, + "resourceId": { + "type": "string", + "description": "The resource ID to backup. Set only if this policy should backup a single resource.", + "example": "DB1", + "nullable": true + }, + "resourceType": { + "type": "string", + "description": "The resource type to backup. Set only if this policy should backup a single resource.", + "example": "database", + "nullable": true + }, + "retention": { + "type": "integer", + "description": "How many days to keep the backup before it will be automatically deleted.", + "format": "int32", + "example": 7 + }, + "schedule": { + "type": "string", + "description": "Policy backup schedule in CRON format.", + "example": "0 * * * *" + }, + "type": { + "type": "string", + "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup).", + "example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is this policy enabled.", + "example": true + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "services", + "resources", + "retention", + "schedule", + "type", + "enabled" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "Hourly backups", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "resourceId": "DB1", + "resourceType": "database", + "retention": 7, + "schedule": "0 * * * *", + "type": "full", + "enabled": true + } + }, + "dedicatedDatabasePooler": { + "description": "PoolerConfig", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether connection pooling is enabled.", + "example": true + }, + "mode": { + "type": "string", + "description": "Connection pool mode. Possible values: transaction (releases connections back to pool after each transaction), session (holds connections for the entire client session).", + "example": "transaction" + }, + "maxConnections": { + "type": "integer", + "description": "Client-connection ceiling the pooler accepts. Enforced on MySQL and MariaDB; on PostgreSQL the pooler has no client cap, so this reports the database's advertised networkMaxConnections and cannot be set here.", + "format": "int32", + "example": 200 + }, + "defaultPoolSize": { + "type": "integer", + "description": "Default pool size per user.", + "format": "int32", + "example": 25 + }, + "port": { + "type": "integer", + "description": "Pooler listening port.", + "format": "int32", + "example": 6432 + }, + "readWriteSplitting": { + "type": "boolean", + "description": "Whether SELECTs are routed to HA replicas while writes and locked reads stay on the primary. Active only when HA is enabled.", + "example": true + }, + "poolerCpuRequest": { + "type": "string", + "description": "Effective CPU request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (5% of DB CPU, floor 100m) unless overridden.", + "example": "100m" + }, + "poolerCpuLimit": { + "type": "string", + "description": "Effective CPU limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (10% of DB CPU, floor 200m) unless overridden.", + "example": "200m" + }, + "poolerMemoryRequest": { + "type": "string", + "description": "Effective memory request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (7.5% of DB memory, floor 64Mi) unless overridden.", + "example": "64Mi" + }, + "poolerMemoryLimit": { + "type": "string", + "description": "Effective memory limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (15% of DB memory, floor 128Mi) unless overridden.", + "example": "128Mi" + } + }, + "required": [ + "enabled", + "mode", + "maxConnections", + "defaultPoolSize", + "port", + "readWriteSplitting", + "poolerCpuRequest", + "poolerCpuLimit", + "poolerMemoryRequest", + "poolerMemoryLimit" + ], + "example": { + "enabled": true, + "mode": "transaction", + "maxConnections": 200, + "defaultPoolSize": 25, + "port": 6432, + "readWriteSplitting": true, + "poolerCpuRequest": "100m", + "poolerCpuLimit": "200m", + "poolerMemoryRequest": "64Mi", + "poolerMemoryLimit": "128Mi" + } + }, + "postgresExtension": { + "description": "Postgres extension", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Extension key used with CREATE EXTENSION.", + "example": "vector" + }, + "name": { + "type": "string", + "description": "Human-readable extension name.", + "example": "pgvector" + }, + "description": { + "type": "string", + "description": "Short description of what the extension provides.", + "example": "Vector data type and similarity search for embeddings." + }, + "category": { + "type": "string", + "description": "Category the extension belongs to.", + "example": "search" + } + }, + "required": [ + "key", + "name", + "description", + "category" + ], + "example": { + "key": "vector", + "name": "pgvector", + "description": "Vector data type and similarity search for embeddings.", + "category": "search" + } + }, + "program": { + "description": "Program", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Program ID", + "example": "" + }, + "title": { + "type": "string", + "description": "Program title", + "example": "" + }, + "description": { + "type": "string", + "description": "Program description", + "example": "" + }, + "tag": { + "type": "string", + "description": "Program tag for highlighting on console" + }, + "icon": { + "type": "string", + "description": "Program icon for highlighting on console" + }, + "url": { + "type": "string", + "description": "URL for more information on this program", + "example": "" + }, + "active": { + "type": "boolean", + "description": "Whether this program is active", + "example": false + }, + "external": { + "type": "boolean", + "description": "Whether this program is external", + "example": false + }, + "billingPlanId": { + "type": "string", + "description": "Billing plan ID that this is program is associated with.", + "example": "" + } + }, + "required": [ + "$id", + "title", + "description", + "tag", + "icon", + "url", + "active", + "external", + "billingPlanId" + ], + "example": { + "$id": "", + "title": "", + "description": "", + "tag": null, + "icon": null, + "url": "", + "active": false, + "external": false, + "billingPlanId": "" + } + }, + "consoleRegion": { + "description": "Region", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Region ID", + "example": "eu-fr" + }, + "name": { + "type": "string", + "description": "Region name", + "example": "EU (Frankfurt)" + }, + "available": { + "type": "boolean", + "description": "Does the organization have access to this region. Null when access has not been resolved.", + "example": false, + "nullable": true + }, + "disabled": { + "type": "boolean", + "description": "Does the backend support this region.", + "example": false + }, + "default": { + "type": "boolean", + "description": "Is this the region default.", + "example": true + }, + "flag": { + "type": "string", + "description": "Region flag code.", + "example": "fr" + } + }, + "required": [ + "$id", + "name", + "disabled", + "default", + "flag" + ], + "example": { + "$id": "eu-fr", + "name": "EU (Frankfurt)", + "available": false, + "disabled": false, + "default": true, + "flag": "fr" + } + }, + "backupRestoration": { + "description": "Restoration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Restoration ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Restoration creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Restoration update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "archiveId": { + "type": "string", + "description": "Backup archive ID.", + "example": "did8jx6ws45jana098ab7" + }, + "policyId": { + "type": "string", + "description": "Backup policy ID.", + "example": "did8jx6ws45jana098ab7" + }, + "status": { + "type": "string", + "description": "The status of the restoration. Possible values: pending, downloading, processing, completed, failed.", + "example": "completed" + }, + "startedAt": { + "type": "string", + "description": "The backup start time.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "migrationId": { + "type": "string", + "description": "Migration ID.", + "example": "did8jx6ws45jana098ab7" + }, + "services": { + "type": "array", + "description": "The services that are backed up by this policy.", + "items": { + "type": "string" + }, + "example": [ + "['databases', 'storage']" + ] + }, + "resources": { + "type": "array", + "description": "The resources that are backed up by this policy.", + "items": { + "type": "string" + }, + "example": [ + "['databases', 'collections', 'attributes', 'indexes']" + ] + }, + "options": { + "type": "string", + "description": "Optional data in key-value object. ", + "example": "{databases.database[{oldId, newId, newName}]}" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "archiveId", + "policyId", + "status", + "startedAt", + "migrationId", + "services", + "resources", + "options" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "archiveId": "did8jx6ws45jana098ab7", + "policyId": "did8jx6ws45jana098ab7", + "status": "completed", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "migrationId": "did8jx6ws45jana098ab7", + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "options": "{databases.database[{oldId, newId, newName}]}" + } + }, + "dedicatedDatabaseRestorationList": { + "description": "Dedicated database restorations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of restorations that matched your query.", + "format": "int32", + "example": 5 + }, + "restorations": { + "type": "array", + "description": "List of restorations.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + }, + "example": [] + } + }, + "required": [ + "total", + "restorations" + ], + "example": { + "total": 5, + "restorations": "" + } + }, + "review": { + "description": "Review", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of user", + "example": "" + }, + "image": { + "type": "string", + "description": "Reviewer image", + "example": "" + }, + "description": { + "type": "string", + "description": "Reviewer description", + "example": "" + }, + "review": { + "type": "string", + "description": "Review", + "example": "" + } + }, + "required": [ + "name", + "image", + "description", + "review" + ], + "example": { + "name": "", + "image": "", + "description": "", + "review": "" + } + }, + "roles": { + "description": "Roles", + "type": "object", + "properties": { + "scopes": { + "type": "array", + "description": "Array of scopes accessible to current user.", + "items": { + "type": "string" + }, + "example": [ + "users.read" + ] + }, + "roles": { + "type": "array", + "description": "Array of roles assigned to current user.", + "items": { + "type": "string" + }, + "example": [ + "developer" + ] + } + }, + "required": [ + "scopes", + "roles" + ], + "example": { + "scopes": "users.read", + "roles": "developer" + } + }, + "managerRule": { + "description": "Rule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Rule creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Rule update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "example": "appwrite.company.com" + }, + "type": { + "type": "string", + "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", + "example": "deployment" + }, + "trigger": { + "type": "string", + "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", + "example": "manual" + }, + "redirectUrl": { + "type": "string", + "description": "URL to redirect to. Used if type is \"redirect\"", + "example": "https:\/\/appwrite.io\/docs" + }, + "redirectStatusCode": { + "type": "integer", + "description": "Status code to apply during redirect. Used if type is \"redirect\"", + "format": "int32", + "example": 301 + }, + "deploymentId": { + "type": "string", + "description": "ID of deployment. Used if type is \"deployment\"", + "example": "n3u9feiwmf" + }, + "deploymentResourceType": { + "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", + "example": "function", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "function" + ], + "title": "function" + }, + { + "type": "string", + "enum": [ + "site" + ], + "title": "site" + } + ], + "nullable": true + }, + "deploymentResourceId": { + "type": "string", + "description": "ID of deployment's resource (site or function ID). Used if type is \"deployment\"", + "example": "n3u9feiwmf" + }, + "deploymentVcsProviderBranch": { + "type": "string", + "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", + "example": "main" + }, + "status": { + "description": "Domain verification status. Possible values are \"unverified\", \"verifying\", \"verified\"", + "example": "verified", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "unverified" + ], + "title": "unverified" + }, + { + "type": "string", + "enum": [ + "verifying" + ], + "title": "verifying" + }, + { + "type": "string", + "enum": [ + "verified" + ], + "title": "verified" + } + ] + }, + "logs": { + "type": "string", + "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", + "example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." + }, + "renewAt": { + "type": "string", + "description": "Certificate auto-renewal date in ISO 8601 format.", + "example": "datetime" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "5e5ea5c16897e" + }, + "region": { + "type": "string", + "description": "Region ID.", + "example": "fra" + }, + "tags": { + "type": "object", + "description": "Edge cache invalidation tags derived from the rule.", + "allOf": [ + { + "$ref": "#\/components\/schemas\/managerTags" + } + ], + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "domain", + "type", + "trigger", + "redirectUrl", + "redirectStatusCode", + "deploymentId", + "deploymentResourceId", + "deploymentVcsProviderBranch", + "status", + "logs", + "renewAt", + "projectId", + "region" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "main", + "status": "verified", + "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", + "renewAt": "datetime", + "projectId": "5e5ea5c16897e", + "region": "fra", + "tags": "" + } + }, + "managerRuntime": { + "description": "Runtime", + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID of function", + "example": "fid8jx6ws45jana098ab7" + }, + "variables": { + "type": "object", + "additionalProperties": true, + "description": "Environment variables for the function execution", + "example": { + "API_KEY": "your-api-key", + "DEBUG": "true" + } + }, + "headers": { + "type": "object", + "additionalProperties": true, + "description": "Headers for the function execution", + "example": { + "X-Appwrite-Key": "your-api-key", + "DEBUG": "true" + } + }, + "scopes": { + "type": "array", + "description": "Scopes for the dyanmic key passed in function execution", + "items": { + "type": "string" + }, + "example": [ + "users.read", + "users.write" + ], + "nullable": true + }, + "execute": { + "type": "array", + "description": "Allowed groups for the function execution", + "items": { + "type": "string" + }, + "example": [ + "any", + "guest" + ], + "nullable": true + }, + "timeout": { + "type": "integer", + "description": "Function timeout in seconds.", + "format": "int32", + "example": 0 + }, + "source": { + "type": "string", + "description": "Build source path", + "example": "" + }, + "entrypoint": { + "type": "string", + "description": "Build entrypoint file", + "example": "" + }, + "version": { + "type": "string", + "description": "Function version.", + "example": "v4" + }, + "cpus": { + "type": "number", + "description": "Function CPU count.", + "format": "double", + "example": 0.5 + }, + "memory": { + "type": "integer", + "description": "Function memory limit in MB.", + "format": "int32", + "example": 512 + }, + "logging": { + "type": "boolean", + "description": "Function logging.", + "example": true + }, + "image": { + "type": "string", + "description": "Runtime image name.", + "example": "" + }, + "command": { + "type": "string", + "description": "Function runtime command.", + "example": "nohup helpers\/start.sh \"node index.js\"" + }, + "tags": { + "type": "object", + "description": "Edge cache invalidation tags derived from the runtime.", + "allOf": [ + { + "$ref": "#\/components\/schemas\/managerTags" + } + ], + "nullable": true + } + }, + "required": [ + "deploymentId", + "timeout", + "source", + "entrypoint", + "version", + "cpus", + "memory", + "logging", + "image", + "command" + ], + "example": { + "deploymentId": "fid8jx6ws45jana098ab7", + "variables": "{\"API_KEY\":\"your-api-key\",\"DEBUG\":\"true\"}", + "headers": "{\"X-Appwrite-Key\":\"your-api-key\",\"DEBUG\":\"true\"}", + "scopes": "[\"users.read\",\"users.write\"]", + "execute": "[\"any\",\"guest\"]", + "timeout": 0, + "source": "", + "entrypoint": "", + "version": "v4", + "cpus": 0.5, + "memory": 512, + "logging": true, + "image": "", + "command": "nohup helpers\/start.sh \"node index.js\"", + "tags": "" + } + }, + "dedicatedDatabaseSpecification": { + "description": "Specification", + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Specification slug. Use this value when creating a dedicated database.", + "example": "s-2vcpu-2gb" + }, + "name": { + "type": "string", + "description": "Human readable specification name.", + "example": "Standard" + }, + "price": { + "type": "number", + "description": "Monthly price of the specification in USD.", + "format": "double", + "example": 20 + }, + "storageOverageRate": { + "type": "number", + "description": "Price per GB of storage above the included amount, per month, in USD.", + "format": "double", + "example": 0.125 + }, + "bandwidthOverageRate": { + "type": "number", + "description": "Price per GB of bandwidth above the included amount, per month, in USD.", + "format": "double", + "example": 0.08 + }, + "replicaRate": { + "type": "number", + "description": "High availability replica price as a fraction of the specification price.", + "format": "double", + "example": 1 + }, + "pitrRate": { + "type": "number", + "description": "Point-in-time recovery price as a fraction of the specification price.", + "format": "double", + "example": 0.2 + }, + "cpu": { + "type": "integer", + "description": "Allocated CPU in millicores.", + "format": "int32", + "example": 2000 + }, + "memory": { + "type": "integer", + "description": "Allocated memory in MB.", + "format": "int32", + "example": 2048 + }, + "maxConnections": { + "type": "integer", + "description": "Maximum number of concurrent connections.", + "format": "int32", + "example": 200 + }, + "includedStorage": { + "type": "integer", + "description": "Included storage in GB before overage charges apply.", + "format": "int32", + "example": 25 + }, + "includedBandwidth": { + "type": "integer", + "description": "Included bandwidth in GB before overage charges apply.", + "format": "int32", + "example": 200 + }, + "enabled": { + "type": "boolean", + "description": "Whether the specification is available on the current plan.", + "example": true + } + }, + "required": [ + "slug", + "name", + "price", + "storageOverageRate", + "bandwidthOverageRate", + "replicaRate", + "pitrRate", + "cpu", + "memory", + "maxConnections", + "includedStorage", + "includedBandwidth", + "enabled" + ], + "example": { + "slug": "s-2vcpu-2gb", + "name": "Standard", + "price": 20, + "storageOverageRate": 0.125, + "bandwidthOverageRate": 0.08, + "replicaRate": 1, + "pitrRate": 0.2, + "cpu": 2000, + "memory": 2048, + "maxConnections": 200, + "includedStorage": 25, + "includedBandwidth": 200, + "enabled": true + } + }, + "dedicatedDatabaseSpecificationList": { + "description": "SpecificationList", + "type": "object", + "properties": { + "specifications": { + "type": "array", + "description": "List of dedicated database specifications.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecification" + }, + "example": [] + }, + "total": { + "type": "integer", + "description": "Total number of specifications.", + "format": "int32", + "example": 9 + } + }, + "required": [ + "specifications", + "total" + ], + "example": { + "specifications": [], + "total": 9 + } + }, + "databaseStatusConnections": { + "description": "Connections", + "type": "object", + "properties": { + "current": { + "type": "integer", + "description": "Current number of active connections.", + "format": "int32", + "example": 12 + }, + "max": { + "type": "integer", + "description": "The engine's own max_connections. On a pooled database this is the backend limit the pooler multiplexes onto, not the ceiling a client pool may reach \u2014 that is networkMaxConnections on the database resource.", + "format": "int32", + "example": 100 + } + }, + "required": [ + "current", + "max" + ], + "example": { + "current": 12, + "max": 100 + } + }, + "databaseStatusReplica": { + "description": "Replica", + "type": "object", + "properties": { + "index": { + "type": "integer", + "description": "Member index within the database. Read `role` for which member accepts writes: a failover moves the primary without renumbering the indexes.", + "format": "int32", + "example": 0 + }, + "role": { + "type": "string", + "description": "Member role. Possible values: primary (accepts reads and writes), replica (read-only follower), unknown (placement not established; reported while a transition is moving or restarting the topology, so no member can be named the write target).", + "example": "primary" + }, + "healthy": { + "type": "boolean", + "description": "Whether the replica is healthy.", + "example": true + }, + "replicating": { + "type": "boolean", + "description": "Whether the engine reports this member's replication stream as up. Null when no reading was taken: a primary has no stream to report, and a member that is not healthy, or whose probe did not answer, has none yet. `healthy` is a reachability probe of the member itself and says nothing about replication, so a healthy member may still not be replicating.", + "example": true, + "nullable": true + }, + "lagSeconds": { + "type": "number", + "description": "Replication lag in seconds (null for primary). Also null against `replicating: true`, for a member that is streaming but whose engine printed no numeric lag.", + "format": "double", + "example": 0.2, + "nullable": true + } + }, + "required": [ + "index", + "role", + "healthy" + ], + "example": { + "index": 0, + "role": "primary", + "healthy": true, + "replicating": true, + "lagSeconds": 0.2 + } + }, + "databaseStatusVolume": { + "description": "Volume", + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Mount path of the volume.", + "example": "\/var\/lib\/postgresql\/data" + }, + "usedPercent": { + "type": "string", + "description": "Percentage of storage used.", + "example": "45%" + }, + "available": { + "type": "string", + "description": "Available storage space.", + "example": "55GB" + }, + "mounted": { + "type": "boolean", + "description": "Whether the volume is mounted.", + "example": true + } + }, + "required": [ + "path", + "usedPercent", + "available", + "mounted" + ], + "example": { + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true + } + }, + "managerTags": { + "description": "Tags", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "Project cache tag.", + "example": "5e5ea5c16897e", + "nullable": true + }, + "team": { + "type": "string", + "description": "Team cache tag.", + "example": "5e5ea5c16897f", + "nullable": true + }, + "deployment": { + "type": "string", + "description": "Deployment cache tag.", + "example": "5e5ea5c168981", + "nullable": true + }, + "domain": { + "type": "string", + "description": "Domain cache tag.", + "example": "function.example.com", + "nullable": true + }, + "resource": { + "type": "string", + "description": "Resource type cache tag.", + "example": "function", + "nullable": true + }, + "function": { + "type": "string", + "description": "Function cache tag.", + "example": "5e5ea5c168980", + "nullable": true + }, + "site": { + "type": "string", + "description": "Site cache tag.", + "example": "5e5ea5c168980", + "nullable": true + } + }, + "example": { + "project": "5e5ea5c16897e", + "team": "5e5ea5c16897f", + "deployment": "5e5ea5c168981", + "domain": "function.example.com", + "resource": "function", + "function": "5e5ea5c168980", + "site": "5e5ea5c168980" + } + }, + "usageBillingPlan": { + "description": "usageBillingPlan", + "type": "object", + "properties": { + "bandwidth": { + "type": "object", + "description": "Bandwidth additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "executions": { + "type": "object", + "description": "Executions additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "member": { + "type": "object", + "description": "Member additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ], + "nullable": true + }, + "realtime": { + "type": "object", + "description": "Realtime additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "realtimeMessages": { + "type": "object", + "description": "Realtime messages additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "realtimeBandwidth": { + "type": "object", + "description": "Realtime bandwidth additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ], + "nullable": true + }, + "storage": { + "type": "object", + "description": "Storage additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "users": { + "type": "object", + "description": "User additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "GBHours": { + "type": "object", + "description": "GBHour additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "imageTransformations": { + "type": "object", + "description": "Image transformation additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "credits": { + "type": "object", + "description": "Credits additional resources", + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ], + "nullable": true + } + }, + "required": [ + "bandwidth", + "executions", + "realtime", + "realtimeMessages", + "storage", + "users", + "GBHours", + "imageTransformations" + ], + "example": { + "bandwidth": null, + "executions": null, + "member": null, + "realtime": null, + "realtimeMessages": null, + "realtimeBandwidth": null, + "storage": null, + "users": null, + "GBHours": null, + "imageTransformations": null, + "credits": null + } + }, + "usageOrganization": { + "description": "Organization", + "type": "object", + "properties": { + "bandwidth": { + "type": "array", + "description": "Aggregated stats for number of requests.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "users": { + "type": "array", + "description": "Aggregated stats for consumed bandwidth.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "executions": { + "type": "array", + "description": "Aggregated stats for function executions.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "databasesReads": { + "type": "array", + "description": "Aggregated stats for database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "databasesWrites": { + "type": "array", + "description": "Aggregated stats for database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "imageTransformations": { + "type": "array", + "description": "Aggregated stats for file transformations.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "imageTransformationsTotal": { + "type": "integer", + "description": "Aggregated stats for total file transformations.", + "format": "int32", + "example": 0 + }, + "screenshotsGenerated": { + "type": "array", + "description": "Aggregated stats for file transformations.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "screenshotsGeneratedTotal": { + "type": "integer", + "description": "Aggregated stats for total file transformations.", + "format": "int32", + "example": 0 + }, + "usersTotal": { + "type": "integer", + "description": "Aggregated stats for total users.", + "format": "int32", + "example": 0 + }, + "executionsTotal": { + "type": "integer", + "description": "Aggregated stats for total executions.", + "format": "int32", + "example": 0 + }, + "executionsMBSecondsTotal": { + "type": "integer", + "description": "Aggregated stats for function executions in mb seconds.", + "format": "int32", + "example": 0 + }, + "buildsMBSecondsTotal": { + "type": "integer", + "description": "Aggregated stats for function builds in mb seconds.", + "format": "int32", + "example": 0 + }, + "filesStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total file storage.", + "format": "int32", + "example": 0 + }, + "buildsStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total builds storage.", + "format": "int32", + "example": 0 + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total deployments storage.", + "format": "int32", + "example": 0 + }, + "databasesStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total databases storage.", + "format": "int32", + "example": 0 + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Aggregated stats for total databases reads.", + "format": "int32", + "example": 0 + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Aggregated stats for total databases writes.", + "format": "int32", + "example": 0 + }, + "backupsStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total backups storage.", + "format": "int32", + "example": 0 + }, + "storageTotal": { + "type": "integer", + "description": "Aggregated stats for total storage.", + "format": "int32", + "example": 0 + }, + "authPhoneTotal": { + "type": "integer", + "description": "Aggregated stats for total auth phone.", + "format": "int32", + "example": 0 + }, + "authPhoneEstimate": { + "type": "integer", + "description": "Aggregated stats for total auth phone estimation.", + "format": "int32", + "example": 0 + }, + "projects": { + "type": "array", + "description": "Aggregated stats for each projects.", + "items": { + "$ref": "#\/components\/schemas\/usageOrganizationProject" + }, + "example": [] + }, + "realtimeConnections": { + "type": "array", + "description": "Aggregated stats for realtime connections.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "realtimeConnectionsTotal": { + "type": "integer", + "description": "Aggregated stats for total realtime connections.", + "format": "int32", + "example": 0 + }, + "realtimeMessages": { + "type": "array", + "description": "Aggregated stats for realtime messages.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "realtimeMessagesTotal": { + "type": "integer", + "description": "Aggregated stats for total realtime messages.", + "format": "int32", + "example": 0 + }, + "realtimeBandwidth": { + "type": "array", + "description": "Aggregated stats for realtime bandwidth.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "example": [] + }, + "realtimeBandwidthTotal": { + "type": "integer", + "description": "Aggregated stats for total realtime bandwidth.", + "format": "int32", + "example": 0 + } + }, + "required": [ + "bandwidth", + "users", + "executions", + "databasesReads", + "databasesWrites", + "imageTransformations", + "imageTransformationsTotal", + "screenshotsGenerated", + "screenshotsGeneratedTotal", + "usersTotal", + "executionsTotal", + "executionsMBSecondsTotal", + "buildsMBSecondsTotal", + "filesStorageTotal", + "buildsStorageTotal", + "deploymentsStorageTotal", + "databasesStorageTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "backupsStorageTotal", + "storageTotal", + "authPhoneTotal", + "authPhoneEstimate", + "projects", + "realtimeConnections", + "realtimeConnectionsTotal", + "realtimeMessages", + "realtimeMessagesTotal", + "realtimeBandwidth", + "realtimeBandwidthTotal" + ], + "example": { + "bandwidth": [], + "users": [], + "executions": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0, + "screenshotsGenerated": [], + "screenshotsGeneratedTotal": 0, + "usersTotal": 0, + "executionsTotal": 0, + "executionsMBSecondsTotal": 0, + "buildsMBSecondsTotal": 0, + "filesStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "databasesStorageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "backupsStorageTotal": 0, + "storageTotal": 0, + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "projects": [], + "realtimeConnections": [], + "realtimeConnectionsTotal": 0, + "realtimeMessages": [], + "realtimeMessagesTotal": 0, + "realtimeBandwidth": [], + "realtimeBandwidthTotal": 0 + } + }, + "usageOrganizationProject": { + "description": "OrganizationProject", + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "projectId", + "example": "5e5ea5c16897e" + }, + "bandwidth": { + "type": "integer", + "description": "Aggregated stats for number of requests.", + "format": "int32", + "example": 0 + }, + "users": { + "type": "integer", + "description": "Aggregated stats for consumed bandwidth.", + "format": "int32", + "example": 0 + }, + "executions": { + "type": "integer", + "description": "Aggregated stats for function executions.", + "format": "int32", + "example": 0 + }, + "databasesReads": { + "type": "integer", + "description": "Aggregated stats for database reads.", + "format": "int32", + "example": 0 + }, + "databasesWrites": { + "type": "integer", + "description": "Aggregated stats for database writes.", + "format": "int32", + "example": 0 + }, + "executionsMBSeconds": { + "type": "integer", + "description": "Aggregated stats for function executions in mb seconds.", + "format": "int32", + "example": 0 + }, + "buildsMBSeconds": { + "type": "integer", + "description": "Aggregated stats for function builds in mb seconds.", + "format": "int32", + "example": 0 + }, + "storage": { + "type": "integer", + "description": "Aggregated stats for number of documents.", + "format": "int32", + "example": 0 + }, + "authPhoneTotal": { + "type": "integer", + "description": "Aggregated stats for phone authentication.", + "format": "int32", + "example": 0 + }, + "authPhoneEstimate": { + "type": "number", + "description": "Aggregated stats for phone authentication estimated cost.", + "format": "double", + "example": 0 + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Aggregated stats for total databases reads.", + "format": "int32", + "example": 0 + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Aggregated stats for total databases writes.", + "format": "int32", + "example": 0 + }, + "imageTransformations": { + "type": "integer", + "description": "Aggregated stats for file transformations.", + "format": "int32", + "example": 0 + }, + "imageTransformationsTotal": { + "type": "integer", + "description": "Aggregated stats for total file transformations.", + "format": "int32", + "example": 0 + }, + "screenshotsGenerated": { + "type": "integer", + "description": "Aggregated stats for file transformations.", + "format": "int32", + "example": 0 + }, + "screenshotsGeneratedTotal": { + "type": "integer", + "description": "Aggregated stats for total file transformations.", + "format": "int32", + "example": 0 + }, + "realtimeConnections": { + "type": "integer", + "description": "Aggregated stats for realtime connections.", + "format": "int32", + "example": 0 + }, + "realtimeMessages": { + "type": "integer", + "description": "Aggregated stats for realtime messages.", + "format": "int32", + "example": 0 + }, + "realtimeBandwidth": { + "type": "integer", + "description": "Aggregated stats for realtime bandwidth.", + "format": "int32", + "example": 0 + } + }, + "required": [ + "projectId", + "bandwidth", + "users", + "executions", + "databasesReads", + "databasesWrites", + "executionsMBSeconds", + "buildsMBSeconds", + "storage", + "authPhoneTotal", + "authPhoneEstimate", + "databasesReadsTotal", + "databasesWritesTotal", + "imageTransformations", + "imageTransformationsTotal", + "screenshotsGenerated", + "screenshotsGeneratedTotal", + "realtimeConnections", + "realtimeMessages", + "realtimeBandwidth" + ], + "example": { + "projectId": "5e5ea5c16897e", + "bandwidth": 0, + "users": 0, + "executions": [], + "databasesReads": 0, + "databasesWrites": 0, + "executionsMBSeconds": 0, + "buildsMBSeconds": 0, + "storage": [], + "authPhoneTotal": [], + "authPhoneEstimate": [], + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "imageTransformations": 0, + "imageTransformationsTotal": 0, + "screenshotsGenerated": 0, + "screenshotsGeneratedTotal": 0, + "realtimeConnections": 0, + "realtimeMessages": 0, + "realtimeBandwidth": 0 + } + }, + "usageResources": { + "description": "Resource", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Invoice name", + "example": "" + }, + "value": { + "type": "integer", + "description": "Invoice value", + "format": "int32", + "example": 0 + }, + "amount": { + "type": "number", + "description": "Invoice amount", + "format": "double", + "example": 500 + }, + "rate": { + "type": "number", + "description": "Invoice rate", + "format": "double", + "example": 12.5 + }, + "desc": { + "type": "string", + "description": "Invoice description", + "example": "Your monthly recurring Pro plan." + }, + "resourceId": { + "type": "string", + "description": "Resource ID", + "example": "" + }, + "type": { + "type": "string", + "description": "Dedicated database engine type for per-database line items (e.g. postgresql). Empty for other resources.", + "example": "postgresql" + }, + "specification": { + "type": "string", + "description": "Dedicated database specification slug for per-database line items (e.g. s-2vcpu-2gb). Empty for other resources.", + "example": "s-2vcpu-2gb" + } + }, + "required": [ + "name", + "value", + "amount", + "rate", + "desc", + "resourceId", + "type", + "specification" + ], + "example": { + "name": "", + "value": 0, + "amount": 500, + "rate": 12.5, + "desc": "Your monthly recurring Pro plan.", + "resourceId": "", + "type": "postgresql", + "specification": "s-2vcpu-2gb" + } + }, + "app": { + "description": "App", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "App ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "App creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "App update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Application name.", + "example": "My Application" + }, + "description": { + "type": "string", + "description": "Application description shown to users during OAuth2 consent.", + "example": "Connect your workspace to My Application." + }, + "clientUri": { + "type": "string", + "description": "Application homepage URL shown to users during OAuth2 consent.", + "example": "https:\/\/example.com" + }, + "logoUri": { + "type": "string", + "description": "Application logo URL shown to users during OAuth2 consent.", + "example": "https:\/\/example.com\/logo.png" + }, + "privacyPolicyUrl": { + "type": "string", + "description": "Application privacy policy URL shown to users during OAuth2 consent.", + "example": "https:\/\/example.com\/privacy" + }, + "termsUrl": { + "type": "string", + "description": "Application terms of service URL shown to users during OAuth2 consent.", + "example": "https:\/\/example.com\/terms" + }, + "contacts": { + "type": "array", + "description": "Application support or security contact emails.", + "items": { + "type": "string" + }, + "example": [ + "support@example.com" + ] + }, + "tagline": { + "type": "string", + "description": "Application tagline shown to users during OAuth2 consent.", + "example": "Automate your workspace." + }, + "tags": { + "type": "array", + "description": "Application tags shown to users during OAuth2 consent.", + "items": { + "type": "string" + }, + "example": [ + "productivity", + "automation" + ] + }, + "labels": { + "type": "array", + "description": "Application labels. Read-only for clients; only a server SDK using a project API key can update them.", + "items": { + "type": "string" + }, + "example": [ + "featured" + ] + }, + "images": { + "type": "array", + "description": "Application image URLs shown to users during OAuth2 consent.", + "items": { + "type": "string" + }, + "example": [ + "https:\/\/example.com\/screenshot.png" + ] + }, + "supportUrl": { + "type": "string", + "description": "Application support URL shown to users during OAuth2 consent.", + "example": "https:\/\/example.com\/support" + }, + "dataDeletionUrl": { + "type": "string", + "description": "Application data deletion URL shown to users during OAuth2 consent.", + "example": "https:\/\/example.com\/data-deletion" + }, + "redirectUris": { + "type": "array", + "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", + "items": { + "type": "string" + }, + "example": [ + "https:\/\/example.com\/callback" + ] + }, + "postLogoutRedirectUris": { + "type": "array", + "description": "List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session.", + "items": { + "type": "string" + }, + "example": [ + "https:\/\/example.com\/logged-out" + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the app is enabled or not.", + "example": true + }, + "type": { + "type": "string", + "description": "OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret.", + "example": "confidential" + }, + "deviceFlow": { + "type": "boolean", + "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", + "example": false + }, + "teamId": { + "type": "string", + "description": "ID of team that owns the application, if owned by team. Otherwise, user ID will be used.", + "example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", + "example": "5e5ea5c16897e" + }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only.", + "items": { + "type": "string" + }, + "example": [ + "organization:organization.read" + ] + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Empty for no redirect.", + "example": "https:\/\/example.com\/setup" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "example": [] + } + }, + "required": [ + "$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" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Application", + "description": "Connect your workspace to My Application.", + "clientUri": "https:\/\/example.com", + "logoUri": "https:\/\/example.com\/logo.png", + "privacyPolicyUrl": "https:\/\/example.com\/privacy", + "termsUrl": "https:\/\/example.com\/terms", + "contacts": [ + "support@example.com" + ], + "tagline": "Automate your workspace.", + "tags": [ + "productivity", + "automation" + ], + "labels": [ + "featured" + ], + "images": [ + "https:\/\/example.com\/screenshot.png" + ], + "supportUrl": "https:\/\/example.com\/support", + "dataDeletionUrl": "https:\/\/example.com\/data-deletion", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "postLogoutRedirectUris": [ + "https:\/\/example.com\/logged-out" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "installationScopes": [ + "organization:organization.read" + ], + "installationRedirectUrl": "https:\/\/example.com\/setup", + "secrets": [] + } + }, + "appSecret": { + "description": "AppSecret", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Secret ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Secret creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Secret update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "Application ID this secret belongs to.", + "example": "5e5ea5c16897e" + }, + "secret": { + "type": "string", + "description": "Always empty. The application client secret is returned only once, in the response of the createSecret method.", + "example": "" + }, + "hint": { + "type": "string", + "description": "Last few characters of the client secret, used to help identify it.", + "example": "f5c6c7" + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the secret.", + "example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the secret.", + "example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "appSecretPlaintext": { + "description": "AppSecretPlaintext", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Secret ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Secret creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Secret update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "Application ID this secret belongs to.", + "example": "5e5ea5c16897e" + }, + "secret": { + "type": "string", + "description": "Application client secret. Returned only when the secret is created; subsequent reads always return an empty value.", + "example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "hint": { + "type": "string", + "description": "Last few characters of the client secret, used to help identify it.", + "example": "f5c6c7" + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the secret.", + "example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the secret.", + "example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "appScope": { + "description": "AppScope", + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Scope value as requested by apps.", + "example": "organization:organization.read" + }, + "description": { + "type": "string", + "description": "Human-readable description of what the scope grants.", + "example": "Access to read the organization" + }, + "type": { + "type": "string", + "description": "What the scope grants access to. One of `account`, `project`, or `organization`. Only `project` and `organization` scopes are installable.", + "example": "organization" + }, + "category": { + "type": "string", + "description": "Scope category, used to group scopes on consent and installation screens.", + "example": "Organization" + }, + "deprecated": { + "type": "boolean", + "description": "Whether the scope is deprecated. Deprecated scopes can still be requested but should not be offered for new grants.", + "example": false + } + }, + "required": [ + "value", + "description", + "type", + "category", + "deprecated" + ], + "example": { + "value": "organization:organization.read", + "description": "Access to read the organization", + "type": "organization", + "category": "Organization", + "deprecated": false + } + }, + "appInstallation": { + "description": "AppInstallation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Installation ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Installation creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Installation update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "ID of the installed application.", + "example": "5e5ea5c16897e" + }, + "teamId": { + "type": "string", + "description": "ID of the team the application is installed on.", + "example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated.", + "items": { + "type": "string" + }, + "example": [ + "organization:organization.read" + ] + }, + "authorizationDetails": { + "type": "array", + "description": "Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here.", + "items": { + "type": "object" + }, + "example": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ] + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the installation.", + "example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the installation.", + "example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time an access token was last issued for the installation in ISO 8601 format. Null if never used.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "teamId", + "scopes", + "authorizationDetails", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "teamId": "5e5ea5c16897e", + "scopes": [ + "organization:organization.read" + ], + "authorizationDetails": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ], + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "appKey": { + "description": "AppKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "App key ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "App key creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "App key update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "Application ID this app key belongs to.", + "example": "5e5ea5c16897e" + }, + "secret": { + "type": "string", + "description": "App key secret.", + "example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "hint": { + "type": "string", + "description": "Last few characters of the app key secret, used to help identify it.", + "example": "f5c6c7" + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the app key.", + "example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the app key.", + "example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time the app key was last used for authentication in ISO 8601 format. Null if never used.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "oauth2Authorize": { + "description": "OAuth2 Authorize", + "type": "object", + "properties": { + "grantId": { + "type": "string", + "description": "OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead.", + "example": "5e5ea5c16897e" + }, + "redirectUrl": { + "type": "string", + "description": "URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required.", + "example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "required": [ + "grantId", + "redirectUrl" + ], + "example": { + "grantId": "5e5ea5c16897e", + "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "oauth2Approve": { + "description": "OAuth2 Approve", + "type": "object", + "properties": { + "redirectUrl": { + "type": "string", + "description": "URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and\/or `id_token` along with the original `state`.", + "example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "required": [ + "redirectUrl" + ], + "example": { + "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "oauth2Reject": { + "description": "OAuth2 Reject", + "type": "object", + "properties": { + "redirectUrl": { + "type": "string", + "description": "URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error.", + "example": "https:\/\/example.com\/callback?error=access_denied&state=fghij" + } + }, + "required": [ + "redirectUrl" + ], + "example": { + "redirectUrl": "https:\/\/example.com\/callback?error=access_denied&state=fghij" + } + }, + "oauth2Grant": { + "description": "OAuth2 Grant", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Grant ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Grant creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Grant update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "ID of the user the grant belongs to.", + "example": "5e5ea5c16897e" + }, + "appId": { + "type": "string", + "description": "ID of the OAuth2 client (app) the grant was requested for.", + "example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Requested OAuth2 scopes the user is being asked to consent to.", + "items": { + "type": "string" + }, + "example": [ + "openid", + "email", + "profile" + ] + }, + "resources": { + "type": "array", + "description": "Requested RFC 8707 resource indicators the user is being asked to consent to.", + "items": { + "type": "string" + }, + "example": [ + "https:\/\/api.example.com\/" + ] + }, + "authorizationDetails": { + "type": "string", + "description": "Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" + }, + "prompt": { + "type": "string", + "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", + "example": "login" + }, + "redirectUri": { + "type": "string", + "description": "Redirect URI the user will be sent to after the flow completes.", + "example": "https:\/\/example.com\/callback" + }, + "authTime": { + "type": "integer", + "description": "Unix timestamp of when the user last authenticated.", + "format": "int32", + "example": 1592981250 + }, + "expire": { + "type": "string", + "description": "Grant expiration time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "appId", + "scopes", + "resources", + "authorizationDetails", + "prompt", + "redirectUri", + "authTime", + "expire" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "prompt": "login", + "redirectUri": "https:\/\/example.com\/callback", + "authTime": 1592981250, + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "oauth2DeviceAuthorization": { + "description": "OAuth2 Device Authorization", + "type": "object", + "properties": { + "device_code": { + "type": "string", + "description": "Device verification code used by the client to poll the token endpoint.", + "example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "user_code": { + "type": "string", + "description": "Short code the end user enters on the verification page.", + "example": "ABCD-EFGH" + }, + "verification_uri": { + "type": "string", + "description": "URL where the end user enters the user code.", + "example": "https:\/\/appwrite.io\/oauth2\/device" + }, + "verification_uri_complete": { + "type": "string", + "description": "Verification URL with the user code prefilled as a query parameter.", + "example": "https:\/\/appwrite.io\/oauth2\/device?user_code=ABCD-EFGH" + }, + "expires_in": { + "type": "integer", + "description": "Lifetime of the device code and user code in seconds.", + "format": "int32", + "example": 900 + }, + "interval": { + "type": "integer", + "description": "Minimum polling interval for the token endpoint in seconds.", + "format": "int32", + "example": 5 + } + }, + "required": [ + "device_code", + "user_code", + "verification_uri", + "verification_uri_complete", + "expires_in", + "interval" + ], + "example": { + "device_code": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "user_code": "ABCD-EFGH", + "verification_uri": "https:\/\/appwrite.io\/oauth2\/device", + "verification_uri_complete": "https:\/\/appwrite.io\/oauth2\/device?user_code=ABCD-EFGH", + "expires_in": 900, + "interval": 5 + } + }, + "oauth2PAR": { + "description": "OAuth2 PAR", + "type": "object", + "properties": { + "request_uri": { + "type": "string", + "description": "Authorization request handle to pass to the authorize endpoint.", + "example": "urn:appwrite:oauth2:request:5e5ea5c16897e" + }, + "expires_in": { + "type": "integer", + "description": "Lifetime of the authorization request handle in seconds.", + "format": "int32", + "example": 600 + } + }, + "required": [ + "request_uri", + "expires_in" + ], + "example": { + "request_uri": "urn:appwrite:oauth2:request:5e5ea5c16897e", + "expires_in": 600 + } + }, + "oauth2Token": { + "description": "OAuth2 Token", + "type": "object", + "properties": { + "access_token": { + "type": "string", + "description": "OAuth2 access token.", + "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." + }, + "token_type": { + "type": "string", + "description": "OAuth2 token type.", + "example": "Bearer" + }, + "expires_in": { + "type": "integer", + "description": "Access token lifetime in seconds.", + "format": "int32", + "example": 3600 + }, + "refresh_token": { + "type": "string", + "description": "OAuth2 refresh token.", + "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." + }, + "scope": { + "type": "string", + "description": "Space-separated scopes granted to the access token.", + "example": "openid email profile" + }, + "authorization_details": { + "type": "string", + "description": "Granted RFC 9396 authorization details as a JSON string.", + "example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", + "nullable": true + }, + "id_token": { + "type": "string", + "description": "OpenID Connect ID token. Returned when the `openid` scope is granted.", + "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", + "nullable": true + } + }, + "required": [ + "access_token", + "token_type", + "expires_in", + "refresh_token", + "scope" + ], + "example": { + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", + "token_type": "Bearer", + "expires_in": 3600, + "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", + "scope": "openid email profile", + "authorization_details": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", + "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." + } + }, + "oauth2Consent": { + "description": "OAuth2 Consent", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Consent ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Consent creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Consent update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "ID of the user the consent belongs to.", + "example": "5e5ea5c16897e" + }, + "appId": { + "type": "string", + "description": "ID of the registered app the consent was given to. Empty for URL-form (CIMD) clients.", + "example": "5e5ea5c16897e" + }, + "cimdUrl": { + "type": "string", + "description": "Client ID metadata document URL of the client the consent was given to. Empty for registered apps.", + "example": "https:\/\/example.com\/.well-known\/client-metadata.json" + }, + "scopes": { + "type": "array", + "description": "OAuth2 scopes the user consented to.", + "items": { + "type": "string" + }, + "example": [ + "openid", + "email", + "profile" + ] + }, + "resources": { + "type": "array", + "description": "RFC 8707 resource indicators the user consented to.", + "items": { + "type": "string" + }, + "example": [ + "https:\/\/api.example.com\/" + ] + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details the user consented to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" + }, + "expire": { + "type": "string", + "description": "Consent expiration time in ISO 8601 format. Empty when the consent has no token-bound expiry yet.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "appId", + "cimdUrl", + "scopes", + "resources", + "authorizationDetails", + "expire" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "cimdUrl": "https:\/\/example.com\/.well-known\/client-metadata.json", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "oauth2ConsentToken": { + "description": "OAuth2 Consent Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token family ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Token update date in ISO 8601 format. Refreshing the token family updates this.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "consentId": { + "type": "string", + "description": "ID of the consent the token family was issued under.", + "example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "ID of the user the token family belongs to.", + "example": "5e5ea5c16897e" + }, + "appId": { + "type": "string", + "description": "ID of the registered app the token family was issued to. Empty for URL-form (CIMD) clients.", + "example": "5e5ea5c16897e" + }, + "cimdUrl": { + "type": "string", + "description": "Client ID metadata document URL of the client the token family was issued to. Empty for registered apps.", + "example": "https:\/\/example.com\/.well-known\/client-metadata.json" + }, + "scopes": { + "type": "array", + "description": "OAuth2 scopes granted on the token family.", + "items": { + "type": "string" + }, + "example": [ + "openid", + "email", + "profile" + ] + }, + "resources": { + "type": "array", + "description": "RFC 8707 resource indicators granted on the token family.", + "items": { + "type": "string" + }, + "example": [ + "https:\/\/api.example.com\/" + ] + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted on the token family, as a JSON string. Each entry has a `type` plus project-defined fields.", + "example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" + }, + "expire": { + "type": "string", + "description": "Expiration time of the current access token of this family in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "consentId", + "userId", + "appId", + "cimdUrl", + "scopes", + "resources", + "authorizationDetails", + "expire" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "consentId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "cimdUrl": "https:\/\/example.com\/.well-known\/client-metadata.json", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "wafRule": { + "description": "WafRule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human friendly rule name.", + "example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "example": "functionId" + }, + "action": { + "description": "Action performed when the rule matches.", + "example": "deny", + "title": "WafRuleAction", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "bypass" + ], + "title": "bypass" + }, + { + "type": "string", + "enum": [ + "deny" + ], + "title": "deny" + }, + { + "type": "string", + "enum": [ + "challenge" + ], + "title": "challenge" + }, + { + "type": "string", + "enum": [ + "rateLimit" + ], + "title": "rateLimit" + }, + { + "type": "string", + "enum": [ + "redirect" + ], + "title": "redirect" + } + ] + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "format": "int32", + "example": 100 + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "example": true + }, + "conditions": { + "type": "array", + "description": "List of conditions evaluated for this rule.", + "items": { + "type": "object" + }, + "example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" + ], + "example": { + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] + } + }, + "wafRuleBypass": { + "description": "WafRuleBypass", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human friendly rule name.", + "example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "example": "functionId" + }, + "action": { + "description": "Action performed when the rule matches.", + "example": "deny", + "title": "WafRuleAction", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "bypass" + ], + "title": "bypass" + }, + { + "type": "string", + "enum": [ + "deny" + ], + "title": "deny" + }, + { + "type": "string", + "enum": [ + "challenge" + ], + "title": "challenge" + }, + { + "type": "string", + "enum": [ + "rateLimit" + ], + "title": "rateLimit" + }, + { + "type": "string", + "enum": [ + "redirect" + ], + "title": "redirect" + } + ] + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "format": "int32", + "example": 100 + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "example": true + }, + "conditions": { + "type": "array", + "description": "List of conditions evaluated for this rule.", + "items": { + "type": "object" + }, + "example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" + ], + "example": { + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] + } + }, + "wafRuleDeny": { + "description": "WafRuleDeny", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human friendly rule name.", + "example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "example": "functionId" + }, + "action": { + "description": "Action performed when the rule matches.", + "example": "deny", + "title": "WafRuleAction", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "bypass" + ], + "title": "bypass" + }, + { + "type": "string", + "enum": [ + "deny" + ], + "title": "deny" + }, + { + "type": "string", + "enum": [ + "challenge" + ], + "title": "challenge" + }, + { + "type": "string", + "enum": [ + "rateLimit" + ], + "title": "rateLimit" + }, + { + "type": "string", + "enum": [ + "redirect" + ], + "title": "redirect" + } + ] + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "format": "int32", + "example": 100 + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "example": true + }, + "conditions": { + "type": "array", + "description": "List of conditions evaluated for this rule.", + "items": { + "type": "object" + }, + "example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" + ], + "example": { + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] + } + }, + "wafRuleChallenge": { + "description": "WafRuleChallenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human friendly rule name.", + "example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "example": "functionId" + }, + "action": { + "description": "Action performed when the rule matches.", + "example": "deny", + "title": "WafRuleAction", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "bypass" + ], + "title": "bypass" + }, + { + "type": "string", + "enum": [ + "deny" + ], + "title": "deny" + }, + { + "type": "string", + "enum": [ + "challenge" + ], + "title": "challenge" + }, + { + "type": "string", + "enum": [ + "rateLimit" + ], + "title": "rateLimit" + }, + { + "type": "string", + "enum": [ + "redirect" + ], + "title": "redirect" + } + ] + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "format": "int32", + "example": 100 + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "example": true + }, + "conditions": { + "type": "array", + "description": "List of conditions evaluated for this rule.", + "items": { + "type": "object" + }, + "example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "example": {} + }, + "challengeType": { + "type": "string", + "description": "Challenge type enforced when the rule matches.", + "example": "compute" + }, + "difficulty": { + "type": "integer", + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest) enforced when the rule matches.", + "format": "int32", + "example": 3 + }, + "ttl": { + "type": "integer", + "description": "Seconds a visitor stays cleared after passing the challenge before being challenged again.", + "format": "int32", + "example": 1800 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "challengeType", + "difficulty", + "ttl" + ], + "example": { + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "challengeType": "compute", + "difficulty": 3, + "ttl": 1800 + } + }, + "wafRuleRateLimit": { + "description": "WafRuleRateLimit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human friendly rule name.", + "example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "example": "functionId" + }, + "action": { + "description": "Action performed when the rule matches.", + "example": "deny", + "title": "WafRuleAction", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "bypass" + ], + "title": "bypass" + }, + { + "type": "string", + "enum": [ + "deny" + ], + "title": "deny" + }, + { + "type": "string", + "enum": [ + "challenge" + ], + "title": "challenge" + }, + { + "type": "string", + "enum": [ + "rateLimit" + ], + "title": "rateLimit" + }, + { + "type": "string", + "enum": [ + "redirect" + ], + "title": "redirect" + } + ] + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "format": "int32", + "example": 100 + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "example": true + }, + "conditions": { + "type": "array", + "description": "List of conditions evaluated for this rule.", + "items": { + "type": "object" + }, + "example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "example": {} + }, + "limit": { + "type": "integer", + "description": "Maximum number of matching requests allowed for the given interval.", + "format": "int32", + "example": 1000 + }, + "interval": { + "type": "integer", + "description": "Interval in seconds for the rate limit window.", + "format": "int32", + "example": 60 + }, + "key": { + "type": "string", + "description": "Rate limit key: `ip` limits per client IP, `userId` limits per authenticated user.", + "example": "userId" + }, + "strategy": { + "type": "string", + "description": "Rate limit strategy: `fixedWindow`, `slidingWindow`, or `tokenBucket`.", + "example": "slidingWindow" + }, + "maxBucketSize": { + "type": "integer", + "description": "Maximum burst capacity in tokens, applied by the `tokenBucket` strategy. The sustained refill rate is `limit \/ interval`. Defaults to `limit`.", + "format": "int32", + "example": 200 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "limit", + "interval", + "key", + "strategy", + "maxBucketSize" + ], + "example": { + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "limit": 1000, + "interval": 60, + "key": "userId", + "strategy": "slidingWindow", + "maxBucketSize": 200 + } + }, + "wafRuleRedirect": { + "description": "WafRuleRedirect", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human friendly rule name.", + "example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "example": "functionId" + }, + "action": { + "description": "Action performed when the rule matches.", + "example": "deny", + "title": "WafRuleAction", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "bypass" + ], + "title": "bypass" + }, + { + "type": "string", + "enum": [ + "deny" + ], + "title": "deny" + }, + { + "type": "string", + "enum": [ + "challenge" + ], + "title": "challenge" + }, + { + "type": "string", + "enum": [ + "rateLimit" + ], + "title": "rateLimit" + }, + { + "type": "string", + "enum": [ + "redirect" + ], + "title": "redirect" + } + ] + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "format": "int32", + "example": 100 + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "example": true + }, + "conditions": { + "type": "array", + "description": "List of conditions evaluated for this rule.", + "items": { + "type": "object" + }, + "example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "example": {} + }, + "location": { + "type": "string", + "description": "Target location for the redirect.", + "example": "\/maintenance" + }, + "statusCode": { + "type": "integer", + "description": "HTTP status code used for the redirect.", + "format": "int32", + "example": 301 + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "location", + "statusCode" + ], + "example": { + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "location": "\/maintenance", + "statusCode": 301 + } + }, + "managerWafRuleList": { + "description": "Manager WAF rule list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rules that matched your query.", + "format": "int32", + "example": 5 + }, + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "$ref": "#\/components\/schemas\/managerWafRule" + }, + "example": [] + } + }, + "required": [ + "total", + "rules" + ], + "example": { + "total": 5, + "rules": "" + } + }, + "wafRuleList": { + "description": "WAF rule list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rules that matched your query.", + "format": "int32", + "example": 5 + }, + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "$ref": "#\/components\/schemas\/wafRule" + }, + "example": [] + } + }, + "required": [ + "total", + "rules" + ], + "example": { + "total": 5, + "rules": "" + } + }, + "oauth2Project": { + "description": "OAuth2 Project", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID.", + "example": "5e5ea5c16897e" + }, + "region": { + "type": "string", + "description": "Region ID the project is deployed in.", + "example": "fra" + }, + "endpoint": { + "type": "string", + "description": "API endpoint of the region the project is deployed in. Empty when the region has no public hostname configured.", + "example": "https:\/\/fra.cloud.appwrite.io\/v1" + } + }, + "required": [ + "$id", + "region", + "endpoint" + ], + "example": { + "$id": "5e5ea5c16897e", + "region": "fra", + "endpoint": "https:\/\/fra.cloud.appwrite.io\/v1" + } + }, + "oauth2Organization": { + "description": "OAuth2 Organization", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Organization ID.", + "example": "5e5ea5c16897e" + } + }, + "required": [ + "$id" + ], + "example": { + "$id": "5e5ea5c16897e" + } + }, + "oauth2ProjectList": { + "description": "OAuth2 accessible projects list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of projects that matched your query.", + "format": "int32", + "example": 5 + }, + "projects": { + "type": "array", + "description": "List of projects.", + "items": { + "$ref": "#\/components\/schemas\/oauth2Project" + }, + "example": [] + } + }, + "required": [ + "total", + "projects" + ], + "example": { + "total": 5, + "projects": "" + } + }, + "oauth2OrganizationList": { + "description": "OAuth2 accessible organizations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of organizations that matched your query.", + "format": "int32", + "example": 5 + }, + "organizations": { + "type": "array", + "description": "List of organizations.", + "items": { + "$ref": "#\/components\/schemas\/oauth2Organization" + }, + "example": [] + } + }, + "required": [ + "total", + "organizations" + ], + "example": { + "total": 5, + "organizations": "" + } + }, + "oauth2ConsentList": { + "description": "OAuth2 consents list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of consents that matched your query.", + "format": "int32", + "example": 5 + }, + "consents": { + "type": "array", + "description": "List of consents.", + "items": { + "$ref": "#\/components\/schemas\/oauth2Consent" + }, + "example": [] + } + }, + "required": [ + "total", + "consents" + ], + "example": { + "total": 5, + "consents": "" + } + }, + "oauth2ConsentTokenList": { + "description": "OAuth2 consent tokens list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tokens that matched your query.", + "format": "int32", + "example": 5 + }, + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "$ref": "#\/components\/schemas\/oauth2ConsentToken" + }, + "example": [] + } + }, + "required": [ + "total", + "tokens" + ], + "example": { + "total": 5, + "tokens": "" + } + }, + "activityEventList": { + "description": "Activity event list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of events that matched your query.", + "format": "int32", + "example": 5 + }, + "events": { + "type": "array", + "description": "List of events.", + "items": { + "$ref": "#\/components\/schemas\/activityEvent" + }, + "example": [] + } + }, + "required": [ + "total", + "events" + ], + "example": { + "total": 5, + "events": "" + } + }, + "addonList": { + "description": "Addons list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of addons that matched your query.", + "format": "int32", + "example": 5 + }, + "addons": { + "type": "array", + "description": "List of addons.", + "items": { + "$ref": "#\/components\/schemas\/addon" + }, + "example": [] + } + }, + "required": [ + "total", + "addons" + ], + "example": { + "total": 5, + "addons": "" + } + }, + "aggregationTeamList": { + "description": "Aggregation team list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of aggregations that matched your query.", + "format": "int32", + "example": 5 + }, + "aggregations": { + "type": "array", + "description": "List of aggregations.", + "items": { + "$ref": "#\/components\/schemas\/aggregationTeam" + }, + "example": [] + } + }, + "required": [ + "total", + "aggregations" + ], + "example": { + "total": 5, + "aggregations": "" + } + }, + "backupArchiveList": { + "description": "Backup archive list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of archives that matched your query.", + "format": "int32", + "example": 5 + }, + "archives": { + "type": "array", + "description": "List of archives.", + "items": { + "$ref": "#\/components\/schemas\/backupArchive" + }, + "example": [] + } + }, + "required": [ + "total", + "archives" + ], + "example": { + "total": 5, + "archives": "" + } + }, + "backupPolicyList": { + "description": "Backup policy list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of policies that matched your query.", + "format": "int32", + "example": 5 + }, + "policies": { + "type": "array", + "description": "List of policies.", + "items": { + "$ref": "#\/components\/schemas\/backupPolicy" + }, + "example": [] + } + }, + "required": [ + "total", + "policies" + ], + "example": { + "total": 5, + "policies": "" + } + }, + "backupRestorationList": { + "description": "Backup restoration list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of restorations that matched your query.", + "format": "int32", + "example": 5 + }, + "restorations": { + "type": "array", + "description": "List of restorations.", + "items": { + "$ref": "#\/components\/schemas\/backupRestoration" + }, + "example": [] + } + }, + "required": [ + "total", + "restorations" + ], + "example": { + "total": 5, + "restorations": "" + } + }, + "billingAddressList": { + "description": "Billing address list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of billingAddresses that matched your query.", + "format": "int32", + "example": 5 + }, + "billingAddresses": { + "type": "array", + "description": "List of billingAddresses.", + "items": { + "$ref": "#\/components\/schemas\/billingAddress" + }, + "example": [] + } + }, + "required": [ + "total", + "billingAddresses" + ], + "example": { + "total": 5, + "billingAddresses": "" + } + }, + "invoiceList": { + "description": "Billing invoices list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of invoices that matched your query.", + "format": "int32", + "example": 5 + }, + "invoices": { + "type": "array", + "description": "List of invoices.", + "items": { + "$ref": "#\/components\/schemas\/invoice" + }, + "example": [] + } + }, + "required": [ + "total", + "invoices" + ], + "example": { + "total": 5, + "invoices": "" + } + }, + "billingPlanList": { + "description": "Billing plan list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of plans that matched your query.", + "format": "int32", + "example": 5 + }, + "plans": { + "type": "array", + "description": "List of plans.", + "items": { + "$ref": "#\/components\/schemas\/billingPlan" + }, + "example": [] + } + }, + "required": [ + "total", + "plans" + ], + "example": { + "total": 5, + "plans": "" + } + }, + "managerBlockList": { + "description": "Manager blocks list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of blocks that matched your query.", + "format": "int32", + "example": 5 + }, + "blocks": { + "type": "array", + "description": "List of blocks.", + "items": { + "$ref": "#\/components\/schemas\/managerBlock" + }, + "example": [] + } + }, + "required": [ + "total", + "blocks" + ], + "example": { + "total": 5, + "blocks": "" + } + }, + "databaseMigrationList": { + "description": "Database Migrations List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of migrations that matched your query.", + "format": "int32", + "example": 5 + }, + "migrations": { + "type": "array", + "description": "List of migrations.", + "items": { + "$ref": "#\/components\/schemas\/databaseMigration" + }, + "example": [] + } + }, + "required": [ + "total", + "migrations" + ], + "example": { + "total": 5, + "migrations": "" + } + }, + "dedicatedDatabaseList": { + "description": "Dedicated databases list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases that matched your query.", + "format": "int32", + "example": 5 + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + }, + "example": [] + } + }, + "required": [ + "total", + "databases" + ], + "example": { + "total": 5, + "databases": "" + } + }, + "dnsRecordsList": { + "description": "DNS records list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of dnsRecords that matched your query.", + "format": "int32", + "example": 5 + }, + "dnsRecords": { + "type": "array", + "description": "List of dnsRecords.", + "items": { + "$ref": "#\/components\/schemas\/dnsRecord" + }, + "example": [] + } + }, + "required": [ + "total", + "dnsRecords" + ], + "example": { + "total": 5, + "dnsRecords": "" + } + }, + "domainSuggestionsList": { + "description": "Domain suggestions list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of suggestions that matched your query.", + "format": "int32", + "example": 5 + }, + "suggestions": { + "type": "array", + "description": "List of suggestions.", + "items": { + "$ref": "#\/components\/schemas\/domainSuggestion" + }, + "example": [] + } + }, + "required": [ + "total", + "suggestions" + ], + "example": { + "total": 5, + "suggestions": "" + } + }, + "domainPricesList": { + "description": "Domain prices list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of prices that matched your query.", + "format": "int32", + "example": 5 + }, + "prices": { + "type": "array", + "description": "List of prices.", + "items": { + "$ref": "#\/components\/schemas\/domainPrice" + }, + "example": [] + } + }, + "required": [ + "total", + "prices" + ], + "example": { + "total": 5, + "prices": "" + } + }, + "domainsList": { + "description": "Domains list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of domains that matched your query.", + "format": "int32", + "example": 5 + }, + "domains": { + "type": "array", + "description": "List of domains.", + "items": { + "$ref": "#\/components\/schemas\/domain" + }, + "example": [] + } + }, + "required": [ + "total", + "domains" + ], + "example": { + "total": 5, + "domains": "" + } + }, + "organizationList": { + "description": "Organizations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "format": "int32", + "example": 5 + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "$ref": "#\/components\/schemas\/organization" + }, + "example": [] + } + }, + "required": [ + "total", + "teams" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "paymentMethodList": { + "description": "Payment methods list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of paymentMethods that matched your query.", + "format": "int32", + "example": 5 + }, + "paymentMethods": { + "type": "array", + "description": "List of paymentMethods.", + "items": { + "$ref": "#\/components\/schemas\/paymentMethod" + }, + "example": [] + } + }, + "required": [ + "total", + "paymentMethods" + ], + "example": { + "total": 5, + "paymentMethods": "" + } + }, + "postgresExtensionList": { + "description": "Postgres extensions list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of extensions that matched your query.", + "format": "int32", + "example": 5 + }, + "extensions": { + "type": "array", + "description": "List of extensions.", + "items": { + "$ref": "#\/components\/schemas\/postgresExtension" + }, + "example": [] + } + }, + "required": [ + "total", + "extensions" + ], + "example": { + "total": 5, + "extensions": "" + } + }, + "consoleRegionList": { + "description": "Regions list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of regions that matched your query.", + "format": "int32", + "example": 5 + }, + "regions": { + "type": "array", + "description": "List of regions.", + "items": { + "$ref": "#\/components\/schemas\/consoleRegion" + }, + "example": [] + } + }, + "required": [ + "total", + "regions" + ], + "example": { + "total": 5, + "regions": "" + } + }, + "appsList": { + "description": "Apps list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of apps that matched your query.", + "format": "int32", + "example": 5 + }, + "apps": { + "type": "array", + "description": "List of apps.", + "items": { + "$ref": "#\/components\/schemas\/app" + }, + "example": [] + } + }, + "required": [ + "total", + "apps" + ], + "example": { + "total": 5, + "apps": "" + } + }, + "appSecretList": { + "description": "App secrets list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of secrets that matched your query.", + "format": "int32", + "example": 5 + }, + "secrets": { + "type": "array", + "description": "List of secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "example": [] + } + }, + "required": [ + "total", + "secrets" + ], + "example": { + "total": 5, + "secrets": "" + } + }, + "appScopeList": { + "description": "App scopes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of scopes that matched your query.", + "format": "int32", + "example": 5 + }, + "scopes": { + "type": "array", + "description": "List of scopes.", + "items": { + "$ref": "#\/components\/schemas\/appScope" + }, + "example": [] + } + }, + "required": [ + "total", + "scopes" + ], + "example": { + "total": 5, + "scopes": "" + } + }, + "appInstallationList": { + "description": "App installations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "format": "int32", + "example": 5 + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/appInstallation" + }, + "example": [] + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "appKeyList": { + "description": "App keys list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "format": "int32", + "example": 5 + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/appKey" + }, + "example": [] + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } + } + }, + "securitySchemes": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ], + "demo": "<YOUR_PROJECT_ID>" + } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ], + "demo": "<YOUR_JWT>" + } + }, + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "The OAuth access token to authenticate with", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ] + } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ], + "demo": "en" + } + }, + "Session": { + "type": "apiKey", + "name": "X-Appwrite-Session", + "description": "The user session to authenticate with", + "in": "header", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ] + } + }, + "Cookie": { + "type": "apiKey", + "name": "Cookie", + "description": "The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes.", + "in": "header", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ] + } + }, + "ImpersonateUserId": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Id", + "description": "Impersonate a user by ID", + "in": "header", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ] + } + }, + "ImpersonateUserEmail": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Email", + "description": "Impersonate a user by email", + "in": "header", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ] + } + }, + "ImpersonateUserPhone": { + "type": "apiKey", + "name": "X-Appwrite-Impersonate-User-Phone", + "description": "Impersonate a user by phone", + "in": "header", + "x-appwrite": { + "platforms": [ + "client", + "server", + "console" + ] + } + }, + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { + "platforms": [ + "server", + "console", + "manager" + ], + "demo": "<YOUR_API_KEY>" + } + }, + "Organization": { + "type": "apiKey", + "name": "X-Appwrite-Organization", + "description": "Your organization ID", + "in": "header", + "x-appwrite": { + "platforms": [ + "server", + "console" + ], + "demo": "<YOUR_ORGANIZATION_ID>" + } + }, + "ForwardedUserAgent": { + "type": "apiKey", + "name": "X-Forwarded-User-Agent", + "description": "The user agent string of the client that made the request", + "in": "header", + "x-appwrite": { + "platforms": [ + "server" + ] + } + }, + "Mode": { + "type": "apiKey", + "name": "X-Appwrite-Mode", + "description": "", + "in": "header", + "x-appwrite": { + "platforms": [ + "console" + ], + "demo": "" + } + }, + "Platform": { + "type": "apiKey", + "name": "X-Appwrite-Platform", + "description": "The platform type (Appwrite or Imagine)", + "in": "header", + "x-appwrite": { + "platforms": [ + "console" + ] + } + } + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https:\/\/appwrite.io\/docs" + } +} \ No newline at end of file